struct socket
Prev | Networking Base Types | Next

## Name

struct socket — general BSD socket

## Synopsis

    struct socket {
      socket_state state;
      unsigned long flags;
      const struct proto_ops * ops;
      struct fasync_struct * fasync_list;
      struct file * file;
      struct sock * sk;
      wait_queue_head_t wait;
      short type;
    };

## Members

state

  socket state (`SS_CONNECTED`, etc)

flags

  socket flags (`SOCK_ASYNC_NOSPACE`, etc)

ops

  protocol specific socket operations

fasync_list

  Asynchronous wake up list

file

  File back pointer for gc

sk

  internal networking protocol agnostic socket representation

wait

  wait queue for several uses

type

  socket type (`SOCK_STREAM`, etc)

Prev | Up | Next
enum sock_type | Home | Socket Buffer Functions