forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 748e4f3d702def1a4bff191e0cf93b6a05340f01
kernel/include/net/esp.h
....@@ -11,6 +11,22 @@
1111 return (struct ip_esp_hdr *)skb_transport_header(skb);
1212 }
1313
14
+static inline void esp_output_fill_trailer(u8 *tail, int tfclen, int plen, __u8 proto)
15
+{
16
+ /* Fill padding... */
17
+ if (tfclen) {
18
+ memset(tail, 0, tfclen);
19
+ tail += tfclen;
20
+ }
21
+ do {
22
+ int i;
23
+ for (i = 0; i < plen - 2; i++)
24
+ tail[i] = i + 1;
25
+ } while (0);
26
+ tail[plen - 2] = plen - 2;
27
+ tail[plen - 1] = proto;
28
+}
29
+
1430 struct esp_info {
1531 struct ip_esp_hdr *esph;
1632 __be64 seqno;