Identification of IP address family

Valdis.Kletnieks at vt.edu Valdis.Kletnieks at vt.edu
Fri May 23 21:49:29 EDT 2014


On Fri, 23 May 2014 04:34:19 -0700, Hettiarachchige Hasitha Shan said:
> The concept includes capturing of packets via the use of libnetfilter and
> apply necessary security implementations. I was able to successfully capture
> packets and extract it relevant data where I store the IP address as unsigned
> int.

YOu're in for a big surprise when that first IPv6 packet arrives.

You're in for an even bigger surprise when the first Decnet or CLNP packet
shows up. :)

> However, I have the requirement of identifying the packets destination IP's
> address family.

OK. I'll be very blunt here.  If you haven't figured out what the first 4 bits
of the IP header are for, and why they're the first 4 bits, you're going to
have a *really* hard time doing packet security.  Because the bad guys
are rarely, if ever, RFC3514 compliant...

And then you get to deal with that 8 bit field between the TTL and the
checksum in an IPv4 header.  And then there's all the fun and games of
figuring out how to deal with a fragmented IPv6 packet....
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 848 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140523/3cd73bb4/attachment.bin 


More information about the Kernelnewbies mailing list