-#ifdef BSD_KERNEL_PRIVATE
-
-#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 */
-
-extern void in_losing(struct inpcb *);
-extern void in_rtchange(struct inpcb *, int);
-extern int in_pcballoc(struct socket *, struct inpcbinfo *, struct proc *);
-extern int in_pcbbind(struct inpcb *, struct sockaddr *, struct proc *);
-extern int in_pcbconnect(struct inpcb *, struct sockaddr *, struct proc *,
- struct ifnet **);
-extern void in_pcbdetach(struct inpcb *);
-extern void in_pcbdispose (struct inpcb *);
-extern void in_pcbdisconnect(struct inpcb *);
-extern int in_pcbinshash(struct inpcb *, int);
-extern int in_pcbladdr(struct inpcb *, struct sockaddr *,
- struct sockaddr_in *, struct ifnet **);
+extern int ipport_lowfirstauto;
+extern int ipport_lowlastauto;
+extern int ipport_firstauto;
+extern int ipport_lastauto;
+extern int ipport_hifirstauto;
+extern int ipport_hilastauto;
+
+/* freshly allocated PCB, it's in use */
+#define INPCB_STATE_INUSE 0x1
+/* this pcb is sitting in a a cache */
+#define INPCB_STATE_CACHED 0x2
+/* should treat as gone, will be garbage collected and freed */
+#define INPCB_STATE_DEAD 0x3
+
+/* marked as ready to be garbaged collected, should be treated as not found */
+#define WNT_STOPUSING 0xffff
+/* that pcb is being acquired, do not recycle this time */
+#define WNT_ACQUIRE 0x1
+/* release acquired mode, can be garbage collected when wantcnt is null */
+#define WNT_RELEASE 0x2
+
+extern void in_pcbinit(void);
+extern void in_pcbinfo_attach(struct inpcbinfo *);
+extern int in_pcbinfo_detach(struct inpcbinfo *);
+
+/* type of timer to be scheduled by inpcb_gc_sched and inpcb_timer_sched */
+enum {
+ INPCB_TIMER_LAZY = 0x1,
+ INPCB_TIMER_FAST,
+ INPCB_TIMER_NODELAY
+};
+extern void inpcb_gc_sched(struct inpcbinfo *, u_int32_t type);
+extern void inpcb_timer_sched(struct inpcbinfo *, u_int32_t type);
+
+extern void in_losing(struct inpcb *);
+extern void in_rtchange(struct inpcb *, int);
+extern int in_pcballoc(struct socket *, struct inpcbinfo *, struct proc *);
+extern int in_pcbbind(struct inpcb *, struct sockaddr *, struct proc *);
+extern int in_pcbconnect(struct inpcb *, struct sockaddr *, struct proc *,
+ unsigned int, struct ifnet **);
+extern void in_pcbdetach(struct inpcb *);
+extern void in_pcbdispose(struct inpcb *);
+extern void in_pcbdisconnect(struct inpcb *);
+extern int in_pcbinshash(struct inpcb *, int);
+extern int in_pcbladdr(struct inpcb *, struct sockaddr *, struct in_addr *,
+ unsigned int, struct ifnet **, int);