xref: /csrg-svn/sys/net/raw_cb.h (revision 37472)
123161Smckusick /*
229067Smckusick  * Copyright (c) 1980, 1986 Regents of the University of California.
333183Sbostic  * All rights reserved.
423161Smckusick  *
533183Sbostic  * Redistribution and use in source and binary forms are permitted
634844Sbostic  * provided that the above copyright notice and this paragraph are
734844Sbostic  * duplicated in all such forms and that any documentation,
834844Sbostic  * advertising materials, and other materials related to such
934844Sbostic  * distribution and use acknowledge that the software was developed
1034844Sbostic  * by the University of California, Berkeley.  The name of the
1134844Sbostic  * University may not be used to endorse or promote products derived
1234844Sbostic  * from this software without specific prior written permission.
1334844Sbostic  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
1434844Sbostic  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
1534844Sbostic  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
1633183Sbostic  *
17*37472Ssklower  *	@(#)raw_cb.h	7.5 (Berkeley) 04/22/89
1823161Smckusick  */
195634Sroot 
205634Sroot /*
215634Sroot  * Raw protocol interface control block.  Used
225634Sroot  * to tie a socket to the generic raw interface.
235634Sroot  */
245634Sroot struct rawcb {
255634Sroot 	struct	rawcb *rcb_next;	/* doubly linked list */
265634Sroot 	struct	rawcb *rcb_prev;
275634Sroot 	struct	socket *rcb_socket;	/* back pointer to socket */
28*37472Ssklower 	struct	sockaddr *rcb_faddr;	/* destination address */
29*37472Ssklower 	struct	sockaddr *rcb_laddr;	/* socket's address */
3021769Skarels 	struct	sockproto rcb_proto;	/* protocol family, protocol */
315634Sroot };
325634Sroot 
335634Sroot #define	sotorawcb(so)		((struct rawcb *)(so)->so_pcb)
345634Sroot 
355634Sroot /*
365634Sroot  * Nominal space allocated to a raw socket.
375634Sroot  */
3836824Skarels #define	RAWSNDQ		8192
3936824Skarels #define	RAWRCVQ		8192
405634Sroot 
415634Sroot #ifdef KERNEL
425634Sroot struct rawcb rawcb;			/* head of list */
435634Sroot #endif
44