C# Class SnmpSharpNet.AgentParameters

SNMP Agent specific values.
This class stores values to access SNMP version 1 and version 2 agents. Pass this class with your request data (Pdu) to the request method of the target class to make a request.
Inheritance: IAgentParameters
ファイルを表示 Open project: griffina/SnmpSharpNet Class Usage Examples

Protected Properties

Property Type Description
_community OctetString
_disableReplySourceCheck bool
_version Integer32

Public Methods

Method Description
AgentParameters ( ) : System

Standard constructor

AgentParameters ( AgentParameters second ) : System

Copy constructor. Initialize the class with the values of the parameter class values.

AgentParameters ( OctetString community ) : System

Constructor

AgentParameters ( SnmpVersion version ) : System

Constructor

AgentParameters ( SnmpVersion version, OctetString community ) : System

Constructor

AgentParameters ( SnmpVersion version, OctetString community, bool disableReplySourceCheck ) : System

Constructor

Clone ( ) : object

Clone current object

GetVersion ( ) : Integer32

Return SNMP version Integer32 object

InitializePacket ( SnmpPacket packet ) : void

Initialize SNMP packet class with agent parameters. In this class, SNMP community name is set in SNMPv1 and SNMPv2 packets.

Valid ( ) : bool

Validate object.

Method Details

AgentParameters() public method

Standard constructor
public AgentParameters ( ) : System
return System

AgentParameters() public method

Copy constructor. Initialize the class with the values of the parameter class values.
public AgentParameters ( AgentParameters second ) : System
second AgentParameters Parameter class.
return System

AgentParameters() public method

Constructor
public AgentParameters ( OctetString community ) : System
community OctetString Agent SNMP community name
return System

AgentParameters() public method

Constructor
public AgentParameters ( SnmpVersion version ) : System
version SnmpVersion SNMP protocol version. Acceptable values are SnmpConstants.SNMPV1 and /// SnmpConstants.SNMPV2
return System

AgentParameters() public method

Constructor
public AgentParameters ( SnmpVersion version, OctetString community ) : System
version SnmpVersion SNMP Protocol version
community OctetString SNMP community name
return System

AgentParameters() public method

Constructor
public AgentParameters ( SnmpVersion version, OctetString community, bool disableReplySourceCheck ) : System
version SnmpVersion SNMP Protocol version
community OctetString SNMP community name
disableReplySourceCheck bool Should reply source IP address/port number be checked on reply reception
return System

Clone() public method

Clone current object
public Clone ( ) : object
return object

GetVersion() public method

Return SNMP version Integer32 object
public GetVersion ( ) : Integer32
return Integer32

InitializePacket() public method

Initialize SNMP packet class with agent parameters. In this class, SNMP community name is set in SNMPv1 and SNMPv2 packets.
public InitializePacket ( SnmpPacket packet ) : void
packet SnmpPacket Packet class to initialize
return void

Valid() public method

Validate object.
public Valid ( ) : bool
return bool

Property Details

_community protected_oe property

SNMP community name for SNMP v1 and v2 protocol versions
protected OctetString _community
return OctetString

_disableReplySourceCheck protected_oe property

Flag that disables checking of host IP address and port number from which reply is received. If not disabled, only replies from the host IP/port to which request was sent will be considered valid and all others will be ignored. Default value is: false (reply source check is enabled) Set to true if you wish to disable this check.
protected bool _disableReplySourceCheck
return bool

_version protected_oe property

Agent protocol version
protected Integer32 _version
return Integer32