home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 4 / DATAFILE_PDCD4.iso / utilities / utilss / sockets / include / net / h / raw_cb < prev    next >
Encoding:
Text File  |  1995-01-11  |  2.2 KB  |  76 lines

  1. /*
  2.  * $Header: /ax/networking:include/net/raw_cb.h:networking  1.1  $
  3.  * $Source: /ax/networking:include/net/raw_cb.h: $
  4.  *
  5.  * Copyright (c) 1988 Acorn Computers Ltd., Cambridge, England
  6.  *
  7.  * $Log:    raw_cb.h,v $
  8.  * Revision 1.1  95/01/11  10:14:49  kwelton
  9.  * Initial revision
  10.  * 
  11.  * Revision 1.3  88/06/17  20:25:15  beta
  12.  * Acorn Unix initial beta version
  13.  * 
  14.  */
  15. /* @(#)raw_cb.h    1.3 87/06/16 3.2/4.3NFSSRC */
  16. /*
  17.  * Copyright (c) 1980, 1986 Regents of the University of California.
  18.  * All rights reserved.  The Berkeley software License Agreement
  19.  * specifies the terms and conditions for redistribution.
  20.  *
  21.  *    @(#)raw_cb.h    7.1 (Berkeley) 6/4/86
  22.  */
  23.  
  24. /*
  25.  * Raw protocol interface control block.  Used
  26.  * to tie a socket to the generic raw interface.
  27.  */
  28. struct rawcb {
  29.     struct    rawcb *rcb_next;    /* doubly linked list */
  30.     struct    rawcb *rcb_prev;
  31.     struct    socket *rcb_socket;    /* back pointer to socket */
  32.     struct    sockaddr rcb_faddr;    /* destination address */
  33.     struct    sockaddr rcb_laddr;    /* socket's address */
  34.     struct    sockproto rcb_proto;    /* protocol family, protocol */
  35.     caddr_t    rcb_pcb;        /* protocol specific stuff */
  36.     struct    mbuf *rcb_options;    /* protocol specific options */
  37.     struct    route rcb_route;    /* routing information */
  38.         int     rcb_cc;                 /* bytes of rawintr queued data */
  39.         int     rcb_mbcnt;              /* bytes of rawintr queued mbufs */
  40.     short    rcb_flags;
  41. };
  42.  
  43. /*
  44.  * Since we can't interpret canonical addresses,
  45.  * we mark an address present in the flags field.
  46.  */
  47. #define    RAW_LADDR    01
  48. #define    RAW_FADDR    02
  49. #define    RAW_DONTROUTE    04        /* no routing, default */
  50. #define RAW_TALLY       0x08            /* tally delivered packets */
  51.  
  52. #define    sotorawcb(so)        ((struct rawcb *)(so)->so_pcb)
  53.  
  54. /*
  55.  * Nominal space allocated to a raw socket.
  56.  */
  57. #define    RAWSNDQ        2048
  58. #define    RAWRCVQ        2048
  59.  
  60. /*
  61.  * Format of raw interface header prepended by
  62.  * raw_input after call from protocol specific
  63.  * input routine.
  64.  */
  65. struct raw_header {
  66.     struct    sockproto raw_proto;    /* format of packet */
  67.     struct    sockaddr raw_dst;    /* dst address for rawintr */
  68.     struct    sockaddr raw_src;    /* src address for sbappendaddr */
  69. };
  70.  
  71. #ifdef KERNEL
  72. struct rawcb rawcb;            /* head of list */
  73. #endif
  74.  
  75. /* EOF raw_cb.h */
  76.