1
2#ifndef _UAPI_MPTCP_H
3#define _UAPI_MPTCP_H
4
5#include <linux/const.h>
6#include <linux/types.h>
7
8#define MPTCP_SUBFLOW_FLAG_MCAP_REM _BITUL(0)
9#define MPTCP_SUBFLOW_FLAG_MCAP_LOC _BITUL(1)
10#define MPTCP_SUBFLOW_FLAG_JOIN_REM _BITUL(2)
11#define MPTCP_SUBFLOW_FLAG_JOIN_LOC _BITUL(3)
12#define MPTCP_SUBFLOW_FLAG_BKUP_REM _BITUL(4)
13#define MPTCP_SUBFLOW_FLAG_BKUP_LOC _BITUL(5)
14#define MPTCP_SUBFLOW_FLAG_FULLY_ESTABLISHED _BITUL(6)
15#define MPTCP_SUBFLOW_FLAG_CONNECTED _BITUL(7)
16#define MPTCP_SUBFLOW_FLAG_MAPVALID _BITUL(8)
17
18enum {
19 MPTCP_SUBFLOW_ATTR_UNSPEC,
20 MPTCP_SUBFLOW_ATTR_TOKEN_REM,
21 MPTCP_SUBFLOW_ATTR_TOKEN_LOC,
22 MPTCP_SUBFLOW_ATTR_RELWRITE_SEQ,
23 MPTCP_SUBFLOW_ATTR_MAP_SEQ,
24 MPTCP_SUBFLOW_ATTR_MAP_SFSEQ,
25 MPTCP_SUBFLOW_ATTR_SSN_OFFSET,
26 MPTCP_SUBFLOW_ATTR_MAP_DATALEN,
27 MPTCP_SUBFLOW_ATTR_FLAGS,
28 MPTCP_SUBFLOW_ATTR_ID_REM,
29 MPTCP_SUBFLOW_ATTR_ID_LOC,
30 MPTCP_SUBFLOW_ATTR_PAD,
31 __MPTCP_SUBFLOW_ATTR_MAX
32};
33
34#define MPTCP_SUBFLOW_ATTR_MAX (__MPTCP_SUBFLOW_ATTR_MAX - 1)
35
36
37#define MPTCP_PM_NAME "mptcp_pm"
38#define MPTCP_PM_CMD_GRP_NAME "mptcp_pm_cmds"
39#define MPTCP_PM_VER 0x1
40
41
42
43
44enum {
45 MPTCP_PM_ATTR_UNSPEC,
46
47 MPTCP_PM_ATTR_ADDR,
48 MPTCP_PM_ATTR_RCV_ADD_ADDRS,
49 MPTCP_PM_ATTR_SUBFLOWS,
50
51 __MPTCP_PM_ATTR_MAX
52};
53
54#define MPTCP_PM_ATTR_MAX (__MPTCP_PM_ATTR_MAX - 1)
55
56enum {
57 MPTCP_PM_ADDR_ATTR_UNSPEC,
58
59 MPTCP_PM_ADDR_ATTR_FAMILY,
60 MPTCP_PM_ADDR_ATTR_ID,
61 MPTCP_PM_ADDR_ATTR_ADDR4,
62 MPTCP_PM_ADDR_ATTR_ADDR6,
63 MPTCP_PM_ADDR_ATTR_PORT,
64 MPTCP_PM_ADDR_ATTR_FLAGS,
65 MPTCP_PM_ADDR_ATTR_IF_IDX,
66
67 __MPTCP_PM_ADDR_ATTR_MAX
68};
69
70#define MPTCP_PM_ADDR_ATTR_MAX (__MPTCP_PM_ADDR_ATTR_MAX - 1)
71
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
76enum {
77 MPTCP_PM_CMD_UNSPEC,
78
79 MPTCP_PM_CMD_ADD_ADDR,
80 MPTCP_PM_CMD_DEL_ADDR,
81 MPTCP_PM_CMD_GET_ADDR,
82 MPTCP_PM_CMD_FLUSH_ADDRS,
83 MPTCP_PM_CMD_SET_LIMITS,
84 MPTCP_PM_CMD_GET_LIMITS,
85
86 __MPTCP_PM_CMD_AFTER_LAST
87};
88
89#endif
90