summaryrefslogtreecommitdiff
path: root/include/net/mptcp.h
diff options
context:
space:
mode:
authorPeter Krystad <peter.krystad@linux.intel.com>2020-01-21 16:56:16 -0800
committerDavid S. Miller <davem@davemloft.net>2020-01-24 13:44:07 +0100
commiteda7acddf8080bb2d022a8d4b8b2345eb80c63ec (patch)
tree91aded05b9988f6f8b55683eec74712a33cb2270 /include/net/mptcp.h
parentf870fa0b5768842cb4690c1c11f19f28b731ae6d (diff)
mptcp: Handle MPTCP TCP options
Add hooks to parse and format the MP_CAPABLE option. This option is handled according to MPTCP version 0 (RFC6824). MPTCP version 1 MP_CAPABLE (RFC6824bis/RFC8684) will be added later in coordination with related code changes. Co-developed-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> Co-developed-by: Florian Westphal <fw@strlen.de> Signed-off-by: Florian Westphal <fw@strlen.de> Co-developed-by: Davide Caratti <dcaratti@redhat.com> Signed-off-by: Davide Caratti <dcaratti@redhat.com> Signed-off-by: Peter Krystad <peter.krystad@linux.intel.com> Signed-off-by: Christoph Paasch <cpaasch@apple.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/mptcp.h')
-rw-r--r--include/net/mptcp.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/net/mptcp.h b/include/net/mptcp.h
index 98ba22379117..3daec2ceb3ff 100644
--- a/include/net/mptcp.h
+++ b/include/net/mptcp.h
@@ -9,6 +9,7 @@
#define __NET_MPTCP_H
#include <linux/skbuff.h>
+#include <linux/tcp.h>
#include <linux/types.h>
/* MPTCP sk_buff extension data */
@@ -26,10 +27,22 @@ struct mptcp_ext {
/* one byte hole */
};
+struct mptcp_out_options {
+#if IS_ENABLED(CONFIG_MPTCP)
+ u16 suboptions;
+ u64 sndr_key;
+ u64 rcvr_key;
+#endif
+};
+
#ifdef CONFIG_MPTCP
void mptcp_init(void);
+void mptcp_parse_option(const unsigned char *ptr, int opsize,
+ struct tcp_options_received *opt_rx);
+void mptcp_write_options(__be32 *ptr, struct mptcp_out_options *opts);
+
/* move the skb extension owership, with the assumption that 'to' is
* newly allocated
*/
@@ -76,6 +89,11 @@ static inline void mptcp_init(void)
{
}
+static inline void mptcp_parse_option(const unsigned char *ptr, int opsize,
+ struct tcp_options_received *opt_rx)
+{
+}
+
static inline void mptcp_skb_ext_move(struct sk_buff *to,
const struct sk_buff *from)
{