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