1: /*
   2:  * Copyright (c) 1980, 1986 Regents of the University of California.
   3:  * All rights reserved.  The Berkeley software License Agreement
   4:  * specifies the terms and conditions for redistribution.
   5:  *
   6:  *	@(#)raw_cb.h	7.1 (Berkeley) 6/4/86
   7:  */
   8: 
   9: /*
  10:  * Raw protocol interface control block.  Used
  11:  * to tie a socket to the generic raw interface.
  12:  */
  13: struct rawcb {
  14:     struct  rawcb *rcb_next;    /* doubly linked list */
  15:     struct  rawcb *rcb_prev;
  16:     struct  socket *rcb_socket; /* back pointer to socket */
  17:     struct  sockaddr rcb_faddr; /* destination address */
  18:     struct  sockaddr rcb_laddr; /* socket's address */
  19:     struct  sockproto rcb_proto;    /* protocol family, protocol */
  20:     caddr_t rcb_pcb;        /* protocol specific stuff */
  21:     struct  mbuf *rcb_options;  /* protocol specific options */
  22:     struct  route rcb_route;    /* routing information */
  23:     short   rcb_flags;
  24: };
  25: 
  26: /*
  27:  * Since we can't interpret canonical addresses,
  28:  * we mark an address present in the flags field.
  29:  */
  30: #define RAW_LADDR   01
  31: #define RAW_FADDR   02
  32: #define RAW_DONTROUTE   04      /* no routing, default */
  33: 
  34: #define sotorawcb(so)       ((struct rawcb *)(so)->so_pcb)
  35: 
  36: /*
  37:  * Nominal space allocated to a raw socket.
  38:  */
  39: #define RAWSNDQ     2048
  40: #define RAWRCVQ     2048
  41: 
  42: /*
  43:  * Format of raw interface header prepended by
  44:  * raw_input after call from protocol specific
  45:  * input routine.
  46:  */
  47: struct raw_header {
  48:     struct  sockproto raw_proto;    /* format of packet */
  49:     struct  sockaddr raw_dst;   /* dst address for rawintr */
  50:     struct  sockaddr raw_src;   /* src address for sbappendaddr */
  51: };
  52: 
  53: #ifdef KERNEL
  54: struct rawcb rawcb;         /* head of list */
  55: #endif

Defined variables

rawcb defined in line 54; used 6 times

Defined struct's

raw_header defined in line 47; used 10 times
rawcb defined in line 13; used 30 times

Defined macros

RAWRCVQ defined in line 40; used 1 times
RAWSNDQ defined in line 39; used 1 times
RAW_DONTROUTE defined in line 32; never used
RAW_FADDR defined in line 31; used 8 times

Usage of this include

Last modified: 1986-06-05
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 819
Valid CSS Valid XHTML 1.0 Strict