1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| char *pcap_lookupdev(char *error_buffer); int pcap_findalldevs(pcap_if_t **alldevsp, char *errbuf); typedef struct pcap_if pcap_if_t; struct pcap_if { struct pcap_if *next; char *name; char *description; struct pcap_addr *addresses; bpf_u_int32 flags; }; struct pcap_addr { struct pcap_addr *next; struct sockaddr *addr; struct sockaddr *netmask; struct sockaddr *broadaddr; struct sockaddr *dstaddr; }; struct pcap_pkthdr { struct timeval ts; bpf_u_int32 caplen; bpf_u_int32 len; }; int pcap_loop(handler,10,capture_handler,NULL); char *inet_ntoa(struct in_addr *addr);
|