Scroll to navigation

STRUCT SOCK_COMMON(9) Linux Networking STRUCT SOCK_COMMON(9)

NAME

struct_sock_common - minimal network layer representation of sockets

SYNOPSIS

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 };

MEMBERS

{unnamed_union}

anonymous

skc_refcnt

reference count

skc_hash

hash value used with various protocol lookup tables

skc_family

network address family

skc_state

Connection state

skc_reuse

SO_REUSEADDR setting

skc_reuseport

SO_REUSEPORT setting

skc_reuse

SO_REUSEADDR setting

skc_bound_dev_if

bound device index if != 0

skc_bind_node

bind hash linkage for various protocol lookup tables

skc_prot

protocol handlers inside a network family

skc_net

reference to the network namespace of this socket

DESCRIPTION

This is the minimal network layer representation of sockets, the header for struct sock and struct inet_timewait_sock.

COPYRIGHT

April 2023 Kernel Hackers Manual 2.6.