Where Online Learning is simpler!
The C and C++ Include Header Files
/usr/include/linux/mptcp.h
$ cat -n /usr/include/linux/mptcp.h 1 /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ 2 #ifndef _MPTCP_H 3 #define _MPTCP_H 4 5 #include
/* for sockaddr_in and sockaddr_in6 */ 6 #include
/* for struct sockaddr */ 7 8 #include
9 #include
10 #include
/* for sockaddr_in */ 11 #include
/* for sockaddr_in6 */ 12 #include
/* for sockaddr_storage and sa_family */ 13 14 #define MPTCP_SUBFLOW_FLAG_MCAP_REM _BITUL(0) 15 #define MPTCP_SUBFLOW_FLAG_MCAP_LOC _BITUL(1) 16 #define MPTCP_SUBFLOW_FLAG_JOIN_REM _BITUL(2) 17 #define MPTCP_SUBFLOW_FLAG_JOIN_LOC _BITUL(3) 18 #define MPTCP_SUBFLOW_FLAG_BKUP_REM _BITUL(4) 19 #define MPTCP_SUBFLOW_FLAG_BKUP_LOC _BITUL(5) 20 #define MPTCP_SUBFLOW_FLAG_FULLY_ESTABLISHED _BITUL(6) 21 #define MPTCP_SUBFLOW_FLAG_CONNECTED _BITUL(7) 22 #define MPTCP_SUBFLOW_FLAG_MAPVALID _BITUL(8) 23 24 #define MPTCP_PM_CMD_GRP_NAME "mptcp_pm_cmds" 25 #define MPTCP_PM_EV_GRP_NAME "mptcp_pm_events" 26 27 #include
28 29 #define MPTCP_INFO_FLAG_FALLBACK _BITUL(0) 30 #define MPTCP_INFO_FLAG_REMOTE_KEY_RECEIVED _BITUL(1) 31 32 #define MPTCP_PM_ADDR_FLAG_SIGNAL (1 << 0) 33 #define MPTCP_PM_ADDR_FLAG_SUBFLOW (1 << 1) 34 #define MPTCP_PM_ADDR_FLAG_BACKUP (1 << 2) 35 #define MPTCP_PM_ADDR_FLAG_FULLMESH (1 << 3) 36 #define MPTCP_PM_ADDR_FLAG_IMPLICIT (1 << 4) 37 38 struct mptcp_info { 39 __u8 mptcpi_subflows; 40 __u8 mptcpi_add_addr_signal; 41 __u8 mptcpi_add_addr_accepted; 42 __u8 mptcpi_subflows_max; 43 __u8 mptcpi_add_addr_signal_max; 44 __u8 mptcpi_add_addr_accepted_max; 45 __u32 mptcpi_flags; 46 __u32 mptcpi_token; 47 __u64 mptcpi_write_seq; 48 __u64 mptcpi_snd_una; 49 __u64 mptcpi_rcv_nxt; 50 __u8 mptcpi_local_addr_used; 51 __u8 mptcpi_local_addr_max; 52 __u8 mptcpi_csum_enabled; 53 __u32 mptcpi_retransmits; 54 __u64 mptcpi_bytes_retrans; 55 __u64 mptcpi_bytes_sent; 56 __u64 mptcpi_bytes_received; 57 __u64 mptcpi_bytes_acked; 58 __u8 mptcpi_subflows_total; 59 }; 60 61 /* MPTCP Reset reason codes, rfc8684 */ 62 #define MPTCP_RST_EUNSPEC 0 63 #define MPTCP_RST_EMPTCP 1 64 #define MPTCP_RST_ERESOURCE 2 65 #define MPTCP_RST_EPROHIBIT 3 66 #define MPTCP_RST_EWQ2BIG 4 67 #define MPTCP_RST_EBADPERF 5 68 #define MPTCP_RST_EMIDDLEBOX 6 69 70 struct mptcp_subflow_data { 71 __u32 size_subflow_data; /* size of this structure in userspace */ 72 __u32 num_subflows; /* must be 0, set by kernel */ 73 __u32 size_kernel; /* must be 0, set by kernel */ 74 __u32 size_user; /* size of one element in data[] */ 75 } __attribute__((aligned(8))); 76 77 struct mptcp_subflow_addrs { 78 union { 79 __kernel_sa_family_t sa_family; 80 struct sockaddr sa_local; 81 struct sockaddr_in sin_local; 82 struct sockaddr_in6 sin6_local; 83 struct __kernel_sockaddr_storage ss_local; 84 }; 85 union { 86 struct sockaddr sa_remote; 87 struct sockaddr_in sin_remote; 88 struct sockaddr_in6 sin6_remote; 89 struct __kernel_sockaddr_storage ss_remote; 90 }; 91 }; 92 93 struct mptcp_subflow_info { 94 __u32 id; 95 struct mptcp_subflow_addrs addrs; 96 }; 97 98 struct mptcp_full_info { 99 __u32 size_tcpinfo_kernel; /* must be 0, set by kernel */ 100 __u32 size_tcpinfo_user; 101 __u32 size_sfinfo_kernel; /* must be 0, set by kernel */ 102 __u32 size_sfinfo_user; 103 __u32 num_subflows; /* must be 0, set by kernel (real subflow count) */ 104 __u32 size_arrays_user; /* max subflows that userspace is interested in; 105 * the buffers at subflow_info/tcp_info 106 * are respectively at least: 107 * size_arrays * size_sfinfo_user 108 * size_arrays * size_tcpinfo_user 109 * bytes wide 110 */ 111 __aligned_u64 subflow_info; 112 __aligned_u64 tcp_info; 113 struct mptcp_info mptcp_info; 114 }; 115 116 /* MPTCP socket options */ 117 #define MPTCP_INFO 1 118 #define MPTCP_TCPINFO 2 119 #define MPTCP_SUBFLOW_ADDRS 3 120 #define MPTCP_FULL_INFO 4 121 122 #endif /* _MPTCP_H */
Contact us
|
About us
|
Term of use
|
Copyright © 2000-2025 MyWebUniversity.com ™