SNMP Manager Programmer's Guide
Programming Examples
SNMP Manager Programmer’s Guide–134249
2-46
SNMPGT
Example 2-4. Contents of snmpgtc (page 1 of 8)
#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 <errno.h> nolist
#include <systype.h> nolist
#include <socket.h> nolist
#include <netdb.h> nolist
#include <in.h> nolist
#ifdef __TANDEM
#include <cextdecs(FILE_GETINFO_,AWAITIOX)> nolist
#else
#include <grdapi.h>
#endif
#define MAXOIDS 16 <-- 2
#define TBSIZE 2048
#define INVALID_HOST_ADDR 0XFFFFFFFFl
#define MAX_REQID_VALUE 0X7FFFFFFF
unsigned char rcvbuff[TBSIZE]; <-- 3
unsigned char sndbuff[TBSIZE];
int cbSend;
SNMP_STATS_T snmp_stats;
OIDC_T base_component_list[ MAX_OID_COUNT ]; <-- 4
OBJ_ID_T base_oid = { MAX_OID_COUNT, base_component_list };
char usage[] = "Usage: %s [-c community] [-i requestid] [-p port]"
" [-r retrycnt] [-t timeout] host name [name] ...\n";