|
The sendinform example is used to send v2c and v3 inform requests. The inform requests can be sent from a manager to another manager.
To send the v2c/v3 inform request, you need to provide the following values.
remoteHost - the manager station to which the trap message is sent.
timeticks - the time elapsed between the last initialization of the network and the generation of the trap.
trapOID - the trap OID.
MIB file, OID, and value - values for building the varbinds.
The following commands generate a simple v2c/v3 inform request.
|
java sendinform -m ../../mibs/RFC1213-MIB remotehost 5000 1.5.0 java sendinform -p 8001 -m ../../mibs/RFC1213-MIB remotehost 5000 1.2.0 1.5.0 test |
The above command sends an inform message to the manager application in the remote host. A trap receiver program in the manager station can receive and display the inform message. By default, the inform requests are sent to the port 162 of the manager station.
Source
Refer the source code for the sendinform example present in <examples/applications/sendinform.java> for more information.
Usage
The usage of the sendinform utility is provided below. The "MIB_files", "host", "TimeTicksValue", and "trapOID" arguments are mandatory and the rest are optional.
Usage: java sendinform [-d Debug][-v version(v2,v3)] [-c community] [-p port] [-u user] [-a auth_protocol] [-w auth_password] [-pp privProtocol(DES/AES-128/AES-192/AES-256/3DES)] [-pp privProtocol(DES/AES-128/AES-192/AES-256/3DES)] [-s priv_password] [-i contextName] -m MIB_file host TimeTicksvalue trapOID [OID value] ...
|