C# Class SnmpSharpNet.TrapPdu

SNMP version 1 TRAP Protocol Data Unit
Trap PDU for SNMP version 1 is a PDU with a unique layout requiring a dedicated class. SNMP versions 2 and 3 use standard PDU type for V2TRAP notifications.
Inheritance: AsnType, ICloneable
ファイルを表示 Open project: griffina/SnmpSharpNet Class Usage Examples

Protected Properties

Property Type Description
_agentAddr IpAddress
_enterprise Oid
_generic Integer32
_specific Integer32
_timeStamp TimeTicks

Public Methods

Method Description
Clone ( ) : Object

Clone object

Set ( TrapPdu second ) : void

Initialize the class with values from another TrapPdu class.

Set ( string value ) : void

Not implemented. Throws NotImplementedException.

TrapPdu ( ) : System

Constructor

TrapPdu ( TrapPdu second ) : System

Constructs a new trap pdu that is identical to the passed pdu.

decode ( byte buffer, int offset ) : int

Decode BER encoded SNMP version 1 trap packet

encode ( MutableByte buffer ) : void

ASN.1 encode SNMP version 1 trap

Method Details

Clone() public method

Clone object
public Clone ( ) : Object
return Object

Set() public method

Initialize the class with values from another TrapPdu class.
public Set ( TrapPdu second ) : void
second TrapPdu TrapPdu class whose values are used to initialize this class.
return void

Set() public method

Not implemented. Throws NotImplementedException.
public Set ( string value ) : void
value string Irrelevant
return void

TrapPdu() public method

Constructor
public TrapPdu ( ) : System
return System

TrapPdu() public method

Constructs a new trap pdu that is identical to the passed pdu.
public TrapPdu ( TrapPdu second ) : System
second TrapPdu The object to copy. ///
return System

decode() public method

Decode BER encoded SNMP version 1 trap packet
Invalid SNMP Pdu type received. Not an SNMP version 1 Trap PDU. Invalid Variable Binding list encoding.
public decode ( byte buffer, int offset ) : int
buffer byte BER encoded buffer
offset int Offset in the packet to start decoding from
return int

encode() public method

ASN.1 encode SNMP version 1 trap
public encode ( MutableByte buffer ) : void
buffer MutableByte buffer to the end of which encoded values are appended.
return void

Property Details

_agentAddr protected_oe property

The IP Address of the remote agent sending the trap.
protected IpAddress,SnmpSharpNet _agentAddr
return IpAddress

_enterprise protected_oe property

Trap enterprise Oid
protected Oid _enterprise
return Oid

_generic protected_oe property

Generic trap code
protected Integer32 _generic
return Integer32

_specific protected_oe property

Specific trap code.
protected Integer32 _specific
return Integer32

_timeStamp protected_oe property

sysUpTime timestamp of the trap event
protected TimeTicks,SnmpSharpNet _timeStamp
return TimeTicks