snmp

package
v0.0.0-...-3a03725 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfig = &Config{
	Port:           161,
	AuthProtocol:   gosnmp.SHA,
	PrivProtocol:   gosnmp.AES,
	Timeout:        time.Second * 5,
	Retries:        2,
	MaxOIDs:        gosnmp.MaxOids,
	MaxRepetitions: 25,
}

Functions

This section is empty.

Types

type AddrType

type AddrType int
const AddrIPv4 AddrType = 1

func (AddrType) String

func (i AddrType) String() string

type CfgLoadType

type CfgLoadType int
const CfgLoadRunningConfigDownload CfgLoadType = 22

func (CfgLoadType) String

func (i CfgLoadType) String() string

type Config

type Config struct {
	Port         uint16
	Username     string
	AuthPassword string
	PrivPassword string
	AuthProtocol gosnmp.SnmpV3AuthProtocol
	PrivProtocol gosnmp.SnmpV3PrivProtocol

	Timeout        time.Duration
	Retries        int
	MaxOIDs        int
	MaxRepetitions uint32
}

func (*Config) DownloadConfig

func (c *Config) DownloadConfig(host string, svr *tftp.Server) error

func (*Config) DownloadConfigs

func (c *Config) DownloadConfigs(hosts []string, workers int, svr *tftp.Server)

func (*Config) New

func (c *Config) New(host string) *gosnmp.GoSNMP

type LoadStatusType

type LoadStatusType int
const (
	LoadStatusNormal                   LoadStatusType = 1
	LoadStatusFlashPrepareReadFailure  LoadStatusType = 2
	LoadStatusFlashReadError           LoadStatusType = 3
	LoadStatusFlashPrepareWriteFailure LoadStatusType = 4
	LoadStatusFlashWriteError          LoadStatusType = 5
	LoadStatusTftpTimeoutError         LoadStatusType = 6
	LoadStatusTftpOutOfBufferSpace     LoadStatusType = 7
	LoadStatusTftpBusy                 LoadStatusType = 8
	LoadStatusTftpRemoteOtherErrors    LoadStatusType = 9
	LoadStatusTftpRemoteNoFile         LoadStatusType = 10
	LoadStatusTftpRemoteBadAccess      LoadStatusType = 11
	LoadStatusTftpRemoteDiskFull       LoadStatusType = 12
	LoadStatusTftpRemoteBadOperation   LoadStatusType = 13
	LoadStatusTftpRemoteBadID          LoadStatusType = 14
	LoadStatusTftpRemoteFileExists     LoadStatusType = 15
	LoadStatusTftpRemoteNoUser         LoadStatusType = 16
	LoadStatusOperationError           LoadStatusType = 17
	LoadStatusLoading                  LoadStatusType = 18
)

func (LoadStatusType) String

func (i LoadStatusType) String() string

Jump to

Keyboard shortcuts

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