1  /* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
2  /* Do not edit directly, auto-generated from: */
3  /*	Documentation/netlink/specs/mptcp_pm.yaml */
4  /* YNL-GEN uapi header */
5  
6  #ifndef _UAPI_LINUX_MPTCP_PM_H
7  #define _UAPI_LINUX_MPTCP_PM_H
8  
9  #define MPTCP_PM_NAME	"mptcp_pm"
10  #define MPTCP_PM_VER	1
11  
12  /**
13   * enum mptcp_event_type
14   * @MPTCP_EVENT_UNSPEC: unused event
15   * @MPTCP_EVENT_CREATED: token, family, saddr4 | saddr6, daddr4 | daddr6,
16   *   sport, dport A new MPTCP connection has been created. It is the good time
17   *   to allocate memory and send ADD_ADDR if needed. Depending on the
18   *   traffic-patterns it can take a long time until the MPTCP_EVENT_ESTABLISHED
19   *   is sent.
20   * @MPTCP_EVENT_ESTABLISHED: token, family, saddr4 | saddr6, daddr4 | daddr6,
21   *   sport, dport A MPTCP connection is established (can start new subflows).
22   * @MPTCP_EVENT_CLOSED: token A MPTCP connection has stopped.
23   * @MPTCP_EVENT_ANNOUNCED: token, rem_id, family, daddr4 | daddr6 [, dport] A
24   *   new address has been announced by the peer.
25   * @MPTCP_EVENT_REMOVED: token, rem_id An address has been lost by the peer.
26   * @MPTCP_EVENT_SUB_ESTABLISHED: token, family, loc_id, rem_id, saddr4 |
27   *   saddr6, daddr4 | daddr6, sport, dport, backup, if_idx [, error] A new
28   *   subflow has been established. 'error' should not be set.
29   * @MPTCP_EVENT_SUB_CLOSED: token, family, loc_id, rem_id, saddr4 | saddr6,
30   *   daddr4 | daddr6, sport, dport, backup, if_idx [, error] A subflow has been
31   *   closed. An error (copy of sk_err) could be set if an error has been
32   *   detected for this subflow.
33   * @MPTCP_EVENT_SUB_PRIORITY: token, family, loc_id, rem_id, saddr4 | saddr6,
34   *   daddr4 | daddr6, sport, dport, backup, if_idx [, error] The priority of a
35   *   subflow has changed. 'error' should not be set.
36   * @MPTCP_EVENT_LISTENER_CREATED: family, sport, saddr4 | saddr6 A new PM
37   *   listener is created.
38   * @MPTCP_EVENT_LISTENER_CLOSED: family, sport, saddr4 | saddr6 A PM listener
39   *   is closed.
40   */
41  enum mptcp_event_type {
42  	MPTCP_EVENT_UNSPEC,
43  	MPTCP_EVENT_CREATED,
44  	MPTCP_EVENT_ESTABLISHED,
45  	MPTCP_EVENT_CLOSED,
46  	MPTCP_EVENT_ANNOUNCED = 6,
47  	MPTCP_EVENT_REMOVED,
48  	MPTCP_EVENT_SUB_ESTABLISHED = 10,
49  	MPTCP_EVENT_SUB_CLOSED,
50  	MPTCP_EVENT_SUB_PRIORITY = 13,
51  	MPTCP_EVENT_LISTENER_CREATED = 15,
52  	MPTCP_EVENT_LISTENER_CLOSED,
53  };
54  
55  enum {
56  	MPTCP_PM_ADDR_ATTR_UNSPEC,
57  	MPTCP_PM_ADDR_ATTR_FAMILY,
58  	MPTCP_PM_ADDR_ATTR_ID,
59  	MPTCP_PM_ADDR_ATTR_ADDR4,
60  	MPTCP_PM_ADDR_ATTR_ADDR6,
61  	MPTCP_PM_ADDR_ATTR_PORT,
62  	MPTCP_PM_ADDR_ATTR_FLAGS,
63  	MPTCP_PM_ADDR_ATTR_IF_IDX,
64  
65  	__MPTCP_PM_ADDR_ATTR_MAX
66  };
67  #define MPTCP_PM_ADDR_ATTR_MAX (__MPTCP_PM_ADDR_ATTR_MAX - 1)
68  
69  enum {
70  	MPTCP_SUBFLOW_ATTR_UNSPEC,
71  	MPTCP_SUBFLOW_ATTR_TOKEN_REM,
72  	MPTCP_SUBFLOW_ATTR_TOKEN_LOC,
73  	MPTCP_SUBFLOW_ATTR_RELWRITE_SEQ,
74  	MPTCP_SUBFLOW_ATTR_MAP_SEQ,
75  	MPTCP_SUBFLOW_ATTR_MAP_SFSEQ,
76  	MPTCP_SUBFLOW_ATTR_SSN_OFFSET,
77  	MPTCP_SUBFLOW_ATTR_MAP_DATALEN,
78  	MPTCP_SUBFLOW_ATTR_FLAGS,
79  	MPTCP_SUBFLOW_ATTR_ID_REM,
80  	MPTCP_SUBFLOW_ATTR_ID_LOC,
81  	MPTCP_SUBFLOW_ATTR_PAD,
82  
83  	__MPTCP_SUBFLOW_ATTR_MAX
84  };
85  #define MPTCP_SUBFLOW_ATTR_MAX (__MPTCP_SUBFLOW_ATTR_MAX - 1)
86  
87  enum {
88  	MPTCP_PM_ENDPOINT_ADDR = 1,
89  
90  	__MPTCP_PM_ENDPOINT_MAX
91  };
92  #define MPTCP_PM_ENDPOINT_MAX (__MPTCP_PM_ENDPOINT_MAX - 1)
93  
94  enum {
95  	MPTCP_PM_ATTR_UNSPEC,
96  	MPTCP_PM_ATTR_ADDR,
97  	MPTCP_PM_ATTR_RCV_ADD_ADDRS,
98  	MPTCP_PM_ATTR_SUBFLOWS,
99  	MPTCP_PM_ATTR_TOKEN,
100  	MPTCP_PM_ATTR_LOC_ID,
101  	MPTCP_PM_ATTR_ADDR_REMOTE,
102  
103  	__MPTCP_ATTR_AFTER_LAST
104  };
105  #define MPTCP_PM_ATTR_MAX (__MPTCP_ATTR_AFTER_LAST - 1)
106  
107  enum mptcp_event_attr {
108  	MPTCP_ATTR_UNSPEC,
109  	MPTCP_ATTR_TOKEN,
110  	MPTCP_ATTR_FAMILY,
111  	MPTCP_ATTR_LOC_ID,
112  	MPTCP_ATTR_REM_ID,
113  	MPTCP_ATTR_SADDR4,
114  	MPTCP_ATTR_SADDR6,
115  	MPTCP_ATTR_DADDR4,
116  	MPTCP_ATTR_DADDR6,
117  	MPTCP_ATTR_SPORT,
118  	MPTCP_ATTR_DPORT,
119  	MPTCP_ATTR_BACKUP,
120  	MPTCP_ATTR_ERROR,
121  	MPTCP_ATTR_FLAGS,
122  	MPTCP_ATTR_TIMEOUT,
123  	MPTCP_ATTR_IF_IDX,
124  	MPTCP_ATTR_RESET_REASON,
125  	MPTCP_ATTR_RESET_FLAGS,
126  	MPTCP_ATTR_SERVER_SIDE,
127  
128  	__MPTCP_ATTR_MAX
129  };
130  #define MPTCP_ATTR_MAX (__MPTCP_ATTR_MAX - 1)
131  
132  enum {
133  	MPTCP_PM_CMD_UNSPEC,
134  	MPTCP_PM_CMD_ADD_ADDR,
135  	MPTCP_PM_CMD_DEL_ADDR,
136  	MPTCP_PM_CMD_GET_ADDR,
137  	MPTCP_PM_CMD_FLUSH_ADDRS,
138  	MPTCP_PM_CMD_SET_LIMITS,
139  	MPTCP_PM_CMD_GET_LIMITS,
140  	MPTCP_PM_CMD_SET_FLAGS,
141  	MPTCP_PM_CMD_ANNOUNCE,
142  	MPTCP_PM_CMD_REMOVE,
143  	MPTCP_PM_CMD_SUBFLOW_CREATE,
144  	MPTCP_PM_CMD_SUBFLOW_DESTROY,
145  
146  	__MPTCP_PM_CMD_AFTER_LAST
147  };
148  #define MPTCP_PM_CMD_MAX (__MPTCP_PM_CMD_AFTER_LAST - 1)
149  
150  #endif /* _UAPI_LINUX_MPTCP_PM_H */
151