1: /*
2: * Copyright (c) 1984, 1985, 1986, 1987 Regents of the University of California.
3: * All rights reserved.
4: *
5: * Redistribution and use in source and binary forms are permitted
6: * provided that this notice is preserved and that due credit is given
7: * to the University of California at Berkeley. The name of the University
8: * may not be used to endorse or promote products derived from this
9: * software without specific prior written permission. This software
10: * is provided ``as is'' without express or implied warranty.
11: *
12: * @(#)ns_pcb.h 7.2 (Berkeley) 1/20/88
13: */
14:
15: /*
16: * Ns protocol interface control block.
17: */
18: struct nspcb {
19: struct nspcb *nsp_next; /* doubly linked list */
20: struct nspcb *nsp_prev;
21: struct nspcb *nsp_head;
22: struct socket *nsp_socket; /* back pointer to socket */
23: struct ns_addr nsp_faddr; /* destination address */
24: struct ns_addr nsp_laddr; /* socket's address */
25: caddr_t nsp_pcb; /* protocol specific stuff */
26: struct route nsp_route; /* routing information */
27: struct ns_addr nsp_lastdst; /* validate cached route for dg socks*/
28: long nsp_notify_param; /* extra info passed via ns_pcbnotify*/
29: short nsp_flags;
30: u_char nsp_dpt; /* default packet type for idp_output*/
31: u_char nsp_rpt; /* last received packet type by
32: idp_input() */
33: };
34:
35: /* possible flags */
36:
37: #define NSP_IN_ABORT 0x1 /* calling abort through socket */
38: #define NSP_RAWIN 0x2 /* show headers on input */
39: #define NSP_RAWOUT 0x4 /* show header on output */
40: #define NSP_ALL_PACKETS 0x8 /* Turn off higher proto processing */
41:
42: #define NS_WILDCARD 1
43:
44: #define nsp_lport nsp_laddr.x_port
45: #define nsp_fport nsp_faddr.x_port
46:
47: #define sotonspcb(so) ((struct nspcb *)((so)->so_pcb))
48:
49: /*
50: * Nominal space allocated to a ns socket.
51: */
52: #define NSSNDQ 2048
53: #define NSRCVQ 2048
54:
55:
56: #ifdef SUPERVISOR
57: struct nspcb nspcb; /* head of list */
58: struct nspcb *ns_pcblookup();
59: #endif
Defined variables
nspcb
defined in line
57; used 28 times
Defined struct's
nspcb
defined in line
18; used 110 times
- in line 19-21(6),
57-58(4)
- in /usr/src/sys/netns/idp_usrreq.c line
46(2),
84(2),
95-97(4),
118(2),
253(2),
365(2),
526-527(4)
- in /usr/src/sys/netns/ns_input.c line
49-50(4),
79(2),
236-239(4),
441(2)
- in /usr/src/sys/netns/ns_pcb.c line
34-42(6),
50(2),
99(2),
180(2),
189(2),
202(2),
215(2),
239(2),
266(2),
280-285(4)
- in /usr/src/sys/netns/spp_usrreq.c line
57(2),
111(2),
527-529(4),
585(2),
596(2),
1067(2),
1181(2),
1426(2),
1442(2),
1471(2),
1534(2),
1547(2),
1571(2),
1711(2)
- in /usr/src/ucb/netstat/ns.c line
48(2),
71-72(4),
79-84(8)
Defined macros
Usage of this include