save boothowto, bootdev
[unix-history] / usr / src / sys / netns / ns_pcb.h
CommitLineData
8ae0e4b4 1/*
0880b18e 2 * Copyright (c) 1984, 1985, 1986 Regents of the University of California.
8ae0e4b4
KM
3 * All rights reserved. The Berkeley software License Agreement
4 * specifies the terms and conditions for redistribution.
5 *
0880b18e 6 * @(#)ns_pcb.h 7.1 (Berkeley) %G%
8ae0e4b4 7 */
886f6794
KS
8
9/*
10 * Ns protocol interface control block.
11 */
12struct 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 */
8f55df45 21 struct ns_addr nsp_lastdst; /* validate cached route for dg socks*/
886f6794
KS
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 */
d78d120a 34#define NSP_ALL_PACKETS 0x8 /* Turn off higher proto processing */
886f6794
KS
35
36#define NS_WILDCARD 1
37
38#define nsp_lport nsp_laddr.x_port
39#define nsp_fport nsp_faddr.x_port
40
41#define sotonspcb(so) ((struct nspcb *)((so)->so_pcb))
42
43/*
44 * Nominal space allocated to a ns socket.
45 */
46#define NSSNDQ 2048
47#define NSRCVQ 2048
48
49
50#ifdef KERNEL
58bca61d
MK
51struct nspcb nspcb; /* head of list */
52struct nspcb *ns_pcblookup();
886f6794 53#endif