aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/net/gue.h
diff options
context:
space:
mode:
authorTom Herbert <therbert@google.com>2014-10-03 15:48:09 -0700
committerDavid S. Miller <davem@davemloft.net>2014-10-03 16:53:33 -0700
commit37dd0247797b168ad1cc7f5dbec825a1ee66535b (patch)
tree93d4136738152f6e02ef98d23cbf537ca531fa9e /include/net/gue.h
parentfou: eliminate IPv4,v6 specific GRO functions (diff)
downloadwireguard-linux-37dd0247797b168ad1cc7f5dbec825a1ee66535b.tar.xz
wireguard-linux-37dd0247797b168ad1cc7f5dbec825a1ee66535b.zip
gue: Receive side for Generic UDP Encapsulation
This patch adds support receiving for GUE packets in the fou module. The fou module now supports direct foo-over-udp (no encapsulation header) and GUE. To support this a type parameter is added to the fou netlink parameters. For a GUE socket we define gue_udp_recv, gue_gro_receive, and gue_gro_complete to handle the specifics of the GUE protocol. Most of the code to manage and configure sockets is common with the fou. Signed-off-by: Tom Herbert <therbert@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/gue.h')
-rw-r--r--include/net/gue.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/include/net/gue.h b/include/net/gue.h
new file mode 100644
index 000000000000..b6c332788084
--- /dev/null
+++ b/include/net/gue.h
@@ -0,0 +1,23 @@
+#ifndef __NET_GUE_H
+#define __NET_GUE_H
+
+struct guehdr {
+ union {
+ struct {
+#if defined(__LITTLE_ENDIAN_BITFIELD)
+ __u8 hlen:4,
+ version:4;
+#elif defined (__BIG_ENDIAN_BITFIELD)
+ __u8 version:4,
+ hlen:4;
+#else
+#error "Please fix <asm/byteorder.h>"
+#endif
+ __u8 next_hdr;
+ __u16 flags;
+ };
+ __u32 word;
+ };
+};
+
+#endif