tcp: Define IPPROTO_MPTCP
authorMat Martineau <mathew.j.martineau@linux.intel.com>
Thu, 9 Jan 2020 15:59:16 +0000 (07:59 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 10 Jan 2020 02:41:41 +0000 (18:41 -0800)
To open a MPTCP socket with socket(AF_INET, SOCK_STREAM, IPPROTO_MPTCP),
IPPROTO_MPTCP needs a value that differs from IPPROTO_TCP. The existing
IPPROTO numbers mostly map directly to IANA-specified protocol numbers.
MPTCP does not have a protocol number allocated because MPTCP packets
use the TCP protocol number. Use private number not used OTA.

Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/trace/events/sock.h
include/uapi/linux/in.h
tools/include/uapi/linux/in.h

index 3ff12b9..a966d4b 100644 (file)
@@ -19,7 +19,8 @@
 #define inet_protocol_names            \
                EM(IPPROTO_TCP)                 \
                EM(IPPROTO_DCCP)                \
-               EMe(IPPROTO_SCTP)
+               EM(IPPROTO_SCTP)                \
+               EMe(IPPROTO_MPTCP)
 
 #define tcp_state_names                        \
                EM(TCP_ESTABLISHED)             \
index e7ad9d3..1521073 100644 (file)
@@ -76,6 +76,8 @@ enum {
 #define IPPROTO_MPLS           IPPROTO_MPLS
   IPPROTO_RAW = 255,           /* Raw IP packets                       */
 #define IPPROTO_RAW            IPPROTO_RAW
+  IPPROTO_MPTCP = 262,         /* Multipath TCP connection             */
+#define IPPROTO_MPTCP          IPPROTO_MPTCP
   IPPROTO_MAX
 };
 #endif
index e7ad9d3..1521073 100644 (file)
@@ -76,6 +76,8 @@ enum {
 #define IPPROTO_MPLS           IPPROTO_MPLS
   IPPROTO_RAW = 255,           /* Raw IP packets                       */
 #define IPPROTO_RAW            IPPROTO_RAW
+  IPPROTO_MPTCP = 262,         /* Multipath TCP connection             */
+#define IPPROTO_MPTCP          IPPROTO_MPTCP
   IPPROTO_MAX
 };
 #endif