aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/net/esp.h
diff options
context:
space:
mode:
authorSteffen Klassert <steffen.klassert@secunet.com>2017-04-14 10:06:33 +0200
committerSteffen Klassert <steffen.klassert@secunet.com>2017-04-14 10:06:33 +0200
commitfca11ebde3f0d1c637550a9b231caa385ce35749 (patch)
tree52b18ae170138ecbdd2dbfd7d1add335d4e5c0af /include/net/esp.h
parentesp6: Remame esp_input_done2 (diff)
downloadwireguard-linux-fca11ebde3f0d1c637550a9b231caa385ce35749.tar.xz
wireguard-linux-fca11ebde3f0d1c637550a9b231caa385ce35749.zip
esp4: Reorganize esp_output
We need a fallback for ESP at layer 2, so split esp_output into generic functions that can be used at layer 3 and layer 2 and use them in esp_output. We also add esp_xmit which is used for the layer 2 fallback. Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'include/net/esp.h')
-rw-r--r--include/net/esp.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/net/esp.h b/include/net/esp.h
index a43be85aedc4..411a49915f11 100644
--- a/include/net/esp.h
+++ b/include/net/esp.h
@@ -10,4 +10,20 @@ static inline struct ip_esp_hdr *ip_esp_hdr(const struct sk_buff *skb)
return (struct ip_esp_hdr *)skb_transport_header(skb);
}
+struct esp_info {
+ struct ip_esp_hdr *esph;
+ __be64 seqno;
+ int tfclen;
+ int tailen;
+ int plen;
+ int clen;
+ int len;
+ int nfrags;
+ __u8 proto;
+ bool inplace;
+};
+
+int esp_output_head(struct xfrm_state *x, struct sk_buff *skb, struct esp_info *esp);
+int esp_output_tail(struct xfrm_state *x, struct sk_buff *skb, struct esp_info *esp);
+int esp_input_done2(struct sk_buff *skb, int err);
#endif