- u_int, struct in_addr, u_int, int, struct ifnet *);
-extern int in_pcblookup_hash_exists(struct inpcbinfo *, struct in_addr,
- u_int, struct in_addr, u_int, int, uid_t *, gid_t *, struct ifnet *);
-extern void in_pcbnotifyall(struct inpcbinfo *, struct in_addr, int,
- void (*)(struct inpcb *, int));
-extern void in_pcbrehash(struct inpcb *);
-extern int in_setpeeraddr(struct socket *so, struct sockaddr **nam);
-extern int in_setsockaddr(struct socket *so, struct sockaddr **nam);
-extern int in_pcb_checkstate(struct inpcb *pcb, int mode, int locked);
-
-extern void in_pcbremlists(struct inpcb *inp);
-extern void inpcb_to_compat(struct inpcb *inp,
- struct inpcb_compat *inp_compat);
-#if !CONFIG_EMBEDDED
-extern void inpcb_to_xinpcb64(struct inpcb *inp,
- struct xinpcb64 *xinp);
-#endif
-extern int get_pcblist_n(short , struct sysctl_req *, struct inpcbinfo *);
-extern void inpcb_get_ports_used(unsigned int , uint8_t *, struct inpcbinfo *);
-
-#define INPCB_OPPORTUNISTIC_THROTTLEON 0x0001
-#define INPCB_OPPORTUNISTIC_SETCMD 0x0002
-extern uint32_t inpcb_count_opportunistic(unsigned int , struct inpcbinfo *, u_int32_t);
-extern void inp_route_copyout(struct inpcb *, struct route *);
-extern void inp_route_copyin(struct inpcb *, struct route *);
-extern int inp_bindif(struct inpcb *, unsigned int);
-extern int inp_nocellular(struct inpcb *, unsigned int);
+ u_int, struct in_addr, u_int, int, struct ifnet *);
+extern int in_pcblookup_hash_exists(struct inpcbinfo *, struct in_addr,
+ u_int, struct in_addr, u_int, int, uid_t *, gid_t *, struct ifnet *);
+extern void in_pcbnotifyall(struct inpcbinfo *, struct in_addr, int,
+ void (*)(struct inpcb *, int));
+extern void in_pcbrehash(struct inpcb *);
+extern int in_getpeeraddr(struct socket *, struct sockaddr **);
+extern int in_getpeeraddr_s(struct socket *, struct sockaddr_storage *);
+extern int in_getsockaddr(struct socket *, struct sockaddr **);
+extern int in_getsockaddr_s(struct socket *, struct sockaddr_storage *);
+extern int in_pcb_checkstate(struct inpcb *, int, int);
+extern void in_pcbremlists(struct inpcb *);
+extern void inpcb_to_compat(struct inpcb *, struct inpcb_compat *);
+extern void inpcb_to_xinpcb64(struct inpcb *, struct xinpcb64 *);
+extern int get_pcblist_n(short, struct sysctl_req *, struct inpcbinfo *);
+#define INPCB_GET_PORTS_USED_WILDCARDOK 0x1
+#define INPCB_GET_PORTS_USED_NOWAKEUPOK 0x2
+extern void inpcb_get_ports_used(u_int32_t, int, u_int32_t, bitstr_t *,
+ struct inpcbinfo *);
+#define INPCB_OPPORTUNISTIC_THROTTLEON 0x0001
+#define INPCB_OPPORTUNISTIC_SETCMD 0x0002
+extern uint32_t inpcb_count_opportunistic(unsigned int, struct inpcbinfo *,
+ u_int32_t);
+extern uint32_t inpcb_find_anypcb_byaddr(struct ifaddr *, struct inpcbinfo *);
+extern void inp_route_copyout(struct inpcb *, struct route *);
+extern void inp_route_copyin(struct inpcb *, struct route *);
+extern int inp_bindif(struct inpcb *, unsigned int, struct ifnet **);
+extern void inp_set_nocellular(struct inpcb *);
+extern void inp_clear_nocellular(struct inpcb *);
+extern void inp_set_noexpensive(struct inpcb *);
+extern void inp_set_awdl_unrestricted(struct inpcb *);
+extern boolean_t inp_get_awdl_unrestricted(struct inpcb *);
+extern void inp_clear_awdl_unrestricted(struct inpcb *);
+#if NECP
+extern void inp_update_necp_policy(struct inpcb *, struct sockaddr *, struct sockaddr *, u_int);
+extern void inp_set_want_app_policy(struct inpcb *);
+extern void inp_clear_want_app_policy(struct inpcb *);
+#endif /* NECP */