SNMP Manager Programmer's Guide
Programming Examples
SNMP Manager Programmer’s Guide–134249
2-58
SNMPGET
Example 2-6. Contents of snmpgetc (page 1 of 6)
#include <stdio.h>  nolist <--1
#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 "snmpfs.h"  nolist
#ifdef __TANDEM
#include <cextdecs(FILE_OPEN_, AWAITIOX)> nolist
#else
#include <grdapi.h>
#endif
#define MAX_REQID_VALUE 0X7FFFFFFF 
#define MAXOIDS 16
OIDC_T   base_component_list[MAX_OID_COUNT];
OBJ_ID_T   base_oid = { MAX_OID_COUNT, base_component_list };
SNMP_STATS_T snmp_stats;
char   usage[] =
"Usage: %s [-a snmpagtname] [-c community] [-i requestid] [-p port] "
"[-r retrycnt] [-t timeout] [-x debuglevel] host name [name] ...\n";
int
main(int argc, char** argv)
{
 char    *buffp;
 char    *community = "public";
 short   debug_level = -1;
 int    dest_port = SNMP_REQUEST_PORT;
 char   opt;
 EBUFFER_T   ebuff;










