Documentation ¶
Overview ¶
Package snmp provides an implementation of the SNMP specification.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Binding ¶
type Binding struct { Name asn1.ObjectIdentifier Value asn1.RawValue }
Binding represents an assignment to a variable, a.k.a. managed object.
type Request ¶
type Request struct { ID int32 Type string // "Get", "GetNext", "GetBulk" Bindings []Binding NonRepeaters int MaxRepetitions int }
A Request represents an SNMP request to be sent over a Transport.
type RoundTripper ¶
RoundTripper is an interface representing the ability to execute a single SNMP transaction, obtaining the Response for a given Request.
A RoundTripper must be safe for concurrent use by multiple goroutines.
type Rows ¶
type Rows struct { Transport RoundTripper // contains filtered or unexported fields }
Rows is the result of a walk. Its cursor starts before the first row of the result set. Use Next to advance through the rows:
rows, err := snmp.Walk(host, community, "ifName") ... for rows.Next() { var name []byte err = rows.Scan(&name) ... } err = rows.Err() // get any error encountered during iteration ...
func Walk ¶
Walk executes a query against host authenticated by the community string, retrieving the MIB sub-tree defined by the the given root oids.