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 * wqwait queue for several uses
struct file * fileFile back pointer for gc
struct sock * skinternal networking protocol agnostic socket representation
const struct proto_ops * opsprotocol specific socket operations