- struct mppcb *mpte_mppcb; /* back ptr to multipath PCB */
- struct mptcb *mpte_mptcb; /* ptr to MPTCP PCB */
- TAILQ_HEAD(, mptopt) mpte_sopts; /* list of socket options */
- TAILQ_HEAD(, mptsub) mpte_subflows; /* list of subflows */
- uint16_t mpte_numflows; /* # of subflows in list */
- uint16_t mpte_nummpcapflows; /* # of MP_CAP subflows */
- sae_associd_t mpte_associd; /* MPTCP association ID */
- sae_connid_t mpte_connid_last; /* last used connection ID */
- /*
- * Threading (protected by mpte_thread_lock)
- */
- decl_lck_mtx_data(, mpte_thread_lock); /* thread lock */
- struct thread *mpte_thread; /* worker thread */
- uint32_t mpte_thread_active; /* thread is running */
- uint32_t mpte_thread_reqs; /* # of requests for thread */
- struct mptsub *mpte_active_sub; /* ptr to last active subf */
- uint8_t mpte_flags; /* per mptcp session flags */
- uint8_t mpte_lost_aid; /* storing lost address id */
- uint8_t mpte_addrid_last; /* storing address id parm */
+ struct mppcb *mpte_mppcb; /* back ptr to multipath PCB */
+ struct mptcb *mpte_mptcb; /* ptr to MPTCP PCB */
+ TAILQ_HEAD(, mptopt) mpte_sopts; /* list of socket options */
+ TAILQ_HEAD(, mptsub) mpte_subflows; /* list of subflows */
+#define MPTCP_MAX_NUM_SUBFLOWS 256
+ uint16_t mpte_numflows; /* # of subflows in list */
+ uint16_t mpte_nummpcapflows; /* # of MP_CAP subflows */
+ sae_associd_t mpte_associd; /* MPTCP association ID */
+ sae_connid_t mpte_connid_last; /* last used connection ID */
+
+ uint64_t mpte_time_target;
+ thread_call_t mpte_time_thread;
+
+ uint32_t mpte_last_cellicon_set;
+ uint32_t mpte_cellicon_increments;
+
+ union {
+ /* Source address of initial subflow */
+ struct sockaddr _mpte_src;
+ struct sockaddr_in _mpte_src_v4;
+ struct sockaddr_in6 _mpte_src_v6;
+ } mpte_u_src;
+#define mpte_src mpte_u_src._mpte_src
+#define __mpte_src_v4 mpte_u_src._mpte_src_v4
+#define __mpte_src_v6 mpte_u_src._mpte_src_v6
+ union {
+ /* Destination address of initial subflow */
+ struct sockaddr _mpte_dst;
+ struct sockaddr_in _mpte_dst_v4;
+ struct sockaddr_in6 _mpte_dst_v6;
+ } mpte_u_dst;
+#define mpte_dst mpte_u_dst._mpte_dst
+#define __mpte_dst_v4 mpte_u_dst._mpte_dst_v4
+#define __mpte_dst_v6 mpte_u_dst._mpte_dst_v6
+
+ struct sockaddr_in mpte_dst_v4_nat64;
+
+ struct sockaddr_in mpte_dst_unicast_v4;
+ struct sockaddr_in6 mpte_dst_unicast_v6;
+
+ uint16_t mpte_alternate_port; /* Alternate port for subflow establishment (network-byte-order) */
+
+ int mpte_epid;
+ uuid_t mpte_euuid;
+
+ struct mptsub *mpte_active_sub; /* ptr to last active subf */
+ uint16_t mpte_flags; /* per mptcp session flags */
+#define MPTE_SND_REM_ADDR 0x01 /* Send Remove_addr option */
+#define MPTE_SVCTYPE_CHECKED 0x02 /* Did entitlement-check for service-type */
+#define MPTE_FIRSTPARTY 0x04 /* First-party app used multipath_extended entitlement */
+#define MPTE_ACCESS_GRANTED 0x08 /* Access to cellular has been granted for this connection */
+#define MPTE_FORCE_ENABLE 0x10 /* For MPTCP regardless of heuristics to detect middleboxes */
+#define MPTE_IN_WORKLOOP 0x20 /* Are we currently inside the workloop ? */
+#define MPTE_WORKLOOP_RELAUNCH 0x40 /* Another event got queued, we should restart the workloop */
+#define MPTE_UNICAST_IP 0x80 /* New subflows are only being established towards the unicast IP in the ADD_ADDR */
+#define MPTE_CELL_PROHIBITED 0x100 /* Cell access has been prohibited based on signal quality */
+ uint8_t mpte_svctype; /* MPTCP Service type */
+ uint8_t mpte_lost_aid; /* storing lost address id */
+ uint8_t mpte_addrid_last; /* storing address id parm */
+
+#define MPTE_ITFINFO_SIZE 4
+ uint32_t mpte_itfinfo_size;
+ struct mpt_itf_info _mpte_itfinfo[MPTE_ITFINFO_SIZE];
+ struct mpt_itf_info *mpte_itfinfo;
+
+ struct mbuf *mpte_reinjectq;
+
+ /* The below is used for stats */
+ uint32_t mpte_subflow_switches; /* Number of subflow-switches in sending */
+ uint32_t mpte_used_cell:1,
+ mpte_used_wifi:1,
+ mpte_initial_cell:1,
+ mpte_triggered_cell,
+ mpte_handshake_success:1;
+
+ struct mptcp_itf_stats mpte_itfstats[MPTCP_ITFSTATS_SIZE];
+ uint64_t mpte_init_txbytes __attribute__((aligned(8)));
+ uint64_t mpte_init_rxbytes __attribute__((aligned(8)));