move pfinit after ifinit so ip can init ifinet (see ip_init)
[unix-history] / usr / src / sys / netinet / in_pcb.h
CommitLineData
ebcadd38 1/* in_pcb.h 4.3 82/03/03 */
bae4854b
BJ
2
3/*
4 * Common structure pcb for internet protocol implementation.
5 * Here are stored pointers to local and foreign host table
6 * entries, local and foreign socket numbers, and pointers
7 * up (to a socket structure) and down (to a protocol-specific)
8 * control block.
9 */
10struct inpcb {
11 struct inpcb *inp_next,*inp_prev;
12 /* pointers to other pcb's */
b454c3ea
BJ
13 struct inpcb *inp_head; /* pointer back to chain of inpcb's
14 for this protocol */
bae4854b
BJ
15 struct in_addr inp_faddr; /* foreign host table entry */
16 u_short inp_fport; /* foreign port */
17 struct in_addr inp_laddr; /* local host table entry */
18 u_short inp_lport; /* local port */
19 struct socket *inp_socket; /* back pointer to socket */
20 caddr_t inp_ppcb; /* pointer to per-protocol pcb */
21};
22
ebcadd38
BJ
23#define INPLOOKUP_WILDCARD 1
24#define INPLOOKUP_SETLOCAL 2
25
bae4854b
BJ
26#define sotoinpcb(so) ((struct inpcb *)(so)->so_pcb)
27
28#ifdef KERNEL
29struct inpcb *in_pcblookup();
30#endif