/*
- * Copyright (c) 2000-2014 Apple Inc. All rights reserved.
+ * Copyright (c) 2000-2016 Apple Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
lck_attr_t *ipi_lock_attr;
lck_grp_t *ipi_lock_grp;
lck_grp_attr_t *ipi_lock_grp_attr;
+
+#define INPCBINFO_UPDATE_MSS 0x1
+ u_int32_t ipi_flags;
};
#define INP_PCBHASH(faddr, lport, fport, mask) \
((_inp)->inp_flags2 & INP2_NO_IFF_EXPENSIVE)
#define INP_AWDL_UNRESTRICTED(_inp) \
((_inp)->inp_flags2 & INP2_AWDL_UNRESTRICTED)
+#define INP_INTCOPROC_ALLOWED(_inp) \
+ ((_inp)->inp_flags2 & INP2_INTCOPROC_ALLOWED)
#endif /* BSD_KERNEL_PRIVATE */
#define INP2_NO_IFF_EXPENSIVE 0x00000008 /* do not use expensive interface */
#define INP2_INHASHLIST 0x00000010 /* pcb is in inp_hash list */
#define INP2_AWDL_UNRESTRICTED 0x00000020 /* AWDL restricted mode allowed */
-#define INP2_KEEPALIVE_OFFLOAD 0x00000040 /* Enable UDP keepalive offload */
+#define INP2_KEEPALIVE_OFFLOAD 0x00000040 /* Enable UDP or TCP keepalive offload */
+#define INP2_INTCOPROC_ALLOWED 0x00000080 /* Allow communication via internal co-processor interfaces */
/*
* Flags passed to in_pcblookup*() functions.
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 **);
+ unsigned int, struct ifnet **, int);
extern struct inpcb *in_pcblookup_local(struct inpcbinfo *, struct in_addr,
u_int, int);
extern struct inpcb *in_pcblookup_local_and_cleanup(struct inpcbinfo *,
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 *);
+extern void inp_set_intcoproc_allowed(struct inpcb *);
+extern boolean_t inp_get_intcoproc_allowed(struct inpcb *);
+extern void inp_clear_intcoproc_allowed(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 int inp_update_policy(struct inpcb *);
extern boolean_t inp_restricted_recv(struct inpcb *, struct ifnet *);
extern boolean_t inp_restricted_send(struct inpcb *, struct ifnet *);
+extern void inp_incr_sndbytes_total(struct socket *, int);
+extern void inp_decr_sndbytes_total(struct socket *, int);
+extern void inp_count_sndbytes(struct inpcb *, u_int32_t);
+extern void inp_incr_sndbytes_unsent(struct socket *, int32_t);
+extern void inp_decr_sndbytes_unsent(struct socket *, int32_t);
+extern int32_t inp_get_sndbytes_allunsent(struct socket *, u_int32_t);
+extern void inp_decr_sndbytes_allunsent(struct socket *, u_int32_t);
#endif /* BSD_KERNEL_PRIVATE */
#ifdef KERNEL_PRIVATE
/* exported for PPP */