SNMP Manager Programmer's Guide
Programming Examples
SNMP Manager Programmer’s Guide–134249
2-144
SNMPHOST Source Code
      else {
       i = jumpIndex - 1;
      lineCnt = 0;
     }
     } /* conversion sucessful */
     } /* assumed a number */
   } /* if (gets (line) != 0) */
   else
     i = numEntries; /* force an exit of the loop */
   } /* if ((i % nPageSize) == 0) */
  } /* if (!bBatchMode) */
 } /* for i */
} /* DisplayHostDevices */
long
main(long argc, char** argv) <--52
{
char usage[] = "Usage: %s [-a snmpagtname] [-b batchmode] [-c community] "
"[-d devcnt] [-i requestid] [-p port] [-r retrycnt] [-t timeout] "
"[-x debuglevel] host\n";
 short   bBatchMode = 0; <--53
 char    *community = "public";
 short   dest_port = SNMP_REQUEST_PORT;
 short   devcnt = NUM_DEV_ENTRIES;
 short   err2 = 0;
 SNMP_HOST_INT_T host_int;
 char    hostname[30];
 char    *hostname1;
 short   i;
 short   numEntries; /* number of entries in the ppTable */
 char   opt;
 DEV_ENTRY_T  **ppTable = 0;
 int    requestid = 1; /*04Dec96 DVVP TPR S961204 0214 90239*/
 short   retrycnt = 0;
 char    *snmpagt = 0;
 short   timeout = 5;
 char    *whoami;
Example 2-18. Contents of snmphosc (page 19 of 23)










