1 /* in_pcb.h 4.3 82/03/03 */ 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 */ 13 struct inpcb *inp_head; /* pointer back to chain of inpcb's 14 for this protocol */ 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 23 #define INPLOOKUP_WILDCARD 1 24 #define INPLOOKUP_SETLOCAL 2 25 26 #define sotoinpcb(so) ((struct inpcb *)(so)->so_pcb) 27 28 #ifdef KERNEL 29 struct inpcb *in_pcblookup(); 30 #endif 31