common

package
v0.0.0-...-51f9457 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package common contains common Machine Database functions.

Package common contains common Machine Database functions.

Index

Constants

View Source
const MaxMAC48 = MAC48(1<<48 - 1)

MaxMAC48 is the largest possible MAC-48 address.

Variables

This section is empty.

Functions

This section is empty.

Types

type IPv4

type IPv4 uint32

IPv4 represents an IPv4 address.

func IPv4Range

func IPv4Range(block string) (IPv4, int64, error)

IPv4Range returns the starting address and length of the given IPv4 CIDR block.

func ParseIPv4

func ParseIPv4(s string) (IPv4, error)

ParseIPv4 returns an IPv4 address from the given string.

func (IPv4) String

func (i IPv4) String() string

String returns a string representation of this IPv4 address.

type MAC48

type MAC48 uint64

MAC48 represents a MAC-48 address.

func ParseMAC48

func ParseMAC48(mac48 string) (MAC48, error)

ParseMAC48 returns a MAC-48 address from the given string.

func (MAC48) String

func (m MAC48) String() string

String returns a string representation of this MAC-48 address.

Jump to

Keyboard shortcuts

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