Skip to content

MAC address #4

Closed
Closed
@seibert

Description

@seibert

Feedback has been that having a special MAC address type would also be useful for the same use cases as IP addresses.

Data layout

MAC addresses are 48-bits, so we will store them zero padded in a 64 bit word.

String form

MAC addresses should be displayed in colon separated hexadecimal. Ex: 00:50:56:c0:00:01. When parsing strings into the MAC address data type, both upper and lower case hexadecimal should be accepted, as well as the usage of ":" or "-" as byte separators.

Operations

Under a .mac namespace, operations like:

  • is_multicast
  • as_int (is this the right name?): Reinterpret MAC address as uint64. Allows user to do custom manipulation of MAC address with bit operations
  • oui: Extract 24 bit OUI as integer

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