Roxen.git / server / base_server / global_variables.pike

version» Context lines:

Roxen.git/server/base_server/global_variables.pike:1:   // This file is part of Roxen WebServer.   // Copyright © 1996 - 2001, Roxen IS. - // $Id: global_variables.pike,v 1.76 2001/08/05 20:06:17 nilsson Exp $ + // $Id: global_variables.pike,v 1.77 2001/08/14 01:47:17 hop Exp $      // #pragma strict_types   #define DEFVAR mixed...:object   #define BDEFVAR mixed...:object      #define IN_ROXEN   #include <module.h>   inherit "read_config";   inherit "basic_defvar";   #include <version.h>
Roxen.git/server/base_server/global_variables.pike:23:   // The following three functions are used to hide variables when they   // are not used. This makes the user-interface clearer and quite a lot   // less clobbered.      private int(0..1) cache_disabled_p() { return !query("cache"); }   private int(0..1) syslog_disabled() { return query("LogA")!="syslog"; }   private int(0..1) ident_disabled_p() { return [int(0..1)]query("default_ident"); }      #ifdef SNMP_AGENT   private int(0..1) snmp_disabled() { return !query("snmp_agent"); } + private string snmp_get_cif_domain() { +  //return(Standards.URI(roxenp()->configurations[0]->get_url()||"http://0.0.0.0")->host); +  return(""); + }   #endif      // And why put these functions here, you might righfully ask.      // The answer is that there is actually a reason for it, it's for   // performance reasons. This file is dumped to a .o file, roxen.pike   // is not.   void set_up_hilfe_variables( Protocol o )   {    function(DEFVAR) defvar = o->defvar;
Roxen.git/server/base_server/global_variables.pike:563:    ->set_range(1, 60*60*24);    // Note that the upper limit is arbitrary.       defvar("config_file_comments", 0,    LOCALE(172, "Commented config files"),    TYPE_FLAG,    LOCALE(173, "Save the variable documentation strings as comments "    "in the configuration files. Only useful if you read or "    "edit the config files directly."));    -  defvar("global_position", -  Variable.Variable(0, VAR_INVISIBLE)); +        -  +    #ifdef SNMP_AGENT    // SNMP stuffs    defvar("snmp_agent", 0, LOCALE(999, "SNMP: Enable SNMP agent"),    TYPE_FLAG|VAR_MORE,    "If set, the Roxen SNMP agent will be anabled. "    );    defvar("snmp_community", ({"public:ro"}), "SNMP: Community string",    TYPE_STRING_LIST,    "One community name per line. Default permissions are 'read-only'. "    "'Read-write' permissions can be specified by append :rw to the community "    "name (for example mypub:rw).",    0, snmp_disabled);   /*    defvar("snmp_mode", "smart", "SNMP: Agent mode",    TYPE_STRING_LIST,    "Standard SNMP server mode, muxed SNMP mode, "    "proxy, agentx or automatic (smart) mode.",    ({"smart", "agent", "agentx", "smux", "proxy" }));   */ -  defvar("snmp_hostport", "", "SNMP: IP address and port", +  defvar("snmp_hostport", snmp_get_cif_domain(), "SNMP: IP address and port",    TYPE_STRING,    "Agent listenning IP adress and port. Format: [[host]:port] "    "If host isn't set then will be use IP address of config interface",    0, snmp_disabled);   /*    defvar("snmp_traphost","","SNMP traps destinations",    TYPE_STRING,    "...",    0, snmp_disabled);   */
Roxen.git/server/base_server/global_variables.pike:620: Inside #if defined(SNMP_AGENT)
   "The physical location of this node (e.g., `telephone closet, 3rd "    "floor').",    0, snmp_disabled);    defvar("snmp_sysservices",72,"SNMP: System MIB - Services",    TYPE_INT,    "A value which indicates the set of services that this entity "    "primarily offers.",    0, snmp_disabled);   #endif // SNMP_AGENT    +  defvar("global_position", +  Variable.Variable(0, VAR_INVISIBLE)); +    }         void restore_global_variables()   {    mapping m = retrieve("Variables", 0);    setvars(retrieve("Variables", 0));    if( !m->argcache_secret ) save();    old_module_dirs = query( "ModuleDirs" );    getvar( "ModuleDirs" )->add_changed_callback( zap_all_module_caches );