[IRC-Dev CVS] Module ircdh: Change commited ircdh/include ircd_log.h,NONE,1.1 ircd_osdep.h,NONE,1.1
Brought to you by:
zolty
From: Zolty <zo...@us...> - 2002-08-18 22:49:44
|
Update of /cvsroot/irc-dev/ircdh/include In directory usw-pr-cvs1:/tmp/cvs-serv31134/ircdh/include Modified Files: bsd.h channel.h ircd.h s_bsd.h s_debug.h send.h struct.h sys.h whowas.h Added Files: ircd_log.h ircd_osdep.h ircd_signal.h Log Message: 2002-08-19 Toni Garcia <zo...@ir...> * ircd/Makefile.in: Se hace una renovacion del archivo, preparandolo para agregar nuevos .c de una manera facil. Es conveniente hacer "make depend" de vez en cuando. * ircd/ircd_log.c: Nuevo sistema de logs del ircd. Esta incompleto. Esta pendiente de ir migrando todos los mensajes. * ircd/ircd_signal.c: Se mueve el codigo de gestion de "signals" de POSIX del ircd.c al nuevo archivo. * ircd/os_*.c: Se agregan las librerias de Thomas Helvey para los defines y funciones segun el sistema operativo. Esto es bueno para el dia que se haga un port de WIN32/WIN64 que se crea un os_windows.c y asi se permite hacer el port con minimos cambios. Aun no esta completo del todo. * /*: Nuevos ficheros README, TODO, del ircu de undernet, hay que personalizarlo. Se actualizan los ChangeLog's. * config/*: Se actualizan los configures y makefiles. Se agregan 2 preguntas en el make config nuevas: KILL_IPMISMATCH: 'Kill connecting clients when forward and reverse DNS mismatch' OPER_WALLOPS: 'Allow opers to wallop' Pero aun no estan implementadas. --- NEW FILE: ircd_log.h --- /* - Internet Relay Chat, include/ircd_log.h * Copyright (C) 1999 Thomas Helvey * * 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 * the Free Software Foundation; either version 1, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * * $Id: ircd_log.h,v 1.1 2002/08/18 22:49:41 zolty Exp $ */ #ifndef INCLUDED_ircd_log_h #define INCLUDED_ircd_log_h struct Client; enum LogLevel { L_CRIT, L_ERROR, L_WARNING, L_NOTICE, L_TRACE, L_INFO, L_DEBUG, L_LAST_LEVEL }; extern void open_log(const char *process_name); extern void close_log(void); extern void set_log_level(int level); extern int get_log_level(void); extern void ircd_log(int priority, const char *fmt, ...); extern void ircd_log_kill(const struct Client *victim, const struct Client *killer, const char *inpath, const char *path); #endif /* INCLUDED_ircd_log_h */ --- NEW FILE: ircd_osdep.h --- /* * ircd_osdep.h * * $Id: ircd_osdep.h,v 1.1 2002/08/18 22:49:41 zolty Exp $ */ #ifndef INCLUDED_ircd_osdep_h #define INCLUDED_ircd_osdep_h struct Client; struct sockaddr_in; typedef enum IOResult { IO_FAILURE = -1, IO_BLOCKED = 0, IO_SUCCESS = 1 } IOResult; /* * NOTE: osdep.c files should never need to know the actual size of a * Client struct. When passed as a parameter, the pointer just needs * to be forwarded to the enumeration function. */ typedef void (*EnumFn)(struct Client *, const char *msg); extern int os_disable_options(int fd); extern int os_get_rusage(struct Client *cptr, int uptime, EnumFn enumerator); extern int os_get_sockerr(int fd); extern int os_get_sockname(int fd, struct sockaddr_in *sin_out); extern int os_get_peername(int fd, struct sockaddr_in *sin_out); extern IOResult os_recv_nonb(int fd, char *buf, unsigned int length, unsigned int *length_out); extern IOResult os_send_nonb(int fd, const char *buf, unsigned int length, unsigned int *length_out); extern IOResult os_recvfrom_nonb(int fd, char *buf, unsigned int len, unsigned int *length_out, struct sockaddr_in *from_out); extern int os_connect_nonb(int fd, const struct sockaddr_in *sin); extern int os_set_fdlimit(unsigned int max_descriptors); extern int os_set_listen(int fd, int backlog); extern int os_set_nonblocking(int fd); extern int os_set_reuseaddr(int fd); extern int os_set_sockbufs(int fd, unsigned int size); #endif /* INCLUDED_ircd_osdep_h */ --- NEW FILE: ircd_signal.h --- /* * ircd_signal.h * * $Id: ircd_signal.h,v 1.1 2002/08/18 22:49:41 zolty Exp $ */ #ifndef INCLUDED_ircd_signal_h #define INCLUDED_ircd_signal_h extern void setup_signals(void); #endif /* INCLUDED_ircd_signal_h */ Index: bsd.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/bsd.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- bsd.h 26 Jul 2002 21:58:23 -0000 1.1.1.1 +++ bsd.h 18 Aug 2002 22:49:41 -0000 1.2 @@ -4,8 +4,8 @@ /*============================================================================= * Proto types */ - -extern RETSIGTYPE dummy(HANDLER_ARG(int sig)); +#include "h.h" +//extern RETSIGTYPE dummy(HANDLER_ARG(int sig)); extern int deliver_it(aClient *cptr, const char *str, int len); extern int writecalls; Index: channel.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/channel.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- channel.h 15 Aug 2002 20:55:23 -0000 1.3 +++ channel.h 18 Aug 2002 22:49:41 -0000 1.4 @@ -28,7 +28,7 @@ #include <sys/types.h> #define INCLUDED_sys_types_h #endif - +#include "h.h" struct SLink; struct Client; @@ -159,7 +159,7 @@ struct Channel { struct Channel *nextch, *prevch, *hnextch; - Mode mode; + struct SMode mode; time_t creationtime; char topic[TOPICLEN + 1]; char topic_nick[NICKLEN + 1]; Index: ircd.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/ircd.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ircd.h 15 Aug 2002 20:55:23 -0000 1.2 +++ ircd.h 18 Aug 2002 22:49:41 -0000 1.3 @@ -1,12 +1,12 @@ /* * ircd.h * - * $Id: + * $Id$ */ #ifndef INCLUDED_ircd_h #define INCLUDED_ircd_h #ifndef INCLUDED_config_h -//#include "config.h" +#include "config.h" #endif #ifndef INCLUDED_struct_h #include "struct.h" /* struct Client */ @@ -14,7 +14,7 @@ #ifndef INCLUDED_sys_types_h #include <sys/types.h> /* size_t, time_t */ #endif - +#include "runmalloc.h" /* * Macros @@ -44,14 +44,8 @@ * Proto types */ -#ifdef PROFIL -extern RETSIGTYPE s_monitor(HANDLER_ARG(int sig)); -#endif -extern RETSIGTYPE s_die(HANDLER_ARG(int sig)); -extern RETSIGTYPE s_restart(HANDLER_ARG(int sig)); - -extern void restart(char *mesg); -extern void server_reboot(void); +extern void server_die(const char *message); +extern void server_restart(const char *message); extern struct Client me; extern time_t CurrentTime; Index: s_bsd.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/s_bsd.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- s_bsd.h 15 Aug 2002 20:55:23 -0000 1.2 +++ s_bsd.h 18 Aug 2002 22:49:41 -0000 1.3 @@ -194,7 +194,6 @@ extern int add_listener(aConfItem *aconf); extern void close_listeners(void); extern void init_sys(void); -extern void write_pidfile(void); extern enum AuthorizationCheckResult check_client(aClient *cptr); extern int check_server(aClient *cptr); extern void close_connection(aClient *cptr); Index: s_debug.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/s_debug.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- s_debug.h 15 Aug 2002 20:55:23 -0000 1.2 +++ s_debug.h 18 Aug 2002 22:49:41 -0000 1.3 @@ -1,12 +1,12 @@ /* * s_debug.h * - * $Id: + * $Id$ */ #ifndef INCLUDED_s_debug_h #define INCLUDED_s_debug_h #ifndef INCLUDED_config_h -//#include "config.h" +#include "config.h" #endif #ifndef INCLUDED_ircd_defs_h #include "ircd_defs.h" /* Needed for HOSTLEN */ @@ -17,9 +17,6 @@ #endif struct Client; - -#include "struct.h" /* Needed for HOSTLEN */ -//#endif #ifdef DEBUGMODE Index: send.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/send.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- send.h 15 Aug 2002 20:55:23 -0000 1.2 +++ send.h 18 Aug 2002 22:49:41 -0000 1.3 @@ -1,7 +1,7 @@ /* * send.h * - * $Id: + * $Id$ */ #ifndef INCLUDED_send_h #define INCLUDED_send_h @@ -9,6 +9,7 @@ #include <stdarg.h> /* va_list */ #define INCLUDED_stdarg_h #endif +#include "h.h" struct Channel; struct Client; @@ -38,9 +39,9 @@ __attribute__ ((format(printf, 3, 4))); extern void sendto_highprot_butone(aClient *cptr, int p, char *pattern, ...) __attribute__ ((format(printf, 3, 4))); -extern void sendto_prefix_one(Reg1 aClient *to, Reg2 aClient *from, +extern void sendto_prefix_one(aClient *to, aClient *from, char *pattern, ...) __attribute__ ((format(printf, 3, 4))); -extern void flush_connections(int fd); +extern void flush_connections(struct Client* cptr); extern void send_queued(aClient *to); extern void vsendto_one(aClient *to, char *pattern, va_list vl); extern void sendto_channel_butone(aClient *one, aClient *from, Index: struct.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/struct.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- struct.h 15 Aug 2002 20:55:23 -0000 1.3 +++ struct.h 18 Aug 2002 22:49:41 -0000 1.4 @@ -17,6 +17,8 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * $Id$ */ #ifndef STRUCT_H @@ -28,6 +30,8 @@ #ifndef INCLUDED_dbuf_h #include "dbuf.h" #endif +#include "ircd_defs.h" +#include "h.h" /*============================================================================= Index: sys.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/sys.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- sys.h 15 Aug 2002 20:55:23 -0000 1.2 +++ sys.h 18 Aug 2002 22:49:41 -0000 1.3 @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: + * $Id: & */ #ifndef INCLUDED_sys_h #define INCLUDED_sys_h @@ -28,6 +28,7 @@ #include "../config/config.h" #include "../config/setup.h" #include "ircd_defs.h" +#include "runmalloc.h" #ifdef __osf__ #define _OSF_SOURCE Index: whowas.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/whowas.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- whowas.h 15 Aug 2002 20:55:23 -0000 1.3 +++ whowas.h 18 Aug 2002 22:49:41 -0000 1.4 @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: + * $Id$ */ #ifndef INCLUDED_whowas_h #define INCLUDED_whowas_h @@ -24,7 +24,7 @@ #include <sys/types.h> /* size_t */ #define INCLUDED_sys_types_h #endif - +#include "h.h" struct Client; /* |