SnmpV2Packet packetv2 = new SnmpV2Packet(); packetv2.Community.Set("public"); packetv2.Pdu.Set(mypdu); byte[] berpacket = packetv2.encode();
Example, SNMP version 2 packet decoding: SnmpV2Packet packetv2 = new SnmpV2Packet(); packetv2.decode(inbuffer,inlen);