1: /*
   2:  * Copyright (c) 1980, 1986 Regents of the University of California.
   3:  * All rights reserved.
   4:  *
   5:  * Redistribution and use in source and binary forms are permitted
   6:  * provided that this notice is preserved and that due credit is given
   7:  * to the University of California at Berkeley. The name of the University
   8:  * may not be used to endorse or promote products derived from this
   9:  * software without specific prior written permission. This software
  10:  * is provided ``as is'' without express or implied warranty.
  11:  *
  12:  *	@(#)raw_cb.h	7.2 (Berkeley) 12/30/87
  13:  */
  14: 
  15: /*
  16:  * Raw protocol interface control block.  Used
  17:  * to tie a socket to the generic raw interface.
  18:  */
  19: struct rawcb {
  20:     struct  rawcb *rcb_next;    /* doubly linked list */
  21:     struct  rawcb *rcb_prev;
  22:     struct  socket *rcb_socket; /* back pointer to socket */
  23:     struct  sockaddr rcb_faddr; /* destination address */
  24:     struct  sockaddr rcb_laddr; /* socket's address */
  25:     struct  sockproto rcb_proto;    /* protocol family, protocol */
  26:     caddr_t rcb_pcb;        /* protocol specific stuff */
  27:     struct  mbuf *rcb_options;  /* protocol specific options */
  28:     struct  route rcb_route;    /* routing information */
  29:     short   rcb_flags;
  30: };
  31: 
  32: /*
  33:  * Since we can't interpret canonical addresses,
  34:  * we mark an address present in the flags field.
  35:  */
  36: #define RAW_LADDR   01
  37: #define RAW_FADDR   02
  38: #define RAW_DONTROUTE   04      /* no routing, default */
  39: 
  40: #define sotorawcb(so)       ((struct rawcb *)(so)->so_pcb)
  41: 
  42: /*
  43:  * Nominal space allocated to a raw socket.
  44:  */
  45: #define RAWSNDQ     2048
  46: #define RAWRCVQ     2048
  47: 
  48: /*
  49:  * Format of raw interface header prepended by
  50:  * raw_input after call from protocol specific
  51:  * input routine.
  52:  */
  53: struct raw_header {
  54:     struct  sockproto raw_proto;    /* format of packet */
  55:     struct  sockaddr raw_dst;   /* dst address for rawintr */
  56:     struct  sockaddr raw_src;   /* src address for sbappendaddr */
  57: };
  58: 
  59: #ifdef SUPERVISOR
  60: struct rawcb rawcb;         /* head of list */
  61: #endif

Defined variables

rawcb defined in line 60; used 10 times

Defined struct's

raw_header defined in line 53; used 10 times
rawcb defined in line 19; used 46 times

Defined macros

RAWRCVQ defined in line 46; used 1 times
RAWSNDQ defined in line 45; used 1 times
RAW_DONTROUTE defined in line 38; never used
RAW_FADDR defined in line 37; used 8 times

Usage of this include

Last modified: 1988-04-27
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 3124
Valid CSS Valid XHTML 1.0 Strict