struct socket — general BSD socket
struct socket { socket_state state; short type; unsigned long flags; struct socket_wq __rcu * wq; struct file * file; struct sock * sk; const struct proto_ops * ops; };
socket_state state
socket state (SS_CONNECTED
, etc)
short type
socket type (SOCK_STREAM
, etc)
unsigned long flags
socket flags (SOCK_NOSPACE
, etc)
struct socket_wq __rcu * wq
wait queue for several uses
struct file * file
File back pointer for gc
struct sock * sk
internal networking protocol agnostic socket representation
const struct proto_ops * ops
protocol specific socket operations