snmp

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2020 License: GPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSubOid

func GetSubOid(oid string, baseOid string) string

func IsOid

func IsOid(oid string) bool

func IsOidPartOf

func IsOidPartOf(oid string, baseOid string) bool

IsOidPartOf tests if an OID is equal of below another OID

func SetVersion

func SetVersion(client *gosnmp.GoSNMP, version string) error

func SortOIDs

func SortOIDs(list []string) []string

Types

type IndexedIds

type IndexedIds map[string]string

type Table

type Table struct {
	Client  *gosnmp.GoSNMP
	Oid     string
	Columns IndexedIds
	Values  TableRows
}

func LoadTableFromWalkOutput

func LoadTableFromWalkOutput(oid string, stream io.Reader) (*Table, error)

func (*Table) GetIntValue

func (t *Table) GetIntValue(id string, oid string) (int, error)

func (*Table) GetSortedOIDs

func (t *Table) GetSortedOIDs() []string

func (*Table) GetStringValue

func (t *Table) GetStringValue(id string, oid string) (string, error)

func (*Table) GetUintValue

func (t *Table) GetUintValue(id string, oid string) (uint, error)

func (*Table) GetValue

func (t *Table) GetValue(id string, oid string) (interface{}, error)

func (*Table) Reset

func (t *Table) Reset()

func (*Table) Walk

func (t *Table) Walk() error

type TableColumns

type TableColumns map[string]gosnmp.SnmpPDU

type TableRows

type TableRows map[string]TableColumns

Jump to

Keyboard shortcuts

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