mac

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: May 30, 2017 License: Apache-2.0 Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MAC

type MAC net.HardwareAddr

MAC address is an net.HardwareAddr encapsulation to force cilium to only use MAC-48.

func ParseMAC

func ParseMAC(s string) (MAC, error)

ParseMAC parses s only as an IEEE 802 MAC-48.

func (MAC) MarshalIndentJSON

func (m MAC) MarshalIndentJSON(prefix, indent string) ([]byte, error)

func (MAC) MarshalJSON

func (m MAC) MarshalJSON() ([]byte, error)

func (MAC) String

func (m MAC) String() string

String returns the string representation of m.

func (MAC) Uint64

func (m MAC) Uint64() (uint64, error)

Uint64 returns the MAC in uint64 format. The MAC is represented as little-endian in the returned value. Example:

m := MAC([]{0x11, 0x12, 0x23, 0x34, 0x45, 0x56})
v, err := m.Uint64()
fmt.Printf("0x%X", v) // 0x564534231211

func (*MAC) UnmarshalJSON

func (m *MAC) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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