Commit | Line | Data |
---|---|---|
8ae0e4b4 | 1 | /* |
240edf1f KS |
2 | * Copyright (c) 1984, 1985, 1986, 1987 Regents of the University of California. |
3 | * All rights reserved. | |
8ae0e4b4 | 4 | * |
dbf0c423 | 5 | * %sccs.include.redist.c% |
240edf1f | 6 | * |
dbf0c423 | 7 | * @(#)ns_pcb.h 7.4 (Berkeley) %G% |
8ae0e4b4 | 8 | */ |
886f6794 KS |
9 | |
10 | /* | |
11 | * Ns protocol interface control block. | |
12 | */ | |
13 | struct nspcb { | |
14 | struct nspcb *nsp_next; /* doubly linked list */ | |
15 | struct nspcb *nsp_prev; | |
16 | struct nspcb *nsp_head; | |
17 | struct socket *nsp_socket; /* back pointer to socket */ | |
18 | struct ns_addr nsp_faddr; /* destination address */ | |
19 | struct ns_addr nsp_laddr; /* socket's address */ | |
20 | caddr_t nsp_pcb; /* protocol specific stuff */ | |
21 | struct route nsp_route; /* routing information */ | |
8f55df45 | 22 | struct ns_addr nsp_lastdst; /* validate cached route for dg socks*/ |
886f6794 KS |
23 | long nsp_notify_param; /* extra info passed via ns_pcbnotify*/ |
24 | short nsp_flags; | |
25 | u_char nsp_dpt; /* default packet type for idp_output*/ | |
26 | u_char nsp_rpt; /* last received packet type by | |
27 | idp_input() */ | |
28 | }; | |
29 | ||
30 | /* possible flags */ | |
31 | ||
32 | #define NSP_IN_ABORT 0x1 /* calling abort through socket */ | |
33 | #define NSP_RAWIN 0x2 /* show headers on input */ | |
34 | #define NSP_RAWOUT 0x4 /* show header on output */ | |
d78d120a | 35 | #define NSP_ALL_PACKETS 0x8 /* Turn off higher proto processing */ |
886f6794 KS |
36 | |
37 | #define NS_WILDCARD 1 | |
38 | ||
39 | #define nsp_lport nsp_laddr.x_port | |
40 | #define nsp_fport nsp_faddr.x_port | |
41 | ||
42 | #define sotonspcb(so) ((struct nspcb *)((so)->so_pcb)) | |
43 | ||
44 | /* | |
45 | * Nominal space allocated to a ns socket. | |
46 | */ | |
47 | #define NSSNDQ 2048 | |
48 | #define NSRCVQ 2048 | |
49 | ||
50 | ||
51 | #ifdef KERNEL | |
58bca61d MK |
52 | struct nspcb nspcb; /* head of list */ |
53 | struct nspcb *ns_pcblookup(); | |
886f6794 | 54 | #endif |