struct sock_common — minimal network layer representation of sockets
struct sock_common { union {unnamed_union}; atomic_t skc_refcnt; unsigned int skc_hash; unsigned short skc_family; volatile unsigned char skc_state; #ifndef __GENKSYMS__ unsigned char skc_reuse; unsigned char skc_reuseport:4; #else unsigned char skc_reuse; #endif int skc_bound_dev_if; struct hlist_node skc_bind_node; struct proto * skc_prot; #ifdef CONFIG_NET_NS struct net * skc_net; #endif };
anonymous
reference count
hash value used with various protocol lookup tables
network address family
Connection state
SO_REUSEADDR
setting
SO_REUSEPORT
setting
SO_REUSEADDR
setting
bound device index if != 0
bind hash linkage for various protocol lookup tables
protocol handlers inside a network family
reference to the network namespace of this socket