add IFF_LOCAL
[unix-history] / usr / src / sys / net / raw_cb.h
CommitLineData
b11be056 1/* raw_cb.h 6.1 83/07/29 */
16287509
BJ
2
3/*
4 * Raw protocol interface control block. Used
5 * to tie a socket to the generic raw interface.
6 */
7struct rawcb {
8 struct rawcb *rcb_next; /* doubly linked list */
9 struct rawcb *rcb_prev;
10 struct socket *rcb_socket; /* back pointer to socket */
126472ab
SL
11 struct sockaddr rcb_faddr; /* destination address */
12 struct sockaddr rcb_laddr; /* socket's address */
16287509 13 caddr_t rcb_pcb; /* protocol specific stuff */
71fb71a3 14 struct route rcb_route; /* routing information */
16287509
BJ
15 short rcb_flags;
16};
17
18/*
19 * Since we can't interpret canonical addresses,
20 * we mark an address present in the flags field.
21 */
126472ab
SL
22#define RAW_LADDR 01
23#define RAW_FADDR 02
71fb71a3 24#define RAW_DONTROUTE 04 /* no routing, default */
16287509
BJ
25
26#define sotorawcb(so) ((struct rawcb *)(so)->so_pcb)
27
28/*
29 * Nominal space allocated to a raw socket.
30 */
31#define RAWSNDQ 2048
32#define RAWRCVQ 2048
33
34/*
a7d16889
SL
35 * Format of raw interface header prepended by
36 * raw_input after call from protocol specific
37 * input routine.
16287509
BJ
38 */
39struct raw_header {
126472ab 40 struct sockproto raw_proto; /* format of packet */
faad37c0
SL
41 struct sockaddr raw_dst; /* dst address for rawintr */
42 struct sockaddr raw_src; /* src address for sbappendaddr */
16287509
BJ
43};
44
45#ifdef KERNEL
46struct rawcb rawcb; /* head of list */
47#endif