devicededuper

package
v0.0.0-...-bfe00b6 Latest Latest
Warning

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

Go to latest
Published: May 2, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package devicededuper provides a deduplication mechanism for SNMP devices based on the device info It is used to deduplicate devices which have multiple IPs

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IncrementIP

func IncrementIP(ip net.IP)

IncrementIP increments an IP address by 1

Types

type DeviceDeduper

type DeviceDeduper interface {
	DecrementIPCounter(ip string)
	MarkIPAsProcessed(ip string)
	AddPendingDevice(device PendingDevice)
	GetDedupedDevices() []PendingDevice
	ResetCounters()
}

DeviceDeduper is an interface for deduplicating SNMP devices

func NewDeviceDeduper

func NewDeviceDeduper(config snmp.ListenerConfig) DeviceDeduper

NewDeviceDeduper creates a new DeviceDeduper instance

type DeviceInfo

type DeviceInfo struct {
	Name        string
	Description string
	BootTimeMs  int64
	SysObjectID string
}

DeviceInfo contains information about a SNMP device that is used to deduplicate devices

type PendingDevice

type PendingDevice struct {
	Config         snmp.Config
	Info           DeviceInfo
	AuthIndex      int
	AddedFromCache bool
	IP             string
	Failures       int
}

PendingDevice represents a device pending deduplication

Jump to

Keyboard shortcuts

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