Crate advmac

Source
Expand description

advMAC

Advanced MAC address library.

Crates.io docs.rs Codecov

§Usage

Add this to your Cargo.toml:

[dependencies]
advmac = "1.0.3"

§Features:

  • EUI-48 and EUI-64.
  • Extensive no_std support.
  • serde support (even on no_std).
  • const fn address parser with convenience macros for compile-time address handling: mac6!, mac8!.
  • MAC address generation and editing.

Macros§

mac6
Convenience macro for creating MacAddr6 in compile-time.
mac8
Convenience macro for creating MacAddr8 in compile-time.

Structs§

MacAddr6
MAC address, represented as EUI-48
MacAddr8
MAC address, represented as EUI-64

Enums§

IpError
MacAddrFormat
ParseError

Constants§

MAC_CANONICAL_SIZE6
Size of formatted MAC using MacAddr6::format_string and MacAddrFormat::Canonical.
MAC_CANONICAL_SIZE8
Size of formatted MAC using MacAddr8::format_string and MacAddrFormat::Canonical.
MAC_COLON_NOTATION_SIZE6
Size of formatted MAC using MacAddr6::format_string and MacAddrFormat::ColonNotation.
MAC_COLON_NOTATION_SIZE8
Size of formatted MAC using MacAddr8::format_string and MacAddrFormat::ColonNotation.
MAC_DOT_NOTATION_SIZE6
Size of formatted MAC using MacAddr6::format_string and MacAddrFormat::DotNotation.
MAC_DOT_NOTATION_SIZE8
Size of formatted MAC using MacAddr8::format_string and MacAddrFormat::DotNotation.
MAC_HEXADECIMAL0X_SIZE6
Size of formatted MAC using MacAddr6::format_string and MacAddrFormat::Hexadecimal0x.
MAC_HEXADECIMAL0X_SIZE8
Size of formatted MAC using MacAddr8::format_string and MacAddrFormat::Hexadecimal0x.
MAC_HEXADECIMAL_SIZE6
Size of formatted MAC using MacAddr6::format_string and MacAddrFormat::Hexadecimal.
MAC_HEXADECIMAL_SIZE8
Size of formatted MAC using MacAddr8::format_string and MacAddrFormat::Hexadecimal.
MAC_MAX_SIZE
Maximum formatted size.