The answer all depends on what you are trying to do, and in what environment. The structure of IPv4 headers is extremely well-known, rather simple, and thoroughly documented in public RFCs. You can write your own IPv4 header structures in a few minutes; the basic IP header is only 20 bytes long.
But what will you do with them? Build them, parse them, filter them, etc.? You may need to understand different aspects of IPv4, such as how “optional” headers work (it’s optional to build them, but you still must know how to parse them), how protocol layering works, how IP interacts with ARP and other link-layer protocols, how IP routing works, etc. IPv6 has a very different structure, but it is also publicly documented.
So, before we can even begin to offer any guidance, you’ll have to decide (and articulate) what you are trying to accomplish. At this point, with the information you’ve given, all that can be said is, “go read the RFCs”. http://www.ietf.org. Start at RFC 791, and work your way forward in time, if you want to understand IPv4.
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com
Sent: Wednesday, January 17, 2007 11:27 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] getting the ip header
how do i get the ip header of an ip packet?
do i have to create my own structures or are there pre-defined structures that windows offers to extract the header info of a packet?
i.e there are structs like iphdr or ipv6hdr on unix that makes it easy to identify which ip version the packet data belongs to. how do i do this in windows?
thanks much.
Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer