text: /*
   * Note: this file originally auto-generated by mib2c using
   *        : mib2c.scalar.conf 11805 2005-01-07 09:37:18Z dts12 $
   */
  
  #include <net-snmp/net-snmp-config.h>
  #include <net-snmp/net-snmp-includes.h>
  #include <net-snmp/agent/net-snmp-agent-includes.h>
  #include "xsnmpInternal.h"
  
  /** Initializes the xsnmpInternal module */
  void
  init_xsnmpInternal(void)
  {
      static oid xsnmpVersion_oid[] = { 1,3,6,1,4,1,20038,2,1,5,1 };
  
    DEBUGMSGTL(("xsnmpInternal", "Initializing\n"));
  
      netsnmp_register_scalar(
          netsnmp_create_handler_registration("xsnmpVersion", handle_xsnmpVersion,
                                 xsnmpVersion_oid, OID_LENGTH(xsnmpVersion_oid),
                                 HANDLER_CAN_RONLY
          ));
  }
  
  int
  handle_xsnmpVersion(netsnmp_mib_handler *handler,
                            netsnmp_handler_registration *reginfo,
                            netsnmp_agent_request_info   *reqinfo,
                            netsnmp_request_info         *requests)
  {
      /* We are never called for a GETNEXT if it's registered as a
         "instance", as it's "magically" handled for us.  */
  
      /* a instance handler also only hands us one request at a time, so
         we don't need to loop over a list of requests; we'll only get one. */
      
      switch(reqinfo->mode) {
  
          case MODE_GET:
              snmp_set_var_typed_integer(requests->requestvb, ASN_GAUGE, 1);
              break;
  
  
          default:
              /* we should never get here, so this is a really bad error */
              snmp_log(LOG_ERR, "unknown mode (%d) in handle_xsnmpVersion\n", reqinfo->mode );
              return SNMP_ERR_GENERR;
      }
  
      return SNMP_ERR_NOERROR;
  }
  