Identification of IP address family

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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.
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux