Roxen.git / server / base_server / snmpagent.pike

version» Context lines:

Roxen.git/server/base_server/snmpagent.pike:1:   /* -  * $Id: snmpagent.pike,v 1.11 2001/08/22 14:41:18 hop Exp $ +  * $Id: snmpagent.pike,v 1.12 2001/08/23 18:06:07 nilsson Exp $    *    * The Roxen SNMP agent    * Copyright © 2001, Roxen IS.    *    * Author: Honza Petrous    * January 2001         RFC 1213 base MIB    system.* (all done)
Roxen.git/server/base_server/snmpagent.pike:80:   #define SNMP_OP_GETRESPONSE 2   #define SNMP_OP_SETREQUEST 3   #define SNMP_OP_TRAP 4      #define OBJ_STR(x) ({"str", x})   #define OBJ_INT(x) ({"int", x})   #define OBJ_OID(x) ({"oid", x})   #define OBJ_TICK(x) ({"tick", x})   #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 + // 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   #define RISMIB_BASE_WEBSERVER RISMIB_BASE+"."+RISMIB_BASE_WEBSERVER_ADD   // enterprises.roxenis.app.webserver.global   #define RISMIB_BASE_WEBSERVER_GLOBAL RISMIB_BASE_WEBSERVER+".1"
Roxen.git/server/base_server/snmpagent.pike:113:   #define RISMIB_BASE_WEBSERVER_VS_SDATA RISMIB_BASE_WEBSERVER_VS+".4"   // enterprises.roxenis.app.webserver.vsTable.vsEntry.vsReceived   #define RISMIB_BASE_WEBSERVER_VS_RDATA RISMIB_BASE_WEBSERVER_VS+".5"   // enterprises.roxenis.app.webserver.vsTable.vsEntry.vsHeaders   #define RISMIB_BASE_WEBSERVER_VS_SHDRS RISMIB_BASE_WEBSERVER_VS+".6"   // enterprises.roxenis.app.webserver.vsTable.vsEntry.vsRequests   #define RISMIB_BASE_WEBSERVER_VS_REQS RISMIB_BASE_WEBSERVER_VS+".7"      #define LOG_EVENT(txt, pkt) log_event(txt, pkt)    + //!   class SNMPagent {    private int enabled;       // Global variables    private object fd; // opened UDP port    private int inited; // flag    private int snmpinpkts;    private int snmpoutpkts;    private int snmpbadver;    private int snmpbadcommnames;
Roxen.git/server/base_server/snmpagent.pike:533:    }       void create() {       report_error("SubMIBManager object [" + (string)name + "] hasn't replaced contructor!\n");    } // create       //! Returns array. First element is type of second element.    //! Is usable for very primitive managed objects, in which case the value    //! is got by calling function from submibtab table. -  //array `[](string oid) { +     array get(string oid, mapping|void pkt) {       function rval;    string soid;       SNMPAGENT_MSG(sprintf("%s: GET(%O) from %s@%s:%d", name, oid, pkt->community, pkt->ip,pkt->port));    soid = oid_strip(oid);    if (functionp(rval = submibtab[soid])) {    SNMPAGENT_MSG("found MIB object.");    return rval();
Roxen.git/server/base_server/snmpagent.pike:661:       //! 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.11 $"/" ")[1]+" (devel. rel.)"); +  return OBJ_STR("Roxen Webserver SNMP agent v"+("$Revision: 1.12 $"/" ")[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_uptime() {    return OBJ_TICK((time(1) - roxen->start_time)*100);