hwaddr

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2017 License: Apache-2.0 Imports: 2 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

View Source
const (
	PrivateMACPrefixString = "0a:58"
)

Variables

View Source
var (
	// private mac prefix safe to use
	PrivateMACPrefix = []byte{0x0a, 0x58}
)

Functions

func GenerateHardwareAddr4

func GenerateHardwareAddr4(ip net.IP, prefix []byte) (net.HardwareAddr, error)

GenerateHardwareAddr4 generates 48 bit virtual mac addresses based on the IP4 input.

Types

type InvalidPrefixLengthErr

type InvalidPrefixLengthErr struct {
	// contains filtered or unexported fields
}

func (InvalidPrefixLengthErr) Error

func (e InvalidPrefixLengthErr) Error() string

type MacParseErr

type MacParseErr struct {
	// contains filtered or unexported fields
}

func (MacParseErr) Error

func (e MacParseErr) Error() string

type SupportIp4OnlyErr

type SupportIp4OnlyErr struct {
	// contains filtered or unexported fields
}

func (SupportIp4OnlyErr) Error

func (e SupportIp4OnlyErr) Error() string

Jump to

Keyboard shortcuts

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