From 0e66b0d13cbd21d612d961ec0e95df21255801ce Mon Sep 17 00:00:00 2001 From: Markus Legner Date: Wed, 27 Sep 2023 12:23:45 +0200 Subject: [PATCH] feat: add basic types for daemon communication --- crates/scion/src/daemon.rs | 2 ++ crates/scion/src/daemon/types.rs | 15 +++++++++++++++ crates/scion/src/lib.rs | 1 + 3 files changed, 18 insertions(+) create mode 100644 crates/scion/src/daemon.rs create mode 100644 crates/scion/src/daemon/types.rs diff --git a/crates/scion/src/daemon.rs b/crates/scion/src/daemon.rs new file mode 100644 index 0000000..ca3a2de --- /dev/null +++ b/crates/scion/src/daemon.rs @@ -0,0 +1,2 @@ +mod types; +pub use types::{AsInfo, PathRequestFlags}; diff --git a/crates/scion/src/daemon/types.rs b/crates/scion/src/daemon/types.rs new file mode 100644 index 0000000..1902954 --- /dev/null +++ b/crates/scion/src/daemon/types.rs @@ -0,0 +1,15 @@ +use crate::address::IA; + +/// Information about the local AS +#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)] +pub struct AsInfo { + pub ia: IA, + pub mtu: u16, +} + +/// Flags for path requests +#[derive(Copy, Clone, Debug, Default, PartialEq, Eq, Hash)] +pub struct PathRequestFlags { + pub refresh: bool, + pub hidden: bool, +} diff --git a/crates/scion/src/lib.rs b/crates/scion/src/lib.rs index f74634c..343b0b2 100644 --- a/crates/scion/src/lib.rs +++ b/crates/scion/src/lib.rs @@ -1 +1,2 @@ pub mod address; +pub mod daemon;