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