#include <pcap.h>
#include <net/ethernet.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/if_ether.h>
#include <netinet/in_systm.h>
#include <netinet/ip.h>
#include <netinet/udp.h>
#include <netinet/tcp.h>
#include <netinet/ip_icmp.h>
#include "Codifier.h"
Include dependency graph for anonymizer0_3_3.cpp:
Go to the source code of this file.
Classes | |
struct | options |
struct | pseudo1 |
Defines | |
#define | PACKET_SIZE 65535 |
Functions | |
void | sec_to_min (long seconds, double usec) |
pcap_t * | pcap_open_live (const char *device, int snaplen, int promisc, int to_ms, char *errbuf) |
pcap_t * | pcap_open_offline (const char *input, char *errbuf) |
int | pcap_findalldevs (pcap_if_t **alldevsp, char *errbuf) |
pcap_dumper_t * | pcap_dump_open (pcap_t *descr, const char *output) |
void | pcap_dump (u_char *user, const struct pcap_pkthdr *h, const u_char *sp) |
void | pcap_dump_close (pcap_dumper_t *p) |
void | pcap_close (pcap_t *p) |
const u_char * | pcap_next (pcap_t *p, struct pcap_pkthdr *h) |
int | pcap_datalink (pcap_t *p) |
options | readOptions (int argcc, char **argv, int *count) |
void | processIP (const u_char *datipkt, struct pcap_pkthdr hdr, pcap_dumper_t *descrOUT, options o, Codifier &) |
void | processARP (const u_char *datipkt, struct pcap_pkthdr hdr, pcap_dumper_t *descrOUT, options o, Codifier &codificatore) |
void | processUDP (const u_char *datipkt, struct pcap_pkthdr hdr, pcap_dumper_t *descrOUT, options o) |
void | processTCP (const u_char *datipkt, struct pcap_pkthdr hdr, pcap_dumper_t *descrOUT, options o) |
void | processICMP (const u_char *datipkt, struct pcap_pkthdr hdr, pcap_dumper_t *descrOUT, options o, Codifier &codificatore) |
int | handle_ip (const struct ip *ip, int *lev4) |
int | Checksum (const u_char *Buff, int BufLen) |
int | checksumTCPUDP (const struct in_addr src, const struct in_addr dst, const u_int8_t protocol, const u_int16_t length, u_char *pkth) |
void | showHelp () |
int | main (int argc, char **argv) |
Variables | |
int | pktprocessed |
int | pktanonymized |
int | pktdropped |
|
Definition at line 33 of file anonymizer0_3_3.cpp. Referenced by main(). |
|
Definition at line 1002 of file anonymizer0_3_3.cpp. Referenced by processICMP(), processIP(), processTCP(), and processUDP(). |
|
Definition at line 1023 of file anonymizer0_3_3.cpp. References pseudo1::dst, pseudo1::prot, pseudo1::src, pseudo1::transplen, and pseudo1::zeros. Referenced by processTCP(), and processUDP(). |
|
Definition at line 996 of file anonymizer0_3_3.cpp. Referenced by processICMP(), processIP(), processTCP(), and processUDP(). |
|
Definition at line 82 of file anonymizer0_3_3.cpp. References options::cutPayload, options::dimIPaddr, options::dimPayload, options::invalidOption, options::live, PACKET_SIZE, pcap_datalink(), pcap_dump_open(), pcap_findalldevs(), pcap_next(), pcap_open_live(), pktanonymized, pktdropped, pktprocessed, options::prefix, readOptions(), showHelp(), and options::verbose. Here is the call graph for this function: ![]() |
|
|
|
Referenced by main(). |
|
Referenced by processARP(), processICMP(), processIP(), processTCP(), and processUDP(). |
|
|
|
Referenced by main(). |
|
Referenced by main(). |
|
Referenced by main(). |
|
Referenced by main(). |
|
|
|
Definition at line 529 of file anonymizer0_3_3.cpp. References Codifier::Codifica(), options::dimIPaddr, pcap_dump(), and options::prefix. Here is the call graph for this function: ![]() |
|
Definition at line 801 of file anonymizer0_3_3.cpp. References Checksum(), Codifier::Codifica(), options::cutPayload, options::dimIPaddr, options::dimPayload, handle_ip(), pcap_dump(), and options::prefix. Referenced by processIP(). Here is the call graph for this function: ![]() |
|
Definition at line 566 of file anonymizer0_3_3.cpp. References Checksum(), Codifier::Codifica(), options::cutPayload, options::dimIPaddr, options::dimPayload, handle_ip(), pcap_dump(), pktanonymized, pktdropped, options::prefix, processICMP(), processTCP(), processUDP(), and options::verbose. Here is the call graph for this function: ![]() |
|
Definition at line 740 of file anonymizer0_3_3.cpp. References Checksum(), checksumTCPUDP(), options::cutPayload, options::dimPayload, handle_ip(), pcap_dump(), and options::verbose. Referenced by processIP(). Here is the call graph for this function: ![]() |
|
Definition at line 668 of file anonymizer0_3_3.cpp. References Checksum(), checksumTCPUDP(), options::cutPayload, options::dimPayload, handle_ip(), and pcap_dump(). Referenced by processIP(). Here is the call graph for this function: ![]() |
|
Definition at line 372 of file anonymizer0_3_3.cpp. References options::cutPayload, options::dimIPaddr, options::dimPayload, options::invalidOption, options::live, options::prefix, showHelp(), and options::verbose. Referenced by main(). Here is the call graph for this function: ![]() |
|
Definition at line 337 of file anonymizer0_3_3.cpp. |
|
Definition at line 355 of file anonymizer0_3_3.cpp. Referenced by main(), and readOptions(). |
|
Definition at line 79 of file anonymizer0_3_3.cpp. Referenced by main(), and processIP(). |
|
Definition at line 79 of file anonymizer0_3_3.cpp. Referenced by main(), and processIP(). |
|
Definition at line 79 of file anonymizer0_3_3.cpp. Referenced by main(). |