ipnet

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2020 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Policy_ACCEPT string = "ACCEPT"
	Policy_DROP   string = "DROP"
)
View Source
const (
	NetworkProtocolNotSupported string = "-"
	NetworkProtocolIPv4TCP      string = "tcp"
	NetworkProtocolIPv6TCP      string = "tcp6"
	NetworkProtocolIPv4UDP      string = "udp"
	NetworkProtocolIPv6UDP      string = "udp6"
	NetworkProtocolANY          string = "any"
)
View Source
const MMesh64Prefix string = "fd77:f:"

Variables

This section is empty.

Functions

func CheckNetworkPolicy

func CheckNetworkPolicy(p *network.Policy) error

func GetIPv4Encap

func GetIPv4Encap(ipv6 string) (string, error)

func GetIPv6

func GetIPv6(ipv4 string) (string, error)

func GetIPv6Endpoint

func GetIPv6Endpoint(ipv6 string) (string, error)

func GetMMesh64Addr

func GetMMesh64Addr(ipv6, ipv4 string) (string, error)

func GetNetworkProtocol

func GetNetworkProtocol(af AddressFamily, proto layers.IPProtocol) (string, error)

func GetPortName

func GetPortName(proto layers.IPProtocol, p uint16) string

func IPProtocol

func IPProtocol(proto string) layers.IPProtocol

Types

type AddressFamily

type AddressFamily int32
const (
	AddressFamilyUnspec AddressFamily = 0
	AddressFamilyIPv4   AddressFamily = 4
	AddressFamilyIPv6   AddressFamily = 6
)

func (AddressFamily) String

func (af AddressFamily) String() string

Jump to

Keyboard shortcuts

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