ipv6md

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2025 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnknownData    = errors.New("unknown data")
	ErrUnknownType    = errors.New("unknown type")
	ErrUnexpectedType = errors.New("unexpected type")
)
View Source
var IPv6Prefix = []byte{0x20, 0x01}

ipv6Prefix contains the first two bytes of the IPv6 address, set to 0x20 and 0x01 to better masquerade the address as a "real" address.

Functions

This section is empty.

Types

type Type

type Type uint16
const (
	Unknown       Type = 0x00
	AddrPort      Type = 0x01
	AddrPortXOR   Type = 0x02
	AddrPortXORV2 Type = 0x03
)

func GetType

func GetType(ip net.IP) (Type, error)

GetType returns the type of the given IP address or an error if the data contains an unknown type.

func (Type) String

func (t Type) String() string

func (Type) ToUint16

func (t Type) ToUint16() uint16

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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