Skip to content

cargo run --example dump_ipv4? #13

@randomizedcoder

Description

@randomizedcoder

Sorry, trying to run the example "cargo run --example dump_ipv4"

das@t:~/Downloads$ mkdir test_netlink
das@t:~/Downloads$ cd test_netlink/
das@t:~/Downloads/test_netlink$ git clone https://github.com/rust-netlink/netlink-packet-sock-diag.git
Cloning into 'netlink-packet-sock-diag'...
remote: Enumerating objects: 306, done.
remote: Counting objects: 100% (306/306), done.
remote: Compressing objects: 100% (142/142), done.
remote: Total 306 (delta 169), reused 274 (delta 147), pack-reused 0
Receiving objects: 100% (306/306), 66.00 KiB | 1.22 MiB/s, done.
Resolving deltas: 100% (169/169), done.
das@t:~/Downloads/test_netlink$ cd netlink-packet-sock-diag/
das@t:~/Downloads/test_netlink/netlink-packet-sock-diag$ cargo run --example dump_ipv4
    Updating crates.io index
  Downloaded thiserror-impl v1.0.47
  Downloaded quote v1.0.33
  Downloaded thiserror v1.0.47
  Downloaded anyhow v1.0.75
  Downloaded syn v2.0.29
  Downloaded 5 crates (347.5 KB) in 0.44s
   Compiling proc-macro2 v1.0.66
   Compiling unicode-ident v1.0.11
   Compiling anyhow v1.0.75
   Compiling paste v1.0.14
   Compiling thiserror v1.0.47
   Compiling libc v0.2.147
   Compiling byteorder v1.4.3
   Compiling log v0.4.20
   Compiling smallvec v1.11.0
   Compiling bytes v1.4.0
   Compiling bitflags v1.3.2
   Compiling lazy_static v1.4.0
   Compiling quote v1.0.33
   Compiling netlink-sys v0.8.5
   Compiling syn v2.0.29
   Compiling thiserror-impl v1.0.47
   Compiling netlink-packet-utils v0.5.2
   Compiling netlink-packet-core v0.7.0
   Compiling netlink-packet-sock-diag v0.4.2 (/home/das/Downloads/test_netlink/netlink-packet-sock-diag)
error[E0532]: expected unit struct, unit variant or constant, found tuple variant `NetlinkPayload::Done`
  --> examples/dump_ipv4.rs:65:17
   |
65 |                 NetlinkPayload::Done => {
   |                 ^^^^^^^^^^^^^^^^^^^^
   |
  ::: /home/das/.cargo/registry/src/index.crates.io-6f17d22bba15001f/netlink-packet-core-0.7.0/src/payload.rs:21:5
   |
21 |     Done(DoneMessage),
   |     ---- `NetlinkPayload::Done` defined here
   |
help: use the tuple variant pattern syntax instead
   |
65 |                 NetlinkPayload::Done(_) => {
   |                 ~~~~~~~~~~~~~~~~~~~~~~~
help: consider importing one of these items instead
   |
3  + use core::str::pattern::SearchStep::Done;
   |
3  + use std::str::pattern::SearchStep::Done;
   |
help: if you import `Done`, refer to it directly
   |
65 -                 NetlinkPayload::Done => {
65 +                 Done => {
   |

error[E0599]: no variant or associated item named `Ack` found for enum `NetlinkPayload` in the current scope
  --> examples/dump_ipv4.rs:59:56
   |
59 |                 NetlinkPayload::Noop | NetlinkPayload::Ack(_) => {}
   |                                                        ^^^ variant or associated item not found in `NetlinkPayload<_>`

Some errors have detailed explanations: E0532, E0599.
For more information about an error, try `rustc --explain E0532`.
error: could not compile `netlink-packet-sock-diag` (example "dump_ipv4") due to 2 previous errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions