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

unknown display hint: "ipv4" #630

Closed
bck01215 opened this issue Jun 21, 2023 · 1 comment
Closed

unknown display hint: "ipv4" #630

bck01215 opened this issue Jun 21, 2023 · 1 comment

Comments

@bck01215
Copy link

Following the logging for xdp guide I get this error:

error: could not parse the format string: unknown display hint: "ipv4"
  --> src/main.rs:68:9
   |
68 | ...   "SRC IP: {:ipv4}, SRC PORT: {}", source_addr, sour...

Fix:

    info!(
        &ctx,
        "SRC IP: {}, SRC PORT: {}", source_addr, source_port
    );

Not sure if the display hint adds value. This is my cargo.toml

[package]
name = "learning-ebpf"
version = "0.1.0"
edition = "2021"

[dependencies]
aya-bpf = { git = "https://github.com/aya-rs/aya", branch = "main" }
aya-log-ebpf = { git = "https://github.com/aya-rs/aya", branch = "main" }
learning-common = { path = "../learning-common" }
network-types = "0.0.4"

[[bin]]
name = "learning"
path = "src/main.rs"

[profile.dev]
opt-level = 3
debug = false
debug-assertions = false
overflow-checks = false
lto = true
panic = "abort"
incremental = false
codegen-units = 1
rpath = false

[profile.release]
lto = true
panic = "abort"
codegen-units = 1

[workspace]
members = []

It looks like it should come from aya-log-ebpf but I don't know how.

@tamird
Copy link
Member

tamird commented Jun 22, 2023

This is being worked on in aya-rs/book#118. Closing this, but please reopen.

The display hint should be {:i}.

@tamird tamird closed this as completed Jun 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants