tcpdump mailing list archives
Re: accessing IP packet header
From: Guy Harris <guy () alum mit edu>
Date: Thu, 15 Jun 2006 11:45:36 -0700
lalani () cs fsu edu wrote:
I wanted to access IP packet and then subsequently UDP/TCP/ICMP/IGMP packet information. Are there any explicit function which I can call to get information like version, IHL, source port, destination port, etc. to get that information for each IP type of packet.
Not in libpcap. See the tcpdump.org libpcap tutorial at http://www.tcpdump.org/pcap.htmfor some information on how to write your own code to find the IP header in a packet (the example is for Ethernet) and extract fields from it, and how to find the TCP (or other transport layer) header.
- This is the tcpdump-workers list. Visit https://lists.sandelman.ca/ to unsubscribe.
Current thread:
- accessing IP packet header lalani (Jun 15)
- Re: accessing IP packet header Guy Harris (Jun 15)
- Re: accessing IP packet header Ian McDonald (Jun 15)