Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump Rust toolchain to 1.85 #69

Merged
merged 2 commits into from
Mar 7, 2025
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
14 changes: 7 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[workspace.dependencies]
anyhow = "1.0.89"
convert_case = "0.6.0"
env_logger = "0.11.5"
anyhow = "1.0.97"
convert_case = "0.8.0"
env_logger = "0.11.6"
epan-sys = { path = "epan-sys" }
log = "0.4.22"
zenoh-buffers = { version = "1.2.1" , git = "https://github.com/eclipse-zenoh/zenoh.git" , branch = "main" }
zenoh-codec = { version = "1.2.1" , git = "https://github.com/eclipse-zenoh/zenoh.git" , branch = "main" }
zenoh-protocol = { version = "1.2.1" , git = "https://github.com/eclipse-zenoh/zenoh.git" , branch = "main" }
log = "0.4.26"
zenoh-buffers = { version = "1.2.1", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "main" }
zenoh-codec = { version = "1.2.1", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "main" }
zenoh-protocol = { version = "1.2.1", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "main" }
zenoh-transport = { features = [
"transport_compression",
] , version = "1.2.1" , git = "https://github.com/eclipse-zenoh/zenoh.git" , branch = "main" }
], version = "1.2.1", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "main" }
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "1.75.0"
channel = "1.85.0"
25 changes: 18 additions & 7 deletions zenoh-dissector/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,17 @@ extern "C" fn plugin_register() {
unsafe {
PLUG.register_protoinfo = Some(register_protoinfo);
PLUG.register_handoff = Some(register_handoff);
epan_sys::proto_register_plugin(&PLUG);
epan_sys::proto_register_plugin(&raw const PLUG);
}
}

#[no_mangle]
unsafe extern "C" fn prefs_callback() {
if CURR_TCP_PORT != TCP_PORT {
log::info!("Update TCP Port: {CURR_TCP_PORT} -> {TCP_PORT}");
#[allow(static_mut_refs)] // Wireshark requires these references to be static mut
{
log::info!("Update TCP Port: {CURR_TCP_PORT} -> {TCP_PORT}");
}
PROTOCOL_DATA.with(|data| {
let handle = data
.borrow()
Expand All @@ -91,7 +94,10 @@ unsafe extern "C" fn prefs_callback() {
}

if CURR_UDP_PORT != UDP_PORT {
log::info!("Update UDP Port: {CURR_UDP_PORT} -> {UDP_PORT}");
#[allow(static_mut_refs)] // Wireshark requires these references to be static mut
{
log::info!("Update UDP Port: {CURR_UDP_PORT} -> {UDP_PORT}");
}
PROTOCOL_DATA.with(|data| {
let handle = data
.borrow()
Expand Down Expand Up @@ -123,22 +129,22 @@ fn register_zenoh_protocol() -> Result<()> {
nul_terminated_str("TCP Port")?,
nul_terminated_str("Zenoh TCP Port to listen to")?,
10 as _,
&mut TCP_PORT as _,
&raw mut TCP_PORT as _,
);
epan_sys::prefs_register_uint_preference(
zenoh_module,
nul_terminated_str("udp.port")?,
nul_terminated_str("UDP Port")?,
nul_terminated_str("Zenoh UDP Port to listen to")?,
10 as _,
&mut UDP_PORT as _,
&raw mut UDP_PORT as _,
);
epan_sys::prefs_register_bool_preference(
zenoh_module,
nul_terminated_str("is_compression")?,
nul_terminated_str("Is Compression")?,
nul_terminated_str("Is Zenoh message compressed")?,
&mut IS_COMPRESSION as _,
&raw mut IS_COMPRESSION as _,
);
}

Expand Down Expand Up @@ -221,7 +227,12 @@ unsafe extern "C" fn register_handoff() {
epan_sys::heuristic_enable_e_HEURISTIC_DISABLE,
);

log::info!("Zenoh dissector is registered for TCP port {TCP_PORT} and UDP port {UDP_PORT}");
#[allow(static_mut_refs)] // Wireshark requires these references to be static mut
{
log::info!(
"Zenoh dissector is registered for TCP port {TCP_PORT} and UDP port {UDP_PORT}"
);
}
log::info!("Zenoh heuristic dissector is registered for TCP and UDP");
});
}
Expand Down
Loading