SNMP Configuration and Management Manual
Trap Multiplexer Subagent/Manager
SNMP Configuration and Management Manual—424777-006
12-63
Application Source Code
  spi_err = EMSGETTKN ((short*)event_buf,          <-- 25
       ZTMX_TKN_TRAP_SPECIFIC, /* specific trap no */
       (char*) &t_specific,
       1);       /* index    */
  if (spi_err != ZSPI_ERR_OK)
  DEBUG();
  printf ("Specific Trap No : %d \n",t_specific);
  spi_err = EMSGETTKN ((short*)event_buf,          <-- 26
       ZTMX_TKN_TRAP_TIMETICKS, /* timeticks */
       (char*) &t_timeticks,
       1);       /* index  */
  if (spi_err != ZSPI_ERR_OK)
   DEBUG();
  printf ("Timeticks   : %d \n",t_timeticks);
  /* enter the data list to get the next token */
  spi_err = EMSGETTKN ((short*)event_buf,          <-- 27
       ZSPI_TKN_DATALIST);
  if (spi_err != ZSPI_ERR_OK)
   DEBUG();
  spi_err = EMSGETTKN ((short*)event_buf,          <-- 28
       ZTMX_TKN_TRAP_VARBIND_COUNT, /* varbind count */
       (char*) &t_varbind_count,
       1);        /* index    */
  if (spi_err != ZSPI_ERR_OK)
   DEBUG();
  printf ("Varbind Count  : %d \n",t_varbind_count);
  for(i = 1 ; i <= t_varbind_count ; i++)          <-- 29
  {
   /* enter the data list to get the varbind */
   spi_err = EMSGETTKN ((short*)event_buf,         <-- 30
        ZSPI_TKN_DATALIST);
   if (spi_err !=ZSPI_ERR_OK)
    DEBUG();
   printf ("\nVarbind #%d\n",i);
Example 12-3. Sample Application Source Code (page 8 of 14)










