snmp

package
v0.0.0-...-c88c7c2 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AuthProtocolNone   = ""
	AuthProtocolMD5    = "md5"
	AuthProtocolSHA    = "sha"
	AuthProtocolSHA224 = "sha224"
	AuthProtocolSHA256 = "sha256"
	AuthProtocolSHA384 = "sha384"
	AuthProtocolSHA512 = "sha512"
)
View Source
const (
	PrivacyProtocolNone    = ""
	PrivacyProtocolDES     = "des"
	PrivacyProtocolAES128  = "aes128"
	PrivacyProtocolAES192  = "aes192"
	PrivacyProtocolAES192C = "aes192c"
	PrivacyProtocolAES256  = "aes256"
	PrivacyProtocolAES256C = "aes256c"
)

Variables

This section is empty.

Functions

func GetAuthProtocolOption

func GetAuthProtocolOption(protos ...AuthProtocol) dsl.Option

func GetPrivacyProtocolOption

func GetPrivacyProtocolOption(protos ...PrivacyProtocol) dsl.Option

Types

type AuthProtocol

type AuthProtocol string

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(host, transport, username string,
	authProto AuthProtocol, privacyProto PrivacyProtocol,
	password dsl.PasswordCallback,
	encryptionPassphrase dsl.EncryptionPassphraseCallback) (*Client, error)

func (*Client) CheckResult

func (c *Client) CheckResult(oid string, expectedType byte) error

func (*Client) Close

func (c *Client) Close() error

func (*Client) Walk

func (c *Client) Walk(oid string) (Values, error)

type PrivacyProtocol

type PrivacyProtocol string

type Value

type Value struct {
	OID  string
	Type byte
	Val  interface{}
}

func (Value) ValBytes

func (v Value) ValBytes() ([]byte, error)

func (Value) ValDuration

func (v Value) ValDuration() (time.Duration, error)

func (Value) ValFloat64

func (v Value) ValFloat64() (float64, error)

func (Value) ValInt64

func (v Value) ValInt64() (int64, error)

func (Value) ValString

func (v Value) ValString() (string, error)

func (Value) ValUint64

func (v Value) ValUint64() (uint64, error)

type Values

type Values struct {
	// contains filtered or unexported fields
}

func (*Values) Get

func (v *Values) Get(oid string) *Value

func (*Values) GetBytes

func (v *Values) GetBytes(oid string) ([]byte, error)

func (*Values) GetFloat64

func (v *Values) GetFloat64(oid string) (float64, error)

func (*Values) GetInt64

func (v *Values) GetInt64(oid string) (int64, error)

func (*Values) GetString

func (v *Values) GetString(oid string) (string, error)

func (*Values) GetUint64

func (v *Values) GetUint64(oid string) (uint64, error)

func (*Values) String

func (v *Values) String() string

func (*Values) Walk

func (v *Values) Walk(callback func(Value))

Jump to

Keyboard shortcuts

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