tcpdump mailing list archives
Re: pcap_next_ex: Packet Data
From: Guy Harris <guy () alum mit edu>
Date: Mon, 24 Apr 2006 15:52:27 -0700
On Apr 24, 2006, at 3:23 AM, Sumit wrote:
printf("packet time/caplen/len %u %u %u\n", header- >ts, header->caplen, header->len);
You can't do that. "header->ts" is a structure, and you can't print a structure with "%u". What that statement actually does is implementation-dependent, but one thing it's unlikely to do is correctly print the value of header->caplen or header->len.
If you want to print the two values from the time stamp, you could doprintf("packet time/caplen/len %d/%d %u %u\n", header->ts.tv_sec, header->ts.tv_usec, header->caplen, header->len);
- This is the tcpdump-workers list. Visit https://lists.sandelman.ca/ to unsubscribe.
Current thread:
- How to use "pcap" on a router kashif javed (Apr 01)