-#define INP_CONTROLOPTS (INP_RECVOPTS|INP_RECVRETOPTS|INP_RECVDSTADDR|\
- INP_RECVIF|\
- IN6P_PKTINFO|IN6P_HOPLIMIT|IN6P_HOPOPTS|\
- IN6P_DSTOPTS|IN6P_RTHDR|IN6P_RTHDRDSTOPTS|\
- IN6P_AUTOFLOWLABEL|INP_RECVTTL)
-#define INP_UNMAPPABLEOPTS (IN6P_HOPOPTS|IN6P_DSTOPTS|IN6P_RTHDR|\
- IN6P_AUTOFLOWLABEL)
-
- /* for KAME src sync over BSD*'s */
-#define IN6P_HIGHPORT INP_HIGHPORT
-#define IN6P_LOWPORT INP_LOWPORT
-#define IN6P_ANONPORT INP_ANONPORT
-#define IN6P_RECVIF INP_RECVIF
-#define IN6P_MTUDISC INP_MTUDISC
-#define IN6P_FAITH INP_FAITH
-#define IN6P_CONTROLOPTS INP_CONTROLOPTS
- /*
- * socket AF version is {newer than,or include}
- * actual datagram AF version
- */
-
-#define INPLOOKUP_WILDCARD 1
-#ifdef __APPLE__
-#define INPCB_ALL_OWNERS 0xff
-#define INPCB_NO_OWNER 0x0
-#define INPCB_OWNED_BY_X 0x80
-#define INPCB_MAX_IDS 7
-#endif /* __APPLE__ */
-
-#define sotoinpcb(so) ((struct inpcb *)(so)->so_pcb)
-#define sotoin6pcb(so) sotoinpcb(so) /* for KAME src sync over BSD*'s */
-
-#define INP_SOCKAF(so) so->so_proto->pr_domain->dom_family
-
-#define INP_CHECK_SOCKAF(so, af) (INP_SOCKAF(so) == af)
-
-#ifdef KERNEL
-extern int ipport_lowfirstauto;
-extern int ipport_lowlastauto;
-extern int ipport_firstauto;
-extern int ipport_lastauto;
-extern int ipport_hifirstauto;
-extern int ipport_hilastauto;
-
-#define INPCB_STATE_INUSE 0x1 /* freshly allocated PCB, it's in use */
-#define INPCB_STATE_CACHED 0x2 /* this pcb is sitting in a a cache */
-#define INPCB_STATE_DEAD 0x3 /* should treat as gone, will be garbage collected and freed */
-
-#define WNT_STOPUSING 0xffff /* marked as ready to be garbaged collected, should be treated as not found */
-#define WNT_ACQUIRE 0x1 /* that pcb is being acquired, do not recycle this time */
-#define WNT_RELEASE 0x2 /* release acquired mode, can be garbage collected when wantcnt is null */
-
-
-void in_pcbpurgeif0(struct inpcb *, struct ifnet *);
-void in_losing(struct inpcb *);
-void in_rtchange(struct inpcb *, int);
-int in_pcballoc(struct socket *, struct inpcbinfo *, struct proc *);
-int in_pcbbind(struct inpcb *, struct sockaddr *, struct proc *);
-int in_pcbconnect(struct inpcb *, struct sockaddr *, struct proc *);
-void in_pcbdetach(struct inpcb *);
-void in_pcbdispose (struct inpcb *);
-void in_pcbdisconnect(struct inpcb *);
-int in_pcbinshash(struct inpcb *, int);
-int in_pcbladdr(struct inpcb *, struct sockaddr *, struct sockaddr_in **);
-struct inpcb *
- in_pcblookup_local(struct inpcbinfo *, struct in_addr, u_int, int);
-struct inpcb *
- in_pcblookup_hash(struct inpcbinfo *,
- struct in_addr, u_int, struct in_addr, u_int,
- int, struct ifnet *);
-void in_pcbnotifyall(struct inpcbinfo *, struct in_addr,
- int, void (*)(struct inpcb *, int));
-void in_pcbrehash(struct inpcb *);
-int in_setpeeraddr(struct socket *so, struct sockaddr **nam);
-int in_setsockaddr(struct socket *so, struct sockaddr **nam);
-int in_pcb_checkstate(struct inpcb *pcb, int mode, int locked);
-
-int
-in_pcb_grab_port (struct inpcbinfo *pcbinfo,
- u_short options,
- struct in_addr laddr,
- u_short *lport,
- struct in_addr faddr,
- u_short fport,
- u_int cookie,
- u_char owner_id);
-
-int
-in_pcb_letgo_port(struct inpcbinfo *pcbinfo,
- struct in_addr laddr,
- u_short lport,
- struct in_addr faddr,
- u_short fport, u_char owner_id);
-
-u_char
-in_pcb_get_owner(struct inpcbinfo *pcbinfo,
- struct in_addr laddr,
- u_short lport,
- struct in_addr faddr,
- u_short fport,
- u_int *cookie);
-
-void in_pcb_nat_init(struct inpcbinfo *pcbinfo, int afamily, int pfamily,
- int protocol);
-
-int
-in_pcb_new_share_client(struct inpcbinfo *pcbinfo, u_char *owner_id);
-
-int
-in_pcb_rem_share_client(struct inpcbinfo *pcbinfo, u_char owner_id);
-
-void in_pcbremlists(struct inpcb *inp);
-int in_pcb_ckeckstate(struct inpcb *, int, int);
-void inpcb_to_compat(struct inpcb *inp, struct inpcb_compat *inp_compat);
-
-#endif /* KERNEL */