1 /* 2 * Copyright (c) 1980, 1986 Regents of the University of California. 3 * All rights reserved. 4 * 5 * %sccs.include.redist.c% 6 * 7 * @(#)raw_cb.h 7.6 (Berkeley) 06/28/90 8 */ 9 10 /* 11 * Raw protocol interface control block. Used 12 * to tie a socket to the generic raw interface. 13 */ 14 struct rawcb { 15 struct rawcb *rcb_next; /* doubly linked list */ 16 struct rawcb *rcb_prev; 17 struct socket *rcb_socket; /* back pointer to socket */ 18 struct sockaddr *rcb_faddr; /* destination address */ 19 struct sockaddr *rcb_laddr; /* socket's address */ 20 struct sockproto rcb_proto; /* protocol family, protocol */ 21 }; 22 23 #define sotorawcb(so) ((struct rawcb *)(so)->so_pcb) 24 25 /* 26 * Nominal space allocated to a raw socket. 27 */ 28 #define RAWSNDQ 8192 29 #define RAWRCVQ 8192 30 31 #ifdef KERNEL 32 struct rawcb rawcb; /* head of list */ 33 #endif 34