home *** CD-ROM | disk | FTP | other *** search
- Date: November 1992
- To: users of [drive]\tcpip\samples\snmp
- Subject: snmp related samples
-
- This directory contains samples for the following:
-
- 1.The src.pw file, defining the SNMP community names.
- 2.The snmptrap.dst file, defining the hosts where to send SNMP traps to.
- 3.A dpisampl.c program which serves as a sample for an SNMP-DPI sub-agent.
-
- To use these samples:
-
- 1.Set the environment variable as described in programmer's manual.
-
- 2.First you may want to review and/or change the pw.src file and the
- snmptrap.dst file.
- Then, to install the SNMP community names and the SNMP trap destinations
- you can issue:
-
- [C:\tcpip\samples\snmp] nmake snmpsmpl.mak
-
- This will create snmp.pw (via the make_pw cmd) and then copy the
- snmp.pw and snmptrap.dst files to the ETC directory, as specified
- in the environment variable %etc% (default: C:\TCPIP\ETC)
-
- If you want to do these steps manually:
-
- [C:\tcpip\samples\snmp] copy snmptrap.dst \tcpip\etc
- [C:\tcpip\samples\snmp] make_pw
- [C:\tcpip\samples\snmp] copy snmp.pw \tcpip\etc
-
- 3.You can now start the SNMP agent:
-
- [C:\tcpip\samples\snmp] start snmpd
-
- After this you should be able to get SNMP variables. In another window:
-
- [C:\tcpip\samples\snmp] start snmpreqd
- [C:\tcpip\samples\snmp] snmp get host_name community_name sysDescr
- [C:\tcpip\samples\snmp] snmpgrp host_name community_name sys
-
- 4.Compiling and Linking the SNMP-DPI sample sub-agent
-
- [C:\tcpip\samples\snmp] nmake dpisampl.mak
-
- After this you can run the SNMP-DPI sub-agent (snmpd must be active):
-
- [C:\tcpip\samples\snmp] start dpisampl host_name community_name
-
- After this you should be able to get SNMP subagent variables.
- In another window:
-
- [C:\tcpip\samples\snmp] start snmpreqd
- [C:\tcpip\samples\snmp] snmp get host_name community_name dpiSampleNumber
- [C:\tcpip\samples\snmp] snmp get host_name community_name dpiSampleCounter
-