transform

package
v3.31.6 Latest Latest
Warning

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

Go to latest
Published: May 10, 2023 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IP added in v3.3.0

func IP(address net.IP, transforms []IPConversion) (net.IP, error)

IP transforms a single ip address. If the transform results in multiple new targets, an error will be returned.

func IPToList added in v3.3.0

func IPToList(address net.IP, transforms []IPConversion) ([]net.IP, error)

IPToList manipulates an net.IP based on a list of IPConversions. It can potentially expand one ip address into multiple addresses.

func PtrNameMagic

func PtrNameMagic(name, domain string) (string, error)

PtrNameMagic implements the PTR magic.

func ReverseDomainName

func ReverseDomainName(cidr string) (string, error)

ReverseDomainName turns a CIDR block into a reversed (in-addr) name.

func UintToIP

func UintToIP(u uint32) net.IP

UintToIP convert a 32-bit into into a net.IP.

Types

type IPConversion added in v3.3.0

type IPConversion struct {
	Low, High net.IP
	NewBases  []net.IP
	NewIPs    []net.IP
}

IPConversion describes an IP conversion.

func DecodeTransformTable

func DecodeTransformTable(transforms string) ([]IPConversion, error)

DecodeTransformTable turns a string-encoded table into a list of conversions.

Jump to

Keyboard shortcuts

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