SNMP version 1 packet class. Supported types are SNMP-GET, SNMP-GETNEXT, SNMP-SET and SNMP-RESPONSE.
Namespace:
SnmpSharpNetAssembly: SnmpSharpNet (in SnmpSharpNet.dll) Version: 0.5.0.0 (0.5.0.0)
Syntax
| C# | Visual Basic | Visual C++ |
public class SnmpV1Packet : SnmpPacket
Public Class SnmpV1Packet _ Inherits SnmpPacket
public ref class SnmpV1Packet : public SnmpPacket
Members
| All Members | Constructors | Fields | Properties | Methods |
| Member | Description | |
|---|---|---|
| SnmpV1Packet()()() |
Standard constructor.
| |
| SnmpV1Packet(String) |
Standard constructor.
| |
| _pdu |
SNMP Protocol Data Unit
| |
| decode(array<Byte>[]()[], Int32) |
Decode received SNMP packet.
(Overrides SnmpPacket..::.decode(array<Byte>[]()[], Int32).) | |
| encode()()() |
Encode SNMP packet for sending.
(Overrides SnmpPacket..::.encode()()().) | |
| encode(MutableByte) |
Wrap BER encoded SNMP information contained in the parameter MutableByte class.
Information in the parameter is prepended by the SNMP version field and wrapped in a sequence header.
Derived classes call this method to finalize SNMP packet encoding.
(Inherited from SnmpPacket.) | |
| Equals(Object) | (Inherited from Object.) | |
| GetHashCode()()() |
Serves as a hash function for a particular type.
(Inherited from Object.) | |
| GetType()()() |
Gets the Type of the current instance.
(Inherited from Object.) | |
| IsNotification |
Packet is a notification
(Inherited from SnmpPacket.) | |
| IsReport |
Packet is a report
(Inherited from SnmpPacket.) | |
| IsRequest |
Packet is a request
(Inherited from SnmpPacket.) | |
| IsResponse |
Packet is a response
(Inherited from SnmpPacket.) | |
| Pdu |
Access to the packet Pdu.
(Overrides SnmpPacket..::.Pdu.) | |
| SnmpCommunity |
Get SNMP community value used by SNMP version 1 and version 2 protocols.
| |
| ToString()()() | (Inherited from Object.) | |
| Version |
SNMP Protocol version
(Inherited from SnmpPacket.) |
Remarks
Available packet classes are:
CopyC#
Example, SNMP version 1 packet decoding:
CopyC#
- SnmpV1Packet
- SnmpV1TrapPacket
- SnmpV2Packet
- SnmpV3Packet
SnmpV1Packet packetv1 = new SnmpV1Packet(); packetv1.SnmpCommunity.Set("public"); packetv1.Pdu.Set(mypdu); byte[] berpacket = packetv1.encode();
SnmpV1Packet packetv1 = new SnmpV1Packet();
packetv1.decode(inbuffer,inlen);