Omega Security Services 0.7.3

main.c File Reference

#include "stdinc.h"
#include "server.h"

Go to the source code of this file.

Functions

static void showHelp ()
void Run (void)
void DaemonSeed (void)
void Banner (void)
void Load_Dbs (void)
static void AtExit (void)
void do_restart (void)
void psr_HandleEvent (Socket *s, int et)
int main (int argc, char **argv, char **env)
int check_for_pid ()
void OneTimeAround ()
void SetTime ()
void Exit (int status)
void Rehash (int status)
void init_lists ()

Variables

int uselogchan
ServCmdsservcmds_list = NULL
UserCmdsusercmds_list = NULL
Modulemodule_list = NULL
char ** my_env
char ** my_argv

Function Documentation

static void AtExit ( void  ) [static]

AtExit() Called by atexit when program terminates this insures we have proper cleanup :)

Returns:
void - must return void

Definition at line 401 of file main.c.

References CfgSettings, close_log(), dest_all_threads(), DestAccList(), destroy_event_list(), Event(), Omega, Conf::pidfile, SHUTDOWN, socket_cleanup(), sync_state, and uplink_cleanup().

Referenced by main().

void Banner ( void  )

Definition at line 166 of file main.c.

References COMPILE_DATE, PACKAGE_VERSION, skip_banner, SYSUNAME_SHORT, and VERSION_STRING.

Referenced by Run().

int check_for_pid ( )

Move this to its own function

return 0 if there is no pid or -1 if there is no file else return the current active pid.

Definition at line 231 of file main.c.

References CfgSettings, and Conf::pidfile.

Referenced by DaemonSeed().

void DaemonSeed ( void  )

Definition at line 186 of file main.c.

References CfgSettings, check_for_pid(), nofork, pid, and Conf::pidfile.

Referenced by main().

void do_restart ( void  )

Definition at line 477 of file main.c.

References CfgSettings, Event(), my_argv, Conf::pidfile, SPATH, and uplink_cleanup().

Referenced by SigHandler().

void Exit ( int  status)

Our exit function - since everything is pretty much handled in AtExit we are just calling exit(0) for the time being

Definition at line 454 of file main.c.

Referenced by Core_Construct(), load_modules(), main(), and SigHandler().

void init_lists ( void  )

Definition at line 491 of file main.c.

References access_flags, accesslist, connected_sockets, events, servlist, sockets, sockevents, and userlist.

Referenced by main().

void Load_Dbs ( void  )

Load_Dbs()

Definition at line 443 of file main.c.

void OneTimeAround ( )

Definition at line 339 of file main.c.

References alog(), LOG_SOCKET, MOD_LOAD_POST, receive(), run_mod_que(), RunTimedEvents(), SetTime(), and SOCK_ERR_OK.

Referenced by Run().

void psr_HandleEvent ( Socket s,
int  et 
)

Definition at line 263 of file parser.c.

References memcounts::buflinecnt, memcounts::buflinesize, EVENT_READ, GetLine(), and parse().

void Rehash ( int  status)

Definition at line 462 of file main.c.

References CfgSettings, Conf::conf_name, config_load(), destroy_config_tree(), Event(), and sendto_logchan().

Referenced by Core_Construct(), and SigHandler().

void SetTime ( )

Definition at line 371 of file main.c.

References curdate, lastdate, and ServerTime.

Referenced by main(), and OneTimeAround().

static void showHelp ( ) [static]

Definition at line 507 of file main.c.

Referenced by main().


Variable Documentation

Definition at line 19 of file main.c.

char ** my_argv

Definition at line 27 of file main.c.

Referenced by do_restart(), and main().

char** my_env

Definition at line 27 of file main.c.

Referenced by main().

Definition at line 16 of file main.c.

Definition at line 5 of file log.h.

Referenced by main(), sendto_logchan(), and uplink_cleanup().

Definition at line 17 of file main.c.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines