home *** CD-ROM | disk | FTP | other *** search
/ Network PC / Network PC.iso / amiga utilities / communication / internet / amitcp3.0b / src.lha / src / amitcp / net / raw_cb.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-09-08  |  4.4 KB  |  126 lines

  1. /* $Id: raw_cb.h,v 1.5 1993/06/04 11:16:15 jraja Exp $
  2.  *
  3.  * Copyright (c) 1993 AmiTCP/IP Group, <amitcp-group@hut.fi>,
  4.  *                    Helsinki University of Technology, Finland.
  5.  *                    All rights reserved.
  6.  *
  7.  * raw_cb.h --- Raw Socket Control Blocks
  8.  *
  9.  * Last modified: Fri Jun  4 00:39:17 1993 jraja
  10.  *
  11.  * HISTORY
  12.  * $Log: raw_cb.h,v $
  13.  * Revision 1.5  1993/06/04  11:16:15  jraja
  14.  * Fixes for first public release.
  15.  *
  16.  * Revision 1.4  1993/05/16  21:09:43  ppessi
  17.  * RCS version changed.
  18.  *
  19.  * Revision 1.3  1993/03/05  03:12:46  ppessi
  20.  * Compiles with SASC. Initial test version
  21.  *
  22.  * Revision 1.2  93/02/25  19:52:23  19:52:23  ppessi (Pekka Pessi)
  23.  *  Added prototypes
  24.  * 
  25.  * Revision 1.1  92/11/20  14:59:25  14:59:25  jraja (Jarno Tapio Rajahalme)
  26.  * Initial revision
  27.  * 
  28.  *
  29.  */
  30.  
  31. /* 
  32.  * Mach Operating System
  33.  * Copyright (c) 1992 Carnegie Mellon University
  34.  * All Rights Reserved.
  35.  * 
  36.  * Permission to use, copy, modify and distribute this software and its
  37.  * documentation is hereby granted, provided that both the copyright
  38.  * notice and this permission notice appear in all copies of the
  39.  * software, derivative works or modified versions, and any portions
  40.  * thereof, and that both notices appear in supporting documentation.
  41.  * 
  42.  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
  43.  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
  44.  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
  45.  * 
  46.  * Carnegie Mellon requests users of this software to return to
  47.  * 
  48.  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
  49.  *  School of Computer Science
  50.  *  Carnegie Mellon University
  51.  *  Pittsburgh PA 15213-3890
  52.  * 
  53.  * any improvements or extensions that they make and grant Carnegie Mellon 
  54.  * the rights to redistribute these changes.
  55.  */
  56. /*
  57.  * HISTORY
  58.  * Log:    raw_cb.h,v
  59.  * Revision 2.1  92/04/21  17:13:38  rwd
  60.  * BSDSS
  61.  * 
  62.  *
  63.  */
  64.  
  65. /*
  66.  * Copyright (c) 1980, 1986 Regents of the University of California.
  67.  * All rights reserved.
  68.  *
  69.  * Redistribution and use in source and binary forms, with or without
  70.  * modification, are permitted provided that the following conditions
  71.  * are met:
  72.  * 1. Redistributions of source code must retain the above copyright
  73.  *    notice, this list of conditions and the following disclaimer.
  74.  * 2. Redistributions in binary form must reproduce the above copyright
  75.  *    notice, this list of conditions and the following disclaimer in the
  76.  *    documentation and/or other materials provided with the distribution.
  77.  * 3. All advertising materials mentioning features or use of this software
  78.  *    must display the following acknowledgement:
  79.  *    This product includes software developed by the University of
  80.  *    California, Berkeley and its contributors.
  81.  * 4. Neither the name of the University nor the names of its contributors
  82.  *    may be used to endorse or promote products derived from this software
  83.  *    without specific prior written permission.
  84.  *
  85.  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  86.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  87.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  88.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  89.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  90.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  91.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  92.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  93.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  94.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  95.  * SUCH DAMAGE.
  96.  *
  97.  *    @(#)raw_cb.h    7.6 (Berkeley) 6/28/90
  98.  */
  99.  
  100. /*
  101.  * Raw protocol interface control block.  Used
  102.  * to tie a socket to the generic raw interface.
  103.  */
  104. struct rawcb {
  105.     struct    rawcb *rcb_next;    /* doubly linked list */
  106.     struct    rawcb *rcb_prev;
  107.     struct    socket *rcb_socket;    /* back pointer to socket */
  108.     struct    sockaddr *rcb_faddr;    /* destination address */
  109.     struct    sockaddr *rcb_laddr;    /* socket's address */
  110.     struct    sockproto rcb_proto;    /* protocol family, protocol */
  111. };
  112.  
  113. #define    sotorawcb(so)        ((struct rawcb *)(so)->so_pcb)
  114.  
  115. /*
  116.  * Nominal space allocated to a raw socket.
  117.  */
  118. #define    RAWSNDQ        8192
  119. #define    RAWRCVQ        8192
  120.  
  121. #ifdef KERNEL
  122. extern struct rawcb rawcb;            /* head of list */
  123. #include <net/raw_cb_protos.h>
  124. #include <net/raw_usrreq_protos.h>
  125. #endif
  126.