Versions in this module Expand all Collapse all v1 v1.24.3 Apr 27, 2022 Changes in this version + const AsnExtensionID + const MaxOids + var Default = &GoSNMP + func Check(err error) + func Partition(currentPosition, partitionSize, sliceLength int) bool + func ToBigInt(value interface{}) *big.Int + type Asn1BER byte + const BitString + const Boolean + const Counter32 + const Counter64 + const EndOfContents + const EndOfMibView + const Gauge32 + const IPAddress + const Integer + const NoSuchInstance + const NoSuchObject + const NsapAddress + const Null + const ObjectDescription + const ObjectIdentifier + const OctetString + const Opaque + const OpaqueDouble + const OpaqueFloat + const TimeTicks + const Uinteger32 + const UnknownType + func (i Asn1BER) String() string + type BitStringValue struct + BitLength int + Bytes []byte + func (b BitStringValue) At(i int) int + func (b BitStringValue) RightAlign() []byte + type GoSNMP struct + AppOpts map[string]interface{} + Community string + Conn net.Conn + Context context.Context + ContextEngineID string + ContextName string + ExponentialTimeout bool + Logger Logger + MaxOids int + MaxRepetitions uint8 + MsgFlags SnmpV3MsgFlags + NonRepeaters int + Port uint16 + Retries int + SecurityModel SnmpV3SecurityModel + SecurityParameters SnmpV3SecurityParameters + Target string + Timeout time.Duration + Transport string + Version SnmpVersion + func (x *GoSNMP) BulkWalk(rootOid string, walkFn WalkFunc) error + func (x *GoSNMP) BulkWalkAll(rootOid string) (results []SnmpPDU, err error) + func (x *GoSNMP) Check(err error) + func (x *GoSNMP) Connect() error + func (x *GoSNMP) ConnectIPv4() error + func (x *GoSNMP) ConnectIPv6() error + func (x *GoSNMP) Get(oids []string) (result *SnmpPacket, err error) + func (x *GoSNMP) GetBulk(oids []string, nonRepeaters uint8, maxRepetitions uint8) (result *SnmpPacket, err error) + func (x *GoSNMP) GetNext(oids []string) (result *SnmpPacket, err error) + func (x *GoSNMP) SendTrap(trap SnmpTrap) (result *SnmpPacket, err error) + func (x *GoSNMP) Set(pdus []SnmpPDU) (result *SnmpPacket, err error) + func (x *GoSNMP) SetMsgID(msgID uint32) + func (x *GoSNMP) SetRequestID(reqID uint32) + func (x *GoSNMP) SnmpDecodePacket(resp []byte) (*SnmpPacket, error) + func (x *GoSNMP) SnmpEncodePacket(pdutype PDUType, pdus []SnmpPDU, nonRepeaters uint8, maxRepetitions uint8) ([]byte, error) + func (x *GoSNMP) UnmarshalTrap(trap []byte) (result *SnmpPacket) + func (x *GoSNMP) Walk(rootOid string, walkFn WalkFunc) error + func (x *GoSNMP) WalkAll(rootOid string) (results []SnmpPDU, err error) + type Handler interface + BulkWalk func(rootOid string, walkFn WalkFunc) error + BulkWalkAll func(rootOid string) (results []SnmpPDU, err error) + Check func(err error) + Close func() error + Community func() string + Connect func() error + ConnectIPv4 func() error + ConnectIPv6 func() error + ContextEngineID func() string + ContextName func() string + Get func(oids []string) (result *SnmpPacket, err error) + GetBulk func(oids []string, nonRepeaters uint8, maxRepetitions uint8) (result *SnmpPacket, err error) + GetExponentialTimeout func() bool + GetNext func(oids []string) (result *SnmpPacket, err error) + Logger func() Logger + MaxOids func() int + MaxRepetitions func() uint8 + MsgFlags func() SnmpV3MsgFlags + NonRepeaters func() int + Port func() uint16 + Retries func() int + SecurityModel func() SnmpV3SecurityModel + SecurityParameters func() SnmpV3SecurityParameters + SendTrap func(trap SnmpTrap) (result *SnmpPacket, err error) + Set func(pdus []SnmpPDU) (result *SnmpPacket, err error) + SetCommunity func(community string) + SetContextEngineID func(contextEngineID string) + SetContextName func(contextName string) + SetExponentialTimeout func(value bool) + SetLogger func(logger Logger) + SetMaxOids func(maxOids int) + SetMaxRepetitions func(maxRepetitions uint8) + SetMsgFlags func(msgFlags SnmpV3MsgFlags) + SetNonRepeaters func(nonRepeaters int) + SetPort func(port uint16) + SetRetries func(retries int) + SetSecurityModel func(securityModel SnmpV3SecurityModel) + SetSecurityParameters func(securityParameters SnmpV3SecurityParameters) + SetTarget func(target string) + SetTimeout func(timeout time.Duration) + SetVersion func(version SnmpVersion) + Target func() string + Timeout func() time.Duration + UnmarshalTrap func(trap []byte) (result *SnmpPacket) + Version func() SnmpVersion + Walk func(rootOid string, walkFn WalkFunc) error + WalkAll func(rootOid string) (results []SnmpPDU, err error) + func NewHandler() Handler + type Logger interface + Print func(v ...interface{}) + Printf func(format string, v ...interface{}) + type PDUType byte + const GetBulkRequest + const GetNextRequest + const GetRequest + const GetResponse + const InformRequest + const Report + const SNMPv2Trap + const Sequence + const SetRequest + const Trap + type SNMPError uint8 + const AuthorizationError + const BadValue + const CommitFailed + const GenErr + const InconsistentName + const InconsistentValue + const NoAccess + const NoCreation + const NoError + const NoSuchName + const NotWritable + const ReadOnly + const ResourceUnavailable + const TooBig + const UndoFailed + const WrongEncoding + const WrongLength + const WrongType + const WrongValue + func (i SNMPError) String() string + type SnmpPDU struct + Logger Logger + Name string + Type Asn1BER + Value interface{} + func (p *SnmpPDU) Check(err error) + type SnmpPacket struct + Community string + ContextEngineID string + ContextName string + Error SNMPError + ErrorIndex uint8 + Logger Logger + MaxRepetitions uint8 + MsgFlags SnmpV3MsgFlags + MsgID uint32 + MsgMaxSize uint32 + NonRepeaters uint8 + PDUType PDUType + RequestID uint32 + SecurityModel SnmpV3SecurityModel + SecurityParameters SnmpV3SecurityParameters + Variables []SnmpPDU + Version SnmpVersion + func (p *SnmpPacket) Check(err error) + func (packet *SnmpPacket) MarshalMsg() ([]byte, error) + type SnmpTrap struct + AgentAddress string + Enterprise string + GenericTrap int + SpecificTrap int + Timestamp uint + Variables []SnmpPDU + type SnmpV3AuthProtocol uint8 + const MD5 + const NoAuth + const SHA + type SnmpV3MsgFlags uint8 + const AuthNoPriv + const AuthPriv + const NoAuthNoPriv + const Reportable + type SnmpV3PrivProtocol uint8 + const AES + const AES192 + const AES192C + const AES256 + const AES256C + const DES + const NoPriv + type SnmpV3SecurityModel uint8 + const UserSecurityModel + type SnmpV3SecurityParameters interface + Copy func() SnmpV3SecurityParameters + Log func() + type SnmpVersion uint8 + const Version1 + const Version2c + const Version3 + func (s SnmpVersion) String() string + type TrapListener struct + OnNewTrap func(s *SnmpPacket, u *net.UDPAddr) + Params *GoSNMP + func NewTrapListener() *TrapListener + func (t *TrapListener) Close() + func (t *TrapListener) Listen(addr string) error + func (t *TrapListener) Listening() <-chan bool + type UsmSecurityParameters struct + AuthenticationParameters string + AuthenticationPassphrase string + AuthenticationProtocol SnmpV3AuthProtocol + AuthoritativeEngineBoots uint32 + AuthoritativeEngineID string + AuthoritativeEngineTime uint32 + Logger Logger + PrivacyKey []byte + PrivacyParameters []byte + PrivacyPassphrase string + PrivacyProtocol SnmpV3PrivProtocol + SecretKey []byte + UserName string + func (sp *UsmSecurityParameters) Copy() SnmpV3SecurityParameters + func (sp *UsmSecurityParameters) GenKeys() + func (sp *UsmSecurityParameters) GenSalt() + func (sp *UsmSecurityParameters) Log() + type VarBind struct + Name asn1.ObjectIdentifier + Value asn1.RawValue + type WalkFunc func(dataUnit SnmpPDU) error