snmp

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	BulkWalkAll(rootOid string) (results []gosnmp.SnmpPDU, err error)
	Get(oids []string) (result *gosnmp.SnmpPacket, err error)
}

Client defines a new SNMP interface to abstract SNMP operations.

type SwitchClient

type SwitchClient struct {
	GoSNMP *gosnmp.GoSNMP
}

SwitchClient implements the Client interface.

func New

func New(s *gosnmp.GoSNMP) *SwitchClient

New returns a new SNMP client.

func (*SwitchClient) BulkWalkAll

func (s *SwitchClient) BulkWalkAll(rootOid string) (results []gosnmp.SnmpPDU, err error)

BulkWalkAll performs an SNMP BulkWalk operation for an OID, returning an array of all values.

func (*SwitchClient) Get

func (s *SwitchClient) Get(oids []string) (results *gosnmp.SnmpPacket, err error)

Get does an SNMP Get operation on an array of OIDs.

Jump to

Keyboard shortcuts

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