Skip to content

Commit

Permalink
tcp: Define IPPROTO_MPTCP
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mat Martineau authored and David S. Miller committed Jan 10, 2020
1 parent bf97651 commit faf391c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/trace/events/sock.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) \
Expand Down
2 changes: 2 additions & 0 deletions include/uapi/linux/in.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions tools/include/uapi/linux/in.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit faf391c

Please sign in to comment.