Skip to content

Commit faf391c

Browse files
mjmartineaudavem330
authored andcommitted
tcp: Define IPPROTO_MPTCP
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 <[email protected]> Signed-off-by: Mat Martineau <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent bf97651 commit faf391c

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

include/trace/events/sock.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
#define inet_protocol_names \
2020
EM(IPPROTO_TCP) \
2121
EM(IPPROTO_DCCP) \
22-
EMe(IPPROTO_SCTP)
22+
EM(IPPROTO_SCTP) \
23+
EMe(IPPROTO_MPTCP)
2324

2425
#define tcp_state_names \
2526
EM(TCP_ESTABLISHED) \

include/uapi/linux/in.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ enum {
7676
#define IPPROTO_MPLS IPPROTO_MPLS
7777
IPPROTO_RAW = 255, /* Raw IP packets */
7878
#define IPPROTO_RAW IPPROTO_RAW
79+
IPPROTO_MPTCP = 262, /* Multipath TCP connection */
80+
#define IPPROTO_MPTCP IPPROTO_MPTCP
7981
IPPROTO_MAX
8082
};
8183
#endif

tools/include/uapi/linux/in.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ enum {
7676
#define IPPROTO_MPLS IPPROTO_MPLS
7777
IPPROTO_RAW = 255, /* Raw IP packets */
7878
#define IPPROTO_RAW IPPROTO_RAW
79+
IPPROTO_MPTCP = 262, /* Multipath TCP connection */
80+
#define IPPROTO_MPTCP IPPROTO_MPTCP
7981
IPPROTO_MAX
8082
};
8183
#endif

0 commit comments

Comments
 (0)