sock structure in 2.6 vs 2.4

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

 



Hi,
I want to find a way to get the IP address of the interface on which
we recieve certain packets. I am using netfilter to access the
packets. Someone told me (in a previous post) that this could not be
done.
But looking at the 2.4 kernel files I found  that the sock structure
contains rcv_saddr which should point to the bound local IPv4 address.
But we are working on the 2.6 Kernel and it looks like the sock
structure in 2.6 kernel (in include/net/sock.h) is different and it
does not include rcv_saddr field.
Am I looking at the correct sock structure? Is there another way to
get the local IP address?
Is there some analogus structure that contains this data apart from
sock structure in the 2.6 kernel?

Any help would be great!

Thanks and regards,
Rajat.
http://rajatswarup.blogspot.com/

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[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