Skip to content

A collection of network related libraries that includes protocol parsers and daemons

License

Notifications You must be signed in to change notification settings

ustorbeck/NetGauze

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NetGauze (under-development)

github build status codecov

A collection of network related libraries that includes protocol parsers and daemons. This project is still in an early stage.

Supported Protocols

  1. BGP
    1. Packet representation and wire format serialization/deserialization: netgauze-bgp-pkt
    2. BGP Speaker (including connection management and FSM): netgauze-bgp-speaker
  2. BMP
    1. Packet representation and wire format serialization/deserialization: netgauze-bmp-pkt
    2. Service building block to receive BMP messages: netgauze-bmp-service
  3. Netflow V9 and IPFIX
    1. Packet representation and wire format serialization/deserialization: netgauze-flow-pkt
    2. Service building block to receive messages: netgauze-flow-service
  4. UDP-Notif
    1. Packet representation and wire format serialization/deserialization: netgauze-udp-notif-pkt

Development documentation

Running tests

NetGauze uses macro test from the trybuild crate.

To generate the expected output for macro test the TRYBUILD env var must be set:

TRYBUILD=overwrite cargo test

To generate the expected output for pcap tests the OVERWRITE env var must be set:

OVERWRITE=true cargo test

Running code formatting and clippy checks

cargo fmt -- --config format_code_in_doc_comments=true --config wrap_comments=true --config imports_granularity=Crate

NetGauze uses nightly rust build for clippy checks just to anticipate what's coming in new rust releases.

cargo +nightly clippy --tests -- -Dclippy::all

Running examples

Some NetGauze crates come with examples. Check ls ./crates/*/examples to list existing examples.

For example, run the ./crates/flow-service/example/print-flow.rs, you can use:

cargo run -p netgauze-flow-service --example print-flow

Running Packet Serde Fuzzer

  • Fuzzing BGP Peer cargo +nightly fuzz run fuzz-bgp-peer

  • Fuzzing BGP pkt serde

    cargo +nightly fuzz run fuzz-bgp-pkt
    cargo +nightly fuzz run fuzz-bgp-pkt-serialize
    
  • Fuzzing BMP pkt serde

    cargo +nightly fuzz run fuzz-bmp-pkt
    cargo +nightly fuzz run fuzz-bmp-pkt-serialize
    
  • Fuzzing IPFIX cargo +nightly fuzz run fuzz-ipfix-pkt

  • Fuzzing Netflow V9 cargo +nightly fuzz run fuzz-netflow-v9-pkt

License

Licensed under Apache License, Version 2.0 (LICENSE or http://www.apache.org/licenses/LICENSE-2.0)

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be licensed as above, without any additional terms or conditions.

About

A collection of network related libraries that includes protocol parsers and daemons

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%