1*7c478bd9Sstevel@tonic-gate /* 2*7c478bd9Sstevel@tonic-gate * Copyright (c) 1997-1998 by Sun Microsystems, Inc. 3*7c478bd9Sstevel@tonic-gate * All rights reserved. 4*7c478bd9Sstevel@tonic-gate */ 5*7c478bd9Sstevel@tonic-gate 6*7c478bd9Sstevel@tonic-gate /* 7*7c478bd9Sstevel@tonic-gate * Copyright (c) 1982, 1986 Regents of the University of California. 8*7c478bd9Sstevel@tonic-gate * All rights reserved. The Berkeley software License Agreement 9*7c478bd9Sstevel@tonic-gate * specifies the terms and conditions for redistribution. 10*7c478bd9Sstevel@tonic-gate */ 11*7c478bd9Sstevel@tonic-gate 12*7c478bd9Sstevel@tonic-gate /* 13*7c478bd9Sstevel@tonic-gate * Common structure pcb for internet protocol implementation. 14*7c478bd9Sstevel@tonic-gate * Here are stored pointers to local and foreign host table 15*7c478bd9Sstevel@tonic-gate * entries, local and foreign socket numbers, and pointers 16*7c478bd9Sstevel@tonic-gate * up (to a socket structure) and down (to a protocol-specific) 17*7c478bd9Sstevel@tonic-gate * control block. 18*7c478bd9Sstevel@tonic-gate */ 19*7c478bd9Sstevel@tonic-gate 20*7c478bd9Sstevel@tonic-gate #ifndef _NETINET_IN_PCB_H 21*7c478bd9Sstevel@tonic-gate #define _NETINET_IN_PCB_H 22*7c478bd9Sstevel@tonic-gate 23*7c478bd9Sstevel@tonic-gate /* in_pcb.h 1.7 88/08/19 SMI; from UCB 7.1 6/5/86 */ 24*7c478bd9Sstevel@tonic-gate 25*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 26*7c478bd9Sstevel@tonic-gate extern "C" { 27*7c478bd9Sstevel@tonic-gate #endif 28*7c478bd9Sstevel@tonic-gate 29*7c478bd9Sstevel@tonic-gate struct inpcb { 30*7c478bd9Sstevel@tonic-gate struct inpcb *inp_next, *inp_prev; /* pointers to other pcb's */ 31*7c478bd9Sstevel@tonic-gate struct inpcb *inp_head; /* pointer back to chain of inpcb's */ 32*7c478bd9Sstevel@tonic-gate /* for this protocol */ 33*7c478bd9Sstevel@tonic-gate struct in_addr inp_faddr; /* foreign host table entry */ 34*7c478bd9Sstevel@tonic-gate ushort_t inp_fport; /* foreign port */ 35*7c478bd9Sstevel@tonic-gate struct in_addr inp_laddr; /* local host table entry */ 36*7c478bd9Sstevel@tonic-gate ushort_t inp_lport; /* local port */ 37*7c478bd9Sstevel@tonic-gate struct socket *inp_socket; /* back pointer to socket */ 38*7c478bd9Sstevel@tonic-gate caddr_t inp_ppcb; /* pointer to per-protocol pcb */ 39*7c478bd9Sstevel@tonic-gate struct route inp_route; /* placeholder for routing entry */ 40*7c478bd9Sstevel@tonic-gate struct mbuf *inp_options; /* IP options */ 41*7c478bd9Sstevel@tonic-gate }; 42*7c478bd9Sstevel@tonic-gate 43*7c478bd9Sstevel@tonic-gate #define INPLOOKUP_WILDCARD 1 44*7c478bd9Sstevel@tonic-gate #define INPLOOKUP_SETLOCAL 2 45*7c478bd9Sstevel@tonic-gate 46*7c478bd9Sstevel@tonic-gate #define sotoinpcb(so) ((struct inpcb *)(so)->so_pcb) 47*7c478bd9Sstevel@tonic-gate 48*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 49*7c478bd9Sstevel@tonic-gate } 50*7c478bd9Sstevel@tonic-gate #endif 51*7c478bd9Sstevel@tonic-gate 52*7c478bd9Sstevel@tonic-gate #endif /* _NETINET_IN_PCB_H */ 53