C# Class SnmpSharpNet.MsgFlags

Message flags in the SNMP v3 header.
Message flags hold flags that indicate if packet is authenticated, privacy protected and if report reply is expected on errors. Message flags field is a 1 byte OctetString encoded field.
Inheritance: AsnType, ICloneable
显示文件 Open project: griffina/SnmpSharpNet Class Usage Examples

Public Properties

Property Type Description
FLAG_AUTH byte
FLAG_PRIV byte
FLAG_REPORTABLE byte

Protected Properties

Property Type Description
_authenticationFlag bool
_privacyFlag bool
_reportableFlag bool

Public Methods

Method Description
Clone ( ) : object

Clone this class.

MsgFlags ( ) : System

Standard constructor. All flags are set to false by default.

MsgFlags ( bool authentication, bool privacy, bool reportable ) : System

Constructor. Initialize individual flag values.

ToString ( ) : string

Return string representation of the object.

decode ( byte buffer, int offset ) : int

Decode message flags from the BER encoded buffer starting at specified offset.

encode ( MutableByte buffer ) : void

Encode SNMP v3 message flag field

Method Details

Clone() public method

Clone this class.
public Clone ( ) : object
return object

MsgFlags() public method

Standard constructor. All flags are set to false by default.
public MsgFlags ( ) : System
return System

MsgFlags() public method

Constructor. Initialize individual flag values.
public MsgFlags ( bool authentication, bool privacy, bool reportable ) : System
authentication bool true if authentication is used, otherwise false
privacy bool true if privacy protection is used, otherwise false
reportable bool true if report is expected, otherwise false
return System

ToString() public method

Return string representation of the object.
public ToString ( ) : string
return string

decode() public method

Decode message flags from the BER encoded buffer starting at specified offset.
public decode ( byte buffer, int offset ) : int
buffer byte BER encoded buffer
offset int Offset within the buffer to start decoding process
return int

encode() public method

Encode SNMP v3 message flag field
public encode ( MutableByte buffer ) : void
buffer MutableByte Buffer to append encoded value to
return void

Property Details

FLAG_AUTH public_oe static_oe property

Bit value that, when set, indicates that packet has been authenticated.
public static byte FLAG_AUTH
return byte

FLAG_PRIV public_oe static_oe property

Bit value that, when set, indicates that packet has been privacy protected.
public static byte FLAG_PRIV
return byte

FLAG_REPORTABLE public_oe static_oe property

Bit value that, when set, indicates that sender of the packet expects report packet to be sent by the agent on errors.
public static byte FLAG_REPORTABLE
return byte

_authenticationFlag protected_oe property

True if authentication is used to secure the packet, otherwise false.
protected bool _authenticationFlag
return bool

_privacyFlag protected_oe property

True if ScopedPdu portion of the packet is privacy protected with encryption, otherwise false.
protected bool _privacyFlag
return bool

_reportableFlag protected_oe property

True if reportable flag is set, otherwise false.
protected bool _reportableFlag
return bool