Encode SNMP version 3 packet

Namespace:  SnmpSharpNet
Assembly:  SnmpSharpNet (in SnmpSharpNet.dll) Version: (


public override byte[] encode()
Visual Basic (Declaration)
Public Overrides Function encode As Byte()
Visual C++
virtual array<unsigned char>^ encode() override

Return Value

Byte array BER encoded SNMP packet.


Before encoding the packet into a byte array you need to ensure all required information is set. Examples of required information is request type, Vbs (Oid + values pairs), USM settings including SecretName, authentication method and secret (if needed), privacy method and secret (if needed), etc.

See Also