Thread: [IRC-Dev CVS] Module ircdh: Change commited ircdh/ircd ircd_log.c,NONE,1.1 ircd_signal.c,NONE,1.1 os
Brought to you by:
zolty
Update of /cvsroot/irc-dev/ircdh/ircd In directory usw-pr-cvs1:/tmp/cvs-serv31134/ircdh/ircd Modified Files: Makefile.in bsd.c chkconf.c ircd.c list.c opercmds.c parse.c res.c s_auth.c s_bdd.c s_bsd.c s_conf.c s_debug.c s_ping.c s_socks.c send.c support.c version.c.SH Added Files: ircd_log.c ircd_signal.c os_bsd.c os_generic.c os_linux.c os_solaris.c 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.c --- /* * IRC - Internet Relay Chat, ircd/ircd_log.c * Copyright (C) 1999 Thomas Helvey (BleepSoft) * * See file AUTHORS in IRC package for additional names of * the programmers. * * 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.c,v 1.1 2002/08/18 22:49:42 zolty Exp $ */ #include "ircd_log.h" #if 0 #include "client.h" #endif #include "struct.h" #include "s_serv.h" #if 0 #include "ircd_string.h" #endif #include "s_debug.h" #include "struct.h" #include <assert.h> #include <stdarg.h> #include <stdio.h> #include <syslog.h> #include <unistd.h> #define LOG_BUFSIZE 2048 static int logLevel = L_INFO; #ifdef USE_SYSLOG static int sysLogLevel[] = { LOG_CRIT, LOG_ERR, LOG_WARNING, LOG_NOTICE, LOG_INFO, LOG_INFO, LOG_INFO }; #endif void ircd_log(int priority, const char *fmt, ...) { #if defined(USE_SYSLOG) || defined(DEBUGMODE) char buf[LOG_BUFSIZE]; va_list args; assert(-1 < priority); assert(priority < L_LAST_LEVEL); assert(0 != fmt); if (priority > logLevel) return; va_start(args, fmt); vsprintf(buf, fmt, args); va_end(args); #endif #ifdef USE_SYSLOG syslog(sysLogLevel[priority], "%s", buf); #endif #ifdef DEBUGMODE Debug((DEBUG_INFO, "LOG: %s", buf)); #endif } void open_log(const char *process_name) { #ifdef USE_SYSLOG if (EmptyString(process_name)) process_name = "ircd"; openlog(process_name, LOG_PID | LOG_NDELAY, LOG_USER); #endif } void close_log(void) { #ifdef USE_SYSLOG closelog(); #endif } void set_log_level(int level) { if (L_ERROR < level && level < L_LAST_LEVEL) logLevel = level; } int get_log_level(void) { return(logLevel); } /* * ircd_log_kill - log information about a kill */ void ircd_log_kill(const struct Client *victim, const struct Client *killer, const char *inpath, const char *path) { if (MyUser(victim)) { /* * get more infos when your local clients are killed -- _dl */ if (IsServer(killer)) ircd_log(L_TRACE, "A local client %s!%s@%s KILLED from %s [%s] Path: %s!%s)", victim->name, victim->user->username, victim->user->host, killer->name, killer->name, inpath, path); else ircd_log(L_TRACE, "A local client %s!%s@%s KILLED by %s [%s!%s@%s] (%s!%s)", victim->name, victim->user->username, victim->user->host, killer->name, killer->name, killer->user->username, killer->user->host, inpath, path); } else ircd_log(L_TRACE, "KILL From %s For %s Path %s!%s", killer->name, victim->name, inpath, path); } --- NEW FILE: ircd_signal.c --- /* * IRC - Internet Relay Chat, ircd/ircd_signal.c * Copyright (C) 1990 Jarkko Oikarinen and * University of Oulu, Computing Center * * 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_signal.c,v 1.1 2002/08/18 22:49:42 zolty Exp $ */ #include "ircd_signal.h" #include "ircd.h" #include <signal.h> static struct tag_SignalCounter { unsigned int alrm; unsigned int hup; } SignalCounter; #ifdef PROFIL void s_monitor(int sig) { static int mon = 0; moncontrol(mon); mon = 1 - mon; } #endif void sigalrm_handler(int sig) { ++SignalCounter.alrm; } void sigterm_handler(int sig) { server_die("received signal SIGTERM"); } static void sighup_handler(int sig) { ++SignalCounter.hup; GlobalRehashFlag = 1; } static void sigint_handler(int sig) { GlobalRestartFlag = 1; } void setup_signals(void) { struct sigaction act; act.sa_handler = SIG_IGN; act.sa_flags = 0; sigemptyset(&act.sa_mask); sigaddset(&act.sa_mask, SIGPIPE); sigaddset(&act.sa_mask, SIGALRM); #ifdef SIGWINCH sigaddset(&act.sa_mask, SIGWINCH); sigaction(SIGWINCH, &act, 0); #endif sigaction(SIGPIPE, &act, 0); act.sa_handler = sigalrm_handler; sigaction(SIGALRM, &act, 0); sigemptyset(&act.sa_mask); act.sa_handler = sighup_handler; sigaction(SIGHUP, &act, 0); act.sa_handler = sigint_handler; sigaction(SIGINT, &act, 0); act.sa_handler = sigterm_handler; sigaction(SIGTERM, &act, 0); #ifdef HAVE_RESTARTABLE_SYSCALLS /* * At least on Apollo sr10.1 it seems continuing system calls * after signal is the default. The following 'siginterrupt' * should change that default to interrupting calls. */ siginterrupt(SIGALRM, 1); #endif } --- NEW FILE: os_bsd.c --- /* * IRC - Internet Relay Chat, ircd/os_generic.c * 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: os_bsd.c,v 1.1 2002/08/18 22:49:42 zolty Exp $ * */ #include "ircd_osdep.h" #include "config.h" #include <assert.h> #include <sys/types.h> #include <sys/time.h> #include <sys/resource.h> #include <errno.h> #include <fcntl.h> #include <netinet/in.h> #include <stdio.h> #include <string.h> #include <sys/ioctl.h> #include <sys/socket.h> #include <unistd.h> #ifdef HPUX #include <sys/syscall.h> #define getrusage(a,b) syscall(SYS_GETRUSAGE, a, b) #endif /* * This is part of the STATS replies. There is no offical numeric for this * since this isnt an official command, in much the same way as HASH isnt. * It is also possible that some systems wont support this call or have * different field names for "struct rusage". * -avalon */ int os_get_rusage(struct Client *cptr, int uptime, EnumFn enumerator) { char buf[256]; #ifdef HAVE_GETRUSAGE struct rusage rus; time_t secs; #ifdef hz # define hzz hz #else # ifdef HZ # define hzz HZ # else int hzz = 1; # ifdef HPUX hzz = sysconf(_SC_CLK_TCK); # endif #endif #endif assert(0 != enumerator); if (getrusage(RUSAGE_SELF, &rus) == -1) return 0; secs = rus.ru_utime.tv_sec + rus.ru_stime.tv_sec; if (secs == 0) secs = 1; sprintf(buf, "CPU Secs %ld:%ld User %ld:%ld System %ld:%ld", secs / 60, secs % 60, rus.ru_utime.tv_sec / 60, rus.ru_utime.tv_sec % 60, rus.ru_stime.tv_sec / 60, rus.ru_stime.tv_sec % 60); (*enumerator)(cptr, buf); sprintf(buf, "RSS %ld ShMem %ld Data %ld Stack %ld", rus.ru_maxrss, rus.ru_ixrss / (uptime * hzz), rus.ru_idrss / (uptime * hzz), rus.ru_isrss / (uptime * hzz)); (*enumerator)(cptr, buf); sprintf(buf, "Swaps %ld Reclaims %ld Faults %ld", rus.ru_nswap, rus.ru_minflt, rus.ru_majflt); (*enumerator)(cptr, buf); sprintf(buf, "Block in %ld out %ld", rus.ru_inblock, rus.ru_oublock); (*enumerator)(cptr, buf); sprintf(buf, "Msg Rcv %ld Send %ld", rus.ru_msgrcv, rus.ru_msgsnd); (*enumerator)(cptr, buf); sprintf(buf, "Signals %ld Context Vol. %ld Invol %ld", rus.ru_nsignals, rus.ru_nvcsw, rus.ru_nivcsw); (*enumerator)(cptr, buf); #else /* HAVE_GETRUSAGE */ #if HAVE_TIMES struct tms tmsbuf; time_t secs, mins; int hzz = 1, ticpermin; int umin, smin, usec, ssec; assert(0 != enumerator); #ifdef HPUX hzz = sysconf(_SC_CLK_TCK); #endif ticpermin = hzz * 60; umin = tmsbuf.tms_utime / ticpermin; usec = (tmsbuf.tms_utime % ticpermin) / (float)hzz; smin = tmsbuf.tms_stime / ticpermin; ssec = (tmsbuf.tms_stime % ticpermin) / (float)hzz; secs = usec + ssec; mins = (secs / 60) + umin + smin; secs %= hzz; if (times(&tmsbuf) == -1) return 0; secs = tmsbuf.tms_utime + tmsbuf.tms_stime; sprintf(buf, "CPU Secs %d:%d User %d:%d System %d:%d", mins, secs, umin, usec, smin, ssec); (*enumerator)(cptr, buf); #endif /* HAVE_TIMES */ #endif /* HAVE_GETRUSAGE */ return 1; } int os_get_sockerr(int fd) { int err = 0; #if defined(SO_ERROR) unsigned int len = sizeof(err); getsockopt(fd, SOL_SOCKET, SO_ERROR, &err, &len); #endif return err; } /* * set_non_blocking * * Set the client connection into non-blocking mode. If your * system doesn't support this, you can make this a dummy * function (and get all the old problems that plagued the * blocking version of IRC--not a problem if you are a * lightly loaded node...) */ int os_set_nonblocking(int fd) { int res; #ifndef NBLOCK_SYSV int nonb = 0; #endif /* * NOTE: consult ALL your relevant manual pages *BEFORE* changing * these ioctl's. There are quite a few variations on them, * as can be seen by the PCS one. They are *NOT* all the same. * Heed this well. - Avalon. */ #ifdef NBLOCK_POSIX nonb |= O_NONBLOCK; #endif #ifdef NBLOCK_BSD nonb |= O_NDELAY; #endif #ifdef NBLOCK_SYSV /* This portion of code might also apply to NeXT. -LynX */ res = 1; if (ioctl(fd, FIONBIO, &res) == -1) return 0; #else if ((res = fcntl(fd, F_GETFL, 0)) == -1) return 0; else if (fcntl(fd, F_SETFL, res | nonb) == -1) return 0; #endif return 1; } /* * set_sock_opts */ int os_set_reuseaddr(int fd) { unsigned int opt = 1; return (0 == setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (const char*) &opt, sizeof(opt))); } int os_set_sockbufs(int fd, unsigned int size) { unsigned int opt = size; return (0 == setsockopt(fd, SOL_SOCKET, SO_RCVBUF, (const char*) &opt, sizeof(opt)) && 0 == setsockopt(fd, SOL_SOCKET, SO_SNDBUF, (const char*) &opt, sizeof(opt))); } int os_disable_options(int fd) { #if defined(IP_OPTIONS) && defined(IPPROTO_IP) return (0 == setsockopt(fd, IPPROTO_IP, IP_OPTIONS, NULL, 0)); #else return 1; #endif } /* * Try and find the correct name to use with getrlimit() for setting the max. * number of files allowed to be open by this process. */ #ifdef RLIMIT_FDMAX #define RLIMIT_FD_MAX RLIMIT_FDMAX #else #ifdef RLIMIT_NOFILE #define RLIMIT_FD_MAX RLIMIT_NOFILE #else #ifdef RLIMIT_OPEN_MAX #define RLIMIT_FD_MAX RLIMIT_OPEN_MAX #else #undef RLIMIT_FD_MAX #endif #endif #endif int os_set_fdlimit(unsigned int max_descriptors) { #if defined(HAVE_SETRLIMIT) && defined(RLIMIT_FD_MAX) struct rlimit limit; if (!getrlimit(RLIMIT_FD_MAX, &limit)) { if (limit.rlim_max < MAXCONNECTIONS) return limit.rlim_max; limit.rlim_cur = limit.rlim_max; /* make soft limit the max */ return setrlimit(RLIMIT_FD_MAX, &limit); } #endif /* defined(HAVE_SETRLIMIT) && defined(RLIMIT_FD_MAX) */ return 0; } IOResult os_recv_nonb(int fd, char* buf, unsigned int length, unsigned int* count_out) { int res; assert(0 != buf); assert(0 != count_out); *count_out = 0; errno = 0; if (0 < (res = recv(fd, buf, length, 0))) { *count_out = (unsigned) res; return IO_SUCCESS; } else if (res < 0) { if (EWOULDBLOCK == errno || EAGAIN == errno) return IO_BLOCKED; else return IO_FAILURE; } /* * 0 == client closed the connection * < 1 == error */ return IO_FAILURE; } IOResult os_recvfrom_nonb(int fd, char* buf, unsigned int length, unsigned int* length_out, struct sockaddr_in* sin_out) { int res; unsigned int len = sizeof(struct sockaddr_in); assert(0 != buf); assert(0 != length_out); assert(0 != sin_out); errno = 0; *length_out = 0; res = recvfrom(fd, buf, length, 0, (struct sockaddr*) sin_out, &len); if (-1 == res) { if (EWOULDBLOCK == errno || ENOMEM == errno) return IO_BLOCKED; return IO_FAILURE; } *length_out = res; return IO_SUCCESS; } IOResult os_send_nonb(int fd, const char* buf, unsigned int length, unsigned int* count_out) { int res; assert(0 != buf); assert(0 != count_out); *count_out = 0; errno = 0; if (-1 < (res = send(fd, buf, length, 0))) { *count_out = (unsigned) res; return IO_SUCCESS; } else if (EWOULDBLOCK == errno || EAGAIN == errno || ENOMEM == errno || ENOBUFS == errno) return IO_BLOCKED; return IO_FAILURE; } int os_connect_nonb(int fd, const struct sockaddr_in* sin) { if (connect(fd, (struct sockaddr*) sin, sizeof(struct sockaddr_in))) { if (errno != EINPROGRESS) return 0; } return 1; } int os_get_sockname(int fd, struct sockaddr_in* sin_out) { unsigned int len = sizeof(struct sockaddr_in); assert(0 != sin_out); return (0 == getsockname(fd, (struct sockaddr*) sin_out, &len)); } int os_get_peername(int fd, struct sockaddr_in* sin_out) { unsigned int len = sizeof(struct sockaddr_in); assert(0 != sin_out); return (0 == getpeername(fd, (struct sockaddr*) sin_out, &len)); } int os_set_listen(int fd, int backlog) { return (0 == listen(fd, backlog)); } --- NEW FILE: os_generic.c --- /* * IRC - Internet Relay Chat, ircd/os_generic.c * 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: os_generic.c,v 1.1 2002/08/18 22:49:42 zolty Exp $ * */ #include "ircd_osdep.h" #include "config.h" #include <assert.h> #include <errno.h> #include <fcntl.h> #include <netinet/in.h> #include <stdio.h> #include <string.h> #include <sys/ioctl.h> #include <sys/types.h> #include <sys/resource.h> #include <sys/socket.h> #include <sys/time.h> #if 0 #include <unistd.h> #endif #ifdef HPUX #include <sys/syscall.h> #define getrusage(a,b) syscall(SYS_GETRUSAGE, a, b) #endif /* * This is part of the STATS replies. There is no offical numeric for this * since this isnt an official command, in much the same way as HASH isnt. * It is also possible that some systems wont support this call or have * different field names for "struct rusage". * -avalon */ int os_get_rusage(struct Client *cptr, int uptime, EnumFn enumerator) { char buf[256]; #ifdef HAVE_GETRUSAGE struct rusage rus; time_t secs; #ifdef hz # define hzz hz #else # ifdef HZ # define hzz HZ # else int hzz = 1; # ifdef HPUX hzz = sysconf(_SC_CLK_TCK); # endif #endif #endif assert(0 != enumerator); if (getrusage(RUSAGE_SELF, &rus) == -1) return 0; secs = rus.ru_utime.tv_sec + rus.ru_stime.tv_sec; if (secs == 0) secs = 1; sprintf(buf, "CPU Secs %ld:%ld User %ld:%ld System %ld:%ld", secs / 60, secs % 60, rus.ru_utime.tv_sec / 60, rus.ru_utime.tv_sec % 60, rus.ru_stime.tv_sec / 60, rus.ru_stime.tv_sec % 60); (*enumerator)(cptr, buf); sprintf(buf, "RSS %ld ShMem %ld Data %ld Stack %ld", rus.ru_maxrss, rus.ru_ixrss / (uptime * hzz), rus.ru_idrss / (uptime * hzz), rus.ru_isrss / (uptime * hzz)); (*enumerator)(cptr, buf); sprintf(buf, "Swaps %ld Reclaims %ld Faults %ld", rus.ru_nswap, rus.ru_minflt, rus.ru_majflt); (*enumerator)(cptr, buf); sprintf(buf, "Block in %ld out %ld", rus.ru_inblock, rus.ru_oublock); (*enumerator)(cptr, buf); sprintf(buf, "Msg Rcv %ld Send %ld", rus.ru_msgrcv, rus.ru_msgsnd); (*enumerator)(cptr, buf); sprintf(buf, "Signals %ld Context Vol. %ld Invol %ld", rus.ru_nsignals, rus.ru_nvcsw, rus.ru_nivcsw); (*enumerator)(cptr, buf); #else /* HAVE_GETRUSAGE */ #if HAVE_TIMES struct tms tmsbuf; time_t secs, mins; int hzz = 1, ticpermin; int umin, smin, usec, ssec; assert(0 != enumerator); #ifdef HPUX hzz = sysconf(_SC_CLK_TCK); #endif ticpermin = hzz * 60; umin = tmsbuf.tms_utime / ticpermin; usec = (tmsbuf.tms_utime % ticpermin) / (float)hzz; smin = tmsbuf.tms_stime / ticpermin; ssec = (tmsbuf.tms_stime % ticpermin) / (float)hzz; secs = usec + ssec; mins = (secs / 60) + umin + smin; secs %= hzz; if (times(&tmsbuf) == -1) return 0; secs = tmsbuf.tms_utime + tmsbuf.tms_stime; sprintf(buf, "CPU Secs %d:%d User %d:%d System %d:%d", mins, secs, umin, usec, smin, ssec); (*enumerator)(cptr, buf); #endif /* HAVE_TIMES */ #endif /* HAVE_GETRUSAGE */ return 1; } int os_get_sockerr(int fd) { int err = 0; #if defined(SO_ERROR) unsigned int len = sizeof(err); getsockopt(fd, SOL_SOCKET, SO_ERROR, &err, &len); #endif return err; } /* * set_non_blocking * * Set the client connection into non-blocking mode. If your * system doesn't support this, you can make this a dummy * function (and get all the old problems that plagued the * blocking version of IRC--not a problem if you are a * lightly loaded node...) */ int os_set_nonblocking(int fd) { int res; #ifndef NBLOCK_SYSV int nonb = 0; #endif /* * NOTE: consult ALL your relevant manual pages *BEFORE* changing * these ioctl's. There are quite a few variations on them, * as can be seen by the PCS one. They are *NOT* all the same. * Heed this well. - Avalon. */ #ifdef NBLOCK_POSIX nonb |= O_NONBLOCK; #endif #ifdef NBLOCK_BSD nonb |= O_NDELAY; #endif #ifdef NBLOCK_SYSV /* This portion of code might also apply to NeXT. -LynX */ res = 1; if (ioctl(fd, FIONBIO, &res) == -1) return 0; #else if ((res = fcntl(fd, F_GETFL, 0)) == -1) return 0; else if (fcntl(fd, F_SETFL, res | nonb) == -1) return 0; #endif return 1; } /* * set_sock_opts */ int os_set_reuseaddr(int fd) { unsigned int opt = 1; return (0 == setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (const char*) &opt, sizeof(opt))); } int os_set_sockbufs(int fd, unsigned int size) { unsigned int opt = size; return (0 == setsockopt(fd, SOL_SOCKET, SO_RCVBUF, (const char*) &opt, sizeof(opt)) && 0 == setsockopt(fd, SOL_SOCKET, SO_SNDBUF, (const char*) &opt, sizeof(opt))); } int os_disable_options(int fd) { #if defined(IP_OPTIONS) && defined(IPPROTO_IP) return (0 == setsockopt(fd, IPPROTO_IP, IP_OPTIONS, NULL, 0)); #else return 1; #endif } /* * Try and find the correct name to use with getrlimit() for setting the max. * number of files allowed to be open by this process. */ #ifdef RLIMIT_FDMAX #define RLIMIT_FD_MAX RLIMIT_FDMAX #else #ifdef RLIMIT_NOFILE #define RLIMIT_FD_MAX RLIMIT_NOFILE #else #ifdef RLIMIT_OPEN_MAX #define RLIMIT_FD_MAX RLIMIT_OPEN_MAX #else #undef RLIMIT_FD_MAX #endif #endif #endif int os_set_fdlimit(unsigned int max_descriptors) { #if defined(HAVE_SETRLIMIT) && defined(RLIMIT_FD_MAX) struct rlimit limit; if (!getrlimit(RLIMIT_FD_MAX, &limit)) { if (limit.rlim_max < MAXCONNECTIONS) return limit.rlim_max; limit.rlim_cur = limit.rlim_max; /* make soft limit the max */ return setrlimit(RLIMIT_FD_MAX, &limit); } #endif /* defined(HAVE_SETRLIMIT) && defined(RLIMIT_FD_MAX) */ return 0; } IOResult os_recv_nonb(int fd, char* buf, unsigned int length, unsigned int* count_out) { int res; assert(0 != buf); assert(0 != count_out); *count_out = 0; errno = 0; if (0 < (res = recv(fd, buf, length, 0))) { *count_out = (unsigned) res; return IO_SUCCESS; } else if (res < 0) { if (EWOULDBLOCK == errno || EAGAIN == errno) return IO_BLOCKED; else return IO_FAILURE; } /* * 0 == client closed the connection * < 1 == error */ return IO_FAILURE; } IOResult os_recvfrom_nonb(int fd, char* buf, unsigned int length, unsigned int* length_out, struct sockaddr_in* sin_out) { int res; unsigned int len = sizeof(struct sockaddr_in); assert(0 != buf); assert(0 != length_out); assert(0 != sin_out); errno = 0; res = recvfrom(fd, buf, length, 0, (struct sockaddr*) sin_out, &len); if (-1 == res) { if (EWOULDBLOCK == errno || ENOMEM == errno) return IO_BLOCKED; return IO_FAILURE; } *length_out = res; return IO_SUCCESS; } IOResult os_send_nonb(int fd, const char* buf, unsigned int length, unsigned int* count_out) { int res; assert(0 != buf); assert(0 != count_out); *count_out = 0; errno = 0; if (-1 < (res = send(fd, buf, length, 0))) { *count_out = (unsigned) res; return IO_SUCCESS; } else if (EWOULDBLOCK == errno || EAGAIN == errno || ENOMEM == errno || ENOBUFS == errno) return IO_BLOCKED; return IO_FAILURE; } int os_connect_nonb(int fd, const struct sockaddr_in* sin) { if (connect(fd, (struct sockaddr*) sin, sizeof(struct sockaddr_in))) { if (errno != EINPROGRESS) return 0; } return 1; } int os_get_sockname(int fd, struct sockaddr_in* sin_out) { unsigned int len = sizeof(struct sockaddr_in); assert(0 != sin_out); return (0 == getsockname(fd, (struct sockaddr*) sin_out, &len)); } int os_get_peername(int fd, struct sockaddr_in* sin_out) { unsigned int len = sizeof(struct sockaddr_in); assert(0 != sin_out); return (0 == getpeername(fd, (struct sockaddr*) sin_out, &len)); } int os_set_listen(int fd, int backlog) { return (0 == listen(fd, backlog)); } --- NEW FILE: os_linux.c --- /* * IRC - Internet Relay Chat, ircd/os_linux.c * 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: os_linux.c,v 1.1 2002/08/18 22:49:42 zolty Exp $ * */ #include "ircd_osdep.h" #include <assert.h> #include <errno.h> #include <fcntl.h> #include <stdio.h> #include <netinet/in.h> #include <string.h> #include <sys/ioctl.h> #include <sys/resource.h> #include <sys/socket.h> #include <sys/types.h> #include <sys/times.h> #include <sys/param.h> #if 0 #include <unistd.h> #endif /* * This is part of the STATS replies. There is no offical numeric for this * since this isnt an official command, in much the same way as HASH isnt. * It is also possible that some systems wont support this call or have * different field names for "struct rusage". * -avalon */ int os_get_rusage(struct Client *cptr, int uptime, EnumFn enumerator) { char buf[256]; struct rusage rus; struct tms tmsbuf; time_t secs; time_t mins; int umin; int smin; int usec; int ssec; int ticpermin = HZ * 60; unsigned int tick_count = uptime * HZ; if (0 == tick_count) ++tick_count; assert(0 != enumerator); if (getrusage(RUSAGE_SELF, &rus) == -1) return 0; secs = rus.ru_utime.tv_sec + rus.ru_stime.tv_sec; if (secs == 0) secs = 1; sprintf(buf, "CPU Secs %ld:%ld User %ld:%ld System %ld:%ld", secs / 60, secs % 60, rus.ru_utime.tv_sec / 60, rus.ru_utime.tv_sec % 60, rus.ru_stime.tv_sec / 60, rus.ru_stime.tv_sec % 60); (*enumerator)(cptr, buf); sprintf(buf, "RSS %ld ShMem %ld Data %ld Stack %ld", rus.ru_maxrss, rus.ru_ixrss / tick_count, rus.ru_idrss / tick_count, rus.ru_isrss / tick_count); (*enumerator)(cptr, buf); sprintf(buf, "Swaps %ld Reclaims %ld Faults %ld", rus.ru_nswap, rus.ru_minflt, rus.ru_majflt); (*enumerator)(cptr, buf); sprintf(buf, "Block in %ld out %ld", rus.ru_inblock, rus.ru_oublock); (*enumerator)(cptr, buf); sprintf(buf, "Msg Rcv %ld Send %ld", rus.ru_msgrcv, rus.ru_msgsnd); (*enumerator)(cptr, buf); sprintf(buf, "Signals %ld Context Vol. %ld Invol %ld", rus.ru_nsignals, rus.ru_nvcsw, rus.ru_nivcsw); (*enumerator)(cptr, buf); if (times(&tmsbuf) == -1) return 0; umin = tmsbuf.tms_utime / ticpermin; usec = (tmsbuf.tms_utime % ticpermin) / (float)HZ; smin = tmsbuf.tms_stime / ticpermin; ssec = (tmsbuf.tms_stime % ticpermin) / (float)HZ; secs = usec + ssec; mins = (secs / 60) + umin + smin; secs %= HZ; sprintf(buf, "CPU Secs %ld:%ld User %d:%d System %d:%d", mins, secs, umin, usec, smin, ssec); (*enumerator)(cptr, buf); return 1; } int os_get_sockerr(int fd) { int err = 0; unsigned int len = sizeof(err); getsockopt(fd, SOL_SOCKET, SO_ERROR, &err, &len); return err; } /* * set_non_blocking * * Set the client connection into non-blocking mode. If your * system doesn't support this, you can make this a dummy * function (and get all the old problems that plagued the * blocking version of IRC--not a problem if you are a * lightly loaded node...) */ int os_set_nonblocking(int fd) { int res = 1; return (0 == ioctl(fd, FIONBIO, &res)); } /* * set_sock_opts */ int os_set_reuseaddr(int fd) { unsigned int opt = 1; return (0 == setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt))); } int os_set_sockbufs(int fd, unsigned int size) { unsigned int opt = size; return (0 == setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &opt, sizeof(opt)) && 0 == setsockopt(fd, SOL_SOCKET, SO_SNDBUF, &opt, sizeof(opt))); } int os_disable_options(int fd) { return (0 == setsockopt(fd, IPPROTO_IP, IP_OPTIONS, NULL, 0)); } int os_set_fdlimit(unsigned int max_descriptors) { struct rlimit limit; if (!getrlimit(RLIMIT_NOFILE, &limit)) { if (limit.rlim_max < max_descriptors) return limit.rlim_max; limit.rlim_cur = limit.rlim_max; /* make soft limit the max */ return setrlimit(RLIMIT_NOFILE, &limit); } return 0; } /* * os_recv_nonb - non blocking read of a connection * returns: * 1 if data was read or socket is blocked (recoverable error) * count_out > 0 if data was read * * 0 if socket closed from other end * -1 if an unrecoverable error occurred */ IOResult os_recv_nonb(int fd, char* buf, unsigned int length, unsigned int* count_out) { int res; assert(0 != buf); assert(0 != count_out); *count_out = 0; errno = 0; if (0 < (res = recv(fd, buf, length, 0))) { *count_out = (unsigned) res; return IO_SUCCESS; } else if (res < 0) { if (EWOULDBLOCK == errno || EAGAIN == errno) return IO_BLOCKED; else return IO_FAILURE; } /* * 0 == client closed the connection * < 1 == error */ return IO_FAILURE; } IOResult os_recvfrom_nonb(int fd, char* buf, unsigned int length, unsigned int* length_out, struct sockaddr_in* sin_out) { int res; unsigned int len = sizeof(struct sockaddr_in); assert(0 != buf); assert(0 != length_out); assert(0 != sin_out); errno = 0; res = recvfrom(fd, buf, length, 0, (struct sockaddr*) sin_out, &len); if (-1 == res) { if (EWOULDBLOCK == errno || ENOMEM == errno) return IO_BLOCKED; return IO_FAILURE; } *length_out = res; return IO_SUCCESS; } /* * os_send_nonb - non blocking read of a connection * returns: * 1 if data was written * count_out contains amount written * * 0 if write call blocked, recoverable error * -1 if an unrecoverable error occurred */ IOResult os_send_nonb(int fd, const char* buf, unsigned int length, unsigned int* count_out) { int res; assert(0 != buf); assert(0 != count_out); *count_out = 0; errno = 0; if (-1 < (res = send(fd, buf, length, 0))) { *count_out = (unsigned) res; return IO_SUCCESS; } else if (EAGAIN == errno || ENOMEM == errno || ENOBUFS == errno) return IO_BLOCKED; return IO_FAILURE; } int os_connect_nonb(int fd, const struct sockaddr_in* sin) { if (connect(fd, (const struct sockaddr*) sin, sizeof(struct sockaddr_in))) { if (errno != EINPROGRESS) return 0; } return 1; } int os_get_sockname(int fd, struct sockaddr_in* sin_out) { unsigned int len = sizeof(struct sockaddr_in); assert(0 != sin_out); return (0 == getsockname(fd, (struct sockaddr*) sin_out, &len)); } int os_get_peername(int fd, struct sockaddr_in* sin_out) { unsigned int len = sizeof(struct sockaddr_in); assert(0 != sin_out); return (0 == getpeername(fd, (struct sockaddr*) sin_out, &len)); } int os_set_listen(int fd, int backlog) { /* * for linux 2.2 backlog is the number of connections ready to be accepted * not the max syn requests, there is a kernel tweak there to set the max * syn request queue length */ return (0 == listen(fd, backlog)); } --- NEW FILE: os_solaris.c --- /* * IRC - Internet Relay Chat, ircd/os_solaris.c * 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: os_solaris.c,v 1.1 2002/08/18 22:49:42 zolty Exp $ * */ #include "ircd_osdep.h" #include <assert.h> #include <errno.h> #include <netinet/in.h> #include <stdio.h> #include <string.h> #include <sys/filio.h> #include <sys/ioctl.h> #include <sys/param.h> #include <sys/resource.h> #include <sys/socket.h> #include <sys/types.h> #include <unistd.h> /* * This is part of the STATS replies. There is no offical numeric for this * since this isnt an official command, in much the same way as HASH isnt. * It is also possible that some systems wont support this call or have * different field names for "struct rusage". * -avalon */ int os_get_rusage(struct Client *cptr, int uptime, EnumFn enumerator) { char buf[256]; struct rusage rus; time_t secs; int hz = HZ; int upticks = uptime * hz; assert(0 != enumerator); if (getrusage(RUSAGE_SELF, &rus) == -1) return 0; secs = rus.ru_utime.tv_sec + rus.ru_stime.tv_sec; if (secs == 0) secs = 1; sprintf(buf, "CPU Secs %ld:%ld User %ld:%ld System %ld:%ld", secs / 60, secs % 60, rus.ru_utime.tv_sec / 60, rus.ru_utime.tv_sec % 60, rus.ru_stime.tv_sec / 60, rus.ru_stime.tv_sec % 60); (*enumerator)(cptr, buf); sprintf(buf, "RSS %ld ShMem %ld Data %ld Stack %ld", rus.ru_maxrss, rus.ru_ixrss / upticks, rus.ru_idrss / upticks, rus.ru_isrss / upticks); (*enumerator)(cptr, buf); sprintf(buf, "Swaps %ld Reclaims %ld Faults %ld", rus.ru_nswap, rus.ru_minflt, rus.ru_majflt); (*enumerator)(cptr, buf); sprintf(buf, "Block in %ld out %ld", rus.ru_inblock, rus.ru_oublock); (*enumerator)(cptr, buf); sprintf(buf, "Msg Rcv %ld Send %ld", rus.ru_msgrcv, rus.ru_msgsnd); (*enumerator)(cptr, buf); sprintf(buf, "Signals %ld Context Vol. %ld Invol %ld", rus.ru_nsignals, rus.ru_nvcsw, rus.ru_nivcsw); (*enumerator)(cptr, buf); return 1; } int os_get_sockerr(int fd) { int err = 0; int len = sizeof(err); getsockopt(fd, SOL_SOCKET, SO_ERROR, (void*) &err, &len); return err; } /* * set_non_blocking * * Set the client connection into non-blocking mode. If your * system doesn't support this, you can make this a dummy * function (and get all the old problems that plagued the * blocking version of IRC--not a problem if you are a * lightly loaded node...) */ int os_set_nonblocking(int fd) { int res = 1; return (0 == ioctl(fd, FIONBIO, &res)); } /* * set_sock_opts */ int os_set_reuseaddr(int fd) { unsigned int opt = 1; return (0 == setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (const char*) &opt, sizeof(opt))); } int os_set_sockbufs(int fd, unsigned int size) { unsigned int opt = size; return (0 == setsockopt(fd, SOL_SOCKET, SO_RCVBUF, (const char*) &opt, sizeof(opt)) && 0 == setsockopt(fd, SOL_SOCKET, SO_SNDBUF, (const char*) &opt, sizeof(opt))); } int os_disable_options(int fd) { return (0 == setsockopt(fd, IPPROTO_IP, IP_OPTIONS, NULL, 0)); } int os_set_fdlimit(unsigned int max_descriptors) { struct rlimit limit; if (!getrlimit(RLIMIT_NOFILE, &limit)) { if (limit.rlim_max < max_descriptors) return limit.rlim_max; limit.rlim_cur = limit.rlim_max; /* make soft limit the max */ return setrlimit(RLIMIT_NOFILE, &limit); } return 0; } IOResult os_recv_nonb(int fd, char* buf, unsigned int length, unsigned int* count_out) { int res; assert(0 != buf); assert(0 != count_out); *count_out = 0; errno = 0; if (0 < (res = recv(fd, buf, length, 0))) { *count_out = (unsigned) res; return IO_SUCCESS; } else if (res < 0) { if (EAGAIN == errno || ENOBUFS == errno || ENOMEM == errno || ENOSR == errno) return IO_BLOCKED; else return IO_FAILURE; } /* * 0 == client closed the connection * < 1 == error */ return IO_FAILURE; } IOResult os_recvfrom_nonb(int fd, char* buf, unsigned int length, unsigned int* length_out, struct sockaddr_in* sin_out) { int res; unsigned int len = sizeof(struct sockaddr_in); assert(0 != buf); assert(0 != length_out); assert(0 != sin_out); errno = 0; res = recvfrom(fd, buf, length, 0, (struct sockaddr*) sin_out, &len); if (-1 == res) { if (EAGAIN == errno || ENOBUFS == errno || ENOMEM == errno || ENOSR == errno) return IO_BLOCKED; return IO_FAILURE; } *length_out = res; return IO_SUCCESS; } IOResult os_send_nonb(int fd, const char* buf, unsigned int length, unsigned int* count_out) { int res; assert(0 != buf); assert(0 != count_out); *count_out = 0; errno = 0; if (-1 < (res = send(fd, buf, length, 0))) { *count_out = (unsigned) res; return IO_SUCCESS; } else if (EAGAIN == errno || ENOBUFS == errno || ENOMEM == errno || ENOSR == errno) return IO_BLOCKED; return IO_FAILURE; } int os_connect_nonb(int fd, const struct sockaddr_in* sin) { if (connect(fd, (struct sockaddr*) sin, sizeof(struct sockaddr_in))) { if (errno != EINPROGRESS) return 0; } return 1; } int os_get_sockname(int fd, struct sockaddr_in* sin_out) { int len = sizeof(struct sockaddr_in); assert(0 != sin_out); return (0 == getsockname(fd, (struct sockaddr*) sin_out, &len)); } int os_get_peername(int fd, struct sockaddr_in* sin_out) { int len = sizeof(struct sockaddr_in); assert(0 != sin_out); return (0 == getpeername(fd, (struct sockaddr*) sin_out, &len)); } int os_set_listen(int fd, int backlog) { return (0 == listen(fd, backlog)); } Index: Makefile.in =================================================================== RCS file: /cvsroot/irc-dev/ircdh/ircd/Makefile.in,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Makefile.in 6 Aug 2002 18:45:19 -0000 1.3 +++ Makefile.in 18 Aug 2002 22:49:41 -0000 1.4 @@ -37,6 +37,7 @@ MKDIR=mkdir TOUCH=touch GREP=grep +OSDEP_C=@OSDEP_C@ @SET_MAKE@ # The following variables are replaced by what you give during configuration : @@ -59,15 +60,54 @@ IRCDLIBS= #### End of system configuration section. #### +PURIFY = -OBJS=IPcheck.o bsd.o channel.o class.o common.o crule.o dbuf.o fileio.o ircd.o \ - list.o map.o match.o numnicks.o opercmds.o packet.o parse.o querycmds.o \ - random.o res.o runmalloc.o s_auth.o s_bsd.o s_conf.o s_debug.o s_err.o \ - s_misc.o s_numeric.o s_ping.o s_serv.o s_user.o send.o sprintf_irc.o \ - support.o userload.o whocmds.o whowas.o hash.o s_socks.o s_bdd.o \ - m_config.o m_watch.o +SRC = \ + IPcheck.c \ + channel.c \ + class.c \ + crule.c \ + dbuf.c \ + fileio.c \ + hash.c \ + ircd.c \ + ircd_log.c \ + ircd_osdep.c \ + ircd_signal.c \ + list.c \ + map.c \ + match.c \ + numnicks.c \ + opercmds.c \ + packet.c \ + parse.c \ + querycmds.c \ + random.c \ + res.c \ + s_auth.c \ + s_bdd.c \ + s_bsd.c \ + s_conf.c \ + s_debug.c \ + s_err.c \ + s_misc.c \ + s_numeric.c \ + s_ping.c \ + s_serv.c \ + s_socks.c \ + s_user.c \ + send.c \ + sprintf_irc.c \ + support.c \ + userload.c \ + whocmds.c \ + whowas.c \ + m_config.c \ + m_watch.c \ + common.c \ + bsd.c -SRC=${OBJS:%.o=%.c} +OBJS = ${SRC:%.c=%.o} all: ( cd ..; make -f Makefile ) @@ -79,19 +119,30 @@ build: ircd chkconf -ircd: ${OBJS} ../include/patchlevel.h - ${SHELL} version.c.SH - ${CC} ${CFLAGS} ${CPPFLAGS} -c version.c - ${CC} ${CFLAGS} ${OBJS} version.o ${LDFLAGS} ${IRCDLIBS} -o ircd +ircd: ${OBJS} ../include/patchlevel.h version.o + ${PURIFY} ${CC} ${OBJS} version.o ${LDFLAGS} ${IRCDLIBS} -o ircd ${CHMOD} ${IRCDMODE} ircd -chkcrule.o: crule.c ../include/sys.h ../include/../config/config.h \ - ../include/../config/setup.h ../include/runmalloc.h ../include/h.h \ - ../include/s_debug.h ../include/struct.h ../include/dbuf.h \ - ../include/whowas.h ../include/s_serv.h ../include/ircd.h \ - ../include/match.h ../include/s_bsd.h ../include/s_conf.h \ - ../include/list.h ../include/common.h ../include/crule.h \ - ../include/s_bdd.h +# +# Make sure the anti hack checksums get included when things change +# bleah +# +version.c: version.c.SH s_serv.c s_user.c channel.c s_bsd.c s_misc.c ircd.c + ${SHELL} version.c.SH + +ircd_osdep.c: ${OSDEP_C} + rm -f ircd_osdep.c + ln -s ${OSDEP_C} ircd_osdep.c + +ircd_string.o: ircd_string.c chattr.tab.c + +table_gen: table_gen.o + ${CC} -o $@ table_gen.o + +chattr.tab.c: table_gen + ./table_gen > chattr.tab.c + +chkcrule.o: crule.c ${CC} ${CFLAGS} ${CPPFLAGS} -DCR_CHKCONF -o chkcrule.o -c crule.c chkconf: chkconf.o match.o common.o chkcrule.o runmalloc.o fileio.o @@ -99,6 +150,10 @@ chkconf.o match.o common.o chkcrule.o runmalloc.o fileio.o \ ${LDFLAGS} ${IRCDLIBS} -o chkconf +#chkconf: chkconf.o fda.o match.o chkcrule.o ircd_alloc.o fileio.o ircd_string.o +# ${CC} chkconf.o fda.o match.o chkcrule.o ircd_alloc.o fileio.o \ +# ircd_string.o ${LDFLAGS} ${IRCDLIBS} -o chkconf + install: build @if [ ! -d ${DPATH} -a ! -f ${DPATH} ]; then \ echo "Creating directory ${DPATH}"; \ @@ -114,11 +169,12 @@ gsub("\\\\+","",$$(NF)); \ }; \ print $$(NF) }'` > /tmp/ircd.tag; +# @echo `date +%Y%m%d%H%M` > /tmp/ircd.tag; @echo "Installing new ircd as ${BINDIR}/ircd.`cat /tmp/ircd.tag` :" ${INSTALL} -m ${IRCDMODE} -o ${IRCDOWN} -g ${IRCDGRP} ircd ${BINDIR}/ircd.`cat /tmp/ircd.tag` @( cd ${BINDIR}; \ ${RM} -f ${SYMLINK}; \ - ${LN_S} ircd.`cat /tmp/ircd.tag` ${SYMLINK}; ) + ${LN_S} ircd.`cat /tmp/ircd.tag` ${SYMLINK}; ) @${RM} /tmp/ircd.tag ${INSTALL} -s -m 700 -o ${IRCDOWN} -g ${IRCDGRP} chkconf ${BINDIR} ${INSTALL} -m 600 -o ${IRCDOWN} -g ${IRCDGRP} ../doc/ejemplo.conf ${DPATH} @@ -169,7 +225,7 @@ @echo "Please remove the contents of ${DPATH} manually" clean: - ${RM} -f *.o ircd version.c chkconf + ${RM} -f *.o *.bak ircd version.c chkconf ircd_osdep.c chattr.tab.c table_gen distclean: clean ${RM} -f Makefile stamp-m @@ -227,91 +283,93 @@ # DO NOT DELETE THIS LINE -- make depend depends on it. IPcheck.o: IPcheck.c ../include/sys.h ../config/config.h \ - ../config/setup.h ../include/runmalloc.h ../include/h.h \ - ../include/s_debug.h ../include/IPcheck.h ../include/querycmds.h \ - ../include/struct.h ../include/whowas.h ../include/dbuf.h \ - ../zlib/zlib.h ../zlib/zconf.h ../include/s_user.h ../include/s_bsd.h \ - ../include/s_conf.h ../include/list.h ../include/send.h \ - ../include/s_bdd.h ../include/support.h -bsd.o: bsd.c ../include/sys.h ../config/config.h ../config/setup.h \ - ../include/runmalloc.h ../include/h.h ../include/s_debug.h \ - ../include/struct.h ../include/whowas.h ../include/dbuf.h \ - ../zlib/zlib.h ../zlib/zconf.h ../include/s_bsd.h ../include/s_conf.h \ - ../include/list.h ../include/ircd.h ../include/bsd.h + ../config/setup.h ../include/ircd_defs.h ../include/runmalloc.h \ + ../include/h.h ../include/s_debug.h ../include/IPcheck.h \ + ../include/ircd.h ../include/struct.h ../include/whowas.h \ + ../include/dbuf.h ../include/querycmds.h ../include/s_user.h \ + ../include/s_bsd.h ../include/s_conf.h ../include/list.h \ + ../include/send.h ../include/s_bdd.h ../include/support.h channel.o: channel.c ../include/sys.h ../config/config.h \ - ../config/setup.h ../include/runmalloc.h ../include/h.h \ - ../include/s_debug.h ../include/struct.h ../include/whowas.h \ - ../include/dbuf.h ../zlib/zlib.h ../zlib/zconf.h ../include/channel.h \ - ../include/list.h ../include/parse.h ../include/send.h \ - ../include/s_err.h ../include/numeric.h ../include/ircd.h \ - ../include/common.h ../include/s_bdd.h ../include/match.h \ - ../include/hash.h ../include/s_serv.h ../include/s_misc.h \ - ../include/s_user.h ../include/s_conf.h ../include/s_bsd.h \ - ../include/msg.h ../include/support.h ../include/numnicks.h \ + ../config/setup.h ../include/ircd_defs.h ../include/runmalloc.h \ + ../include/h.h ../include/s_debug.h ../include/struct.h \ + ../include/whowas.h ../include/dbuf.h ../include/channel.h \ + ../include/parse.h ../include/send.h ../include/s_err.h \ + ../include/numeric.h ../include/ircd.h ../include/common.h \ + ../include/s_bdd.h ../include/match.h ../include/list.h \ + ../include/hash.h ../include/s_misc.h ../include/s_user.h \ + ../include/s_conf.h ../include/s_bsd.h ../include/msg.h \ + ../include/s_serv.h ../include/support.h ../include/numnicks.h \ ../include/sprintf_irc.h ../include/querycmds.h class.o: class.c ../include/sys.h ../config/config.h ../config/setup.h \ - ../include/runmalloc.h ../include/h.h ../include/s_debug.h \ - ../include/struct.h ../include/whowas.h ../include/dbuf.h \ - ../zlib/zlib.h ../zlib/zconf.h ../include/class.h ../include/s_conf.h \ + ../include/ircd_defs.h ../include/runmalloc.h ../include/h.h \ + ../include/s_debug.h ../include/struct.h ../include/whowas.h \ + ../include/dbuf.h ../include/class.h ../include/s_conf.h \ ../include/list.h ../include/s_serv.h ../include/send.h \ ../include/s_err.h ../include/numeric.h ../include/ircd.h -common.o: common.c ../include/common.h ../include/sys.h \ - ../config/config.h ../config/setup.h ../include/runmalloc.h crule.o: crule.c ../include/sys.h ../config/config.h ../config/setup.h \ - ../include/runmalloc.h ../include/h.h ../include/s_debug.h \ - ../include/struct.h ../include/whowas.h ../include/dbuf.h \ - ../zlib/zlib.h ../zlib/zconf.h ../include/s_serv.h ../include/ircd.h \ + ../include/ircd_defs.h ../include/runmalloc.h ../include/h.h \ + ../include/s_debug.h ../include/struct.h ../include/whowas.h \ + ../include/dbuf.h ../include/s_serv.h ../include/ircd.h \ ../include/match.h ../include/s_bsd.h ../include/s_conf.h \ ../include/list.h ../include/common.h ../include/crule.h -dbuf.o: dbuf.c ../include/h.h ../include/s_debug.h ../include/common.h \ - ../include/sys.h ../config/config.h ../config/setup.h \ - ../include/runmalloc.h ../include/struct.h ../include/whowas.h \ - ../include/dbuf.h ../zlib/zlib.h ../zlib/zconf.h ../include/s_serv.h \ - ../include/send.h +dbuf.o: dbuf.c ../include/h.h ../include/s_debug.h ../config/config.h \ + ../config/setup.h ../include/ircd_defs.h ../include/common.h \ + ../include/sys.h ../include/runmalloc.h ../include/struct.h \ + ../include/whowas.h ../include/dbuf.h ../include/s_serv.h fileio.o: fileio.c ../include/fileio.h ../include/runmalloc.h -ircd.o: ircd.c ../include/sys.h ../config/config.h ../config/setup.h \ - ../include/runmalloc.h ../include/h.h ../include/s_debug.h \ - ../include/res.h ../include/list.h ../include/struct.h \ - ../include/whowas.h ../include/dbuf.h ../zlib/zlib.h ../zlib/zconf.h \ - ../include/s_serv.h ../include/send.h ../include/ircd.h \ - ../include/s_conf.h ../include/class.h ../include/s_misc.h \ - ../include/parse.h ../include/match.h ../include/s_bsd.h \ - ../include/crule.h ../include/userload.h ../include/numeric.h \ - ../include/hash.h ../include/bsd.h ../include/version.h \ - ../include/numnicks.h +ircd.o: ircd.c ../include/ircd.h ../config/config.h ../config/setup.h \ + ../include/struct.h ../include/whowas.h ../include/h.h \ + ../include/s_debug.h ../include/ircd_defs.h ../include/dbuf.h \ + ../include/runmalloc.h ../include/IPcheck.h ../include/class.h \ + ../include/crule.h ../include/hash.h ../include/ircd_log.h \ + ../include/ircd_signal.h ../include/list.h ../include/match.h \ + ../include/msg.h ../include/numeric.h ../include/numnicks.h \ + ../include/parse.h ../include/res.h ../include/s_auth.h \ + ../include/s_bsd.h ../include/s_conf.h ../include/s_misc.h \ + ../include/send.h ../include/sys.h ../include/userload.h \ + ../include/version.h ../include/s_serv.h ../include/bsd.h +ircd_osdep.o: ircd_osdep.c ../include/ircd_osdep.h +ircd_log.o: ircd_log.c ../include/ircd_log.h ../include/struct.h \ + ../include/whowas.h ../include/h.h ../include/s_debug.h \ + ../config/config.h ../config/setup.h ../include/ircd_defs.h \ + ../include/dbuf.h ../include/s_serv.h +ircd_signal.o: ircd_signal.c ../include/ircd_signal.h ../include/ircd.h \ + ../config/config.h ../config/setup.h ../include/struct.h \ + ../include/whowas.h ../include/h.h ../include/s_debug.h \ + ../include/ircd_defs.h ../include/dbuf.h ../include/runmalloc.h list.o: list.c ../include/sys.h ../config/config.h ../config/setup.h \ - ../include/runmalloc.h ../include/h.h ../include/s_debug.h \ - ../include/struct.h ../include/whowas.h ../include/dbuf.h \ - ../zlib/zlib.h ../zlib/zconf.h ../include/numeric.h ../include/send.h \ + ../include/ircd_defs.h ../include/runmalloc.h ../include/h.h \ + ../include/s_debug.h ../include/struct.h ../include/whowas.h \ + ../include/dbuf.h ../include/numeric.h ../include/send.h \ ../include/s_conf.h ../include/list.h ../include/class.h \ ../include/match.h ../include/ircd.h ../include/s_serv.h \ ../include/support.h ../include/s_misc.h ../include/s_bsd.h \ ../include/res.h ../include/common.h ../include/s_user.h \ ../include/opercmds.h map.o: map.c ../include/sys.h ../config/config.h ../config/setup.h \ - ../include/runmalloc.h ../include/h.h ../include/s_debug.h \ - ../include/struct.h ../include/whowas.h ../include/dbuf.h \ - ../zlib/zlib.h ../zlib/zconf.h ../include/numeric.h ../include/send.h \ + ../include/ircd_defs.h ../include/runmalloc.h ../include/h.h \ + ../include/s_debug.h ../include/struct.h ../include/whowas.h \ + ../include/dbuf.h ../include/numeric.h ../include/send.h \ ../include/match.h ../include/list.h ../include/s_err.h \ ../include/ircd.h ../include/s_bsd.h ../include/s_conf.h \ ../include/s_misc.h ../include/querycmds.h ../include/map.h \ ../include/numnicks.h match.o: match.c ../include/sys.h ../config/config.h ../config/setup.h \ - ../include/runmalloc.h ../include/h.h ../include/s_debug.h \ - ../include/struct.h ../include/whowas.h ../include/dbuf.h \ - ../zlib/zlib.h ../zlib/zconf.h ../include/common.h ../include/match.h \ + ../include/ircd_defs.h ../include/runmalloc.h ../include/h.h \ + ../include/s_debug.h ../include/struct.h ../include/whowas.h \ + ../include/dbuf.h ../include/common.h ../include/match.h \ ../include/ircd.h numnicks.o: numnicks.c ../include/numnicks.h ../include/sys.h \ - ../config/config.h ../config/setup.h ../include/runmalloc.h \ - ../include/h.h ../include/s_debug.h ../include/s_serv.h \ - ../include/struct.h ../include/whowas.h ../include/dbuf.h \ - ../zlib/zlib.h ../zlib/zconf.h ../include/common.h ../include/ircd.h \ + ../config/config.h ../config/setup.h ../include/ircd_defs.h \ + ../include/runmalloc.h ../include/h.h ../include/s_debug.h \ + ../include/s_serv.h ../include/struct.h ../include/whowas.h \ + ../include/dbuf.h ../include/common.h ../include/ircd.h \ ../include/s_misc.h ../include/match.h ../include/s_bsd.h \ ../include/s_conf.h ../include/list.h opercmds.o: opercmds.c ../include/sys.h ../config/config.h \ - ../config/setup.h ../include/runmalloc.h ../include/h.h \ - ../include/s_debug.h ../include/opercmds.h ../include/struct.h \ - ../include/whowas.h ../include/dbuf.h ../zlib/zlib.h ../zlib/zconf.h \ + ../config/setup.h ../include/ircd_defs.h ../include/runmalloc.h \ + ../include/h.h ../include/s_debug.h ../include/opercmds.h \ + ../include/struct.h ../include/whowas.h ../include/dbuf.h \ ../include/ircd.h ../include/s_bsd.h ../include/s_conf.h \ ../include/list.h ../include/send.h ../include/s_err.h \ ../include/numeric.h ../include/match.h ../include/s_misc.h \ @@ -321,16 +379,16 @@ ../include/crule.h ../include/version.h ../include/support.h \ ../include/s_serv.h ../include/hash.h packet.o: packet.c ../include/sys.h ../config/config.h ../config/setup.h \ - ../include/runmalloc.h ../include/h.h ../include/s_debug.h \ - ../include/struct.h ../include/whowas.h ../include/dbuf.h \ - ../zlib/zlib.h ../zlib/zconf.h ../include/s_misc.h ../include/s_bsd.h \ + ../include/ircd_defs.h ../include/runmalloc.h ../include/h.h \ + ../include/s_debug.h ../include/struct.h ../include/whowas.h \ + ../include/dbuf.h ../include/s_misc.h ../include/s_bsd.h \ ../include/s_conf.h ../include/list.h ../include/ircd.h \ ../include/msg.h ../include/parse.h ../include/send.h \ ../include/packet.h ../include/s_serv.h parse.o: parse.c ../include/sys.h ../config/config.h ../config/setup.h \ - ../include/runmalloc.h ../include/h.h ../include/s_debug.h \ - ../include/struct.h ../include/whowas.h ../include/dbuf.h \ - ../zlib/zlib.h ../zlib/zconf.h ../include/s_serv.h ../include/send.h \ + ../include/ircd_defs.h ../include/runmalloc.h ../include/h.h \ + ../include/s_debug.h ../include/struct.h ../include/whowas.h \ + ../include/dbuf.h ../include/s_serv.h ../include/send.h \ ../include/parse.h ../include/common.h ../include/s_bsd.h \ ../include/s_conf.h ../include/list.h ../include/msg.h \ ../include/s_user.h ../include/channel.h ../include/s_ping.h \ @@ -340,9 +398,9 @@ ../include/numnicks.h ../include/opercmds.h ../include/querycmds.h \ ../include/whocmds.h querycmds.o: querycmds.c ../include/sys.h ../config/config.h \ - ../config/setup.h ../include/runmalloc.h ../include/h.h \ - ../include/s_debug.h ../include/struct.h ../include/whowas.h \ - ../include/dbuf.h ../zlib/zlib.h ../zlib/zconf.h ../include/parse.h \ + ../config/setup.h ../include/ircd_defs.h ../include/runmalloc.h \ + ../include/h.h ../include/s_debug.h ../include/struct.h \ + ../include/whowas.h ../include/dbuf.h ../include/parse.h \ ../include/send.h ../include/s_err.h ../include/numeric.h \ ../include/ircd.h ../include/s_user.h ../include/version.h \ ../include/s_bsd.h ../include/s_conf.h ../include/list.h \ @@ -350,30 +408,39 @@ ../include/msg.h ../include/channel.h ../include/numnicks.h \ ../include/userload.h ../include/support.h ../include/querycmds.h random.o: random.c ../include/sys.h ../config/config.h ../config/setup.h \ - ../include/runmalloc.h ../include/random.h + ../include/ircd_defs.h ../include/runmalloc.h ../include/random.h res.o: res.c ../include/sys.h ../config/config.h ../config/setup.h \ - ../include/runmalloc.h ../include/h.h ../include/s_debug.h \ - ../include/res.h ../include/list.h ../include/struct.h \ - ../include/whowas.h ../include/dbuf.h ../zlib/zlib.h ../zlib/zconf.h \ + ../include/ircd_defs.h ../include/runmalloc.h ../include/h.h \ + ../include/s_debug.h ../include/res.h ../include/list.h \ + ../include/struct.h ../include/whowas.h ../include/dbuf.h \ ../include/numeric.h ../include/send.h ../include/s_err.h \ ../include/s_misc.h ../include/s_bsd.h ../include/s_conf.h \ ../include/ircd.h ../include/s_ping.h ../include/support.h \ ../include/common.h ../include/sprintf_irc.h -runmalloc.o: runmalloc.c ../include/sys.h ../config/config.h \ - ../config/setup.h ../include/runmalloc.h ../include/h.h \ - ../include/s_debug.h s_auth.o: s_auth.c ../include/sys.h ../config/config.h ../config/setup.h \ - ../include/runmalloc.h ../include/h.h ../include/s_debug.h \ - ../include/res.h ../include/list.h ../include/struct.h \ - ../include/whowas.h ../include/dbuf.h ../zlib/zlib.h ../zlib/zconf.h \ + ../include/ircd_defs.h ../include/runmalloc.h ../include/h.h \ + ../include/s_debug.h ../include/res.h ../include/list.h \ + ../include/struct.h ../include/whowas.h ../include/dbuf.h \ ../include/common.h ../include/send.h ../include/s_bsd.h \ ../include/s_conf.h ../include/s_misc.h ../include/s_serv.h \ ../include/support.h ../include/ircd.h ../include/s_auth.h \ ../include/sprintf_irc.h +s_bdd.o: s_bdd.c ../include/sys.h ../config/config.h ../config/setup.h \ + ../include/ircd_defs.h ../include/runmalloc.h ../include/h.h \ + ../include/s_debug.h ../include/struct.h ../include/whowas.h \ + ../include/dbuf.h ../include/ircd.h ../include/s_serv.h \ + ../include/s_misc.h ../include/sprintf_irc.h ../include/send.h \ + ../include/s_err.h ../include/numeric.h ../include/s_bsd.h \ + ../include/s_conf.h ../include/list.h ../include/hash.h \ + ../include/common.h ../include/match.h ../include/crule.h \ + ../include/parse.h ../include/numnicks.h ../include/userload.h \ + ../include/s_user.h ../include/channel.h ../include/querycmds.h \ + ../include/IPcheck.h ../include/s_bdd.h ../include/msg.h \ + ../include/support.h s_bsd.o: s_bsd.c ../include/sys.h ../config/config.h ../config/setup.h \ - ../include/runmalloc.h ../include/h.h ../include/s_debug.h \ - ../include/res.h ../include/list.h ../include/struct.h \ - ../include/whowas.h ../include/dbuf.h ../zlib/zlib.h ../zlib/zconf.h \ + ../include/ircd_defs.h ../include/runmalloc.h ../include/h.h \ + ../include/s_debug.h ../include/res.h ../include/list.h \ + ../include/struct.h ../include/whowas.h ../include/dbuf.h \ ../include/s_bsd.h ../include/s_conf.h ../include/s_serv.h \ ../include/numeric.h ../include/send.h ../include/s_bdd.h \ ../include/s_misc.h ../include/hash.h ../include/s_err.h \ @@ -384,31 +451,32 @@ ../include/s_user.h ../include/sprintf_irc.h ../include/querycmds.h \ ../include/IPcheck.h ../include/s_socks.h ../include/msg.h s_conf.o: s_conf.c ../include/sys.h ../config/config.h ../config/setup.h \ - ../include/runmalloc.h ../include/h.h ../include/s_debug.h \ - ../include/struct.h ../include/whowas.h ../include/dbuf.h \ - ../zlib/zlib.h ../zlib/zconf.h ../include/s_serv.h \ - ../include/opercmds.h ../include/numeric.h ../include/send.h \ - ../include/s_conf.h ../include/list.h ../include/class.h \ - ../include/s_misc.h ../include/match.h ../include/common.h \ - ../include/s_err.h ../include/s_bsd.h ../include/ircd.h \ - ../include/crule.h ../include/res.h ../include/support.h \ - ../include/parse.h ../include/numnicks.h ../include/sprintf_irc.h \ - ../include/IPcheck.h ../include/hash.h ../include/fileio.h -s_debug.o: s_debug.c ../include/sys.h ../config/config.h \ - ../config/setup.h ../include/runmalloc.h ../include/h.h \ + ../include/ircd_defs.h ../include/runmalloc.h ../include/h.h \ ../include/s_debug.h ../include/struct.h ../include/whowas.h \ - ../include/dbuf.h ../zlib/zlib.h ../zlib/zconf.h ../include/numeric.h \ - ../include/hash.h ../include/s_serv.h ../include/send.h \ - ../include/s_conf.h ../include/list.h ../include/class.h \ - ../include/ircd.h ../include/s_bsd.h ../include/bsd.h ../include/res.h \ - ../include/channel.h ../include/numnicks.h + ../include/dbuf.h ../include/s_serv.h ../include/opercmds.h \ + ../include/numeric.h ../include/send.h ../include/s_conf.h \ + ../include/list.h ../include/class.h ../include/s_misc.h \ + ../include/match.h ../include/common.h ../include/s_err.h \ + ../include/s_bsd.h ../include/ircd.h ../include/crule.h \ + ../include/res.h ../include/support.h ../include/parse.h \ + ../include/numnicks.h ../include/sprintf_irc.h ../include/IPcheck.h \ + ../include/hash.h ../include/fileio.h +s_debug.o: s_debug.c ../include/channel.h ../include/ircd_defs.h \ + ../include/h.h ../include/s_debug.h ../config/config.h \ + ../config/setup.h ../include/class.h ../include/hash.h \ + ../include/ircd_osdep.h ../include/ircd.h ../include/struct.h \ + ../include/whowas.h ../include/dbuf.h ../include/runmalloc.h \ + ../include/list.h ../include/numeric.h ../include/numnicks.h \ + ../include/res.h ../include/s_bsd.h ../include/s_conf.h \ + ../include/send.h ../include/sys.h ../include/bsd.h ../include/s_serv.h s_err.o: s_err.c ../include/sys.h ../config/config.h ../config/setup.h \ - ../include/runmalloc.h ../include/h.h ../i... [truncated message content] |