eui

package module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 24, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

README

eui

Functions for working with Extended Unique Identifiers (EUI) which are also known as MAC Adresses.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidInput = errors.New("invalid hardware address")
)

Functions

This section is empty.

Types

type EUI48

type EUI48 [6]byte

A EUI48 represents a 64 bit wide extended unique identifier.

func MustEUI48

func MustEUI48(out EUI48, err error) EUI48

func ParseEUI48FromHWAddr added in v0.2.0

func ParseEUI48FromHWAddr(hwaddr net.HardwareAddr) (out EUI48, err error)

func (EUI48) Encode

func (i EUI48) Encode(groupSize int, delimiter byte) string

Encode encodes the given EUI48 address in the specified format.

func (*EUI48) FillFromHWAddr added in v0.2.0

func (i *EUI48) FillFromHWAddr(hwAddr net.HardwareAddr) error

FillFromHWAddr parses an EUI-48 or EUI-64 address and returns the EUI48 address.

func (*EUI48) FillFromString added in v0.2.0

func (i *EUI48) FillFromString(s string) error

func (EUI48) Hex

func (i EUI48) Hex() string

func (EUI48) MarshalText added in v0.2.0

func (i EUI48) MarshalText() ([]byte, error)

func (EUI48) String

func (i EUI48) String() string

func (*EUI48) UnmarshalText added in v0.2.0

func (i *EUI48) UnmarshalText(text []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL