net

package
v0.0.0-...-75a7993 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Copyright © 2019 Amari Robinson

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataLinkAddr

type DataLinkAddr interface {
	// Bytes returns the data link address as a byte sequence.
	Bytes() []byte

	// CanonicalString returns a canonicalized string representation.
	CanonicalString() string

	HumanReadableString() string
}

DataLinkAddr represents a OSI Layer 2 data link address.

func ParseCanonicalAddr

func ParseCanonicalAddr(s string) (DataLinkAddr, error)

ParseCanonicalAddr parses a string previously created with `CanonicalString`.

type IPv4

type IPv4 net.IP

func (IPv4) MarshalJSON

func (addr IPv4) MarshalJSON() ([]byte, error)

func (IPv4) MarshalText

func (addr IPv4) MarshalText() ([]byte, error)

func (IPv4) MarshalYAML

func (addr IPv4) MarshalYAML() (interface{}, error)

func (IPv4) String

func (addr IPv4) String() string

func (*IPv4) UnmarshalJSON

func (addr *IPv4) UnmarshalJSON(data []byte) (err error)

func (*IPv4) UnmarshalTOML

func (addr *IPv4) UnmarshalTOML(data []byte) (err error)

func (*IPv4) UnmarshalYAML

func (addr *IPv4) UnmarshalYAML(value *yaml.Node) error

type IPv4Mask

type IPv4Mask net.IPMask

func (IPv4Mask) MarshalJSON

func (addr IPv4Mask) MarshalJSON() ([]byte, error)

func (IPv4Mask) MarshalText

func (addr IPv4Mask) MarshalText() ([]byte, error)

func (IPv4Mask) MarshalYAML

func (addr IPv4Mask) MarshalYAML() (interface{}, error)

func (IPv4Mask) String

func (addr IPv4Mask) String() string

func (*IPv4Mask) UnmarshalJSON

func (addr *IPv4Mask) UnmarshalJSON(data []byte) (err error)

func (*IPv4Mask) UnmarshalTOML

func (addr *IPv4Mask) UnmarshalTOML(data []byte) (err error)

func (*IPv4Mask) UnmarshalYAML

func (addr *IPv4Mask) UnmarshalYAML(value *yaml.Node) error

type IPv6

type IPv6 net.IP

func (IPv6) MarshalJSON

func (addr IPv6) MarshalJSON() ([]byte, error)

func (IPv6) MarshalText

func (addr IPv6) MarshalText() ([]byte, error)

func (IPv6) MarshalYAML

func (addr IPv6) MarshalYAML() (interface{}, error)

func (IPv6) String

func (addr IPv6) String() string

func (*IPv6) UnmarshalJSON

func (addr *IPv6) UnmarshalJSON(data []byte) (err error)

func (*IPv6) UnmarshalTOML

func (addr *IPv6) UnmarshalTOML(data []byte) (err error)

func (*IPv6) UnmarshalYAML

func (addr *IPv6) UnmarshalYAML(value *yaml.Node) error

type IPv6PrefixLen

type IPv6PrefixLen uint8

func (*IPv6PrefixLen) UnmarshalJSON

func (l *IPv6PrefixLen) UnmarshalJSON(data []byte) error

UnmarshalJSON implements `json.Unmarshaler`

func (*IPv6PrefixLen) UnmarshalTOML

func (l *IPv6PrefixLen) UnmarshalTOML(data []byte) error

UnmarshalTOML implements `toml.Unmarshaler`

func (*IPv6PrefixLen) UnmarshalText

func (l *IPv6PrefixLen) UnmarshalText(data []byte) error

UnmarshalText implements `encoding.Unmarshaler`

func (*IPv6PrefixLen) UnmarshalYAML

func (l *IPv6PrefixLen) UnmarshalYAML(value *yaml.Node) error

UnmarshalYAML implements `yaml.Unmarshaler`

type MACAddr

type MACAddr net.HardwareAddr

MACAddr is a "media access control" address

func ParseMAC

func ParseMAC(s string) (MACAddr, error)

ParseMAC wraps `net.ParseMAC`

func (MACAddr) Bytes

func (m MACAddr) Bytes() []byte

Bytes implements `DataLinkAddr`.

func (MACAddr) CanonicalString

func (m MACAddr) CanonicalString() string

CanonicalString implements `DataLinkAddr`.

func (MACAddr) HumanReadableString

func (m MACAddr) HumanReadableString() string

HumanReadableString implements `DataLinkAddr`.

func (MACAddr) MarshalJSON

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

MarshalJSON implements `json.Marshaler`

func (MACAddr) MarshalTOML

func (m MACAddr) MarshalTOML() ([]byte, error)

MarshalTOML implements `toml.Marshaler`

func (MACAddr) MarshalText

func (m MACAddr) MarshalText() ([]byte, error)

MarshalText implements `encoding.Marshaler`

func (MACAddr) MarshalYAML

func (m MACAddr) MarshalYAML() (interface{}, error)

MarshalYAML implements `yaml.Marshaler`

func (*MACAddr) UnmarshalJSON

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

UnmarshalJSON implements `json.Unmarshaler`

func (*MACAddr) UnmarshalTOML

func (m *MACAddr) UnmarshalTOML(data []byte) error

UnmarshalTOML implements `toml.Unmarshaler`

func (*MACAddr) UnmarshalText

func (m *MACAddr) UnmarshalText(data []byte) error

UnmarshalText implements `encoding.Unmarshaler`

func (*MACAddr) UnmarshalYAML

func (m *MACAddr) UnmarshalYAML(value *yaml.Node) error

UnmarshalYAML implements `yaml.Unmarshaler`

Jump to

Keyboard shortcuts

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