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 | * |
240edf1f | 5 | * Redistribution and use in source and binary forms are permitted |
616d42db KB |
6 | * provided that the above copyright notice and this paragraph are |
7 | * duplicated in all such forms and that any documentation, | |
8 | * advertising materials, and other materials related to such | |
9 | * distribution and use acknowledge that the software was developed | |
10 | * by the University of California, Berkeley. The name of the | |
11 | * University may not be used to endorse or promote products derived | |
12 | * from this software without specific prior written permission. | |
13 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR | |
14 | * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED | |
15 | * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. | |
240edf1f | 16 | * |
616d42db | 17 | * @(#)ns_pcb.h 7.3 (Berkeley) %G% |
8ae0e4b4 | 18 | */ |
886f6794 KS |
19 | |
20 | /* | |
21 | * Ns protocol interface control block. | |
22 | */ | |
23 | struct nspcb { | |
24 | struct nspcb *nsp_next; /* doubly linked list */ | |
25 | struct nspcb *nsp_prev; | |
26 | struct nspcb *nsp_head; | |
27 | struct socket *nsp_socket; /* back pointer to socket */ | |
28 | struct ns_addr nsp_faddr; /* destination address */ | |
29 | struct ns_addr nsp_laddr; /* socket's address */ | |
30 | caddr_t nsp_pcb; /* protocol specific stuff */ | |
31 | struct route nsp_route; /* routing information */ | |
8f55df45 | 32 | struct ns_addr nsp_lastdst; /* validate cached route for dg socks*/ |
886f6794 KS |
33 | long nsp_notify_param; /* extra info passed via ns_pcbnotify*/ |
34 | short nsp_flags; | |
35 | u_char nsp_dpt; /* default packet type for idp_output*/ | |
36 | u_char nsp_rpt; /* last received packet type by | |
37 | idp_input() */ | |
38 | }; | |
39 | ||
40 | /* possible flags */ | |
41 | ||
42 | #define NSP_IN_ABORT 0x1 /* calling abort through socket */ | |
43 | #define NSP_RAWIN 0x2 /* show headers on input */ | |
44 | #define NSP_RAWOUT 0x4 /* show header on output */ | |
d78d120a | 45 | #define NSP_ALL_PACKETS 0x8 /* Turn off higher proto processing */ |
886f6794 KS |
46 | |
47 | #define NS_WILDCARD 1 | |
48 | ||
49 | #define nsp_lport nsp_laddr.x_port | |
50 | #define nsp_fport nsp_faddr.x_port | |
51 | ||
52 | #define sotonspcb(so) ((struct nspcb *)((so)->so_pcb)) | |
53 | ||
54 | /* | |
55 | * Nominal space allocated to a ns socket. | |
56 | */ | |
57 | #define NSSNDQ 2048 | |
58 | #define NSRCVQ 2048 | |
59 | ||
60 | ||
61 | #ifdef KERNEL | |
58bca61d MK |
62 | struct nspcb nspcb; /* head of list */ |
63 | struct nspcb *ns_pcblookup(); | |
886f6794 | 64 | #endif |