tcpdump mailing list archives
Re: IP Header Size is always 5
From: Shameem Ahamed <shameem.ahamed () hotmail com>
Date: Wed, 1 Apr 2009 21:02:37 +0530
Hello Sebastian, Thanks for the reply. In that case also, we should be able to get the source and destination IP address from the below code printf("Source IP: %s \n",inet_ntoa(ipHeader->ip_src)); For me it gives me Segmentation Fault. Also, i am not able to access the tcp header details. printf("Transport Protocaol Used : %s \n", prototoname(ipHeader->ip_p)); printf("Source IP: %s \n",inet_ntoa(ipHeader->ip_src)); // tcpHeader=(struct tcphdr *)(packet +ETHER_SIZE+size_ip); printf("====================TCP Header Details================\n"); size_tcp=tcpHeader->doff; printf("TCP Header Size is: %d \n",size_tcp); Regards, Shameem
Date: Wed, 1 Apr 2009 11:22:55 -0400 From: Sebastien.Roy () Sun COM Subject: Re: [tcpdump-workers] IP Header Size is always 5 To: tcpdump-workers () lists tcpdump org On Wed, 2009-04-01 at 20:42 +0530, Shameem Ahamed wrote:I was trying to create a function (for testing purpose) which displays the header information for Ethernet, IP and TCP using a Linux machine. The problem i am having is, whenever i read any packet from the saved pcap file, it displays the IP header size (ip->ip_hl) is 5 (some times less than 5).The header length field in an IPv4 header is the length of the header in 32-bit words (not in bytes). See RFC 791. -Seb - This is the tcpdump-workers list. Visit https://cod.sandelman.ca/ to unsubscribe.
_________________________________________________________________ How fun is this? IMing with Windows Live Messenger just got better. http://www.microsoft.com/india/windows/windowslive/messenger.aspx- This is the tcpdump-workers list. Visit https://cod.sandelman.ca/ to unsubscribe.
Current thread:
- IP Header Size is always 5 Shameem Ahamed (Apr 01)
- Re: IP Header Size is always 5 Sebastien Roy (Apr 01)
- Re: IP Header Size is always 5 Shameem Ahamed (Apr 01)
- Re: IP Header Size is always 5 Guy Harris (Apr 01)
- Re: IP Header Size is always 5 Shameem Ahamed (Apr 01)
- Re: IP Header Size is always 5 Shameem Ahamed (Apr 01)
- Re: IP Header Size is always 5 Sebastien Roy (Apr 01)
- Re: IP Header Size is always 5 Florian Weimer (Apr 01)