SNMP Manager Programmer's Guide
Programming Examples
SNMP Manager Programmer’s Guide–134249
2-86
SNMPWALK
Example 2-11. Contents of snmpwlkc (page 1 of 7)
#include <stdio.h>  nolist
#include <ctype.h>  nolist
#include <asn1.h>  nolist
#include <localio.h>  nolist
#include <buffer.h>  nolist
#include <objectid.h> nolist
#include <snmp.h>  nolist
#include <snmpstat.h> nolist
#include <buildpkt.h> nolist
#include <print.h>  nolist
#include <talh>   nolist
#include <errno.h>  nolist
#include <systype.h>  nolist
#include <socket.h>  nolist
#include <netdb.h>  nolist
#include <in.h>   nolist
#include <readmib.h>  nolist <--1
#include <rtutils.h>  nolist
#include "snmpfs.h"  nolist
#ifdef __TANDEM
#include <cextdecs(FILE_OPEN_,    \
     FILE_CLOSE_,    \
     FILE_GETINFO_,    \
     AWAITIOX)>  nolist
#else
#include <grdapi.h>
#endif
#define MAX_REQID_VALUE 0X7FFFFFFF 
FILE *outfile;
OIDC_T  base_component_list[MAX_OID_COUNT];
OBJ_ID_T base_oid = { MAX_OID_COUNT, base_component_list };
SNMP_STATS_T snmp_stats;
int
main(int argc, char** argv)
{
char usage[] = "Usage: %s [-a snmpagtname] [-c community] [-d distance] "
"[-i requestid] [-p port] [-r retrycnt] [-t timeout] [-x debuglevel] "
"host [name]\n";
 char    *buffp;
 char    *community = "public";
 short    debug_level = -1;
 int     dest_port = SNMP_REQUEST_PORT;










