
/* $Header: $ */
/* $Source: $ */
/* $Author: $ */

#include "mit_copyright.h"
#include "db.h"
#include <stdio.h>
#include <sys/types.h>
#include <sys/file.h>
#include <sys/time.h>
#include <sys/wait.h>
#include <syslog.h>
#include <sys/ioctl.h>
#ifndef SOCK_STREAM	/* This should be in sys/scoket.h itself */
#include <sys/socket.h>
#endif
#include <sys/un.h>
#include <netinet/in.h>
#include <netdb.h>
#include <errno.h>
#include <signal.h>

#ifdef BSD4_3
extern int errno;
#endif

/* global variables */
extern int portNum;		/* read from the configuration file */
extern int schedulerPaused;	/* Depends upon server paused *or* not */


/* define MACROS for the scheduler */

/*
 * Now the port number is read from the config file so that we can
 * have multiple servers per host.
 */
/* #define PORTNUM	7000	 /* Port num for socket in INET domain */
#define DEFLOGF "/dev/null"	/* dafault log file */
#define SKULKSECTIMEOUT	   600	/* Skulker has a 600 second timeout */
#define SKULKMSECTIMEOUT   0	/* and a 0 micro-sec tmeout */
#define SCHEDULERPREFIX	   "scheduler_"
#ifndef CONFDIR			
#define CONFDIR	"/mit/pss2/src/server"
#endif not(CONFDIR)
/* 
 * FREE/BUSY for SPVR state. It is a 3 bit state as AIO
 * where A is 0 (not active), 1 (active)
 *       I is 0 (enabled),    1 (disabled)
 *       O is 0 (enable),     1 (disabled)
 * So to check spvrState for FREE, check if it is *not* NOTFREE
 * to set it to busy, bit-wise or with BUSY.
 */
#define NOTFREE 0110      
#define BUSY 0100

/* Forward non-integer function references */

extern char *GetHostNameForServer();	/* Gets hostname from server DB */


