00001 00005 /* $NetBSD: raw_cb.h,v 1.11 1996/05/28 23:24:50 pk Exp $ */ 00006 00007 /* 00008 * Copyright (c) 1980, 1986, 1993 00009 * The Regents of the University of California. All rights reserved. 00010 * 00011 * Redistribution and use in source and binary forms, with or without 00012 * modification, are permitted provided that the following conditions 00013 * are met: 00014 * 1. Redistributions of source code must retain the above copyright 00015 * notice, this list of conditions and the following disclaimer. 00016 * 2. Redistributions in binary form must reproduce the above copyright 00017 * notice, this list of conditions and the following disclaimer in the 00018 * documentation and/or other materials provided with the distribution. 00019 * 3. All advertising materials mentioning features or use of this software 00020 * must display the following acknowledgement: 00021 * This product includes software developed by the University of 00022 * California, Berkeley and its contributors. 00023 * 4. Neither the name of the University nor the names of its contributors 00024 * may be used to endorse or promote products derived from this software 00025 * without specific prior written permission. 00026 * 00027 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 00028 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00029 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00030 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 00031 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00032 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 00033 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 00034 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 00035 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 00036 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 00037 * SUCH DAMAGE. 00038 * 00039 * @(#)raw_cb.h 8.1 (Berkeley) 6/10/93 00040 */ 00041 00042 #ifndef __NET_RAW_CB_H 00043 #define __NET_RAW_CB_H 00044 00045 /* 00046 * Raw protocol interface control block. Used 00047 * to tie a socket to the generic raw interface. 00048 */ 00049 struct rawcb { 00050 LIST_ENTRY(rawcb) rcb_list; /* doubly linked list */ 00051 struct socket *rcb_socket; /* back pointer to socket */ 00052 struct sockaddr *rcb_faddr; /* destination address */ 00053 struct sockaddr *rcb_laddr; /* socket's address */ 00054 struct sockproto rcb_proto; /* protocol family, protocol */ 00055 }; 00056 00057 #define sotorawcb(so) ((struct rawcb *)(so)->so_pcb) 00058 00059 /* 00060 * Nominal space allocated to a raw socket. 00061 */ 00062 #define RAWSNDQ 8192 00063 #define RAWRCVQ 8192 00064 00065 #endif
1.3.8