Expand description
Hardware Address
§Installation
[dependencies]
hardware-address = "0.1"§Pedigree
This code is inspired and modified based on go-src.
§License
hardware-address is under the terms of both the MIT license and the
Apache License (Version 2.0).
See LICENSE-APACHE, LICENSE-MIT for details.
Copyright (c) 2025 Al Liu.
Macros§
- A macro for defining address types.
Structs§
- Represents a physical EUI-64 format address.
- Represents a physical 20-octet InfiniBand format address.
- Represents a physical hardware address (MAC address).
Enums§
- ParseError represents an error that occurred while parsing hex address.
Functions§
- Parses s as an IEEE 802 MAC-48, EUI-48, EUI-64, or a 20-octet IP over InfiniBand link-layer address and etc using one of the following formats:
- Converts a hexadecimal slice to an integer. Returns a tuple containing:
- Converts the next two hex digits of s into a byte. If s is longer than 2 bytes then the third byte must match e.
Type Aliases§
- Represents an error that occurred while parsing
Eui64Addr. - Represents an error that occurred while parsing
InfiniBandAddr. - Represents an error that occurred while parsing
MacAddr.