Commit | Line | Data |
---|---|---|
c124e997 | 1 | /* in_pcb.h 4.4 82/03/29 */ |
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 | */ | |
10 | struct 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 */ | |
c124e997 | 21 | struct route inp_route; /* placeholder for routing entry */ |
bae4854b BJ |
22 | }; |
23 | ||
ebcadd38 BJ |
24 | #define INPLOOKUP_WILDCARD 1 |
25 | #define INPLOOKUP_SETLOCAL 2 | |
26 | ||
bae4854b BJ |
27 | #define sotoinpcb(so) ((struct inpcb *)(so)->so_pcb) |
28 | ||
29 | #ifdef KERNEL | |
30 | struct inpcb *in_pcblookup(); | |
31 | #endif |