History

mptcp: allow dumping subflow context to userspace

add ulp-specific diagnostic functions, so that subflow information can be dumped to userspace programs like 'ss'. v2 -> v3: - uapi: use bit macros appropriate for userspace

Davide Caratti committed 6 years ago

Commit 5147dfb1 parent 3b1d6217 files · +146 −1Browse files

Showing the changes to include/uapi/linux (2 of 7 files). Show all

Unified · Split

2 files
  1. include/uapi/linux/inet_diag.h +1 −0
  2. include/uapi/linux/mptcp.h +35 −0
include/uapi/linux/inet_diag.h+1−0
@@ -166,6 +166,7 @@ enum { · 165 unmodified lines
166166 INET_ULP_INFO_UNSPEC,
167167 INET_ULP_INFO_NAME,
168168 INET_ULP_INFO_TLS,
169+ INET_ULP_INFO_MPTCP,
169170 __INET_ULP_INFO_MAX,
170171 };
171172 #define INET_ULP_INFO_MAX (__INET_ULP_INFO_MAX - 1)
include/uapi/linux/mptcp.h+35−0
@@ -0,0 +1,35 @@
1+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
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+
18+enum {
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+#endif /* _UAPI_MPTCP_H */