Christopher Ferris | af09c70 | 2020-06-01 20:29:29 -0700 | [diff] [blame] | 1 | /**************************************************************************** |
| 2 | **************************************************************************** |
| 3 | *** |
| 4 | *** This header was automatically generated from a Linux kernel header |
| 5 | *** of the same name, to make information necessary for userspace to |
| 6 | *** call into the kernel available to libc. It contains only constants, |
| 7 | *** structures, and macros generated from the original header, and thus, |
| 8 | *** contains no copyrightable information. |
| 9 | *** |
| 10 | *** To edit the content of this header, modify the corresponding |
| 11 | *** source file (e.g. under external/kernel-headers/original/) then |
| 12 | *** run bionic/libc/kernel/tools/update_all.py |
| 13 | *** |
| 14 | *** Any manual change here will be lost the next time this script will |
| 15 | *** be run. You've been warned! |
| 16 | *** |
| 17 | **************************************************************************** |
| 18 | ****************************************************************************/ |
| 19 | #ifndef _UAPI_MPTCP_H |
| 20 | #define _UAPI_MPTCP_H |
| 21 | #include <linux/const.h> |
| 22 | #include <linux/types.h> |
| 23 | #define MPTCP_SUBFLOW_FLAG_MCAP_REM _BITUL(0) |
| 24 | #define MPTCP_SUBFLOW_FLAG_MCAP_LOC _BITUL(1) |
| 25 | #define MPTCP_SUBFLOW_FLAG_JOIN_REM _BITUL(2) |
| 26 | #define MPTCP_SUBFLOW_FLAG_JOIN_LOC _BITUL(3) |
| 27 | #define MPTCP_SUBFLOW_FLAG_BKUP_REM _BITUL(4) |
| 28 | #define MPTCP_SUBFLOW_FLAG_BKUP_LOC _BITUL(5) |
| 29 | #define MPTCP_SUBFLOW_FLAG_FULLY_ESTABLISHED _BITUL(6) |
| 30 | #define MPTCP_SUBFLOW_FLAG_CONNECTED _BITUL(7) |
| 31 | #define MPTCP_SUBFLOW_FLAG_MAPVALID _BITUL(8) |
| 32 | enum { |
| 33 | MPTCP_SUBFLOW_ATTR_UNSPEC, |
| 34 | MPTCP_SUBFLOW_ATTR_TOKEN_REM, |
| 35 | MPTCP_SUBFLOW_ATTR_TOKEN_LOC, |
| 36 | MPTCP_SUBFLOW_ATTR_RELWRITE_SEQ, |
| 37 | MPTCP_SUBFLOW_ATTR_MAP_SEQ, |
| 38 | MPTCP_SUBFLOW_ATTR_MAP_SFSEQ, |
| 39 | MPTCP_SUBFLOW_ATTR_SSN_OFFSET, |
| 40 | MPTCP_SUBFLOW_ATTR_MAP_DATALEN, |
| 41 | MPTCP_SUBFLOW_ATTR_FLAGS, |
| 42 | MPTCP_SUBFLOW_ATTR_ID_REM, |
| 43 | MPTCP_SUBFLOW_ATTR_ID_LOC, |
| 44 | MPTCP_SUBFLOW_ATTR_PAD, |
| 45 | __MPTCP_SUBFLOW_ATTR_MAX |
| 46 | }; |
| 47 | #define MPTCP_SUBFLOW_ATTR_MAX (__MPTCP_SUBFLOW_ATTR_MAX - 1) |
| 48 | #define MPTCP_PM_NAME "mptcp_pm" |
| 49 | #define MPTCP_PM_CMD_GRP_NAME "mptcp_pm_cmds" |
Christopher Ferris | a9750ed | 2021-05-03 14:02:49 -0700 | [diff] [blame] | 50 | #define MPTCP_PM_EV_GRP_NAME "mptcp_pm_events" |
Christopher Ferris | af09c70 | 2020-06-01 20:29:29 -0700 | [diff] [blame] | 51 | #define MPTCP_PM_VER 0x1 |
| 52 | enum { |
| 53 | MPTCP_PM_ATTR_UNSPEC, |
| 54 | MPTCP_PM_ATTR_ADDR, |
| 55 | MPTCP_PM_ATTR_RCV_ADD_ADDRS, |
| 56 | MPTCP_PM_ATTR_SUBFLOWS, |
| 57 | __MPTCP_PM_ATTR_MAX |
| 58 | }; |
| 59 | #define MPTCP_PM_ATTR_MAX (__MPTCP_PM_ATTR_MAX - 1) |
| 60 | enum { |
| 61 | MPTCP_PM_ADDR_ATTR_UNSPEC, |
| 62 | MPTCP_PM_ADDR_ATTR_FAMILY, |
| 63 | MPTCP_PM_ADDR_ATTR_ID, |
| 64 | MPTCP_PM_ADDR_ATTR_ADDR4, |
| 65 | MPTCP_PM_ADDR_ATTR_ADDR6, |
| 66 | MPTCP_PM_ADDR_ATTR_PORT, |
| 67 | MPTCP_PM_ADDR_ATTR_FLAGS, |
| 68 | MPTCP_PM_ADDR_ATTR_IF_IDX, |
| 69 | __MPTCP_PM_ADDR_ATTR_MAX |
| 70 | }; |
| 71 | #define MPTCP_PM_ADDR_ATTR_MAX (__MPTCP_PM_ADDR_ATTR_MAX - 1) |
| 72 | #define MPTCP_PM_ADDR_FLAG_SIGNAL (1 << 0) |
| 73 | #define MPTCP_PM_ADDR_FLAG_SUBFLOW (1 << 1) |
| 74 | #define MPTCP_PM_ADDR_FLAG_BACKUP (1 << 2) |
| 75 | enum { |
| 76 | MPTCP_PM_CMD_UNSPEC, |
| 77 | MPTCP_PM_CMD_ADD_ADDR, |
| 78 | MPTCP_PM_CMD_DEL_ADDR, |
| 79 | MPTCP_PM_CMD_GET_ADDR, |
| 80 | MPTCP_PM_CMD_FLUSH_ADDRS, |
| 81 | MPTCP_PM_CMD_SET_LIMITS, |
| 82 | MPTCP_PM_CMD_GET_LIMITS, |
Christopher Ferris | a9750ed | 2021-05-03 14:02:49 -0700 | [diff] [blame] | 83 | MPTCP_PM_CMD_SET_FLAGS, |
Christopher Ferris | af09c70 | 2020-06-01 20:29:29 -0700 | [diff] [blame] | 84 | __MPTCP_PM_CMD_AFTER_LAST |
| 85 | }; |
Christopher Ferris | 25c18d4 | 2020-10-14 17:42:58 -0700 | [diff] [blame] | 86 | #define MPTCP_INFO_FLAG_FALLBACK _BITUL(0) |
| 87 | #define MPTCP_INFO_FLAG_REMOTE_KEY_RECEIVED _BITUL(1) |
| 88 | struct mptcp_info { |
| 89 | __u8 mptcpi_subflows; |
| 90 | __u8 mptcpi_add_addr_signal; |
| 91 | __u8 mptcpi_add_addr_accepted; |
| 92 | __u8 mptcpi_subflows_max; |
| 93 | __u8 mptcpi_add_addr_signal_max; |
| 94 | __u8 mptcpi_add_addr_accepted_max; |
| 95 | __u32 mptcpi_flags; |
| 96 | __u32 mptcpi_token; |
| 97 | __u64 mptcpi_write_seq; |
| 98 | __u64 mptcpi_snd_una; |
| 99 | __u64 mptcpi_rcv_nxt; |
Christopher Ferris | a9750ed | 2021-05-03 14:02:49 -0700 | [diff] [blame] | 100 | __u8 mptcpi_local_addr_used; |
| 101 | __u8 mptcpi_local_addr_max; |
Christopher Ferris | 25c18d4 | 2020-10-14 17:42:58 -0700 | [diff] [blame] | 102 | }; |
Christopher Ferris | a9750ed | 2021-05-03 14:02:49 -0700 | [diff] [blame] | 103 | enum mptcp_event_type { |
| 104 | MPTCP_EVENT_UNSPEC = 0, |
| 105 | MPTCP_EVENT_CREATED = 1, |
| 106 | MPTCP_EVENT_ESTABLISHED = 2, |
| 107 | MPTCP_EVENT_CLOSED = 3, |
| 108 | MPTCP_EVENT_ANNOUNCED = 6, |
| 109 | MPTCP_EVENT_REMOVED = 7, |
| 110 | MPTCP_EVENT_SUB_ESTABLISHED = 10, |
| 111 | MPTCP_EVENT_SUB_CLOSED = 11, |
| 112 | MPTCP_EVENT_SUB_PRIORITY = 13, |
| 113 | }; |
| 114 | enum mptcp_event_attr { |
| 115 | MPTCP_ATTR_UNSPEC = 0, |
| 116 | MPTCP_ATTR_TOKEN, |
| 117 | MPTCP_ATTR_FAMILY, |
| 118 | MPTCP_ATTR_LOC_ID, |
| 119 | MPTCP_ATTR_REM_ID, |
| 120 | MPTCP_ATTR_SADDR4, |
| 121 | MPTCP_ATTR_SADDR6, |
| 122 | MPTCP_ATTR_DADDR4, |
| 123 | MPTCP_ATTR_DADDR6, |
| 124 | MPTCP_ATTR_SPORT, |
| 125 | MPTCP_ATTR_DPORT, |
| 126 | MPTCP_ATTR_BACKUP, |
| 127 | MPTCP_ATTR_ERROR, |
| 128 | MPTCP_ATTR_FLAGS, |
| 129 | MPTCP_ATTR_TIMEOUT, |
| 130 | MPTCP_ATTR_IF_IDX, |
Christopher Ferris | fcc3b4f | 2021-07-01 01:30:21 +0000 | [diff] [blame^] | 131 | MPTCP_ATTR_RESET_REASON, |
| 132 | MPTCP_ATTR_RESET_FLAGS, |
Christopher Ferris | a9750ed | 2021-05-03 14:02:49 -0700 | [diff] [blame] | 133 | __MPTCP_ATTR_AFTER_LAST |
| 134 | }; |
| 135 | #define MPTCP_ATTR_MAX (__MPTCP_ATTR_AFTER_LAST - 1) |
Christopher Ferris | fcc3b4f | 2021-07-01 01:30:21 +0000 | [diff] [blame^] | 136 | #define MPTCP_RST_EUNSPEC 0 |
| 137 | #define MPTCP_RST_EMPTCP 1 |
| 138 | #define MPTCP_RST_ERESOURCE 2 |
| 139 | #define MPTCP_RST_EPROHIBIT 3 |
| 140 | #define MPTCP_RST_EWQ2BIG 4 |
| 141 | #define MPTCP_RST_EBADPERF 5 |
| 142 | #define MPTCP_RST_EMIDDLEBOX 6 |
Christopher Ferris | af09c70 | 2020-06-01 20:29:29 -0700 | [diff] [blame] | 143 | #endif |