SNMP Transport Provider

 

The SNMP transport provider is responsible for all communication between the SNMP manager and agent. It essentially acts as a bridge between the SNMP API and the actual transport protocol used. The advantage of using this approach is that the SNMP API need not be aware of the underlying protocol used and the user can virtually run SNMP over anything. For using a particular transport protocol, the user has to implement that protocol and plug-in (or register) it with the SNMP transport provider. Multiple protocols, such as TCP, UDP, and Serial communication can be used simultaneously in an application to communicate with various agents having SNMP over different protocols. The corresponding protocol providers are to be implemented by the user.

 

We have provided simple command-line examples that use the TCP/IP protocol over SNMP transport provider to perform basic operations, such as GET, SET, GETNEXT, GETBULK, TRAPS, INFORM, and WALK. Also command-line example has been provided that performs SNMP GET operation with UDP/IP and SNMP GETNEXT operation with TCP/IP protocol.

 

APIs used for plugging-in your protocol implementation

 

These interfaces are part of the com.adventnet.snmp.snmp2 package.

  1. SnmpTransportProvider - This interface provides the basic I/O operations. It contains the following API methods. Refer the javadocs files for exact syntax.

  2. ProtocolOptions - This interface defines some parameters that are to be implemented by the user. It contains the following API methods. Refer the javadocs files for exact syntax.

  3. SnmpTransportPacket - This class contains the details of the ProtocolOptions used by the SNMP API and the details of message sent or received. This contains the following API methods. Refer the javadocs files for exact syntax.

You can also implement your own transport provider. Refer Custom Transport Provider for more information.

 

 



Copyright © 1996-2006, AdventNet Inc. All Rights Reserved.