/*
** SellaNMS
** $Id: main.h,v 2.14 2005/08/10 07:49:40 sella Exp $
** Copyright (c) 2001-2005 Digital Genesis Software, LLC. All Rights Reserved.
** Released under the GPL Version 2 License.
** http://www.digitalgenesis.com
*/

#ifndef __DGS_COMMON_DAEMON_H
#define __DGS_COMMON_DAEMON_H

#ifdef HAVE_CONFIG_H
	#include "config.h"
#endif

#include "defaults.h"
#include "configuration/configuration.h"
#include <stl/slist>
#include <stl/string>
#include <stl/vector>

#define DEFAULT_SYSLOG_FACILITY  LOG_LOCAL0

void sighandler(int sig);
int main(int argc, char** argv);
RESULT version(void);
RESULT about(void);
RESULT usage();
RESULT checkEuidRoot();
RESULT processCommandLine(int argc, char **argv);
RESULT processDaemonOptions();
RESULT processTraceOptions();
RESULT processDebug();
RESULT writePidFile(const char* pid_file, pid_t pid);
RESULT readConfig();
void loadMibs();
void unloadMibs();
RESULT grantPriv();
RESULT dropPriv();

/* Module API */
bool start();
const char* getName();
const char* getConfigPath();
const char* getProcTitle();
const char* getDefaultPidFile();
const char* getDefaultStatFile();
const char* getDefaultConfigFile();
int getDefaultNiceness();
int requireSNMPMIBs();

#endif

/*
** Local Variables:
** c-basic-offset: 3
** tab-width: 3
** End:
** vim600: fdm=marker
** vim: noet ts=3 sw=3
*/
