Deleted Added
sdiff udiff text old ( 34923 ) new ( 36079 )
full compact
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 $
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);
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 */
78 u_quad_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
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 ---