Roxen.git / server / base_server / snmpagent.pike

version» Context lines:

Roxen.git/server/base_server/snmpagent.pike:1:   /* -  * $Id: snmpagent.pike,v 1.21 2002/02/12 16:52:33 hop Exp $ +  * $Id: snmpagent.pike,v 1.22 2007/08/22 15:04:14 grubba Exp $    *    * The Roxen SNMP agent    * Copyright © 2001, Honza Petrous, hop@unibase.cz    *    * Author: Honza Petrous    * January 2001         RFC 1213 base MIB    system.* (all done)
Roxen.git/server/base_server/snmpagent.pike:79:   #define OBJ_COUNT(x) ({"count", x})      // The starting part of OID of every object will have, so we stripp it out   // before making index from OID to the MIB DB   #define MIBTREE_BASE "1.3.6.1"      #define RISMIB_BASE_ADD "4.1.8614"   // enterprises.roxenis   #define RISMIB_BASE MIBTREE_BASE+"."+RISMIB_BASE_ADD   #define RISMIB_BASE_WEBSERVER_ADD "1.1" - // enterprises.roxenis.app.roxen + // enterprises.roxenis.app.webserver   #define RISMIB_BASE_WEBSERVER RISMIB_BASE+"."+RISMIB_BASE_WEBSERVER_ADD   //   // enterprises.roxenis.app.webserver.global   #define RISMIB_BASE_WEBSERVER_GLOBAL RISMIB_BASE_WEBSERVER+".1"   // enterprises.roxenis.app.webserver.global.restart   #define RISMIB_BASE_WEBSERVER_GLOBAL_BOOT RISMIB_BASE_WEBSERVER_GLOBAL+".1"   // enterprises.roxenis.app.webserver.global.vsCount   #define RISMIB_BASE_WEBSERVER_GLOBAL_VS RISMIB_BASE_WEBSERVER_GLOBAL+".2"   //   // enterprises.roxenis.app.webserver.vsTable
Roxen.git/server/base_server/snmpagent.pike:575:    return(1);    }      } // end of SNMPagent object      //! Removes first four octets from OID string, as internal table works   //! on such stripped OIDs.   private string|int oid_strip (string oid) { // note: this method must be public!       array arr = oid / "."; -  if (sizeof(arr) < 7) // FIXME: exists oid with less octets? +  if (sizeof(arr) < 5) // FIXME: exists oid with less octets?    return 0;    oid = arr[4..] * ".";    return oid;   }      //!   //! Generic class for submib tree managers, or individual objects as well.   //!   class SubMIBManager {   
Roxen.git/server/base_server/snmpagent.pike:771:       //! External function for MIB object returning nothing    array get_null() { return OBJ_COUNT(0); }      } // SubMIBManager      // base external feeders      //! External function for MIB object 'system.sysDescr'   array get_description() { -  return OBJ_STR("Roxen Webserver SNMP agent v"+("$Revision: 1.21 $"/" ")[1]+" (devel. rel.)"); +  return OBJ_STR("Roxen Webserver SNMP agent v"+("$Revision: 1.22 $"/" ")[1]+" (devel. rel.)");   }      //! External function for MIB object 'system.sysOID'   array get_sysoid() {    return OBJ_OID(RISMIB_BASE_WEBSERVER);   }      //! External function for MIB object 'system.sysUpTime'   array get_sysuptime() {    return OBJ_TICK((time(1) - roxen->start_time)*100);