A query regarding the sock structure

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

 



Hi,
I have a question regarding the "struct sock" in "sock.h" file.

1) There are 2 __u32 elements one name "saddr" and the other
"rcv_saddr". If what I know is correct then the latter is supposed
store the local IP address to which the socket is bound to and the
former contains the IP address to be used while transmitting the
packet. Is the above explanation correct else why do we have 2
source address data elements.
2) What is the significance of the "num" data element in this structure,
this seems to be used for storing the source port ? But there is already
an element "sport" for storing the source port info. Then, what is the
purpose of having "num" element ?

Would appreciate any help in answering the above question.

Thanks,
Rithin.

-- 
Rithin K. Shetty
Graduate Student (Computer Science)
N C State University
Raleigh,NC.
Phone: 919-834-6782
http://www4.ncsu.edu/~rkshetty

-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux