\subsection*{socket}
Each \ds{socket} data structure holds information about a BSD socket.
It does not exist independently; it is, instead, part of the VFS \ds{inode}
data structure.
\SeeModule{include/linux/\\net.h}
\begin{tscreen}\begin{verbatim}
struct socket {
  short                type;         /* SOCK_STREAM, ...             */
  socket_state         state;
  long                 flags;
  struct proto_ops     *ops;         /* protocols do most everything */
  void                 *data;        /* protocol data                */
  struct socket        *conn;        /* server socket connected to   */
  struct socket        *iconn;       /* incomplete client conn.s     */
  struct socket        *next;
  struct wait_queue    **wait;       /* ptr to place to wait on      */
  struct inode         *inode;
  struct fasync_struct *fasync_list; /* Asynchronous wake up list    */
  struct file          *file;        /* File back pointer for gc     */
};
\end{verbatim}\end{tscreen}
