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