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.
Showing the changes to include/uapi/linux (1 of 3 files). Show all
Unified · Split
| @@ -76,6 +76,8 @@ enum { · 75 unmodified lines | ||
| 76 | 76 | #define IPPROTO_MPLS IPPROTO_MPLS |
| 77 | 77 | IPPROTO_RAW = 255, /* Raw IP packets */ |
| 78 | 78 | #define IPPROTO_RAW IPPROTO_RAW |
| 79 | + IPPROTO_MPTCP = 262, /* Multipath TCP connection */ | |
| 80 | +#define IPPROTO_MPTCP IPPROTO_MPTCP | |
| 79 | 81 | IPPROTO_MAX |
| 80 | 82 | }; |
| 81 | 83 | #endif |