netutils

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2019 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HostLocal int8 = iota
	LinkLocal
	SiteLocal
	Global
	LocalMulticast
	GlobalMulticast
	Invalid
)

IP classifications

Variables

This section is empty.

Functions

func ClassifyIP

func ClassifyIP(ip net.IP) int8

ClassifyIP returns the classification for the given IP address.

func IPIsGlobal

func IPIsGlobal(ip net.IP) bool

IPIsGlobal returns true if the given IP is a global address.

func IPIsLAN

func IPIsLAN(ip net.IP) bool

IPIsLAN returns true if the given IP is a site-local or link-local address.

func IPIsLinkLocal

func IPIsLinkLocal(ip net.IP) bool

IPIsLinkLocal returns true if the given IP is a link-local address.

func IPIsLocalhost

func IPIsLocalhost(ip net.IP) bool

IPIsLocalhost returns whether the IP refers to the host itself.

func IPIsSiteLocal

func IPIsSiteLocal(ip net.IP) bool

IPIsSiteLocal returns true if the given IP is a site-local address.

func IsValidFqdn

func IsValidFqdn(fqdn string) bool

IsValidFqdn returns whether the given string is a valid fqdn.

Types

type SimpleStreamAssembler

type SimpleStreamAssembler struct {
	Cumulated    []byte
	CumulatedLen int
	Complete     bool
}

func NewSimpleStreamAssembler

func NewSimpleStreamAssembler() *SimpleStreamAssembler

func (*SimpleStreamAssembler) Reassembled

func (a *SimpleStreamAssembler) Reassembled(reassembly []tcpassembly.Reassembly)

Reassembled implements tcpassembly.Stream's Reassembled function.

func (*SimpleStreamAssembler) ReassemblyComplete

func (a *SimpleStreamAssembler) ReassemblyComplete()

ReassemblyComplete implements tcpassembly.Stream's ReassemblyComplete function.

type SimpleStreamAssemblerManager

type SimpleStreamAssemblerManager struct {
	InitLock sync.Mutex
	// contains filtered or unexported fields
}

func (*SimpleStreamAssemblerManager) GetLastAssembler

func (m *SimpleStreamAssemblerManager) GetLastAssembler() *SimpleStreamAssembler

func (*SimpleStreamAssemblerManager) New

Jump to

Keyboard shortcuts

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