2 * parse.c - parsing of pcap packages
4 * author: hackbard@hackdaworld.dyndns.org
12 /* all the parsing stuff will go here
14 * different protocols should get to seperated files though ...
17 void parse_package(unsigned char *ptr,const struct pcap_pkthdr *pcap_header,const unsigned char *package) {
26 printf("---> package %d --- %s\n",
28 ctime((const time_t*)&(pcap_header->ts.tv_sec)));
29 if(info->mode&MODE_ASCIIOUT) {
30 puts("content in ascii:");
31 for(i=0;i<pcap_header->caplen;i++) printf("%c ",package[i]);
34 if(info->mode&MODE_HEXOUT) {
35 puts("content in ascii:");
36 for(i=0;i<pcap_header->caplen;i++) printf("%x ",package[i]);