+extern int sosendallatonce(struct socket *so);
+extern int soreadable(struct socket *so);
+extern int sowriteable(struct socket *so);
+extern void sowwakeup(struct socket *so);
+extern int sosendcheck(struct socket *, struct sockaddr *, user_ssize_t,
+ int32_t, int32_t, int, int *, struct mbuf *);
+
+extern int soo_ioctl(struct fileproc *, u_long, caddr_t, vfs_context_t);
+extern int soo_stat(struct socket *, void *, int);
+extern int soo_select(struct fileproc *, int, void *, vfs_context_t);
+extern int soo_kqfilter(struct fileproc *, struct knote *, vfs_context_t);
+
+extern struct sockaddr_entry *sockaddrentry_alloc(int);
+extern void sockaddrentry_free(struct sockaddr_entry *);
+extern struct sockaddr_entry *sockaddrentry_dup(const struct sockaddr_entry *,
+ int);
+extern struct sockaddr_list *sockaddrlist_alloc(int);
+extern void sockaddrlist_free(struct sockaddr_list *);
+extern void sockaddrlist_insert(struct sockaddr_list *,
+ struct sockaddr_entry *);
+extern void sockaddrlist_remove(struct sockaddr_list *,
+ struct sockaddr_entry *);
+extern struct sockaddr_list *sockaddrlist_dup(const struct sockaddr_list *,
+ int);
+
+/* Service class flags used for setting service class on a packet */
+#define PKT_SCF_IPV6 0x00000001 /* IPv6 packet */
+#define PKT_SCF_TCP_ACK 0x00000002 /* Pure TCP ACK */
+
+extern void set_packet_service_class(struct mbuf *, struct socket *,
+ mbuf_svc_class_t, u_int32_t);
+extern void so_tc_update_stats(struct mbuf *, struct socket *,
+ mbuf_svc_class_t);
+extern mbuf_svc_class_t mbuf_service_class_from_control(struct mbuf *);
+extern mbuf_svc_class_t so_tc2msc(int);
+extern int so_svc2tc(mbuf_svc_class_t);
+
+extern u_int8_t tcp_cansbgrow(struct sockbuf *sb);
+extern int tcp_get_msg_priority(struct mbuf *, uint32_t *);
+extern void set_tcp_stream_priority(struct socket *so);
+
+extern int so_set_traffic_class(struct socket *, int);
+extern void so_set_default_traffic_class(struct socket *);
+extern int so_set_opportunistic(struct socket *, int);
+extern int so_get_opportunistic(struct socket *);
+extern int so_set_recv_anyif(struct socket *, int);
+extern int so_get_recv_anyif(struct socket *);
+extern int so_set_effective_pid(struct socket *, int, struct proc *);
+extern int so_set_effective_uuid(struct socket *, uuid_t, struct proc *);
+extern int so_set_restrictions(struct socket *, uint32_t);
+extern uint32_t so_get_restrictions(struct socket *);
+extern void socket_tclass_init(void);
+extern int so_set_tcdbg(struct socket *, struct so_tcdbg *);
+extern int sogetopt_tcdbg(struct socket *, struct sockopt *);
+extern void so_set_lro(struct socket*, int);
+
+extern int so_isdstlocal(struct socket *);
+extern void so_recv_data_stat(struct socket *, struct mbuf *, size_t);
+extern void so_inc_recv_data_stat(struct socket *, size_t, size_t, uint32_t);
+extern int so_wait_for_if_feedback(struct socket *);
+extern int msgq_sbspace(struct socket *so, struct mbuf *control);
+extern int soopt_getm(struct sockopt *sopt, struct mbuf **mp);
+extern int soopt_mcopyin(struct sockopt *sopt, struct mbuf *m);
+extern int soopt_mcopyout(struct sockopt *sopt, struct mbuf *m);
+extern boolean_t so_cache_timer(void);
+
+extern void mptcp_preproc_sbdrop(struct mbuf *, unsigned int);
+extern void mptcp_postproc_sbdrop(struct mbuf *, u_int64_t, u_int32_t,
+ u_int32_t);
+extern int mptcp_adj_rmap(struct socket *, struct mbuf *);
+
+extern void netpolicy_post_msg(uint32_t, struct netpolicy_event_data *,
+ uint32_t);
+extern void socket_post_kev_msg(uint32_t, struct kev_socket_event_data *,
+ uint32_t);
+extern void socket_post_kev_msg_closed(struct socket *);
+/*
+ * Socket operation routines.
+ * These routines are called by the routines in
+ * sys_socket.c or from a system process, and
+ * implement the semantics of socket operations by
+ * switching out to the protocol specific routines.
+ */
+extern void postevent(struct socket *, struct sockbuf *, int);
+extern void evsofree(struct socket *);