C# 클래스 SnmpSharpNet.SnmpV1TrapPacket

SNMP version 1 TRAP packet class.
Available packet classes are:
  • SnmpV1Packet
  • SnmpV1TrapPacket
  • SnmpV2Packet
  • SnmpV3Packet
This class is provided to simplify encoding and decoding of packets and to provide consistent interface for users who wish to handle transport part of protocol on their own without using the UdpTarget class. SnmpPacket and derived classes have been developed to implement SNMP packet support. For SNMP version 1 and 2 packet, SnmpV1Packet and SnmpV2Packet classes provides sufficient support for encoding and decoding data to/from BER buffers to satisfy requirements of most applications. SNMP version 3 on the other hand requires a lot more information to be passed to the encoder method and returned by the decode method. Attempt of implementing SNMP version 3 as part of SnmpV3Packet class was operational but required too many function arguments to operate so a different interface was developed using dedicated SnmpV3Packet class.
상속: SnmpPacket
파일 보기 프로젝트 열기: griffina/SnmpSharpNet 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
_pdu TrapPdu
_snmpCommunity OctetString

공개 메소드들

메소드 설명
SnmpV1TrapPacket ( ) : System

Standard constructor.

SnmpV1TrapPacket ( string snmpCommunity ) : System

Standard constructor.

decode ( byte buffer, int length ) : int

Decode received packet. This method overrides the base implementation that cannot be used with this type of the packet.

encode ( ) : byte[]

Encode SNMP packet for sending.

메소드 상세

SnmpV1TrapPacket() 공개 메소드

Standard constructor.
public SnmpV1TrapPacket ( ) : System
리턴 System

SnmpV1TrapPacket() 공개 메소드

Standard constructor.
public SnmpV1TrapPacket ( string snmpCommunity ) : System
snmpCommunity string SNMP community name for the packet
리턴 System

decode() 공개 메소드

Decode received packet. This method overrides the base implementation that cannot be used with this type of the packet.
public decode ( byte buffer, int length ) : int
buffer byte Packet buffer
length int Buffer length
리턴 int

encode() 공개 메소드

Encode SNMP packet for sending.
public encode ( ) : byte[]
리턴 byte[]

프로퍼티 상세

_pdu 보호되어 있는 프로퍼티

SNMP Protocol Data Unit
protected TrapPdu,SnmpSharpNet _pdu
리턴 TrapPdu

_snmpCommunity 보호되어 있는 프로퍼티

SNMP community name
protected OctetString _snmpCommunity
리턴 OctetString