FW: Identifying neighbors within the LAN

Hettiarachchige Hasitha Shan hh_shan at live.com
Fri May 23 07:33:32 EDT 2014


Dear Sirs/ Ma'ams,

I am an undergraduate student following the B Eng (Hons) Software 
Engineering degree program at University of Westminster, UK. As for my 
final year research project I am implementing a packet security 
enhancement module.

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. However, I have the requirement of identifying the packets destination IP's address family.

I tried many ways, which only lead me to user space implementations, not C linux kernel module programming. During my research I just came across %pI4 and %pI6 which formats and displays the Ip address, not give out its address family, i. e. IPv6 or IPv4.

I would be really grateful if you experts would help me get through this obstacle. any references or examples to identify the IP address family (IPv4/ IPv6) of the IP (which is store in unsigned int variables) will be  highly appreciated.

Thank you,

Best Regards,
H. Hasitha Shan

P.S. I apologize in advance if this question has an obvious answer, but as I am a novice in this area, my research lead me to dead ends for weeks and your help will be very much appreciated.
 		 	   		   		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140523/224da046/attachment.html 


More information about the Kernelnewbies mailing list