SNMP Manager Programmer's Guide
Programming Examples
SNMP Manager Programmer’s Guide–134249
2-7
Managers Supporting UDP and IPC
SNMP_HOST_INT_T holds values assigned and used by the functions whose 
prototypes appear in snmpfsh: 
Example 2-1. Contents of snmpfsh
#ifndef _SNMPFS_H_
#define _SNMPFS_H_
#ifndef _sockaddr_in_DEFINED
#include <in.h>   nolist
#endif /* _sockaddr_in_DEFINED */
typedef struct SNMP_HOST_INT_S  /* Host interface structure */
  {
  unsigned short  version;   /* Used for version control */
           /* Set by SNMP_Init_ to 1.  */
  unsigned short  local_flag;  /* 0 - remote, else (1) local */
  unsigned char  host_name[8];  /* Expand host name for local */
           /* This includes the slash! */
  unsigned char  agent_name[8]; /* Agent name for local */
            /* This includes the $ but */
           /* not include the ".#MGR" */
  unsigned long  host_addr;  /* TCP/IP address for remote */
  struct sockaddr_in dest;    /* Destination socket address */
  struct sockaddr_in from;    /* Received from socket address */
  short    file_num;   /* File number */
  short    err_num;   /* General error number */
  short    timeout;   /* Timeout in centi-seconds */
  long    count_written; /* Amount of data written */
  long    count_read;  /* Amount of data read */
  } SNMP_HOST_INT_T;
extern short SNMP_Close_  (SNMP_HOST_INT_T *host_int);
extern char* SNMP_FS_ErrMsg_ (short err_num, short det_err_num);
extern short SNMP_Init_  (SNMP_HOST_INT_T *host_int,
       short   host_int_size,
       char    *in_name);
extern short SNMP_Open_  (SNMP_HOST_INT_T *host_int,
       unsigned short debug_flag);
extern short SNMP_WriteRead_ (SNMP_HOST_INT_T *host_int,
       SNMP_PKT_T  *spkt,
       SNMP_PKT_T  **rpkt,
       EBUFFER_T  *ebuffp,
       unsigned short debug_flag);
extern short check_host_name (char   *hname);
#endif /* _SNMPFS_H_ */
Note. The comments embedded in snmpfsh and the other files used by managers supporting 
UDP and IPC use the term “local” to mean IPC and the term “remote” to mean UDP. 
version The SNMP version being supported.
local_flag An indication of whether to use UDP or IPC communication.
host_name The name of a NonStop Kernel system; used for IPC 
communication.










