Documentation ¶
Index ¶
- Variables
- func CompareNetwork(a Network, b Network) int
- func ComparePrefix(a Prefix, b Prefix) int
- func DateTimeFmt(t time.Time) string
- func IsUsefulInterface(iface net.Interface) bool
- func NewNetworkIterator(n Network) *networkIterator
- func NewNetworkIteratorAsChannel(n Network) *networkIteratorAsChannel
- func SortDevicesByAddr(devs []Device)
- func SortNetworksByAddr(nets []Network)
- type Addr
- type Asn
- type Device
- func (d *Device) ClearUpdated()
- func (d Device) DiscoveredAtString() string
- func (d Device) FirstSeenString() string
- func (d Device) IsNameAddr() bool
- func (d Device) IsServer() bool
- func (d Device) IsUpdated() bool
- func (d Device) LastPingMaximumString() string
- func (d Device) LastPingMeanString() string
- func (d Device) LastSeenDurString(f func(time.Time) time.Duration) string
- func (d Device) LastSeenString() string
- func (d Device) Merge(in Device) Device
- func (d *Device) SetUpdated()
- func (d Device) String() string
- func (d *Device) UpdateFromPingStats(stats nettools.Icmp4EchoResponseStatistics, ts time.Time)
- type DeviceFilter
- type DiscoveredNetwork
- type DiscoverySource
- type EventDeviceAdded
- type EventDeviceDiscovered
- type EventDeviceUpdated
- type FlowSummaryForAddrByCountry
- type FlowSummaryForAddrByIP
- type FlowSummaryForAddrByName
- type IPRange
- type IpAsn
- type IpFlow
- type MAC
- type Meta
- type Network
- type NetworkAddedEvent
- type NetworkFilter
- type NetworkStats
- type Pinger
- type PortList
- type Prefix
- func (np Prefix) Addr() netip.Addr
- func (np Prefix) Bits() int
- func (np Prefix) Contains(addr Addr) bool
- func (np Prefix) ContainsAddr(addr netip.Addr) bool
- func (np Prefix) Is6() bool
- func (np *Prefix) Scan(src interface{}) error
- func (np Prefix) String() string
- func (np Prefix) Value() (driver.Value, error)
- type Protocol
- type SNMP
- type ScanAllNetworksRequest
- type ScanNetworkRequest
- type Server
- type Tag
- type Tags
- type TcpFlags
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrDeviceExists = errors.New("device exists") ErrDeviceDoesNotExist = errors.New("device does not exists") EmptyDevice = Device{} )
View Source
var ( ErrNetworkExists = errors.New("network exists") ErrNetworkDoesNotExist = errors.New("network does not exists") )
View Source
var RandomizedMacAddressTag = Tag{Val: "RandomizedMACAddress"}
Functions ¶
func CompareNetwork ¶
func ComparePrefix ¶
func DateTimeFmt ¶
func IsUsefulInterface ¶
func NewNetworkIterator ¶
func NewNetworkIterator(n Network) *networkIterator
func NewNetworkIteratorAsChannel ¶
func NewNetworkIteratorAsChannel(n Network) *networkIteratorAsChannel
func SortDevicesByAddr ¶
func SortDevicesByAddr(devs []Device)
func SortNetworksByAddr ¶
func SortNetworksByAddr(nets []Network)
Types ¶
type Device ¶
type Device struct { Name string Addr Addr MAC MAC DiscoveredAt time.Time DiscoveredBy DiscoverySource Meta Meta Server Server PerformancePing Pinger SNMP SNMP // contains filtered or unexported fields }
func (*Device) ClearUpdated ¶
func (d *Device) ClearUpdated()
func (Device) DiscoveredAtString ¶
func (Device) FirstSeenString ¶
func (Device) IsNameAddr ¶
func (Device) LastPingMaximumString ¶
func (Device) LastPingMeanString ¶
func (Device) LastSeenDurString ¶
func (Device) LastSeenString ¶
func (*Device) SetUpdated ¶
func (d *Device) SetUpdated()
func (*Device) UpdateFromPingStats ¶
func (d *Device) UpdateFromPingStats(stats nettools.Icmp4EchoResponseStatistics, ts time.Time)
type DeviceFilter ¶
DeviceFilter defines a function used to select a set of required devices.
type DiscoveredNetwork ¶
type DiscoveredNetwork Network
type DiscoverySource ¶
type DiscoverySource string
func (DiscoverySource) IsEmpty ¶
func (ds DiscoverySource) IsEmpty() bool
func (*DiscoverySource) Scan ¶
func (ds *DiscoverySource) Scan(src interface{}) error
func (DiscoverySource) String ¶
func (ds DiscoverySource) String() string
type EventDeviceAdded ¶
type EventDeviceAdded Device
func (EventDeviceAdded) String ¶
func (nd EventDeviceAdded) String() string
type EventDeviceDiscovered ¶
type EventDeviceDiscovered Device
var EmptyDiscoveredDevice EventDeviceDiscovered
func (EventDeviceDiscovered) String ¶
func (dd EventDeviceDiscovered) String() string
type EventDeviceUpdated ¶
type EventDeviceUpdated Device
func (EventDeviceUpdated) String ¶
func (ude EventDeviceUpdated) String() string
type FlowSummaryForAddrByIP ¶
type IpFlow ¶
type MAC ¶
type MAC struct {
M net.HardwareAddr
}
func HardwareAddrToMAC ¶
func HardwareAddrToMAC(a net.HardwareAddr) MAC
func MustParseMAC ¶
func (MAC) Addr ¶
func (m MAC) Addr() net.HardwareAddr
type Network ¶
func NewNetworkFromPrefix ¶
type NetworkFilter ¶
NetworkFilter defines a function used to select a set of required devices.
type NetworkStats ¶
type PortList ¶
type PortList struct {
Ports []int
}
func IntSliceToPortList ¶
func MustParsePortList ¶
func ParsePortList ¶
type ScanAllNetworksRequest ¶
type ScanAllNetworksRequest struct{}
type ScanNetworkRequest ¶
type ScanNetworkRequest Network
Click to show internal directories.
Click to hide internal directories.