Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,923 changes: 1,143 additions & 780 deletions Cargo.lock

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

members = [
"adm",
"common",
"lldpd-common",
"lldpd-client",
"lldpd",
"protocol",
Expand All @@ -15,11 +15,11 @@ resolver = "2"

# intra-package dependencies
lldpd-client = { path = "lldpd-client" }
lldpd-common = { path = "lldpd-common" }
protocol = { path = "protocol" }
common = { path = "common" }

# oxide dependencies from github
dpd-client = { git = "https://github.com/oxidecomputer/dendrite"}
dpd-client = { git = "https://github.com/oxidecomputer/dendrite", branch = "main" }

# public dependencies from crates.io
anyhow = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion lldpd-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ description = "Client library for the Oxide LLDP daemon"

[dependencies]
chrono.workspace = true
common.workspace = true
futures.workspace = true
lldpd-common.workspace = true
protocol.workspace = true
progenitor.workspace = true
reqwest.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion lldpd-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use std::fmt;

/// Return the default port on which the `lldpd` API server listens for clients.
pub const fn default_port() -> u16 {
::common::DEFAULT_LLDPD_PORT
::lldpd_common::DEFAULT_LLDPD_PORT
}

// Automatically generate the client bindings using Progenitor.
Expand Down
2 changes: 1 addition & 1 deletion common/Cargo.toml → lldpd-common/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "common"
name = "lldpd-common"
version = "0.1.0"
authors = ["Nils Nieuwejaar <nils@oxide.computer>"]
edition = "2021"
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions lldpd/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ smf = [ "dep:smf-rs" ]
[dependencies]
anyhow.workspace = true
chrono.workspace = true
common.workspace = true
protocol.workspace = true
dpd-client.workspace = true
dropshot.workspace = true
http.workspace = true
lldpd-common.workspace = true
protocol.workspace = true
signal-hook.workspace = true
serde.workspace = true
schemars.workspace = true
Expand Down
5 changes: 3 additions & 2 deletions lldpd/src/api_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -848,11 +848,12 @@ pub async fn api_server_manager(
// We always listen on localhost
config_addrs.push(SocketAddr::new(
IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)),
common::DEFAULT_LLDPD_PORT,
lldpd_common::DEFAULT_LLDPD_PORT,
));
// Get the list of all the addresses we should be listening on,
// and compare it to the list we currently are listening on.
let (add, remove) = common::purge_common(&config_addrs, &active_addrs);
let (add, remove) =
lldpd_common::purge_common(&config_addrs, &active_addrs);

for addr in remove {
let hdl = active.remove(&addr).unwrap();
Expand Down
4 changes: 2 additions & 2 deletions lldpd/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ pub(crate) struct Opt {
about = "log format",
help = "format logs for 'human' or 'json' consumption"
)]
log_format: common::LogFormat,
log_format: lldpd_common::LogFormat,

#[structopt(long, help = "run without dpd")]
#[cfg(feature = "dendrite")]
Expand Down Expand Up @@ -199,7 +199,7 @@ fn get_switchinfo(opts: &Opt) -> SwitchInfo {
}

async fn run_lldpd(opts: Opt) -> LldpdResult<()> {
let log = common::log_init("lldpd", &opts.log_file, opts.log_format)?;
let log = lldpd_common::log_init("lldpd", &opts.log_file, opts.log_format)?;

let switchinfo = get_switchinfo(&opts);
println!("switchinfo: {switchinfo:#?}");
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
# We choose a specific toolchain (rather than "stable") for repeatability. The
# intent is to keep this up-to-date with recently-released stable Rust.

channel = "1.84.0"
channel = "1.87.0"
profile = "default"