summaryrefslogtreecommitdiffstats
path: root/src/types/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/types/mod.rs')
-rw-r--r--src/types/mod.rs31
1 files changed, 6 insertions, 25 deletions
diff --git a/src/types/mod.rs b/src/types/mod.rs
index ea7c570..868fb71 100644
--- a/src/types/mod.rs
+++ b/src/types/mod.rs
@@ -1,26 +1,7 @@
-use std::time::Instant;
+mod keys;
+mod tun;
+mod udp;
-/* This file holds types passed between components.
- * Whenever a type cannot be held local to a single module.
- */
-
-#[derive(Debug, Clone, Copy)]
-pub struct Key {
- pub key: [u8; 32],
- pub id: u32,
-}
-
-#[cfg(test)]
-impl PartialEq for Key {
- fn eq(&self, other: &Self) -> bool {
- self.id == other.id && self.key[..] == other.key[..]
- }
-}
-
-#[derive(Debug, Clone, Copy)]
-pub struct KeyPair {
- pub birth: Instant, // when was the key-pair created
- pub confirmed: bool, // has the key-pair been confirmed?
- pub send: Key, // key for outbound messages
- pub recv: Key, // key for inbound messages
-}
+pub use keys::{Key, KeyPair};
+pub use tun::Tun;
+pub use udp::Bind; \ No newline at end of file