I have created a class which works on the MicroFramework which allows you to deal with Snmp packets which are in the form of byte's.
The heirarchy looks like this:
SnmpType - Enum, used to provide managed representations of Bytes which represent relevant Snmp Types
ErrorStatus - Enum, used to provide managed representations of Bytes which represent the ErrorStatus field in a SnmpPacket
ByteList - sealed class, used as a byte buffer for combining byte's and the like.
Variable - public class, Has properties such as Identifier, Value, Length and TypeCode, is primarily used for managed representation of the raw byte's in a byte
BasicEncodingRules - sealed class, all static members, used for encoding and decoding of Variables in BER format
ProtocolDataUnit - public class, Has properites such as Version, RequestId, PduType, CommunityName, ErrorStatus and ErrorIndex as well as Bindings (which is Variable
Example useage is as follows:
ProtocolDataUnit pdu = new ProtocolDataUnit();
pdu.PduType = SnmpType.GetRequestPdu;
pdu.RequestId = 1;
pdu.ErrorIndex = 0;
pdu.ErrorStatus = 0;
pdu.CommunityName = "private";
byte toSend = pdu.ToPacket().ToByteArray();
byte first = pdu.ToPacket().First();
byte last = pdu.ToPacket().Last();
If anyone thinks that they would be interested please let me know and I will provide the class code so that others may use it as well.
Julius R. Friedman