mirror of
				https://github.com/osmarks/ngircd.git
				synced 2025-11-03 23:43:00 +00:00 
			
		
		
		
	Doxygen'ify and update comments in ngircd.{c|h}
This commit is contained in:
		@@ -67,8 +67,10 @@ static bool NGIRCd_Init PARAMS(( bool ));
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * The main() function of ngIRCd.
 | 
					 * The main() function of ngIRCd.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 * Here all starts: this function is called by the operating system loader,
 | 
					 * Here all starts: this function is called by the operating system loader,
 | 
				
			||||||
 * it is the first portion of code executed of ngIRCd.
 | 
					 * it is the first portion of code executed of ngIRCd.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 * @param argc	The number of arguments passed to ngIRCd on the command line.
 | 
					 * @param argc	The number of arguments passed to ngIRCd on the command line.
 | 
				
			||||||
 * @param argv	An array containing all the arguments passed to ngIRCd.
 | 
					 * @param argv	An array containing all the arguments passed to ngIRCd.
 | 
				
			||||||
 * @return	Global exit code of ngIRCd, zero on success.
 | 
					 * @return	Global exit code of ngIRCd, zero on success.
 | 
				
			||||||
@@ -232,7 +234,7 @@ main( int argc, const char *argv[] )
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Debug-Level (for IRCs "VERSION" command) */
 | 
						/* Debug level for "VERSION" command */
 | 
				
			||||||
	NGIRCd_DebugLevel[0] = '\0';
 | 
						NGIRCd_DebugLevel[0] = '\0';
 | 
				
			||||||
#ifdef DEBUG
 | 
					#ifdef DEBUG
 | 
				
			||||||
	if( NGIRCd_Debug ) strcpy( NGIRCd_DebugLevel, "1" );
 | 
						if( NGIRCd_Debug ) strcpy( NGIRCd_DebugLevel, "1" );
 | 
				
			||||||
@@ -287,11 +289,9 @@ main( int argc, const char *argv[] )
 | 
				
			|||||||
			exit(1);
 | 
								exit(1);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		/*
 | 
							/* Create protocol and server identification. The syntax
 | 
				
			||||||
		 * create protocol and server identification.
 | 
							 * used by ngIRCd in PASS commands and the known "extended
 | 
				
			||||||
		 * The syntax used by ngIRCd in PASS commands and the extended flags
 | 
							 * flags" are described in doc/Protocol.txt. */
 | 
				
			||||||
		 * are described in doc/Protocol.txt
 | 
					 | 
				
			||||||
		 */
 | 
					 | 
				
			||||||
#ifdef IRCPLUS
 | 
					#ifdef IRCPLUS
 | 
				
			||||||
		snprintf( NGIRCd_ProtoID, sizeof NGIRCd_ProtoID, "%s%s %s|%s:%s", PROTOVER, PROTOIRCPLUS, PACKAGE_NAME, PACKAGE_VERSION, IRCPLUSFLAGS );
 | 
							snprintf( NGIRCd_ProtoID, sizeof NGIRCd_ProtoID, "%s%s %s|%s:%s", PROTOVER, PROTOIRCPLUS, PACKAGE_NAME, PACKAGE_VERSION, IRCPLUSFLAGS );
 | 
				
			||||||
#ifdef ZLIB
 | 
					#ifdef ZLIB
 | 
				
			||||||
@@ -317,10 +317,9 @@ main( int argc, const char *argv[] )
 | 
				
			|||||||
			exit( 1 );
 | 
								exit( 1 );
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		/* Hauptschleife */
 | 
							/* Main Run Loop */
 | 
				
			||||||
		Conn_Handler( );
 | 
							Conn_Handler( );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		/* Alles abmelden */
 | 
					 | 
				
			||||||
		Conn_Exit( );
 | 
							Conn_Exit( );
 | 
				
			||||||
		Client_Exit( );
 | 
							Client_Exit( );
 | 
				
			||||||
		Channel_Exit( );
 | 
							Channel_Exit( );
 | 
				
			||||||
@@ -333,10 +332,12 @@ main( int argc, const char *argv[] )
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * Generate ngIRCd "version string".
 | 
					 * Generate ngIRCd "version strings".
 | 
				
			||||||
 * This string is generated once and then stored in NGIRCd_Version for
 | 
					 *
 | 
				
			||||||
 * further usage, for example by the IRC command VERSION and the --version
 | 
					 * The ngIRCd version information is generated once and then stored in the
 | 
				
			||||||
 * command line switch.
 | 
					 * NGIRCd_Version and NGIRCd_VersionAddition string variables for further
 | 
				
			||||||
 | 
					 * usage, for example by the IRC command "VERSION" and the --version command
 | 
				
			||||||
 | 
					 * line switch.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
static void
 | 
					static void
 | 
				
			||||||
Fill_Version( void )
 | 
					Fill_Version( void )
 | 
				
			||||||
@@ -466,6 +467,7 @@ Pidfile_Delete( void )
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * Create the file containing the process ID of ngIRCd ("PID file").
 | 
					 * Create the file containing the process ID of ngIRCd ("PID file").
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 * @param pid	The process ID to be stored in this file.
 | 
					 * @param pid	The process ID to be stored in this file.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
static void
 | 
					static void
 | 
				
			||||||
@@ -504,6 +506,8 @@ Pidfile_Create(pid_t pid)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * Redirect stdin, stdout and stderr to apropriate file handles.
 | 
					 * Redirect stdin, stdout and stderr to apropriate file handles.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * @param fd	The file handle stdin, stdout and stderr should be redirected to.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
static void
 | 
					static void
 | 
				
			||||||
Setup_FDStreams(int fd)
 | 
					Setup_FDStreams(int fd)
 | 
				
			||||||
@@ -519,6 +523,13 @@ Setup_FDStreams(int fd)
 | 
				
			|||||||
} /* Setup_FDStreams */
 | 
					} /* Setup_FDStreams */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * Get user and group ID of unprivileged "nobody" user.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * @param uid	User ID
 | 
				
			||||||
 | 
					 * @param gid	Group ID
 | 
				
			||||||
 | 
					 * @return	true on success.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
static bool
 | 
					static bool
 | 
				
			||||||
NGIRCd_getNobodyID(uid_t *uid, gid_t *gid )
 | 
					NGIRCd_getNobodyID(uid_t *uid, gid_t *gid )
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@@ -551,6 +562,13 @@ NGIRCd_getNobodyID(uid_t *uid, gid_t *gid )
 | 
				
			|||||||
} /* NGIRCd_getNobodyID */
 | 
					} /* NGIRCd_getNobodyID */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * Initialize ngIRCd daemon.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * @param NGIRCd_NoDaemon	Set to true if ngIRCd should run in the
 | 
				
			||||||
 | 
					 *				foreground and not as a daemon.
 | 
				
			||||||
 | 
					 * @return			true on success.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
static bool
 | 
					static bool
 | 
				
			||||||
NGIRCd_Init( bool NGIRCd_NoDaemon ) 
 | 
					NGIRCd_Init( bool NGIRCd_NoDaemon ) 
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
/*
 | 
					/*
 | 
				
			||||||
 * ngIRCd -- The Next Generation IRC Daemon
 | 
					 * ngIRCd -- The Next Generation IRC Daemon
 | 
				
			||||||
 * Copyright (c)2001,2002 by Alexander Barton (alex@barton.de)
 | 
					 * Copyright (c)2001-2010 Alexander Barton (alex@barton.de).
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * This program is free software; you can redistribute it and/or modify
 | 
					 * This program is free software; you can redistribute it and/or modify
 | 
				
			||||||
 * it under the terms of the GNU General Public License as published by
 | 
					 * it under the terms of the GNU General Public License as published by
 | 
				
			||||||
@@ -23,31 +23,52 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#define C_ARRAY_SIZE(x)	(sizeof(x)/sizeof((x)[0]))
 | 
					#define C_ARRAY_SIZE(x)	(sizeof(x)/sizeof((x)[0]))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/** UNIX timestamp of ngIRCd start */
 | 
				
			||||||
 | 
					GLOBAL time_t NGIRCd_Start;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
GLOBAL time_t NGIRCd_Start;		/* Startzeitpunkt des Daemon */
 | 
					/** ngIRCd start time as string, used for RPL_CREATED_MSG (003) */
 | 
				
			||||||
GLOBAL char NGIRCd_StartStr[64];
 | 
					GLOBAL char NGIRCd_StartStr[64];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/** ngIRCd version number containing release number and compile-time options */
 | 
				
			||||||
GLOBAL char NGIRCd_Version[126];
 | 
					GLOBAL char NGIRCd_Version[126];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/** String specifying the compile-time options and target platform */
 | 
				
			||||||
GLOBAL char NGIRCd_VersionAddition[126];
 | 
					GLOBAL char NGIRCd_VersionAddition[126];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef DEBUG
 | 
					#ifdef DEBUG
 | 
				
			||||||
GLOBAL bool NGIRCd_Debug;		/* Debug-Modus aktivieren */
 | 
					/** Flag indicating if debug mode is active (true) or not (false) */
 | 
				
			||||||
 | 
					GLOBAL bool NGIRCd_Debug;
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef SNIFFER
 | 
					#ifdef SNIFFER
 | 
				
			||||||
GLOBAL bool NGIRCd_Sniffer;		/* Sniffer aktivieren */
 | 
					/** Flag indication if sniffer is active (true) or not (false) */
 | 
				
			||||||
 | 
					GLOBAL bool NGIRCd_Sniffer;
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
GLOBAL bool NGIRCd_Passive;		/* nicht zu anderen Servern connecten */
 | 
					/**
 | 
				
			||||||
 | 
					 * Flag indicating if NO outgoing connections should be established (true)
 | 
				
			||||||
 | 
					 * or not (false, the default)
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					GLOBAL bool NGIRCd_Passive;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
GLOBAL bool NGIRCd_SignalQuit;	/* true: quit server*/
 | 
					/** Flag indicating that ngIRCd has been requested to quit (true) */
 | 
				
			||||||
GLOBAL bool NGIRCd_SignalRestart;	/* true: restart server */
 | 
					GLOBAL bool NGIRCd_SignalQuit;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
GLOBAL char NGIRCd_DebugLevel[2];	/* Debug-Level fuer IRC_VERSION() */
 | 
					/** Flag indicating that ngIRCd has been requested to restart (true) */
 | 
				
			||||||
 | 
					GLOBAL bool NGIRCd_SignalRestart;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
GLOBAL char NGIRCd_ConfFile[FNAME_LEN];	/* Konfigurationsdatei */
 | 
					/**
 | 
				
			||||||
 | 
					 * Debug level for "VERSION" command, see description of numeric RPL_VERSION
 | 
				
			||||||
 | 
					 * (351) in RFC 2812. ngIRCd sets debuglevel to 1 when the debug mode is
 | 
				
			||||||
 | 
					 * active, and to 2 if the sniffer is running.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					GLOBAL char NGIRCd_DebugLevel[2];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
GLOBAL char NGIRCd_ProtoID[COMMAND_LEN];/* Protokoll- und Server-Identifikation */
 | 
					/** Full path and file name of current configuration file */
 | 
				
			||||||
 | 
					GLOBAL char NGIRCd_ConfFile[FNAME_LEN];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/** Protocol and server identification string; see doc/Protocol.txt */
 | 
				
			||||||
 | 
					GLOBAL char NGIRCd_ProtoID[COMMAND_LEN];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user