home *** CD-ROM | disk | FTP | other *** search
/ Programming with VisualAge for Java / IBMVJAVA.ISO / icswin95 / httpdw32.z / conf.h < prev    next >
C/C++ Source or Header  |  1997-04-07  |  4KB  |  143 lines

  1. /**************************************************************
  2.  * Netscape Server API Compatibility Layer
  3.  *
  4.  **************************************************************
  5.  */
  6.  
  7.  
  8. /* NETSCAPE SAYS:
  9.  * conf.h: Deals with the server configuration file.
  10.  *
  11.  * Object configuration is an entirely different matter. This deals with
  12.  * things like what port the server runs on, how many children it spawns,
  13.  * and other server-related issues. Information related configuration is
  14.  * handled by the object conf.
  15.  *
  16.  * Rob McCruel
  17.  */
  18.  
  19.  
  20. #ifndef NSCONF_H
  21. #define NSCONF_H
  22.  
  23.  
  24. #include "netsite.h"
  25. #include "base/file.h"
  26. #include "frame/objset.h"
  27. /* #include "base/daemon.h"   daemon struct */
  28.  
  29. #if defined(AIX) || defined(HPUX) || defined(SOLARIS)
  30. #include <pwd.h>      /* struct passwd */
  31. #endif
  32.  
  33. /* ------------------------------ Constants ------------------------------- */
  34.  
  35. /* The longest line in the configuration file */
  36. #define CONF_MAXLEN 16384
  37.  
  38. #if 0 /* not needed */
  39. #if defined(DAEMON_ANY)
  40. #ifdef MCC_PROXY
  41. #define DEFAULT_PORT 8080
  42. #else
  43. #define DEFAULT_PORT 80
  44. #endif
  45. #endif
  46.  
  47. #if defined(DAEMON_UNIX_POOL) || defined(DAEMON_UNIX_MOBRULE)
  48. #define DEFAULT_POOL_MAX 50
  49. #endif
  50. #endif
  51. /* ------------------------------- Globals -------------------------------- */
  52.  
  53. #ifndef CONF_C
  54.  
  55.  
  56. /*
  57.  * These server parameters are made global because they really don't
  58.  * belong anywhere else.
  59.  */
  60.  
  61. #if defined(AIX) || defined(HPUX) || defined(SOLARIS)
  62. #include <sys/types.h>
  63. #endif
  64.  
  65. /* The object set the administrator has asked us to load */
  66.    extern httpd_objset *std_os;
  67.  
  68. #if 0 /* global variables we do not expose */
  69. /* What port we listen to */
  70. extern int port;
  71.  
  72. /* What address to bind to */
  73. extern char *addr;
  74.  
  75. /* User to run as               */
  76. extern struct passwd *userpw;
  77.  
  78. /* Directory to chroot to */
  79. extern char *chr;
  80.  
  81. /* Where to log our pid to */
  82. extern char *pidfn;
  83.  
  84. /* The server's hostname as should be reported in self-ref URLs */
  85. extern char *server_hostname;
  86.  
  87. /* The main object from which all are derived */
  88.  extern char *root_object;
  89.  
  90. /* The main error log, where all errors are logged */
  91. extern char *master_error_log;
  92.  
  93. /* The e-mail address of someone to mail upon catastrophic error */
  94. extern char *admin_email;
  95.  
  96.  
  97. #if defined(DAEMON_UNIX_POOL) || defined(DAEMON_UNIX_MOBRULE)
  98. /* The maximum number of processes to keep in the pool */
  99. extern int pool_max;
  100. /* The minimum number of processes to keep in the pool */
  101. extern int pool_min;
  102. /* The maximum number of requests each process should handle. -1=default */
  103. extern int pool_life;
  104. #endif  /* defined(DAEMON_.... || defined(DAEMON...) */
  105.  
  106.  
  107. #ifdef NET_SSL
  108. extern char *secure_keyfn;
  109. extern char *secure_certfn;
  110. extern char *secure_dongle;
  111. extern int security_active;
  112. extern int secure_auth;
  113. extern int security_session_timeout;
  114. #endif  /* NET_SSL */
  115. #endif
  116.  
  117. #endif   /* ifndef CONF_C */
  118. /* ------------------------------ Prototypes ------------------------------ */
  119.  
  120.  
  121. /* NETSCAPE SAYS:
  122.  * conf_init reads the given configuration file and sets any non-default
  123.  * parameters to their given setting.
  124.  */
  125.  
  126. char *conf_init(char *cfn);
  127.  
  128. /* NETSCAPE SAYS:
  129.  * conf_terminate frees any data the conf routines may be holding.
  130.  */
  131.  
  132. void conf_terminate(void);
  133.  
  134.  
  135. /*NOT IMPLEMENTED
  136.  * conf_vars2daemon transfers these globals to a daemon structure
  137.  
  138. void conf_vars2daemon(daemon_s *d);
  139.  */
  140.  
  141. #endif  /* NSCONF_H */
  142.  
  143.