代码拉取完成,页面将自动刷新
package snmpgo
import (
"time"
)
var StripHexPrefix = stripHexPrefix
var ToHexStr = toHexStr
var Retry = retry
var GenRequestId = genRequestId
var GenSalt32 = genSalt32
var GenSalt64 = genSalt64
var GenMessageId = genMessageId
var NewNotInTimeWindowError = func() error { return ¬InTimeWindowError{&MessageError{}} }
// For snmpgo testing
var NewSNMPEngine = newSNMPEngine
func ArgsValidate(args *SNMPArguments) error { return args.validate() }
func CheckPdu(engine *snmpEngine, pdu Pdu, args *SNMPArguments) error {
return engine.checkPdu(pdu, args)
}
// For message testing
var NewMessage = newMessage
var UnmarshalMessage = unmarshalMessage
var NewMessageWithPdu = newMessageWithPdu
var NewMessageProcessing = newMessageProcessing
func ToMessageV1(msg message) *messageV1 { return msg.(*messageV1) }
func ToMessageV3(msg message) *messageV3 { return msg.(*messageV3) }
func ToUsm(sec security) *usm { return sec.(*usm) }
// For security testing
var NewSecurity = newSecurity
var PasswordToKey = passwordToKey
var EncryptDES = encryptDES
var EncryptAES = encryptAES
var DecryptDES = decryptDES
var DecryptAES = decryptAES
var NewSecurityMap = newSecurityMap
func NewCommunity() *community { return &community{} }
func NewUsm() *usm { return &usm{} }
// For server
func ListeningUDPAddress(s *TrapServer) string {
for i := 0; i < 12; i++ {
if conn := s.transport.(*packetTransport).conn; conn != nil {
return conn.LocalAddr().String()
}
// XXX Wait until a connection is available, but this code is a kludge
time.Sleep(time.Millisecond * time.Duration(1<<uint(i)))
}
return ""
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。