Versions in this module Expand all Collapse all v0 v0.3.11 Jul 16, 2024 v0.3.10 Jul 16, 2024 v0.3.9 Jul 15, 2024 v0.3.8 Jul 15, 2024 v0.3.7 Jul 15, 2024 v0.3.6 Jul 15, 2024 v0.3.5 Jul 15, 2024 v0.3.4 Jul 15, 2024 v0.3.3 Jul 15, 2024 v0.3.2 Jul 15, 2024 v0.3.1 Jul 15, 2024 v0.3.0 Jul 15, 2024 Changes in this version type Tags + func (ts Tags) String() string v0.2.1 Jul 8, 2024 v0.2.0 Jul 8, 2024 Changes in this version + var EmptyDevice = Device + var ErrDeviceDoesNotExist = errors.New("device does not exists") + var ErrDeviceExists = errors.New("device exists") + var ErrNetworkDoesNotExist = errors.New("network does not exists") + var ErrNetworkExists = errors.New("network exists") + var RandomizedMacAddressTag = Tag + 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 struct + A netip.Addr + func AddrToModelAddr(a netip.Addr) Addr + func MustParseAddr(s string) Addr + func ParseAddr(s string) (ip Addr, err error) + func (na *Addr) Scan(src interface{}) error + func (na Addr) Addr() netip.Addr + func (na Addr) Compare(ip2 Addr) int + func (na Addr) String() string + func (na Addr) Value() (driver.Value, error) + type Asn struct + Asn string + Country string + IPRange IPRange + Name string + type Device struct + Addr Addr + DiscoveredAt time.Time + DiscoveredBy DiscoverySource + MAC MAC + Meta Meta + Name string + PerformancePing Pinger + SNMP SNMP + Server Server + func (d *Device) ClearUpdated() + func (d *Device) SetUpdated() + func (d *Device) UpdateFromPingStats(stats nettools.Icmp4EchoResponseStatistics, ts time.Time) + 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) String() string + type DeviceFilter func(Device) bool + type DiscoveredNetwork Network + type DiscoverySource string + func (ds *DiscoverySource) Scan(src interface{}) error + func (ds DiscoverySource) IsEmpty() bool + func (ds DiscoverySource) String() string + func (ds DiscoverySource) Value() (driver.Value, error) + type EventDeviceAdded Device + func (nd EventDeviceAdded) String() string + type EventDeviceDiscovered Device + var EmptyDiscoveredDevice EventDeviceDiscovered + func (dd EventDeviceDiscovered) String() string + type EventDeviceUpdated Device + func (ude EventDeviceUpdated) String() string + type FlowSummaryForAddrByCountry struct + Country string + Name string + RecvBytes int + XmitBytes int + type FlowSummaryForAddrByIP struct + Addr Addr + Asn string + Country string + Name string + RecvBytes int + XmitBytes int + type FlowSummaryForAddrByName struct + Name string + RecvBytes int + XmitBytes int + type IPRange struct + A netipx.IPRange + func IPRangeToModelIPRange(a netipx.IPRange) IPRange + func MustParseIPRange(s string) IPRange + func ParseIPRange(s string) (ip IPRange, err error) + func (na *IPRange) Scan(src interface{}) error + func (na IPRange) Compare(ip2 IPRange) int + func (na IPRange) IPRange() netipx.IPRange + func (na IPRange) String() string + func (na IPRange) Value() (driver.Value, error) + type IpAsn struct + Created time.Time + IP Addr + type IpFlow struct + Bytes int + DstASN string + DstAddr Addr + DstPort uint16 + End time.Time + Flags TcpFlags + Packets int + Protocol Protocol + SrcASN string + SrcAddr Addr + SrcPort uint16 + Start time.Time + func (ipf IpFlow) String() string + type MAC struct + M net.HardwareAddr + func HardwareAddrToMAC(a net.HardwareAddr) MAC + func MustParseMAC(s string) MAC + func ParseMAC(s string) (m MAC, err error) + func (m *MAC) Scan(src interface{}) error + func (m MAC) Addr() net.HardwareAddr + func (m MAC) Compare(x MAC) int + func (m MAC) IsEmpty() bool + func (m MAC) String() string + func (m MAC) Value() (driver.Value, error) + type Meta struct + DnsName string + Manufacturer string + Tags Tags + type Network struct + LastScan time.Time + Name string + Prefix Prefix + Tags Tags + func New(name string, ns string) (Network, error) + func NewNetworkFromPrefix(ns netip.Prefix) Network + func (n Network) Contains(d Device) bool + func (n Network) String() string + type NetworkAddedEvent Network + type NetworkFilter func(Network) bool + type NetworkStats struct + AvgPing time.Duration + IPTotal float64 + IPUsed uint64 + MaxPing time.Duration + type Pinger struct + FirstSeen time.Time + LastFailed bool + LastSeen time.Time + Maximum time.Duration + Mean time.Duration + type PortList struct + Ports []int + func IntSliceToPortList(s []int) PortList + func MustParsePortList(s string) PortList + func ParsePortList(s string) (pl PortList, err error) + func (pl *PortList) Scan(src interface{}) (err error) + func (pl PortList) Clone() PortList + func (pl PortList) IsEmpty() bool + func (pl PortList) Len() int + func (pl PortList) String() string + func (pl PortList) Value() (driver.Value, error) + type Prefix struct + P netip.Prefix + func MustParsePrefix(s string) Prefix + func PrefixToModelPrefix(p netip.Prefix) Prefix + func (np *Prefix) Scan(src interface{}) error + 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) String() string + func (np Prefix) Value() (driver.Value, error) + type Protocol byte + func (p Protocol) String() string + type SNMP struct + Community string + Description string + HasArpTable bool + HasInterfaces bool + LastArpTableScan time.Time + LastInterfacesScan time.Time + LastSNMPCheck time.Time + Name string + Port int + type ScanAllNetworksRequest struct + type ScanNetworkRequest Network + type Server struct + LastScan time.Time + Ports PortList + type Tag struct + Val string + func Add(tag Tag, tags []Tag) []Tag + func Remove(tag Tag, tags []Tag) []Tag + func (t *Tag) Scan(src interface{}) error + func (t Tag) Equal(intag Tag) bool + func (t Tag) Value() (driver.Value, error) + type Tags []Tag + func (ts *Tags) Scan(src interface{}) error + func (ts Tags) Value() (driver.Value, error) + type TcpFlags byte + func (tf TcpFlags) String() string