home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming with VisualAge for Java
/
IBMVJAVA.ISO
/
icswin95
/
httpdw32.z
/
conf.h
< prev
next >
Wrap
C/C++ Source or Header
|
1997-04-07
|
4KB
|
143 lines
/**************************************************************
* Netscape Server API Compatibility Layer
*
**************************************************************
*/
/* NETSCAPE SAYS:
* conf.h: Deals with the server configuration file.
*
* Object configuration is an entirely different matter. This deals with
* things like what port the server runs on, how many children it spawns,
* and other server-related issues. Information related configuration is
* handled by the object conf.
*
* Rob McCruel
*/
#ifndef NSCONF_H
#define NSCONF_H
#include "netsite.h"
#include "base/file.h"
#include "frame/objset.h"
/* #include "base/daemon.h" daemon struct */
#if defined(AIX) || defined(HPUX) || defined(SOLARIS)
#include <pwd.h> /* struct passwd */
#endif
/* ------------------------------ Constants ------------------------------- */
/* The longest line in the configuration file */
#define CONF_MAXLEN 16384
#if 0 /* not needed */
#if defined(DAEMON_ANY)
#ifdef MCC_PROXY
#define DEFAULT_PORT 8080
#else
#define DEFAULT_PORT 80
#endif
#endif
#if defined(DAEMON_UNIX_POOL) || defined(DAEMON_UNIX_MOBRULE)
#define DEFAULT_POOL_MAX 50
#endif
#endif
/* ------------------------------- Globals -------------------------------- */
#ifndef CONF_C
/*
* These server parameters are made global because they really don't
* belong anywhere else.
*/
#if defined(AIX) || defined(HPUX) || defined(SOLARIS)
#include <sys/types.h>
#endif
/* The object set the administrator has asked us to load */
extern httpd_objset *std_os;
#if 0 /* global variables we do not expose */
/* What port we listen to */
extern int port;
/* What address to bind to */
extern char *addr;
/* User to run as */
extern struct passwd *userpw;
/* Directory to chroot to */
extern char *chr;
/* Where to log our pid to */
extern char *pidfn;
/* The server's hostname as should be reported in self-ref URLs */
extern char *server_hostname;
/* The main object from which all are derived */
extern char *root_object;
/* The main error log, where all errors are logged */
extern char *master_error_log;
/* The e-mail address of someone to mail upon catastrophic error */
extern char *admin_email;
#if defined(DAEMON_UNIX_POOL) || defined(DAEMON_UNIX_MOBRULE)
/* The maximum number of processes to keep in the pool */
extern int pool_max;
/* The minimum number of processes to keep in the pool */
extern int pool_min;
/* The maximum number of requests each process should handle. -1=default */
extern int pool_life;
#endif /* defined(DAEMON_.... || defined(DAEMON...) */
#ifdef NET_SSL
extern char *secure_keyfn;
extern char *secure_certfn;
extern char *secure_dongle;
extern int security_active;
extern int secure_auth;
extern int security_session_timeout;
#endif /* NET_SSL */
#endif
#endif /* ifndef CONF_C */
/* ------------------------------ Prototypes ------------------------------ */
/* NETSCAPE SAYS:
* conf_init reads the given configuration file and sets any non-default
* parameters to their given setting.
*/
char *conf_init(char *cfn);
/* NETSCAPE SAYS:
* conf_terminate frees any data the conf routines may be holding.
*/
void conf_terminate(void);
/*NOT IMPLEMENTED
* conf_vars2daemon transfers these globals to a daemon structure
void conf_vars2daemon(daemon_s *d);
*/
#endif /* NSCONF_H */