struct socket — general BSD socket
struct socket {
socket_state state;
short type;
unsigned long flags;
struct fasync_struct * fasync_list;
wait_queue_head_t wait;
struct file * file;
struct sock * sk;
const struct proto_ops * ops;
};
socket state (SS_CONNECTED, etc)
socket type (SOCK_STREAM, etc)
socket flags (SOCK_ASYNC_NOSPACE, etc)
Asynchronous wake up list
wait queue for several uses
File back pointer for gc
internal networking protocol agnostic socket representation
protocol specific socket operations