utils

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2025 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseSnmpTable

func ParseSnmpTable(table *[]gosnmp.SnmpPDU, prefixLength uint) (*map[string][]Cell, error)

Get a list of PDUs and try to form a table from it prefixLength parts of the oid are ignored from the beginning of the oid. The suffix determines the id of entries from the end of the oid its length is computed by (number of oid points - 1 - prefixLength)

Assumptions: All OIDs in the list _table_ have the same length (= number of separators)

Types

type Cell

type Cell struct {
	Pdu gosnmp.SnmpPDU
	ID  string
}

Jump to

Keyboard shortcuts

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