о залежні функції
struct inode на inode файлу сокета
struct sock * на інет сокет
INET net/sock.h struct sock
struct sock {
/* Socket demultiplex comparisons on incoming packets. */p> __u32 daddr;/* Foreign IPv4 addr */
__u32 rcv_saddr;/* Bound local IPv4 addr */
__u16 dport;/* Destination port */
unsigned short num;/* Local port */
int bound_dev_if;/* Bound device index if! = 0 */
/* Main hash linkage for various protocol lookup tables. */p> struct sock * next;
struct sock ** pprev;
struct sock * bind_next;
struct sock ** bind_pprev;
volatile unsigned char state,/* Connection state */
zapped;/* In ax25 & ipx means not linked */
__u16 sport;/* Source port */
unsigned short family;/* Address family */
unsigned char reuse;/* SO_REUSEADDR setting */
unsigned char shutdown;
atomic_t refcnt;/* Reference count */p> socket_lock_t lock;/* Synchronizer ... */p> int rcvbuf;/* Size of receive buffer in bytes */
wait_queue_head_t * sleep;/* Sock wait queue */
struct dst_entry * dst_cache;/* Destination cache */
rwlock_t dst_lock;
atomic_t rmem_alloc;/* Receive queue bytes committed */
struct sk_buff_head receive_queue;/* Incoming packets */
atomic_t wmem_alloc;/* Transmit queue bytes committed */
struct sk_buff_head write_queue;/* Packet sending queue */
atomic_t omem_alloc;/* "O" is "option" or "other" */
int wmem_queued;/* Persistent queue size */
int forward_alloc;/* Space allocated forward. */p> __u32 saddr;/* Sending source */
unsigned int allocation;/* Allocation mode */
int sndbuf;/* Size of send buffer in bytes */
struct sock * prev;
/* Not all are volatile, but some are, so we might as well say they all are.
* XXX Make this a flag word-DaveM
*/
volatile char dead,
done,
urginline,
keepopen,
linger,
destroy,
no_check,
broadcast,
bsdism;
unsigned char debug;
unsigned char rcvtstamp;
unsigned char use_write_queue;
unsigned char userlocks;
/* Hole of 3 bytes. Try to pack. */p> int route_caps;
int proc;
unsigned long lingertime;
int hashent;
struct sock * pair;
/* The backlog queue is special, it is always used with
* the per-socket spinlock held and requires low latency
* access. Therefore we special case it's implementation.
*/
struct {
struct sk_buff * head;
struct sk_buff * tail;
} backlog;
rwlock_t callback_lock;
/* Error queue, rarely used. */p> struct sk_buff_head error_queue;
struct proto * prot;
# if defined (CONFIG_IPV6) | | defined (CONFIG_IPV6_MODULE)
union {
struc...