SNMP Manager Programmer's Guide
Programming Examples
SNMP Manager Programmer’s Guide–134249
2-29
Managers Supporting UDP and IPC
 } else <--40
 {
  /* Using local access (file) */
  status = WRITEX(host_int->file_num, myEBuff.start_bp,
   send_cnt, &written_cnt);
  if (status != CCE)
  {
   FILE_GETINFO_ (host_int->file_num, &err);
   host_int->err_num = err;  /* Save the error number */
   if (PRINT_DEBUG_MSG)
   {
   fprintf(stdout, "WRITEX initialization failed with error %i.\n",
    err);
   }
   return WRITE_FAILED;
  }
 }  /* end of if(host_int->local_flag == REMOTE_HOSTNAME) */
 AWAITIOX (&temp_file_num, (long *) &IOC_buffp, &written_cnt, &IO_tag, <--41
    (long)(host_int->timeout));
 host_int->count_written = written_cnt;
 FILE_GETINFO_ (host_int->file_num, &err); <--42
 if (err != 0)
 {
  host_int->err_num = err; /* Save the error number */
  if (err == 306) /* SNMP AGENT specific error */
  {
   if (PRINT_DEBUG_MSG)
   {
    fprintf(stdout, "WRITEX failed due to an error detected\n");
   fprintf(stdout, "by the SNMP Agent. See the EMS log for\n");
   fprintf(stdout, "more information.\n");
   }
  } else
  {
   if (PRINT_DEBUG_MSG)
   {
   if (host_int->local_flag == REMOTE_HOSTNAME)
   {
    /* Using remote access (sockets) */
    fprintf(stdout,
     "AWAITIOX for T_SENDTO_NW returned error %i.\n", err);
Example 2-2. Contents of snmpfsc (page 16 of 19)










