Deleted Added
full compact
in_pcb.h (34923) in_pcb.h (36079)
1/*
2 * Copyright (c) 1982, 1986, 1990, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 17 unchanged lines hidden (view full) ---

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)in_pcb.h 8.1 (Berkeley) 6/10/93
1/*
2 * Copyright (c) 1982, 1986, 1990, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 17 unchanged lines hidden (view full) ---

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)in_pcb.h 8.1 (Berkeley) 6/10/93
34 * $Id: in_pcb.h,v 1.24 1998/03/24 18:06:11 wollman Exp $
34 * $Id: in_pcb.h,v 1.25 1998/03/28 10:18:22 bde Exp $
35 */
36
37#ifndef _NETINET_IN_PCB_H_
38#define _NETINET_IN_PCB_H_
39
40#include <sys/queue.h>
41
42/*
43 * Common structure pcb for internet protocol implementation.
44 * Here are stored pointers to local and foreign host table
45 * entries, local and foreign socket numbers, and pointers
46 * up (to a socket structure) and down (to a protocol-specific)
47 * control block.
48 */
49LIST_HEAD(inpcbhead, inpcb);
50LIST_HEAD(inpcbporthead, inpcbport);
35 */
36
37#ifndef _NETINET_IN_PCB_H_
38#define _NETINET_IN_PCB_H_
39
40#include <sys/queue.h>
41
42/*
43 * Common structure pcb for internet protocol implementation.
44 * Here are stored pointers to local and foreign host table
45 * entries, local and foreign socket numbers, and pointers
46 * up (to a socket structure) and down (to a protocol-specific)
47 * control block.
48 */
49LIST_HEAD(inpcbhead, inpcb);
50LIST_HEAD(inpcbporthead, inpcbport);
51typedef u_quad_t inp_gen_t;
51
52/*
53 * NB: the zone allocator is type-stable EXCEPT FOR THE FIRST TWO LONGS
54 * of the structure. Therefore, it is important that the members in
55 * that position not contain any information which is required to be
56 * stable.
57 */
58struct inpcb {

--- 11 unchanged lines hidden (view full) ---

70 int inp_flags; /* generic IP/datagram flags */
71 u_char inp_ip_tos; /* type of service proto */
72 u_char inp_ip_ttl; /* time to live proto */
73 u_char inp_ip_p; /* protocol proto */
74 u_char pad[1]; /* alignment */
75 struct ip_moptions *inp_moptions; /* IP multicast options */
76 LIST_ENTRY(inpcb) inp_portlist; /* list for this PCB's local port */
77 struct inpcbport *inp_phd; /* head of this list */
52
53/*
54 * NB: the zone allocator is type-stable EXCEPT FOR THE FIRST TWO LONGS
55 * of the structure. Therefore, it is important that the members in
56 * that position not contain any information which is required to be
57 * stable.
58 */
59struct inpcb {

--- 11 unchanged lines hidden (view full) ---

71 int inp_flags; /* generic IP/datagram flags */
72 u_char inp_ip_tos; /* type of service proto */
73 u_char inp_ip_ttl; /* time to live proto */
74 u_char inp_ip_p; /* protocol proto */
75 u_char pad[1]; /* alignment */
76 struct ip_moptions *inp_moptions; /* IP multicast options */
77 LIST_ENTRY(inpcb) inp_portlist; /* list for this PCB's local port */
78 struct inpcbport *inp_phd; /* head of this list */
78 u_quad_t inp_gencnt; /* generation count of this instance */
79 inp_gen_t inp_gencnt; /* generation count of this instance */
79};
80/*
81 * The range of the generation count, as used in this implementation,
82 * is 9e19. We would have to create 300 billion connections per
83 * second for this number to roll over in a year. This seems sufficiently
84 * unlikely that we simply don't concern ourselves with that possibility.
85 */
86
80};
81/*
82 * The range of the generation count, as used in this implementation,
83 * is 9e19. We would have to create 300 billion connections per
84 * second for this number to roll over in a year. This seems sufficiently
85 * unlikely that we simply don't concern ourselves with that possibility.
86 */
87
88/*
89 * Interface exported to userland by various protocols which use
90 * inpcbs. Hack alert -- only define if struct xsocket is in scope.
91 */
92#ifdef _SYS_SOCKETVAR_H_
93struct xinpcb {
94 size_t xi_len; /* length of this structure */
95 struct inpcb xi_inp;
96 struct xsocket xi_socket;
97 u_quad_t xi_alignment_hack;
98};
99
100struct xinpgen {
101 size_t xig_len; /* length of this structure */
102 u_int xig_count; /* number of PCBs at this time */
103 inp_gen_t xig_gen; /* generation count at this time */
104 so_gen_t xig_sogen; /* socket generation count at this time */
105};
106#endif /* _SYS_SOCKETVAR_H_ */
107
87struct inpcbport {
88 LIST_ENTRY(inpcbport) phd_hash;
89 struct inpcbhead phd_pcblist;
90 u_short phd_port;
91};
92
93struct inpcbinfo { /* XXX documentation, prefixes */
94 struct inpcbhead *hashbase;

--- 58 unchanged lines hidden ---
108struct inpcbport {
109 LIST_ENTRY(inpcbport) phd_hash;
110 struct inpcbhead phd_pcblist;
111 u_short phd_port;
112};
113
114struct inpcbinfo { /* XXX documentation, prefixes */
115 struct inpcbhead *hashbase;

--- 58 unchanged lines hidden ---