Skip to content

Commit

Permalink
more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
camshaft committed Jun 12, 2024
1 parent cd09ca9 commit 6857a7d
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
corpus.tar.gz filter=lfs diff=lfs merge=lfs -text
*.ebpf filter=lfs diff=lfs merge=lfs -text
*.pcapng filter=lfs diff=lfs merge=lfs -text
2 changes: 1 addition & 1 deletion dc/wireshark/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ fn main() {
println!("cargo:rustc-link-arg=-Wl,-undefined,dynamic_lookup");
} else {
println!("cargo:rustc-link-arg=-U");
println!("cargo:rustc-link-arg=-shared");
}
println!("cargo:rustc-link-arg=-shared");
}

fn env<N: AsRef<str>>(name: N) -> String {
Expand Down
3 changes: 3 additions & 0 deletions dc/wireshark/pcaps/dcquic-stream-tcp.pcapng
Git LFS file not shown
3 changes: 3 additions & 0 deletions dc/wireshark/pcaps/dcquic-stream-udp.pcapng
Git LFS file not shown
18 changes: 14 additions & 4 deletions dc/wireshark/xtask/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,10 @@ impl Test {
}
.run(sh)?;

let so = so();
sh.copy_file(
format!("target/{profile}/libwireshark_dcquic.so"),
"target/wireshark/plugins/4.2/epan/libwireshark_dcquic.so",
format!("target/{profile}/libwireshark_dcquic.{so}"),
format!("target/wireshark/plugins/4.2/epan/libwireshark_dcquic.{so}"),
)?;

cmd!(
Expand Down Expand Up @@ -162,6 +163,14 @@ fn tshark(sh: &Shell) -> Result<String> {
}
}

fn so() -> &'static str {
if cfg!(target_os = "macos") {
"dylib"
} else {
"so"
}
}

#[derive(Debug, Parser)]
struct Install {}

Expand All @@ -179,9 +188,10 @@ impl Install {
};

sh.create_dir(dir)?;
let so = so();
sh.copy_file(
"target/release/libwireshark_dcquic.so",
format!("{dir}/dcquic.so"),
format!("target/release/libwireshark_dcquic.{so}"),
format!("{dir}/dcquic.{so}"),
)?;

Ok(())
Expand Down

0 comments on commit 6857a7d

Please sign in to comment.