snmphelper

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2021 License: GPL-3.0 Imports: 6 Imported by: 3

README

snmphelper

Helpers on top of gosnmp

Documentation

Overview

Package snmphelper implements some functions on top of gosnmp.

Index

Constants

View Source
const Version = "0.0.3"

Version of release

Variables

This section is empty.

Functions

This section is empty.

Types

type Session

type Session struct {
	Host, User, Prot, Pass, Slevel, PrivProt, PrivPass string
	Ver                                                int
	MaxRepetitions, Timeout                            uint32 // Defaults: MaxRepetitions: 5, Timeout: 2
	Snmp                                               *gosnmp.GoSNMP
}

SNMP session object

func (*Session) Get

func (s *Session) Get(oids []string) (SnmpOut, error)

Do SNMP get

func (*Session) New

func (s *Session) New() error

Initializes and returns *gosnmp.GoSNMP in Session.Snmp

func (*Session) Walk

func (s *Session) Walk(oid string, bulk bool, stripoid bool) (SnmpOut, error)

Do SNMP walk or bulkwalk

type SnmpOut

type SnmpOut map[string]snmpValue

Session.Result data type. SNMP query results will appear here.

Jump to

Keyboard shortcuts

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