minor fixes
[unix-history] / usr / src / sys / net / raw_cb.h
CommitLineData
a7d16889 1/* raw_cb.h 4.3 82/02/02 */
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 */
11 struct sockaddr rcb_addr; /* destination address */
12 caddr_t rcb_pcb; /* protocol specific stuff */
13 short rcb_flags;
14};
15
16/*
17 * Since we can't interpret canonical addresses,
18 * we mark an address present in the flags field.
19 */
20#define RAW_ADDR 01 /* got an address */
21
22#define sotorawcb(so) ((struct rawcb *)(so)->so_pcb)
23
24/*
25 * Nominal space allocated to a raw socket.
26 */
27#define RAWSNDQ 2048
28#define RAWRCVQ 2048
29
30/*
a7d16889
SL
31 * Format of raw interface header prepended by
32 * raw_input after call from protocol specific
33 * input routine.
16287509
BJ
34 */
35struct raw_header {
faad37c0
SL
36 struct sockproto raw_protocol; /* format of packet */
37 struct sockaddr raw_dst; /* dst address for rawintr */
38 struct sockaddr raw_src; /* src address for sbappendaddr */
16287509
BJ
39};
40
41#ifdef KERNEL
42struct rawcb rawcb; /* head of list */
43#endif