[SNMP4J] Create PDU from ByteBuffer

Norman Elton normelton at gmail.com
Thu May 29 15:26:20 CEST 2008


I've got a server that listens for both SNMP PDUs and Radius requests
(long story). Right now, I've got one thread that extends
CommandResponder and is listening for incoming PDUs, and another
thread running a DatagramChannel listening for Radius UDP packets.

I'd like to streamline this and have one thread, calling a select() on
two DatagramChannels. When I get a SNMP PDU; however, I don't see a
way to instantiate a PDU object to "decode" the packet.

Is there a way to create a PDU from a given ByteBuffer that's already
been read off the wire, rather than having SNMP run it's own
"listener"?

Hope this makes sense, thanks for your help!

Norman Elton

=======
Network Engineering
College of William & Mary



More information about the SNMP4J mailing list