1: /*
2: * Copyright (c) 1980, 1986 Regents of the University of California.
3: * All rights reserved.
4: *
5: * Redistribution and use in source and binary forms are permitted
6: * provided that this notice is preserved and that due credit is given
7: * to the University of California at Berkeley. The name of the University
8: * may not be used to endorse or promote products derived from this
9: * software without specific prior written permission. This software
10: * is provided ``as is'' without express or implied warranty.
11: *
12: * @(#)raw_cb.h 7.2 (Berkeley) 12/30/87
13: */
14:
15: /*
16: * Raw protocol interface control block. Used
17: * to tie a socket to the generic raw interface.
18: */
19: struct rawcb {
20: struct rawcb *rcb_next; /* doubly linked list */
21: struct rawcb *rcb_prev;
22: struct socket *rcb_socket; /* back pointer to socket */
23: struct sockaddr rcb_faddr; /* destination address */
24: struct sockaddr rcb_laddr; /* socket's address */
25: struct sockproto rcb_proto; /* protocol family, protocol */
26: caddr_t rcb_pcb; /* protocol specific stuff */
27: struct mbuf *rcb_options; /* protocol specific options */
28: struct route rcb_route; /* routing information */
29: short rcb_flags;
30: };
31:
32: /*
33: * Since we can't interpret canonical addresses,
34: * we mark an address present in the flags field.
35: */
36: #define RAW_LADDR 01
37: #define RAW_FADDR 02
38: #define RAW_DONTROUTE 04 /* no routing, default */
39:
40: #define sotorawcb(so) ((struct rawcb *)(so)->so_pcb)
41:
42: /*
43: * Nominal space allocated to a raw socket.
44: */
45: #define RAWSNDQ 2048
46: #define RAWRCVQ 2048
47:
48: /*
49: * Format of raw interface header prepended by
50: * raw_input after call from protocol specific
51: * input routine.
52: */
53: struct {
54: struct sockproto raw_proto; /* format of packet */
55: struct sockaddr raw_dst; /* dst address for rawintr */
56: struct sockaddr raw_src; /* src address for sbappendaddr */
57: };
58:
59: #ifdef SUPERVISOR
60: struct rawcb rawcb; /* head of list */
61: #endif
Defined variables
rawcb
defined in line
60; used 10 times
Defined struct's
defined in line
53; used 10 times
rawcb
defined in line
19; used 46 times
- in line 20-21(4),
60(2)
- in /usr/src/new/crash/dispnet.c line
287-292(8),
298-303(4),
309-311(4),
523(2)
- in /usr/src/sys/net/raw_cb.c line
47(2),
56(2),
76(2),
94(2),
107(2),
143(2)
- in /usr/src/sys/net/raw_usrreq.c line
90(2),
163(2)
- in /usr/src/sys/netimp/raw_imp.c line
46(2)
- in /usr/src/sys/netinet/raw_ip.c line
62(2),
138(2)
Defined macros
Usage of this include