~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/uapi/linux/mptcp.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

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

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php