aboutsummaryrefslogtreecommitdiffstats
path: root/src/router/messages.rs
diff options
context:
space:
mode:
authorMathias Hall-Andersen <mathias@hall-andersen.dk>2019-08-27 21:17:55 +0200
committerMathias Hall-Andersen <mathias@hall-andersen.dk>2019-08-27 21:17:55 +0200
commitcdbcd55eda5a153b6fa7b0e871308286eae7cb54 (patch)
tree6988f08200ddd2a14187b90f29ee9e5c889b202b /src/router/messages.rs
parentRemoved unused sub-module (diff)
downloadwireguard-rs-cdbcd55eda5a153b6fa7b0e871308286eae7cb54.tar.xz
wireguard-rs-cdbcd55eda5a153b6fa7b0e871308286eae7cb54.zip
Added sealing/opening to the router worker
Diffstat (limited to 'src/router/messages.rs')
-rw-r--r--src/router/messages.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/router/messages.rs b/src/router/messages.rs
new file mode 100644
index 0000000..d09bbb3
--- /dev/null
+++ b/src/router/messages.rs
@@ -0,0 +1,11 @@
+use byteorder::LittleEndian;
+use zerocopy::byteorder::{U32, U64};
+use zerocopy::{AsBytes, ByteSlice, FromBytes, LayoutVerified};
+
+#[repr(packed)]
+#[derive(Copy, Clone, FromBytes, AsBytes)]
+pub struct TransportHeader {
+ pub f_type: U32<LittleEndian>,
+ pub f_receiver: U32<LittleEndian>,
+ pub f_counter: U64<LittleEndian>
+} \ No newline at end of file