Go to the source code of this file.
Data Structures | |
| struct | memcounts |
| struct | Conf |
| struct | ProtocolInfo |
| struct | Link |
| struct | CMode |
| struct | Core |
Defines | |
| #define | DPATH PREFIX |
| #define | EPATH ETC_DIR |
| #define | MPATH MODULE_DIR |
| #define | CPATH MODULE_DIR "/core/" |
| #define | PPATH MODULE_DIR "/protocol/" |
| #define | LPATH "/logs/" |
| #define | CONTRIB_PATH MODULE_DIR "/contrib/" |
| #define | SPATH PREFIX "/bin/security" |
| #define | CONFIG_NAME EPATH "/security.cfg" |
| #define | TMP_DIR PREFIX "/var/tmp" |
| #define | CLIENT_MOD_DIR MODULE_DIR "/client/" |
| #define | MAXPATH 255 |
| #define | HASH(x, y) hash_safe(x,y) |
| #define | MyFree(x) |
| #define | s_assert(expr) assert(expr) |
| #define | MAXPARA 15 |
| #define | MAXSTRING 18 |
| #define | NICKMAX 30 |
| #define | MAXSERV 63 |
| #define | CMD_HASH_MAX 597 |
| #define | MODULE_MAX 100 |
| #define | ERR_STATE -3 |
| #define | QUIT -2 |
| #define | SHUTDOWN -1 |
| #define | STARTUP 0 |
| #define | CONNECTING 1 |
| #define | BURSTING 2 |
| #define | RUNNING 3 |
| #define | IS_CON 3 |
| #define | NOT_CON 0 |
| #define | serv_state(state) (((state) != sync_state)? 0 : 1) |
Typedefs | |
| typedef int16_t | int16 |
| typedef u_int16_t | uint16 |
| typedef int32_t | int32 |
| typedef u_int32_t | uint32 |
Functions | |
| Core * | Core_Construct () |
| void | init_core () |
| int | check_for_pid () |
| void | Exit (int) |
| void | Rehash (int) |
| void | OneTimeAround () |
| void | SaveAll (int) |
| void | SetTime () |
| void | init_lists (void) |
Variables | |
| pid_t | pid |
| int | debug |
| int | backtrc |
| int | nofork |
| int | connect_attempts |
| int | introduce_attempts |
| time_t | last_attempt |
| int | recvbytes |
| int | sentbytes |
| time_t | starttime |
| struct memcounts | memcounts |
| Conf | CfgSettings |
| struct ProtocolInfo | ProtocolInfo |
| char | logchan [32] |
| char | datadir [MAXPATH] |
| Link * | Uplink |
| Link * | Links |
| Link * | Me |
| int | sync_state |
| struct tm * | curdate |
| struct tm * | lastdate |
| time_t | ServerTime |
| int | UseTokens |
| Core * | Omega |
| int | session_count |
| size_t | session_size |
| #define BURSTING 2 |
Definition at line 272 of file core.h.
Referenced by AddToChannelU(), NewClient(), and sendto_channel().
| #define CLIENT_MOD_DIR MODULE_DIR "/client/" |
Definition at line 19 of file core.h.
Referenced by find_module_dir().
| #define CONNECTING 1 |
Definition at line 271 of file core.h.
Referenced by uplink_cleanup().
| #define CONTRIB_PATH MODULE_DIR "/contrib/" |
Definition at line 13 of file core.h.
Referenced by find_module_dir().
| #define CPATH MODULE_DIR "/core/" |
Definition at line 10 of file core.h.
Referenced by find_module_dir(), and load_modules().
| #define DPATH PREFIX |
Definition at line 7 of file core.h.
Referenced by InitDefaults(), main(), and open_log().
| #define HASH | ( | x, | |||
| y | ) | hash_safe(x,y) |
Definition at line 23 of file core.h.
Referenced by AddCmd(), AddServCmd(), AddUserCmd(), build_access_list(), config_parse(), DelCmd(), DelServCmd(), DelUserCmd(), do_cmd(), get_config_base(), get_config_bool(), get_config_entry(), HandleServCmd(), HandleUserCmd(), hash_delete(), hash_get(), and load_modules().
| #define LPATH "/logs/" |
Definition at line 12 of file core.h.
Referenced by open_log().
| #define MAXPARA 15 |
Definition at line 85 of file core.h.
Referenced by parse(), and string_to_array().
| #define MAXPATH 255 |
Definition at line 21 of file core.h.
Referenced by create_mod_temp().
| #define MAXSERV 63 |
Definition at line 88 of file core.h.
Referenced by get_hostname().
| #define MPATH MODULE_DIR |
Definition at line 9 of file core.h.
Referenced by find_module_dir().
| #define MyFree | ( | x | ) |
| #define PPATH MODULE_DIR "/protocol/" |
Definition at line 11 of file core.h.
Referenced by find_module_dir().
| #define RUNNING 3 |
Definition at line 273 of file core.h.
Referenced by load_modules(), run_mod_que(), and sendto_logchan().
| #define s_assert | ( | expr | ) | assert(expr) |
Use built in debug commands. These commands bypass the command system and are only for debuging the CORE - There is no documentation on these commands...
Definition at line 81 of file core.h.
Referenced by AddUser(), generate_p10_uid(), generate_uid(), mutex_state(), parse(), read_chanmode_string(), read_usermode_string(), and valid_hostname().
| #define serv_state | ( | state | ) | (((state) != sync_state)? 0 : 1) |
| #define SPATH PREFIX "/bin/security" |
Definition at line 14 of file core.h.
Referenced by do_restart().
| #define STARTUP 0 |
Definition at line 270 of file core.h.
Referenced by Core_Construct().
| #define TMP_DIR PREFIX "/var/tmp" |
Definition at line 18 of file core.h.
Referenced by create_mod_temp().
| 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 216 of file main.c.
References CfgSettings, and Conf::pidfile.
Referenced by DaemonSeed().
| Core* Core_Construct | ( | ) |
Definition at line 31 of file core.c.
References Core::age, alog(), Exit(), Core::exit, Core::log, Rehash(), Core::rehash, STARTUP, Core::state, and sync_state.
Referenced by main().
| 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 448 of file main.c.
Referenced by Core_Construct(), load_modules(), main(), and SigHandler().
| void init_core | ( | ) |
PROTOTYPES
| void init_lists | ( | void | ) |
Definition at line 482 of file main.c.
References access_flags, accesslist, connected_sockets, events, servlist, sockets, sockevents, and userlist.
Referenced by main().
| void OneTimeAround | ( | ) |
Definition at line 333 of file main.c.
References alog(), LOG_SOCKET, receive(), RunTimedEvents(), SetTime(), and SOCK_ERR_OK.
Referenced by Run().
| void Rehash | ( | int | ) |
Definition at line 456 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 SaveAll | ( | int | ) |
| void SetTime | ( | ) |
Definition at line 363 of file main.c.
References curdate, lastdate, and ServerTime.
Referenced by main(), and OneTimeAround().
Definition at line 180 of file core.h.
Referenced by AtExit(), burst_local_servers(), check_for_pid(), config_test(), Connect(), create_mod_temp(), DaemonSeed(), do_cmd(), do_restart(), ev_connectuplink(), exit_all_servs(), init_uid(), InitDefaults(), ircd_wallop(), isOurClient(), load_protocol(), main(), NewClient(), open_log(), refresh_access(), Rehash(), Run(), send_cmd(), sendto_one(), sendto_one_numeric(), sendto_server(), setAccess(), uplink_cleanup(), and VerifyConf().
| int connect_attempts |
| char datadir[MAXPATH] |
Definition at line 193 of file core.h.
Referenced by InitDefaults(), and VerifyConf().
| int debug |
| time_t last_attempt |
| char logchan[32] |
Definition at line 192 of file core.h.
Referenced by foo_connect(), InitDefaults(), main(), and sendto_logchan().
| int nofork |
Definition at line 96 of file core.h.
Referenced by add_protocol(), alog(), DaemonSeed(), and main().
Definition at line 336 of file core.h.
Referenced by AtExit(), main(), Run(), sendto_one_numeric(), and uplink_cleanup().
| pid_t pid |
Definition at line 92 of file core.h.
Referenced by DaemonSeed().
| struct ProtocolInfo ProtocolInfo |
| int recvbytes |
Definition at line 103 of file core.h.
Referenced by sock_readline().
| int sentbytes |
Definition at line 104 of file core.h.
Referenced by send_line(), and sendto_socket().
| time_t ServerTime |
Definition at line 296 of file core.h.
Referenced by alog(), RunTimedEvents(), and SetTime().
| int session_count |
| size_t session_size |
| int sync_state |
Definition at line 283 of file core.h.
Referenced by AddToChannelU(), AtExit(), Core_Construct(), load_modules(), NewClient(), run_mod_que(), sendto_channel(), sendto_logchan(), and uplink_cleanup().
| int UseTokens |
1.6.3