summaryrefslogtreecommitdiffstats
path: root/include/net/mptcp.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/mptcp.h')
-rw-r--r--include/net/mptcp.h35
1 files changed, 29 insertions, 6 deletions
diff --git a/include/net/mptcp.h b/include/net/mptcp.h
index 27627e2d1bc2..0e7c5471010b 100644
--- a/include/net/mptcp.h
+++ b/include/net/mptcp.h
@@ -12,6 +12,8 @@
#include <linux/tcp.h>
#include <linux/types.h>
+struct seq_file;
+
/* MPTCP sk_buff extension data */
struct mptcp_ext {
u64 data_ack;
@@ -33,6 +35,21 @@ struct mptcp_out_options {
u16 suboptions;
u64 sndr_key;
u64 rcvr_key;
+ union {
+ struct in_addr addr;
+#if IS_ENABLED(CONFIG_MPTCP_IPV6)
+ struct in6_addr addr6;
+#endif
+ };
+ u8 addr_id;
+ u64 ahmac;
+ u8 rm_id;
+ u8 join_id;
+ u8 backup;
+ u32 nonce;
+ u64 thmac;
+ u32 token;
+ u8 hmac[20];
struct mptcp_ext ext_copy;
#endif
};
@@ -106,6 +123,9 @@ static inline bool mptcp_skb_can_collapse(const struct sk_buff *to,
skb_ext_find(from, SKB_EXT_MPTCP));
}
+bool mptcp_sk_is_subflow(const struct sock *sk);
+
+void mptcp_seq_show(struct seq_file *seq);
#else
static inline void mptcp_init(void)
@@ -172,17 +192,20 @@ static inline bool mptcp_skb_can_collapse(const struct sk_buff *to,
return true;
}
-#endif /* CONFIG_MPTCP */
+static inline bool mptcp_sk_is_subflow(const struct sock *sk)
+{
+ return false;
+}
-void mptcp_handle_ipv6_mapped(struct sock *sk, bool mapped);
+static inline void mptcp_seq_show(struct seq_file *seq) { }
+#endif /* CONFIG_MPTCP */
#if IS_ENABLED(CONFIG_MPTCP_IPV6)
int mptcpv6_init(void);
+void mptcpv6_handle_mapped(struct sock *sk, bool mapped);
#elif IS_ENABLED(CONFIG_IPV6)
-static inline int mptcpv6_init(void)
-{
- return 0;
-}
+static inline int mptcpv6_init(void) { return 0; }
+static inline void mptcpv6_handle_mapped(struct sock *sk, bool mapped) { }
#endif
#endif /* __NET_MPTCP_H */