Conversation
Introduce robust and RFC-compliant structures for Virtual eXtensible Local Area Network (RFC 7348) and headers, significantly improving VXLAN message handling. Key improvements include: * Adding vni_and_reserved2 Attribute * Removed BitfieldUnit * Added implementation method * Added Unit Tests Co-authored-by: Sven Cowart <svencowart@gmail.com>
* **`GeneveHdr` struct**: A `#[repr(C, packed)]` struct is defined to accurately model the Geneve header format, ensuring correct memory layout.
* **Field Accessors**: Provides `get` and `set` methods for all fields of the Geneve header, including:
* `ver` (Version)
* `opt_len` (Option Length)
* `o_flag` (OAM Flag)
* `c_flag` (Critical Options Present Flag)
* `protocol_type` (Encapsulated Protocol Type, handled with network byte order)
* `vni` (Virtual Network Identifier, handled with network byte order and 24-bit masking)
* **Bitfield Handling**: The methods correctly handle bitfield extraction and insertion for `ver`, `opt_len`, `o_flag`, and `c_flag`.
* **Network Byte Order**: `protocol_type` and `vni` conversions correctly handle big-endian (network byte order).
* **Unit Tests**: Comprehensive unit tests are included to verify the correct behavior of all getters, setters, bitfield operations, and byte order conversions.
This addition provides foundational support for parsing and constructing Geneve encapsulated packets within the project.
* Update `actions/checkout` action. * Use `dtolnay/rust-toolchain` action instead of `actions-rs`. * Run rustfmt and clippy. * Add the following cross targets: * `aarch64` * `bpfel`, `bpfeb` * `riscv64gc` * `wasm32` * `x86_64` test updated nightly matrix drop nightly targets since they haven't been built for over 3 years add clippy to components list skip useless transmute and too many args clippy warnings drop wasm target drop riscv for now add cross-compilation build tests for cross compiled arch add ignore for useless_transmute and too_many_arguments fix ignore opts include musl cross compiling as well remove std feature add std as a feature, but make no_std default run fmt only on stable only run fmt on x86 stable drop std feature since it seems to be unused remove serde no_std warning fix formatting in lib and llc drop std features in cargo.toml sync src
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is just a draft to test the pipelines before proposing it upstream