SLIST_HEAD(,tcp_notify_ack_marker) t_notify_ack; /* state for notifying data acknowledgements */
u_int32_t t_recv_throttle_ts; /* TS for start of recv throttle */
u_int32_t t_rxt_minimum_timeout; /* minimum retransmit timeout in ms */
+ uint32_t t_challengeack_last; /* last time challenge ACK was sent per sec */
+ uint32_t t_challengeack_count; /* # of challenge ACKs already sent per sec */
};
#define IN_FASTRECOVERY(tp) (tp->t_flags & TF_FASTRECOVERY)
mptcp_reset_rexmit_state((_tp_)); \
} while(0);
-#define TCP_AUTORCVBUF_MAX(_ifp_) (((_ifp_) != NULL && \
- ((_ifp_)->if_eflags & IFEF_3CA)) ? tcp_autorcvbuf_max_ca : \
- tcp_autorcvbuf_max)
+#define TCP_AUTORCVBUF_MAX(_ifp_) (((_ifp_) != NULL && (IFNET_IS_CELLULAR((_ifp_))) && ((_ifp_)->if_eflags & IFEF_3CA)) ? \
+ (tcp_autorcvbuf_max << 1) : tcp_autorcvbuf_max)
enum tcp_cc_event {
TCP_CC_CWND_INIT, /* 0 */
u_int32_t tcps_badsyn; /* bogus SYN, e.g. premature ACK */
u_int32_t tcps_mturesent; /* resends due to MTU discovery */
u_int32_t tcps_listendrop; /* listen queue overflows */
+ u_int32_t tcps_synchallenge; /* challenge ACK due to bad SYN */
+ u_int32_t tcps_rstchallenge; /* challenge ACK due to bad RST */
/* new stats from FreeBSD 5.4 sync up */
u_int32_t tcps_minmssdrops; /* average minmss too low drops */
+
u_int32_t tcps_sndrexmitbad; /* unnecessary packet retransmissions */
u_int32_t tcps_badrst; /* ignored RSTs in the window */
u_int32_t tcps_mptcp_back_to_wifi; /* Total number of connections that succeed to move traffic away from cell (when starting on cell) */
u_int32_t tcps_mptcp_wifi_proxy; /* Total number of new subflows that fell back to regular TCP on cell */
u_int32_t tcps_mptcp_cell_proxy; /* Total number of new subflows that fell back to regular TCP on WiFi */
+ u_int32_t tcps_mptcp_triggered_cell; /* Total number of times an MPTCP-connection triggered cell bringup */
};
#define TCP_RTTVAR_SCALE 16 /* multiplier for rttvar; 4 bits */
#define TCP_RTTVAR_SHIFT 4 /* shift for rttvar; 4 bits */
#define TCP_DELTA_SHIFT 2 /* see tcp_input.c */
-
+
+
+/*
+ * TCP structure with information that gives insight into forward progress on an interface,
+ * exported to user-land via sysctl(3).
+ */
+struct xtcpprogress_indicators {
+ u_int32_t xp_numflows; /* Total number of flows */
+ u_int32_t xp_conn_probe_fails; /* Count of connection failures */
+ u_int32_t xp_read_probe_fails; /* Count of read probe failures */
+ u_int32_t xp_write_probe_fails; /* Count of write failures */
+ u_int32_t xp_recentflows; /* Total of "recent" flows */
+ u_int32_t xp_recentflows_unacked; /* Total of "recent" flows with unacknowledged data */
+ u_int64_t xp_recentflows_rxbytes; /* Total of "recent" flows received bytes */
+ u_int64_t xp_recentflows_txbytes; /* Total of "recent" flows transmitted bytes */
+ u_int64_t xp_recentflows_rxooo; /* Total of "recent" flows received out of order bytes */
+ u_int64_t xp_recentflows_rxdup; /* Total of "recent" flows received duplicate bytes */
+ u_int64_t xp_recentflows_retx; /* Total of "recent" flows retransmitted bytes */
+ u_int64_t xp_reserved1; /* Expansion */
+ u_int64_t xp_reserved2; /* Expansion */
+ u_int64_t xp_reserved3; /* Expansion */
+ u_int64_t xp_reserved4; /* Expansion */
+};
+
+struct tcpprogressreq {
+ u_int64_t ifindex; /* Interface index for progress indicators */
+ u_int64_t recentflow_maxduration; /* In mach_absolute_time, max duration for flow to be counted as "recent" */
+ u_int64_t xp_reserved1; /* Expansion */
+ u_int64_t xp_reserved2; /* Expansion */
+};
+
#endif /* PRIVATE */
#pragma pack()
extern int tcp_ecn_inbound;
extern u_int32_t tcp_do_autorcvbuf;
extern u_int32_t tcp_autorcvbuf_max;
-extern u_int32_t tcp_autorcvbuf_max_ca;
extern u_int32_t tcp_autorcvbuf_inc_shift;
extern int tcp_recv_bg;
extern void tcp_get_ports_used(u_int32_t, int, u_int32_t, bitstr_t *);
uint32_t tcp_count_opportunistic(unsigned int ifindex, u_int32_t flags);
uint32_t tcp_find_anypcb_byaddr(struct ifaddr *ifa);
-void tcp_set_max_rwinscale(struct tcpcb *tp, struct socket *so,
- u_int32_t maxrcvbuf);
+void tcp_set_max_rwinscale(struct tcpcb *tp, struct socket *so, struct ifnet *ifp);
struct bwmeas* tcp_bwmeas_alloc(struct tcpcb *tp);
void tcp_bwmeas_free(struct tcpcb *tp);
extern int32_t timer_diff(uint32_t t1, uint32_t toff1, uint32_t t2, uint32_t toff2);