Documentation ¶
Index ¶
- Constants
- func ClassifyIP(ip net.IP) int8
- func IPIsGlobal(ip net.IP) bool
- func IPIsLAN(ip net.IP) bool
- func IPIsLinkLocal(ip net.IP) bool
- func IPIsLocalhost(ip net.IP) bool
- func IPIsSiteLocal(ip net.IP) bool
- func IPsToRRs(domain string, ips []net.IP) ([]dns.RR, error)
- func IsValidFqdn(fqdn string) bool
- type SimpleStreamAssembler
- type SimpleStreamAssemblerManager
Constants ¶
const ( HostLocal int8 = iota LinkLocal SiteLocal Global LocalMulticast GlobalMulticast Invalid int8 = -1 )
IP classifications
Variables ¶
This section is empty.
Functions ¶
func ClassifyIP ¶
ClassifyIP returns the classification for the given IP address.
func IPIsGlobal ¶
IPIsGlobal returns true if the given IP is a global address.
func IPIsLinkLocal ¶
IPIsLinkLocal returns true if the given IP is a link-local address.
func IPIsLocalhost ¶
IPIsLocalhost returns whether the IP refers to the host itself.
func IPIsSiteLocal ¶
IPIsSiteLocal returns true if the given IP is a site-local address.
func IsValidFqdn ¶
IsValidFqdn returns whether the given string is a valid fqdn.
Types ¶
type SimpleStreamAssembler ¶
SimpleStreamAssembler is a simple assembler for github.com/google/gopacket/tcpassembly
func NewSimpleStreamAssembler ¶
func NewSimpleStreamAssembler() *SimpleStreamAssembler
NewSimpleStreamAssembler returns a new 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 }
SimpleStreamAssemblerManager is a simple manager for github.com/google/gopacket/tcpassembly
func (*SimpleStreamAssemblerManager) GetLastAssembler ¶
func (m *SimpleStreamAssemblerManager) GetLastAssembler() *SimpleStreamAssembler
GetLastAssembler returns the newest created stream assembler.
func (*SimpleStreamAssemblerManager) New ¶
func (m *SimpleStreamAssemblerManager) New(net, transport gopacket.Flow) tcpassembly.Stream
New returns a new stream assembler.