Blame SOURCES/workaround-build-issues-uapi.patch

b553ab
--- a/configure.ac
b553ab
+++ b/configure.ac
b553ab
@@ -207,8 +207,7 @@ AC_CHECK_HEADERS([linux/mptcp.h],
b553ab
     AX_CHECK_DEFINE(
b553ab
         [linux/mptcp.h],
b553ab
         [MPTCP_PM_NAME],
b553ab
-        [AC_DEFINE([HAVE_LINUX_MPTCP_H_UPSTREAM], [1])
b553ab
-         AX_CHECK_DEFINE([linux/mptcp.h],
b553ab
+        [AX_CHECK_DEFINE([linux/mptcp.h],
b553ab
                          [MPTCP_PM_EV_GRP_NAME],
b553ab
                          [AC_DEFINE([HAVE_LINUX_MPTCP_H_UPSTREAM_EVENTS],
b553ab
                                     [1])
b553ab
--- a/include/linux/mptcp_upstream.h
b553ab
+++ b/include/linux/mptcp_upstream.h
b553ab
@@ -2,8 +2,16 @@
b553ab
 #ifndef _UAPI_MPTCP_H
b553ab
 #define _UAPI_MPTCP_H
b553ab
 
b553ab
+#ifndef __KERNEL__
b553ab
+#include <netinet/in.h>		/* for sockaddr_in and sockaddr_in6	*/
b553ab
+#include <sys/socket.h>		/* for struct sockaddr			*/
b553ab
+#endif
b553ab
+
b553ab
 #include <linux/const.h>
b553ab
 #include <linux/types.h>
b553ab
+#include <linux/in.h>		/* for sockaddr_in			*/
b553ab
+#include <linux/in6.h>		/* for sockaddr_in6			*/
b553ab
+#include <linux/socket.h>	/* for sockaddr_storage and sa_family	*/
b553ab
 
b553ab
 #define MPTCP_SUBFLOW_FLAG_MCAP_REM		_BITUL(0)
b553ab
 #define MPTCP_SUBFLOW_FLAG_MCAP_LOC		_BITUL(1)
b553ab
@@ -48,6 +56,9 @@ enum {
b553ab
 	MPTCP_PM_ATTR_ADDR,				/* nested address */
b553ab
 	MPTCP_PM_ATTR_RCV_ADD_ADDRS,			/* u32 */
b553ab
 	MPTCP_PM_ATTR_SUBFLOWS,				/* u32 */
b553ab
+	MPTCP_PM_ATTR_TOKEN,				/* u32 */
b553ab
+	MPTCP_PM_ATTR_LOC_ID,				/* u8 */
b553ab
+	MPTCP_PM_ATTR_ADDR_REMOTE,			/* nested address */
b553ab
 
b553ab
 	__MPTCP_PM_ATTR_MAX
b553ab
 };
b553ab
@@ -73,6 +84,8 @@ enum {
b553ab
 #define MPTCP_PM_ADDR_FLAG_SIGNAL			(1 << 0)
b553ab
 #define MPTCP_PM_ADDR_FLAG_SUBFLOW			(1 << 1)
b553ab
 #define MPTCP_PM_ADDR_FLAG_BACKUP			(1 << 2)
b553ab
+#define MPTCP_PM_ADDR_FLAG_FULLMESH			(1 << 3)
b553ab
+#define MPTCP_PM_ADDR_FLAG_IMPLICIT			(1 << 4)
b553ab
 
b553ab
 enum {
b553ab
 	MPTCP_PM_CMD_UNSPEC,
b553ab
@@ -84,6 +97,10 @@ enum {
b553ab
 	MPTCP_PM_CMD_SET_LIMITS,
b553ab
 	MPTCP_PM_CMD_GET_LIMITS,
b553ab
 	MPTCP_PM_CMD_SET_FLAGS,
b553ab
+	MPTCP_PM_CMD_ANNOUNCE,
b553ab
+	MPTCP_PM_CMD_REMOVE,
b553ab
+	MPTCP_PM_CMD_SUBFLOW_CREATE,
b553ab
+	MPTCP_PM_CMD_SUBFLOW_DESTROY,
b553ab
 
b553ab
 	__MPTCP_PM_CMD_AFTER_LAST
b553ab
 };
b553ab
@@ -177,6 +194,7 @@ enum mptcp_event_attr {
b553ab
 	MPTCP_ATTR_IF_IDX,	/* s32 */
b553ab
 	MPTCP_ATTR_RESET_REASON,/* u32 */
b553ab
 	MPTCP_ATTR_RESET_FLAGS, /* u32 */
b553ab
+	MPTCP_ATTR_SERVER_SIDE,	/* u8 */
b553ab
 
b553ab
 	__MPTCP_ATTR_AFTER_LAST
b553ab
 };
b553ab
@@ -192,4 +210,32 @@ enum mptcp_event_attr {
b553ab
 #define MPTCP_RST_EBADPERF	5
b553ab
 #define MPTCP_RST_EMIDDLEBOX	6
b553ab
 
b553ab
+struct mptcp_subflow_data {
b553ab
+	__u32		size_subflow_data;		/* size of this structure in userspace */
b553ab
+	__u32		num_subflows;			/* must be 0, set by kernel */
b553ab
+	__u32		size_kernel;			/* must be 0, set by kernel */
b553ab
+	__u32		size_user;			/* size of one element in data[] */
b553ab
+} __attribute__((aligned(8)));
b553ab
+
b553ab
+struct mptcp_subflow_addrs {
b553ab
+	union {
b553ab
+		__kernel_sa_family_t sa_family;
b553ab
+		struct sockaddr sa_local;
b553ab
+		struct sockaddr_in sin_local;
b553ab
+		struct sockaddr_in6 sin6_local;
b553ab
+		struct __kernel_sockaddr_storage ss_local;
b553ab
+	};
b553ab
+	union {
b553ab
+		struct sockaddr sa_remote;
b553ab
+		struct sockaddr_in sin_remote;
b553ab
+		struct sockaddr_in6 sin6_remote;
b553ab
+		struct __kernel_sockaddr_storage ss_remote;
b553ab
+	};
b553ab
+};
b553ab
+
b553ab
+/* MPTCP socket options */
b553ab
+#define MPTCP_INFO		1
b553ab
+#define MPTCP_TCPINFO		2
b553ab
+#define MPTCP_SUBFLOW_ADDRS	3
b553ab
+
b553ab
 #endif /* _UAPI_MPTCP_H */