Skip to content

Commit

Permalink
feat: add the reliable-protocol's common header
Browse files Browse the repository at this point in the history
  • Loading branch information
jpcsmith committed Oct 4, 2023
1 parent 14abd31 commit 9376316
Show file tree
Hide file tree
Showing 6 changed files with 452 additions and 0 deletions.
1 change: 1 addition & 0 deletions crates/scion/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ edition = "2021"
publish = false

[dependencies]
bytes = "1.5.0"
serde = { version = "1.0.188", features = ["derive"] }
thiserror = "1.0.48"
6 changes: 6 additions & 0 deletions crates/scion/src/address/host.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ impl HostType {
}
}

impl From<HostType> for u8 {
fn from(value: HostType) -> Self {
value as u8
}
}

/// Trait to be implemented by address types that are supported by SCION
/// as valid AS-host addresses.
pub trait HostAddress {
Expand Down
1 change: 1 addition & 0 deletions crates/scion/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
pub mod address;
pub mod daemon;
pub mod reliable;
6 changes: 6 additions & 0 deletions crates/scion/src/reliable.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
mod common_header;
pub use common_header::DecodeError;

mod wire_utils;

const ADDRESS_TYPE_OCTETS: usize = 1;
Loading

0 comments on commit 9376316

Please sign in to comment.