irc-dev-cvs Mailing List for IRC-Dev ircd development (Page 12)
Brought to you by:
zolty
You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(22) |
Sep
|
Oct
(2) |
Nov
|
Dec
(2) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(30) |
Feb
(4) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(27) |
Dec
(17) |
2004 |
Jan
|
Feb
(4) |
Mar
|
Apr
(4) |
May
(8) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(14) |
Dec
(2) |
2005 |
Jan
(18) |
Feb
(2) |
Mar
(12) |
Apr
(18) |
May
(16) |
Jun
(3) |
Jul
(2) |
Aug
|
Sep
(3) |
Oct
(9) |
Nov
|
Dec
|
2007 |
Jan
|
Feb
|
Mar
|
Apr
(8) |
May
|
Jun
|
Jul
(3) |
Aug
|
Sep
(5) |
Oct
|
Nov
(3) |
Dec
(2) |
2008 |
Jan
(6) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(4) |
Jul
(8) |
Aug
(14) |
Sep
(4) |
Oct
(11) |
Nov
(1) |
Dec
|
Update of /cvsroot/irc-dev/ircdh/ircd In directory usw-pr-cvs1:/tmp/cvs-serv1402/ircdh/ircd Modified Files: IPcheck.c Makefile.in hash.c ircd.c ircd_log.c ircd_signal.c list.c map.c opercmds.c os_bsd.c os_generic.c os_linux.c os_solaris.c querycmds.c s_auth.c s_bsd.c s_conf.c s_debug.c s_misc.c s_serv.c s_user.c send.c support.c Log Message: Make indent Index: IPcheck.c =================================================================== RCS file: /cvsroot/irc-dev/ircdh/ircd/IPcheck.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- IPcheck.c 15 Aug 2002 20:55:23 -0000 1.2 +++ IPcheck.c 18 Aug 2002 22:59:22 -0000 1.3 @@ -179,7 +179,8 @@ /* Make ever 10000 disconnects an estimation of the average vector length */ count = 10000; average_length = - (UserStats.clients + UserStats.unknowns + UserStats.local_servers) / HASHTABSIZE; + (UserStats.clients + UserStats.unknowns + + UserStats.local_servers) / HASHTABSIZE; } /* Now check the new element (last) that was moved to this position */ continue; @@ -213,7 +214,8 @@ /* Make ever 10000 disconnects an estimation of the average vector length */ count = 10000; average_length = - (UserStats.clients + UserStats.unknowns + UserStats.local_servers) / HASHTABSIZE; + (UserStats.clients + UserStats.unknowns + + UserStats.local_servers) / HASHTABSIZE; } } else if (CONNECTED_SINCE(curr) > 120U && HAS_TARGETS(curr)) @@ -341,7 +343,8 @@ if (clones) cptr->nexttarget = CurrentTime - (TARGET_DELAY * (STARTTARGETS - 1)); else - cptr->nexttarget = CurrentTime - (TARGET_DELAY * (FREE_TARGETS(entry) - 1)); + cptr->nexttarget = + CurrentTime - (TARGET_DELAY * (FREE_TARGETS(entry) - 1)); #else cptr->nexttarget = CurrentTime - (TARGET_DELAY * (FREE_TARGETS(entry) - 1)); #endif @@ -596,7 +599,7 @@ if ((entry = IPregistry_find(hash, cptr->ip))) { tiempo = (CurrentTime & 0xffffff) - entry->ultimo_chequeo; /* 24 bits. Debe coincidir con el taman~o de la estructura - */ + */ #if defined(BDD) && defined(BDD_CLONES) if (IPbusca_clones_cptr(cptr) != -1) /* HIT! */ Index: Makefile.in =================================================================== RCS file: /cvsroot/irc-dev/ircdh/ircd/Makefile.in,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Makefile.in 18 Aug 2002 22:49:41 -0000 1.4 +++ Makefile.in 18 Aug 2002 22:59:22 -0000 1.5 @@ -328,11 +328,11 @@ ../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_osdep.o: ircd_osdep.c ../include/ircd_osdep.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 \ Index: hash.c =================================================================== RCS file: /cvsroot/irc-dev/ircdh/ircd/hash.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- hash.c 15 Aug 2002 20:55:24 -0000 1.2 +++ hash.c 18 Aug 2002 22:59:22 -0000 1.3 @@ -190,7 +190,7 @@ { channelTable[l] = (struct Channel *)NULL; clientTable[l] = (struct Client *)NULL; - watchTable[l] = (struct Watch *) NULL; + watchTable[l] = (struct Watch *)NULL; }; /* Here is to what we "map" a char before working on it */ @@ -629,4 +629,3 @@ /* return wptr; */ } - Index: ircd.c =================================================================== RCS file: /cvsroot/irc-dev/ircdh/ircd/ircd.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- ircd.c 18 Aug 2002 22:49:42 -0000 1.3 +++ ircd.c 18 Aug 2002 22:59:22 -0000 1.4 @@ -28,7 +28,7 @@ #include "crule.h" #include "hash.h" #if 0 -#include "ircd_alloc.h" /* set_nomem_handler */ +#include "ircd_alloc.h" /* set_nomem_handler */ #endif #include "ircd_defs.h" #include "ircd_log.h" @@ -81,12 +81,12 @@ extern void init_counters(void); -struct Client me; /* That's me */ +struct Client me; /* That's me */ struct Client *GlobalClientList = &me; /* Pointer to beginning of Client list */ -time_t TSoffset = 0; /* Offset of timestamps to system clock */ -int GlobalRehashFlag = 0; /* do a rehash if set */ -int GlobalRestartFlag = 0; /* do a restart if set */ -time_t CurrentTime; /* Updated every time we leave select() */ +time_t TSoffset = 0; /* Offset of timestamps to system clock */ +int GlobalRehashFlag = 0; /* do a rehash if set */ +int GlobalRestartFlag = 0; /* do a restart if set */ +time_t CurrentTime; /* Updated every time we leave select() */ char **myargv; char *configfile = CPATH; /* Server configuration file */ @@ -102,7 +102,7 @@ int pid_fd = -1; /* We'll get an advisory lock in check_pid */ -unsigned short int portnum = 0; /* Server port number, listening this OBSOLETO */ +unsigned short int portnum = 0; /* Server port number, listening this OBSOLETO */ #ifdef PROFIL extern etext(void); #endif @@ -136,7 +136,7 @@ Debug((DEBUG_FATAL, "Couldn't restart server \"%s\": %s", - SPATH, (strerror(errno)) ? strerror(errno) : "")); + SPATH, (strerror(errno)) ? strerror(errno) : "")); exit(-1); } @@ -153,7 +153,8 @@ static int restarting = 0; ircd_log(L_WARNING, "Restarting Server: %s", message); - if (restarting == 0) { + if (restarting == 0) + { restarting = 1; server_reboot(message); } @@ -164,14 +165,15 @@ { Debug((DEBUG_FATAL, "Out of memory: restarting server...")); server_restart("Out of Memory"); -} +} #endif static void write_pidfile(void) { #ifdef PPATH char buff[20]; - if (pid_fd >= 0) { + if (pid_fd >= 0) + { memset(buff, 0, sizeof(buff)); sprintf(buff, "%5d\n", (int)getpid()); if (write(pid_fd, buff, strlen(buff)) == -1) @@ -179,7 +181,7 @@ return; } Debug((DEBUG_NOTICE, "Error opening pid file \"%s\": %s", - PPATH, (strerror(errno)) ? strerror(errno) : "")); + PPATH, (strerror(errno)) ? strerror(errno) : "")); #endif } @@ -323,7 +325,8 @@ #endif ping = IsRegistered(cptr) ? get_client_ping(cptr) : CONNECTTIMEOUT; Debug((DEBUG_DEBUG, "c(%s)=%d p %d r %d a %d", - cptr->name, cptr->status, ping, rflag, (int)(CurrentTime - cptr->lasttime))); + cptr->name, cptr->status, ping, rflag, + (int)(CurrentTime - cptr->lasttime))); /* * Ok, so goto's are ugly and can be avoided here but this code * is already indented enough so I think its justified. -avalon @@ -438,7 +441,7 @@ else sendto_one(cptr, "%s PING :%s", NumServ(&me), me.name); #else - sendto_one(cptr, "%s " TOK_PING " :%s", NumServ(&me), me.name); + sendto_one(cptr, "%s " TOK_PING " :%s", NumServ(&me), me.name); #endif } } @@ -744,7 +747,8 @@ portnum = PORTNUM; me.port = portnum; init_sys(); - if (check_pid()) { + if (check_pid()) + { Debug((DEBUG_FATAL, "Failed to acquire PID file lock after fork")); exit(2); } Index: ircd_log.c =================================================================== RCS file: /cvsroot/irc-dev/ircdh/ircd/ircd_log.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ircd_log.c 18 Aug 2002 22:49:42 -0000 1.1 +++ ircd_log.c 18 Aug 2002 22:59:22 -0000 1.2 @@ -39,7 +39,7 @@ #include <syslog.h> #include <unistd.h> -#define LOG_BUFSIZE 2048 +#define LOG_BUFSIZE 2048 static int logLevel = L_INFO; @@ -103,34 +103,33 @@ int get_log_level(void) { - return(logLevel); + 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) + const char *inpath, const char *path) { - if (MyUser(victim)) { + 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); + "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); + "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); + killer->name, victim->name, inpath, path); } - - Index: ircd_signal.c =================================================================== RCS file: /cvsroot/irc-dev/ircdh/ircd/ircd_signal.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ircd_signal.c 18 Aug 2002 22:49:42 -0000 1.1 +++ ircd_signal.c 18 Aug 2002 22:59:22 -0000 1.2 @@ -99,5 +99,3 @@ siginterrupt(SIGALRM, 1); #endif } - - Index: list.c =================================================================== RCS file: /cvsroot/irc-dev/ircdh/ircd/list.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- list.c 18 Aug 2002 22:49:42 -0000 1.3 +++ list.c 18 Aug 2002 22:59:22 -0000 1.4 @@ -43,8 +43,7 @@ #ifdef DEBUGMODE static struct liststats { int inuse; -} cloc, crem, users, servs, links, classs, aconfs, watchs - ; +} cloc, crem, users, servs, links, classs, aconfs, watchs; #endif void outofmemory(); @@ -515,7 +514,7 @@ if (BadPtr(nick)) return NULL; - wptr = (struct Watch *) RunMalloc(sizeof(struct Watch)); + wptr = (struct Watch *)RunMalloc(sizeof(struct Watch)); if (!wptr) outofmemory(); memset(wptr, 0, sizeof(struct Watch)); Index: map.c =================================================================== RCS file: /cvsroot/irc-dev/ircdh/ircd/map.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- map.c 15 Aug 2002 20:55:24 -0000 1.2 +++ map.c 18 Aug 2002 22:59:22 -0000 1.3 @@ -66,7 +66,8 @@ sprintf(buf, "%s:%d", NumServ(server), base64toint(NumServ(server))); clientes_float = (int)((1000.0 * (server == - &me ? UserStats.local_clients : server->serv->clients)) / clientes + 0.5); + &me ? UserStats.local_clients : server->serv->clients)) / clientes + + 0.5); sendto_one(cptr, rpl_str(RPL_MAP), me.name, cptr->name, prompt, ((IsBurstOrBurstAck(server)) ? "*" : ""), server->name, buf, lag, (server == &me) ? UserStats.local_clients : server->serv->clients, Index: opercmds.c =================================================================== RCS file: /cvsroot/irc-dev/ircdh/ircd/opercmds.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- opercmds.c 18 Aug 2002 22:49:42 -0000 1.5 +++ opercmds.c 18 Aug 2002 22:59:22 -0000 1.6 @@ -1521,13 +1521,15 @@ link_u[i], acptr->name, acptr->serv->by, acptr->serv->user->username, acptr->serv->user->host, - CurrentTime - acptr->lasttime, CurrentTime - acptr->serv->timestamp); + CurrentTime - acptr->lasttime, + CurrentTime - acptr->serv->timestamp); else sendto_one(sptr, rpl_str(RPL_TRACESERVER), me.name, parv[0], conClass, link_s[i], link_u[i], acptr->name, *(acptr->serv->by) ? acptr->serv->by : "*", "*", me.name, - CurrentTime - acptr->lasttime, CurrentTime - acptr->serv->timestamp); + CurrentTime - acptr->lasttime, + CurrentTime - acptr->serv->timestamp); cnt++; break; case STAT_LOG: Index: os_bsd.c =================================================================== RCS file: /cvsroot/irc-dev/ircdh/ircd/os_bsd.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- os_bsd.c 18 Aug 2002 22:49:42 -0000 1.1 +++ os_bsd.c 18 Aug 2002 22:59:22 -0000 1.2 @@ -76,30 +76,30 @@ 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); + 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); + 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); + 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); - + (*enumerator) (cptr, buf); + sprintf(buf, "Msg Rcv %ld Send %ld", rus.ru_msgrcv, rus.ru_msgsnd); - (*enumerator)(cptr, buf); + (*enumerator) (cptr, buf); sprintf(buf, "Signals %ld Context Vol. %ld Invol %ld", - rus.ru_nsignals, rus.ru_nvcsw, rus.ru_nivcsw); - (*enumerator)(cptr, buf); + rus.ru_nsignals, rus.ru_nvcsw, rus.ru_nivcsw); + (*enumerator) (cptr, buf); #else /* HAVE_GETRUSAGE */ #if HAVE_TIMES @@ -126,9 +126,9 @@ 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); + 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; @@ -136,7 +136,7 @@ int os_get_sockerr(int fd) { - int err = 0; + int err = 0; #if defined(SO_ERROR) unsigned int len = sizeof(err); getsockopt(fd, SOL_SOCKET, SO_ERROR, &err, &len); @@ -194,17 +194,17 @@ int os_set_reuseaddr(int fd) { unsigned int opt = 1; - return (0 == setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, - (const char*) &opt, sizeof(opt))); + 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))); + 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) @@ -239,18 +239,19 @@ #if defined(HAVE_SETRLIMIT) && defined(RLIMIT_FD_MAX) struct rlimit limit; - if (!getrlimit(RLIMIT_FD_MAX, &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 */ + 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) +IOResult os_recv_nonb(int fd, char *buf, unsigned int length, + unsigned int *count_out) { int res; assert(0 != buf); @@ -258,16 +259,18 @@ *count_out = 0; errno = 0; - if (0 < (res = recv(fd, buf, length, 0))) { - *count_out = (unsigned) res; + if (0 < (res = recv(fd, buf, length, 0))) + { + *count_out = (unsigned)res; return IO_SUCCESS; } - else if (res < 0) { + else if (res < 0) + { if (EWOULDBLOCK == errno || EAGAIN == errno) return IO_BLOCKED; else return IO_FAILURE; - } + } /* * 0 == client closed the connection * < 1 == error @@ -275,10 +278,10 @@ return IO_FAILURE; } -IOResult os_recvfrom_nonb(int fd, char* buf, unsigned int length, - unsigned int* length_out, struct sockaddr_in* sin_out) +IOResult os_recvfrom_nonb(int fd, char *buf, unsigned int length, + unsigned int *length_out, struct sockaddr_in * sin_out) { - int res; + int res; unsigned int len = sizeof(struct sockaddr_in); assert(0 != buf); assert(0 != length_out); @@ -286,8 +289,9 @@ errno = 0; *length_out = 0; - res = recvfrom(fd, buf, length, 0, (struct sockaddr*) sin_out, &len); - if (-1 == res) { + 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; @@ -296,8 +300,8 @@ return IO_SUCCESS; } -IOResult os_send_nonb(int fd, const char* buf, unsigned int length, - unsigned int* count_out) +IOResult os_send_nonb(int fd, const char *buf, unsigned int length, + unsigned int *count_out) { int res; assert(0 != buf); @@ -305,42 +309,42 @@ *count_out = 0; errno = 0; - if (-1 < (res = send(fd, buf, length, 0))) { - *count_out = (unsigned) res; + 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) + 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) +int os_connect_nonb(int fd, const struct sockaddr_in *sin) { - if (connect(fd, (struct sockaddr*) sin, sizeof(struct sockaddr_in))) { + 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 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)); + return (0 == getsockname(fd, (struct sockaddr *)sin_out, &len)); } -int os_get_peername(int fd, struct sockaddr_in* sin_out) +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)); + return (0 == getpeername(fd, (struct sockaddr *)sin_out, &len)); } int os_set_listen(int fd, int backlog) { return (0 == listen(fd, backlog)); } - - Index: os_generic.c =================================================================== RCS file: /cvsroot/irc-dev/ircdh/ircd/os_generic.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- os_generic.c 18 Aug 2002 22:49:42 -0000 1.1 +++ os_generic.c 18 Aug 2002 22:59:22 -0000 1.2 @@ -79,30 +79,30 @@ 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); + 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); + 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); + 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); - + (*enumerator) (cptr, buf); + sprintf(buf, "Msg Rcv %ld Send %ld", rus.ru_msgrcv, rus.ru_msgsnd); - (*enumerator)(cptr, buf); + (*enumerator) (cptr, buf); sprintf(buf, "Signals %ld Context Vol. %ld Invol %ld", - rus.ru_nsignals, rus.ru_nvcsw, rus.ru_nivcsw); - (*enumerator)(cptr, buf); + rus.ru_nsignals, rus.ru_nvcsw, rus.ru_nivcsw); + (*enumerator) (cptr, buf); #else /* HAVE_GETRUSAGE */ #if HAVE_TIMES @@ -129,9 +129,9 @@ 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); + 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; @@ -139,7 +139,7 @@ int os_get_sockerr(int fd) { - int err = 0; + int err = 0; #if defined(SO_ERROR) unsigned int len = sizeof(err); getsockopt(fd, SOL_SOCKET, SO_ERROR, &err, &len); @@ -197,17 +197,17 @@ int os_set_reuseaddr(int fd) { unsigned int opt = 1; - return (0 == setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, - (const char*) &opt, sizeof(opt))); + 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))); + 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) @@ -242,18 +242,19 @@ #if defined(HAVE_SETRLIMIT) && defined(RLIMIT_FD_MAX) struct rlimit limit; - if (!getrlimit(RLIMIT_FD_MAX, &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 */ + 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) +IOResult os_recv_nonb(int fd, char *buf, unsigned int length, + unsigned int *count_out) { int res; assert(0 != buf); @@ -261,16 +262,18 @@ *count_out = 0; errno = 0; - if (0 < (res = recv(fd, buf, length, 0))) { - *count_out = (unsigned) res; + if (0 < (res = recv(fd, buf, length, 0))) + { + *count_out = (unsigned)res; return IO_SUCCESS; } - else if (res < 0) { + else if (res < 0) + { if (EWOULDBLOCK == errno || EAGAIN == errno) return IO_BLOCKED; else return IO_FAILURE; - } + } /* * 0 == client closed the connection * < 1 == error @@ -278,18 +281,19 @@ return IO_FAILURE; } -IOResult os_recvfrom_nonb(int fd, char* buf, unsigned int length, - unsigned int* length_out, struct sockaddr_in* sin_out) +IOResult os_recvfrom_nonb(int fd, char *buf, unsigned int length, + unsigned int *length_out, struct sockaddr_in * sin_out) { - int res; + 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) { + 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; @@ -298,8 +302,8 @@ return IO_SUCCESS; } -IOResult os_send_nonb(int fd, const char* buf, unsigned int length, - unsigned int* count_out) +IOResult os_send_nonb(int fd, const char *buf, unsigned int length, + unsigned int *count_out) { int res; assert(0 != buf); @@ -307,42 +311,42 @@ *count_out = 0; errno = 0; - if (-1 < (res = send(fd, buf, length, 0))) { - *count_out = (unsigned) res; + 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) + 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) +int os_connect_nonb(int fd, const struct sockaddr_in *sin) { - if (connect(fd, (struct sockaddr*) sin, sizeof(struct sockaddr_in))) { + 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 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)); + return (0 == getsockname(fd, (struct sockaddr *)sin_out, &len)); } -int os_get_peername(int fd, struct sockaddr_in* sin_out) +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)); + return (0 == getpeername(fd, (struct sockaddr *)sin_out, &len)); } int os_set_listen(int fd, int backlog) { return (0 == listen(fd, backlog)); } - - Index: os_linux.c =================================================================== RCS file: /cvsroot/irc-dev/ircdh/ircd/os_linux.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- os_linux.c 18 Aug 2002 22:49:42 -0000 1.1 +++ os_linux.c 18 Aug 2002 22:59:22 -0000 1.2 @@ -70,30 +70,30 @@ 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); + 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); + 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); + 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); - + (*enumerator) (cptr, buf); + sprintf(buf, "Msg Rcv %ld Send %ld", rus.ru_msgrcv, rus.ru_msgsnd); - (*enumerator)(cptr, buf); + (*enumerator) (cptr, buf); sprintf(buf, "Signals %ld Context Vol. %ld Invol %ld", - rus.ru_nsignals, rus.ru_nvcsw, rus.ru_nivcsw); - (*enumerator)(cptr, buf); + rus.ru_nsignals, rus.ru_nvcsw, rus.ru_nivcsw); + (*enumerator) (cptr, buf); if (times(&tmsbuf) == -1) return 0; @@ -106,15 +106,15 @@ 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); + 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; + int err = 0; unsigned int len = sizeof(err); getsockopt(fd, SOL_SOCKET, SO_ERROR, &err, &len); return err; @@ -149,7 +149,7 @@ { 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))); + 0 == setsockopt(fd, SOL_SOCKET, SO_SNDBUF, &opt, sizeof(opt))); } int os_disable_options(int fd) @@ -161,10 +161,11 @@ { struct rlimit limit; - if (!getrlimit(RLIMIT_NOFILE, &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 */ + limit.rlim_cur = limit.rlim_max; /* make soft limit the max */ return setrlimit(RLIMIT_NOFILE, &limit); } return 0; @@ -179,8 +180,8 @@ * 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) +IOResult os_recv_nonb(int fd, char *buf, unsigned int length, + unsigned int *count_out) { int res; assert(0 != buf); @@ -188,16 +189,18 @@ *count_out = 0; errno = 0; - if (0 < (res = recv(fd, buf, length, 0))) { - *count_out = (unsigned) res; + if (0 < (res = recv(fd, buf, length, 0))) + { + *count_out = (unsigned)res; return IO_SUCCESS; } - else if (res < 0) { + else if (res < 0) + { if (EWOULDBLOCK == errno || EAGAIN == errno) return IO_BLOCKED; else return IO_FAILURE; - } + } /* * 0 == client closed the connection * < 1 == error @@ -205,18 +208,19 @@ return IO_FAILURE; } -IOResult os_recvfrom_nonb(int fd, char* buf, unsigned int length, - unsigned int* length_out, struct sockaddr_in* sin_out) +IOResult os_recvfrom_nonb(int fd, char *buf, unsigned int length, + unsigned int *length_out, struct sockaddr_in * sin_out) { - int res; + 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) { + 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; @@ -234,8 +238,8 @@ * 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) +IOResult os_send_nonb(int fd, const char *buf, unsigned int length, + unsigned int *count_out) { int res; assert(0 != buf); @@ -243,8 +247,9 @@ *count_out = 0; errno = 0; - if (-1 < (res = send(fd, buf, length, 0))) { - *count_out = (unsigned) res; + if (-1 < (res = send(fd, buf, length, 0))) + { + *count_out = (unsigned)res; return IO_SUCCESS; } else if (EAGAIN == errno || ENOMEM == errno || ENOBUFS == errno) @@ -254,27 +259,28 @@ } -int os_connect_nonb(int fd, const struct sockaddr_in* sin) +int os_connect_nonb(int fd, const struct sockaddr_in *sin) { - if (connect(fd, (const struct sockaddr*) sin, sizeof(struct sockaddr_in))) { + 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) + +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)); + return (0 == getsockname(fd, (struct sockaddr *)sin_out, &len)); } -int os_get_peername(int fd, struct sockaddr_in* sin_out) +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)); + return (0 == getpeername(fd, (struct sockaddr *)sin_out, &len)); } int os_set_listen(int fd, int backlog) @@ -286,4 +292,3 @@ */ return (0 == listen(fd, backlog)); } - Index: os_solaris.c =================================================================== RCS file: /cvsroot/irc-dev/ircdh/ircd/os_solaris.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- os_solaris.c 18 Aug 2002 22:49:42 -0000 1.1 +++ os_solaris.c 18 Aug 2002 22:59:22 -0000 1.2 @@ -46,8 +46,8 @@ char buf[256]; struct rusage rus; time_t secs; - int hz = HZ; - int upticks = uptime * hz; + int hz = HZ; + int upticks = uptime * hz; assert(0 != enumerator); if (getrusage(RUSAGE_SELF, &rus) == -1) @@ -58,30 +58,29 @@ 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); + 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); + 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); + 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); - + (*enumerator) (cptr, buf); + sprintf(buf, "Msg Rcv %ld Send %ld", rus.ru_msgrcv, rus.ru_msgsnd); - (*enumerator)(cptr, buf); + (*enumerator) (cptr, buf); sprintf(buf, "Signals %ld Context Vol. %ld Invol %ld", - rus.ru_nsignals, rus.ru_nvcsw, rus.ru_nivcsw); - (*enumerator)(cptr, buf); + rus.ru_nsignals, rus.ru_nvcsw, rus.ru_nivcsw); + (*enumerator) (cptr, buf); return 1; } @@ -90,7 +89,7 @@ { int err = 0; int len = sizeof(err); - getsockopt(fd, SOL_SOCKET, SO_ERROR, (void*) &err, &len); + getsockopt(fd, SOL_SOCKET, SO_ERROR, (void *)&err, &len); return err; } @@ -115,17 +114,17 @@ int os_set_reuseaddr(int fd) { unsigned int opt = 1; - return (0 == setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, - (const char*) &opt, sizeof(opt))); + 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))); + 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) @@ -137,17 +136,18 @@ { struct rlimit limit; - if (!getrlimit(RLIMIT_NOFILE, &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 */ + 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) +IOResult os_recv_nonb(int fd, char *buf, unsigned int length, + unsigned int *count_out) { int res; assert(0 != buf); @@ -155,17 +155,19 @@ *count_out = 0; errno = 0; - if (0 < (res = recv(fd, buf, length, 0))) { - *count_out = (unsigned) res; + 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) + 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 @@ -173,20 +175,21 @@ return IO_FAILURE; } -IOResult os_recvfrom_nonb(int fd, char* buf, unsigned int length, - unsigned int* length_out, struct sockaddr_in* sin_out) +IOResult os_recvfrom_nonb(int fd, char *buf, unsigned int length, + unsigned int *length_out, struct sockaddr_in * sin_out) { - int res; + 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) + 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; } @@ -194,8 +197,8 @@ return IO_SUCCESS; } -IOResult os_send_nonb(int fd, const char* buf, unsigned int length, - unsigned int* count_out) +IOResult os_send_nonb(int fd, const char *buf, unsigned int length, + unsigned int *count_out) { int res; assert(0 != buf); @@ -203,42 +206,43 @@ *count_out = 0; errno = 0; - if (-1 < (res = send(fd, buf, length, 0))) { - *count_out = (unsigned) res; + 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) + 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) +int os_connect_nonb(int fd, const struct sockaddr_in *sin) { - if (connect(fd, (struct sockaddr*) sin, sizeof(struct sockaddr_in))) { + 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 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)); + return (0 == getsockname(fd, (struct sockaddr *)sin_out, &len)); } -int os_get_peername(int fd, struct sockaddr_in* sin_out) +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)); + return (0 == getpeername(fd, (struct sockaddr *)sin_out, &len)); } int os_set_listen(int fd, int backlog) { return (0 == listen(fd, backlog)); } - Index: querycmds.c =================================================================== RCS file: /cvsroot/irc-dev/ircdh/ircd/querycmds.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- querycmds.c 15 Aug 2002 20:55:24 -0000 1.2 +++ querycmds.c 18 Aug 2002 22:59:22 -0000 1.3 @@ -260,8 +260,8 @@ sendto_one(sptr, rpl_str(RPL_LOCALUSERS), me.name, parv[0], UserStats.local_clients, max_client_count, date(max_client_count_TS)); - sendto_one(sptr, rpl_str(RPL_GLOBALUSERS), me.name, parv[0], UserStats.clients, - max_global_count, date(max_global_count_TS)); + sendto_one(sptr, rpl_str(RPL_GLOBALUSERS), me.name, parv[0], + UserStats.clients, max_global_count, date(max_global_count_TS)); return 0; } @@ -281,7 +281,8 @@ return 0; sendto_one(sptr, rpl_str(RPL_LUSERCLIENT), me.name, parv[0], - UserStats.clients - UserStats.inv_clients, UserStats.inv_clients, UserStats.servers); + UserStats.clients - UserStats.inv_clients, UserStats.inv_clients, + UserStats.servers); if (UserStats.opers) sendto_one(sptr, rpl_str(RPL_LUSEROP), me.name, parv[0], UserStats.opers); if (UserStats.unknowns > 0) @@ -290,8 +291,8 @@ if (UserStats.channels > 0) sendto_one(sptr, rpl_str(RPL_LUSERCHANNELS), me.name, parv[0], UserStats.channels); - sendto_one(sptr, rpl_str(RPL_LUSERME), me.name, parv[0], UserStats.local_clients, - UserStats.local_servers); + sendto_one(sptr, rpl_str(RPL_LUSERME), me.name, parv[0], + UserStats.local_clients, UserStats.local_servers); return 0; } Index: s_auth.c =================================================================== RCS file: /cvsroot/irc-dev/ircdh/ircd/s_auth.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- s_auth.c 18 Aug 2002 22:49:42 -0000 1.3 +++ s_auth.c 18 Aug 2002 22:59:22 -0000 1.4 @@ -41,7 +41,7 @@ #ifdef USE_SYSLOG #include <syslog.h> #endif -#include <errno.h> +#include <errno.h> #include "h.h" #include "res.h" #include "struct.h" Index: s_bsd.c =================================================================== RCS file: /cvsroot/irc-dev/ircdh/ircd/s_bsd.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- s_bsd.c 18 Aug 2002 22:49:42 -0000 1.4 +++ s_bsd.c 18 Aug 2002 22:59:22 -0000 1.5 @@ -64,7 +64,7 @@ #include <arpa/inet.h> #include <arpa/nameser.h> #include <resolv.h> -#include <errno.h> +#include <errno.h> #include <fcntl.h> #include "h.h" #include "res.h" Index: s_conf.c =================================================================== RCS file: /cvsroot/irc-dev/ircdh/ircd/s_conf.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- s_conf.c 18 Aug 2002 22:49:42 -0000 1.5 +++ s_conf.c 18 Aug 2002 22:59:22 -0000 1.6 @@ -491,7 +491,7 @@ * find a conf entry which matches the hostname and has the same name. */ struct ConfItem *find_conf_exact(const char *name, const char *user, - const char *host, int statmask) + const char *host, int statmask) { Reg1 aConfItem *tmp; char userhost[USERLEN + HOSTLEN + 3]; @@ -604,7 +604,8 @@ { Reg1 aConfItem *bconf; - for (bconf = GlobalConfList, mask &= ~CONF_ILLEGAL; bconf; bconf = bconf->next) + for (bconf = GlobalConfList, mask &= ~CONF_ILLEGAL; bconf; + bconf = bconf->next) { if (!(bconf->status & mask) || (bconf->port != aconf->port)) continue; @@ -1235,7 +1236,7 @@ for (tmp = GlobalConfList; tmp; tmp = tmp->next) if (tmp->status == CONF_TLINES && tmp->host && tmp->passwd) { - temp = (struct TRecord *) RunMalloc(sizeof(struct TRecord)); + temp = (struct TRecord *)RunMalloc(sizeof(struct TRecord)); if (!temp) outofmemory(); temp->hostmask = tmp->host; Index: s_debug.c =================================================================== RCS file: /cvsroot/irc-dev/ircdh/ircd/s_debug.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- s_debug.c 18 Aug 2002 22:49:43 -0000 1.3 +++ s_debug.c 18 Aug 2002 22:59:22 -0000 1.4 @@ -47,7 +47,7 @@ #include <errno.h> #include <fcntl.h> #include <stdarg.h> -#include <stddef.h> /* offsetof */ +#include <stddef.h> /* offsetof */ #include <stdio.h> #include <string.h> #include <unistd.h> @@ -351,20 +351,24 @@ void open_debugfile(void) { #ifdef DEBUGMODE - if (debuglevel >= 0) { + if (debuglevel >= 0) + { printf("isatty = %d ttyname = %#x\n", isatty(2), (unsigned int)ttyname(2)); - if (!(bootopt & BOOT_TTY)) { + if (!(bootopt & BOOT_TTY)) + { int fd; /* * leave debugging output on fd 2 */ - if ((fd = open(LOGFILE, O_CREAT | O_WRONLY | O_APPEND, 0600)) < 0) { - if ((fd = open("/dev/null", O_WRONLY)) < 0) - exit(-1); + if ((fd = open(LOGFILE, O_CREAT | O_WRONLY | O_APPEND, 0600)) < 0) + { + if ((fd = open("/dev/null", O_WRONLY)) < 0) + exit(-1); } - if (fd != 2) { - dup2(fd, 2); - close(fd); + if (fd != 2) + { + dup2(fd, 2); + close(fd); } } } @@ -432,7 +436,7 @@ struct ConfClass *cltmp; #if 0 struct Watch *watch; - struct Membership *member; + struct Membership *member; #endif int lc = 0, /* local clients */ @@ -447,7 +451,7 @@ cl = 0, /* classes */ co = 0; /* conf lines */ #if 0 - wt = 0, /* watch entries */ + wt = 0, /* watch entries */ memberships = 0; /* channel memberships */ #endif @@ -549,9 +553,9 @@ usi * sizeof(struct SLink)); #if 0 sendto_one(cptr, - ":%s %d %s :User channels %d(" SIZE_T_FMT ") Aways %d(" SIZE_T_FMT ")", - me.name, RPL_STATSDEBUG, nick, memberships, - memberships * sizeof(struct Membership), aw, awm); + ":%s %d %s :User channels %d(" SIZE_T_FMT ") Aways %d(" SIZE_T_FMT ")", + me.name, RPL_STATSDEBUG, nick, memberships, + memberships * sizeof(struct Membership), aw, awm); #else sendto_one(cptr, ":%s %d %s :User channels %d(" SIZE_T_FMT ") Aways %d(" SIZE_T_FMT ")", @@ -560,7 +564,8 @@ sendto_one(cptr, ":%s %d %s :Attached confs %d(" SIZE_T_FMT ")", me.name, RPL_STATSDEBUG, nick, lcc, lcc * sizeof(struct SLink)); - totcl = lcm + rcm + us * sizeof(struct User) + usc * sizeof(struct SLink) + awm; + totcl = + lcm + rcm + us * sizeof(struct User) + usc * sizeof(struct SLink) + awm; totcl += lcc * sizeof(struct SLink) + usi * sizeof(struct SLink); sendto_one(cptr, ":%s %d %s :Conflines %d(" SIZE_T_FMT ")", Index: s_misc.c =================================================================== RCS file: /cvsroot/irc-dev/ircdh/ircd/s_misc.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- s_misc.c 15 Aug 2002 20:55:24 -0000 1.2 +++ s_misc.c 18 Aug 2002 22:59:22 -0000 1.3 @@ -97,7 +97,7 @@ * stats stuff */ static struct ServerStatistics ircst; -struct ServerStatistics* ServerStats = &ircst; +struct ServerStatistics *ServerStats = &ircst; char *date(time_t clock) { @@ -358,11 +358,11 @@ * --Run */ int exit_client(struct Client *cptr, /* Connection being handled by - read_message right now */ - struct Client *bcptr, /* Client being killed */ - struct Client *sptr, /* The client that made the decision + read_message right now */ + struct Client *bcptr, /* Client being killed */ + struct Client *sptr, /* The client that made the decision to remove this one, never NULL */ - const char *comment) /* Reason for the exit */ + const char *comment) /* Reason for the exit */ { Reg1 aClient *acptr; Reg3 struct DLink *dlp; @@ -500,8 +500,8 @@ /* * Exit client with formatted message, added 25-9-94 by Run */ -int vexit_client_msg(struct Client *cptr, struct Client *bcptr, struct Client *sptr, - const char *pattern, va_list vl) +int vexit_client_msg(struct Client *cptr, struct Client *bcptr, + struct Client *sptr, const char *pattern, va_list vl) { char msgbuf[1024]; vsprintf_irc(msgbuf, pattern, vl); Index: s_serv.c =================================================================== RCS file: /cvsroot/irc-dev/ircdh/ircd/s_serv.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- s_serv.c 15 Aug 2002 20:55:24 -0000 1.2 +++ s_serv.c 18 Aug 2002 22:59:22 -0000 1.3 @@ -647,7 +647,7 @@ * at the second youngest link, assuming it isn't * a REAL loop. */ - ghost = CurrentTime; /* Mark that it caused a ghost */ + ghost = CurrentTime; /* Mark that it caused a ghost */ if (exit_client(cptr, acptr, &me, "Ghost") == CPTR_KILLED) return CPTR_KILLED; break; Index: s_user.c =================================================================== RCS file: /cvsroot/irc-dev/ircdh/ircd/s_user.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- s_user.c 15 Aug 2002 20:55:24 -0000 1.5 +++ s_user.c 18 Aug 2002 22:59:22 -0000 1.6 @@ -1150,7 +1150,8 @@ * --zoltan */ - if (hacer_ghost && MyConnect(sptr) && (reg) && (CurrentTime >= cptr->nextnick)) + if (hacer_ghost && MyConnect(sptr) && (reg) + && (CurrentTime >= cptr->nextnick)) { if (parc >= 3) clave_ok = verifica_clave_nick(reg->clave, reg->valor, parv[2]); @@ -1936,7 +1937,8 @@ { #ifdef GODMODE sendto_one(sptr, ":%s NOTICE %s :New target: %s; ft " TIME_T_FMT, - me.name, sptr->name, name, (CurrentTime - sptr->nexttarget) / TARGET_DELAY); + me.name, sptr->name, name, + (CurrentTime - sptr->nexttarget) / TARGET_DELAY); #endif sptr->nexttarget += TARGET_DELAY; if (sptr->nexttarget < CurrentTime - (TARGET_DELAY * (MAXTARGETS - 1))) Index: send.c =================================================================== RCS file: /cvsroot/irc-dev/ircdh/ircd/send.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- send.c 18 Aug 2002 22:49:43 -0000 1.3 +++ send.c 18 Aug 2002 22:59:22 -0000 1.4 @@ -98,12 +98,15 @@ void flush_connections(struct Client *cptr) { - if (cptr) { + if (cptr) + { send_queued(cptr); } - else { + else + { int i; - for (i = highest_fd; i >= 0; i--) { + for (i = highest_fd; i >= 0; i--) + { if ((cptr = loc_clients[i])) send_queued(cptr); } Index: support.c =================================================================== RCS file: /cvsroot/irc-dev/ircdh/ircd/support.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- support.c 18 Aug 2002 22:49:43 -0000 1.2 +++ support.c 18 Aug 2002 22:59:22 -0000 1.3 @@ -128,6 +128,7 @@ return buf; } + #if 0 #ifndef HAVE_INET_NETOF /* |
Update of /cvsroot/irc-dev/ircdh/include In directory usw-pr-cvs1:/tmp/cvs-serv1402/ircdh/include Modified Files: IPcheck.h channel.h ircd.h ircd_defs.h ircd_log.h ircd_osdep.h ircd_signal.h list.h map.h match.h numeric.h packet.h res.h s_bsd.h s_conf.h s_debug.h s_misc.h s_numeric.h s_user.h send.h support.h userload.h whocmds.h whowas.h Log Message: Make indent Index: IPcheck.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/IPcheck.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- IPcheck.h 15 Aug 2002 20:55:23 -0000 1.2 +++ IPcheck.h 18 Aug 2002 22:59:22 -0000 1.3 @@ -8,11 +8,11 @@ #define INCLUDED_ipcheck_h #ifndef INCLUDED_sys_types_h -#include <sys/types.h> /* time_t, size_t */ +#include <sys/types.h> /* time_t, size_t */ #define INCLUDED_sys_types_h #endif #ifndef INCLUDED_netinet_in_h -#include <netinet/in.h> /* in_addr */ +#include <netinet/in.h> /* in_addr */ #define INCLUDED_netinet_in_h #endif Index: channel.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/channel.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- channel.h 18 Aug 2002 22:49:41 -0000 1.4 +++ channel.h 18 Aug 2002 22:59:22 -0000 1.5 @@ -22,7 +22,7 @@ #ifndef INCLUDED_channel_h #define INCLUDED_channel_h #ifndef INCLUDED_ircd_defs_h -#include "ircd_defs.h" /* NICKLEN */ +#include "ircd_defs.h" /* NICKLEN */ #endif #ifndef INCLUDED_sys_types_h #include <sys/types.h> Index: ircd.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/ircd.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- ircd.h 18 Aug 2002 22:49:41 -0000 1.3 +++ ircd.h 18 Aug 2002 22:59:22 -0000 1.4 @@ -9,10 +9,10 @@ #include "config.h" #endif #ifndef INCLUDED_struct_h -#include "struct.h" /* struct Client */ +#include "struct.h" /* struct Client */ #endif #ifndef INCLUDED_sys_types_h -#include <sys/types.h> /* size_t, time_t */ +#include <sys/types.h> /* size_t, time_t */ #endif #include "runmalloc.h" @@ -58,7 +58,7 @@ extern int GlobalRestartFlag; extern time_t nextping; extern char *configfile; -extern int debuglevel; +extern int debuglevel; extern char *debugmode; /* Borrar cuando sea necesario */ Index: ircd_defs.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/ircd_defs.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ircd_defs.h 15 Aug 2002 20:55:23 -0000 1.1 +++ ircd_defs.h 18 Aug 2002 22:59:22 -0000 1.2 @@ -101,11 +101,10 @@ * BUFSIZE is exactly long enough to hold one protocol message (RFC 1459) * including the line termination (\r\n). */ -#define BUFSIZE 512 /* WARNING: *DONT* CHANGE THIS!!!! */ +#define BUFSIZE 512 /* WARNING: *DONT* CHANGE THIS!!!! */ #define MAXTARGETS 20 #define STARTTARGETS 10 #define RESERVEDTARGETS 12 #endif /* INCLUDED_ircd_defs_h */ - Index: ircd_log.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/ircd_log.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ircd_log.h 18 Aug 2002 22:49:41 -0000 1.1 +++ ircd_log.h 18 Aug 2002 22:59:22 -0000 1.2 @@ -37,11 +37,10 @@ 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 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); +extern void ircd_log_kill(const struct Client *victim, + const struct Client *killer, const char *inpath, const char *path); #endif /* INCLUDED_ircd_log_h */ - Index: ircd_osdep.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/ircd_osdep.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ircd_osdep.h 18 Aug 2002 22:49:41 -0000 1.1 +++ ircd_osdep.h 18 Aug 2002 22:59:22 -0000 1.2 @@ -20,7 +20,7 @@ * 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); +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); @@ -28,12 +28,11 @@ 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); + unsigned int *length_out); extern IOResult os_send_nonb(int fd, const char *buf, unsigned int length, - unsigned int *length_out); + 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); + 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); Index: ircd_signal.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/ircd_signal.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ircd_signal.h 18 Aug 2002 22:49:41 -0000 1.1 +++ ircd_signal.h 18 Aug 2002 22:59:22 -0000 1.2 @@ -9,6 +9,3 @@ extern void setup_signals(void); #endif /* INCLUDED_ircd_signal_h */ - - - Index: list.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/list.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- list.h 15 Aug 2002 20:55:23 -0000 1.2 +++ list.h 18 Aug 2002 22:59:22 -0000 1.3 @@ -6,7 +6,7 @@ #ifndef INCLUDED_list_h #define INCLUDED_list_h #ifndef INCLUDED_sys_types_h -#include <sys/types.h> /* time_t, size_t */ +#include <sys/types.h> /* time_t, size_t */ #define INCLUDED_sys_types_h #endif @@ -95,4 +95,3 @@ extern void free_watch(struct Watch *wptr); #endif /* INCLUDED_list_h */ - Index: map.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/map.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- map.h 15 Aug 2002 20:55:23 -0000 1.2 +++ map.h 18 Aug 2002 22:59:22 -0000 1.3 @@ -15,6 +15,7 @@ /* borrar */ extern int m_map(aClient *cptr, aClient *sptr, int parc, char *parv[]); -void dump_map(struct Client *cptr, struct Client *server, char *mask, int prompt_length); +void dump_map(struct Client *cptr, struct Client *server, char *mask, + int prompt_length); #endif /* INCLUDED_map_h */ Index: match.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/match.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- match.h 15 Aug 2002 20:55:23 -0000 1.2 +++ match.h 18 Aug 2002 22:59:22 -0000 1.3 @@ -6,11 +6,11 @@ #ifndef INCLUDED_match_h #define INCLUDED_match_h #ifndef INCLUDED_sys_types_h -#include <sys/types.h> /* XXX - broken BSD system headers */ +#include <sys/types.h> /* XXX - broken BSD system headers */ #define INCLUDED_sys_types_h #endif #ifndef INCLUDED_netinet_in_h -#include <netinet/in.h> /* struct in_addr */ +#include <netinet/in.h> /* struct in_addr */ #define INCLUDED_netinet_in_h #endif @@ -50,4 +50,3 @@ extern int matchcompIP(struct in_mask *imask, const char *mask); #endif /* INCLUDED_match_h */ - Index: numeric.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/numeric.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- numeric.h 15 Aug 2002 23:10:14 -0000 1.3 +++ numeric.h 18 Aug 2002 22:59:22 -0000 1.4 @@ -133,7 +133,7 @@ #define ERR_NEEDREGGEDNICK 477 /* DalNet & Undernet Extention */ #define ERR_BANLISTFULL 478 /* Undernet extension */ #define ERR_BADCHANNAME 479 /* EFNet extension */ - /* 479 Undernet extension badchan */ + /* 479 Undernet extension badchan */ /* ERR_LINKFAIL 479 Unreal */ /* ERR_CANNOTKNOCK 480 Unreal */ /* ERR_NOULINE 480 Austnet */ @@ -203,7 +203,7 @@ /* ERR_UPASSNOTSET 554 Undernet extension */ /* ERR_LASTERROR 555 Undernet extension */ - + /* * Numberic replies from server commands. * These are currently in the range 200-399. @@ -259,7 +259,7 @@ #define RPL_TOPICWHOTIME 333 /* Undernet extension */ #define RPL_LISTUSAGE 334 /* Undernet extension */ -/* RPL_WHOISACTUALLY 338 Undernet & Dalnet extension */ +/* RPL_WHOISACTUALLY 338 Undernet & Dalnet extension */ /* RPL_CHANPASSOK 338 IRCnet extension */ /* RPL_BADCHANPASS 339 IRCnet & Dalnet extension */ #define RPL_USERIP 340 /* Undernet extension */ Index: packet.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/packet.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- packet.h 15 Aug 2002 20:55:23 -0000 1.2 +++ packet.h 18 Aug 2002 22:59:22 -0000 1.3 @@ -22,4 +22,3 @@ extern int client_dopacket(struct Client *cptr, size_t length); #endif /* INCLUDED_packet_h */ - Index: res.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/res.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- res.h 15 Aug 2002 20:55:23 -0000 1.2 +++ res.h 18 Aug 2002 22:59:22 -0000 1.3 @@ -7,7 +7,7 @@ #define INCLUDED_res_h #ifndef INCLUDED_sys_types_h -#include <sys/types.h> /* time_t */ +#include <sys/types.h> /* time_t */ #define INCLUDED_sys_types_h #endif Index: s_bsd.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/s_bsd.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- s_bsd.h 18 Aug 2002 22:49:41 -0000 1.3 +++ s_bsd.h 18 Aug 2002 22:59:22 -0000 1.4 @@ -9,7 +9,7 @@ //#include "config.h" #endif #ifndef INCLUDED_sys_types_h -#include <sys/types.h> /* size_t, time_t */ +#include <sys/types.h> /* size_t, time_t */ #define INCLUDED_sys_types_h #endif Index: s_conf.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/s_conf.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- s_conf.h 15 Aug 2002 20:55:23 -0000 1.3 +++ s_conf.h 18 Aug 2002 22:59:22 -0000 1.4 @@ -6,7 +6,7 @@ #ifndef INCLUDED_s_conf_h #define INCLUDED_s_conf_h #ifndef INCLUDED_time_h -#include <time.h> /* struct tm */ +#include <time.h> /* struct tm */ #define INCLUDED_time_h #endif #ifndef INCLUDED_sys_types_h @@ -14,7 +14,7 @@ #define INCLUDED_sys_types_h #endif #ifndef INCLUDED_netinet_in_h -#include <netinet/in.h> /* struct in_addr */ +#include <netinet/in.h> /* struct in_addr */ #define INCLUDED_netinet_in_h #endif @@ -125,12 +125,12 @@ /* * Proto types */ -extern struct ConfItem *attach_confs_byhost(struct Client *cptr, - const char *host, int statmask); -extern struct ConfItem *find_conf_byhost(struct SLink* lp, const char *host, - int statmask); -extern struct ConfItem *find_conf_byname(struct SLink* lp, const char *name, - int statmask); +extern struct ConfItem *attach_confs_byhost(struct Client *cptr, + const char *host, int statmask); +extern struct ConfItem *find_conf_byhost(struct SLink *lp, const char *host, + int statmask); +extern struct ConfItem *find_conf_byname(struct SLink *lp, const char *name, + int statmask); extern struct ConfItem *conf_find_server(const char *name); const char *conf_eval_crule(struct ConfItem *conf); @@ -141,10 +141,9 @@ extern struct ConfItem *find_admin(void); extern struct ConfItem *find_me(void); extern struct ConfItem *find_conf_exact(const char *name, - const char *user, - const char *host, int statmask); + const char *user, const char *host, int statmask); extern enum AuthorizationCheckResult conf_check_client(struct Client *cptr); -extern int conf_check_server(struct Client *cptr); +extern int conf_check_server(struct Client *cptr); extern struct ConfItem *find_conf_name(const char *name, int statmask); /* viejos */ @@ -159,7 +158,7 @@ extern aConfItem *attach_confs_host(aClient *cptr, char *host, int statmask); extern aConfItem *find_conf(Link *lp, const char *name, int statmask); extern aConfItem *find_conf_ip(Link *lp, char *ip, char *user, int statmask); -extern struct ConfItem* find_conf_name(const char* name, int statmask); +extern struct ConfItem *find_conf_name(const char *name, int statmask); /* Viejos */ extern int rehash(struct Client *cptr, int sig); @@ -168,7 +167,7 @@ extern int find_kill(struct Client *cptr); extern int find_restrict(struct Client *cptr); extern int m_killcomment(struct Client *sptr, char *parv, char *filename); -extern struct MotdItem *read_motd(const char* motdfile); +extern struct MotdItem *read_motd(const char *motdfile); /* MIRAR */ #ifdef ESNET_NEG Index: s_debug.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/s_debug.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- s_debug.h 18 Aug 2002 22:49:41 -0000 1.3 +++ s_debug.h 18 Aug 2002 22:59:22 -0000 1.4 @@ -9,7 +9,7 @@ #include "config.h" #endif #ifndef INCLUDED_ircd_defs_h -#include "ircd_defs.h" /* Needed for HOSTLEN */ +#include "ircd_defs.h" /* Needed for HOSTLEN */ #endif #ifndef INCLUDED_stdarg_h #include <stdarg.h> Index: s_misc.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/s_misc.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- s_misc.h 15 Aug 2002 20:55:23 -0000 1.2 +++ s_misc.h 18 Aug 2002 22:59:22 -0000 1.3 @@ -6,11 +6,11 @@ #ifndef INCLUDED_s_misc_h #define INCLUDED_s_misc_h #ifndef INCLUDED_stdarg_h -#include <stdarg.h> /* va_list */ +#include <stdarg.h> /* va_list */ #define INCLUDED_stdarg_h #endif #ifndef INCLUDED_sys_types_h -#include <sys/types.h> /* time_t */ +#include <sys/types.h> /* time_t */ #define INCLUDED_sys_types_h #endif @@ -55,7 +55,7 @@ unsigned int is_abad; /* bad auth requests */ unsigned int is_loc; /* local connections made */ unsigned int uping_recv; /* UDP Pings received */ -unsigned int is_udp; /* PROVISIONAL */ + unsigned int is_udp; /* PROVISIONAL */ }; /* @@ -74,7 +74,8 @@ extern char *get_visible_name(aClient *acptr, aClient *sptr); #endif extern int exit_client_msg(aClient *cptr, aClient *bcptr, - aClient *sptr, const char *pattern, ...) __attribute__ ((format(printf, 4, 5))); + aClient *sptr, const char *pattern, ...) + __attribute__ ((format(printf, 4, 5))); /* de momento no extern int exit_client_msg(struct Client *cptr, struct Client *bcptr, struct Client *sptr, const char *pattern, ...); Index: s_numeric.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/s_numeric.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- s_numeric.h 15 Aug 2002 20:55:23 -0000 1.2 +++ s_numeric.h 18 Aug 2002 22:59:22 -0000 1.3 @@ -12,7 +12,7 @@ * Prototypes */ -extern int do_numeric(int numeric, int nnn, struct Client *cptr, struct Client *sptr, - int parc, char *parv[]); +extern int do_numeric(int numeric, int nnn, struct Client *cptr, + struct Client *sptr, int parc, char *parv[]); #endif /* INCLUDED_s_numeric_h */ Index: s_user.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/s_user.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- s_user.h 15 Aug 2002 20:55:23 -0000 1.2 +++ s_user.h 18 Aug 2002 22:59:22 -0000 1.3 @@ -47,7 +47,7 @@ extern struct SLink *opsarray[]; -typedef char* (*InfoFormatter)(struct Client* who, char* buf); +typedef char *(*InfoFormatter) (struct Client * who, char *buf); /* * Prototypes Index: send.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/send.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- send.h 18 Aug 2002 22:49:41 -0000 1.3 +++ send.h 18 Aug 2002 22:59:22 -0000 1.4 @@ -6,8 +6,8 @@ #ifndef INCLUDED_send_h #define INCLUDED_send_h #ifndef INCLUDED_stdarg_h -#include <stdarg.h> /* va_list */ -#define INCLUDED_stdarg_h +#include <stdarg.h> /* va_list */ +#define INCLUDED_stdarg_h #endif #include "h.h" @@ -41,7 +41,7 @@ __attribute__ ((format(printf, 3, 4))); extern void sendto_prefix_one(aClient *to, aClient *from, char *pattern, ...) __attribute__ ((format(printf, 3, 4))); -extern void flush_connections(struct Client* cptr); +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: support.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/support.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- support.h 15 Aug 2002 20:55:23 -0000 1.2 +++ support.h 18 Aug 2002 22:59:22 -0000 1.3 @@ -11,7 +11,7 @@ #endif #if 0 #ifndef INCLUDED_sys_types_h -#include <sys/types.h> /* broken BSD system headers */ +#include <sys/types.h> /* broken BSD system headers */ #define INCLUDED_sys_types_h #endif #endif /* 0 */ Index: userload.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/userload.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- userload.h 15 Aug 2002 20:55:23 -0000 1.2 +++ userload.h 18 Aug 2002 22:59:22 -0000 1.3 @@ -48,4 +48,3 @@ extern struct current_load_st current_load; #endif /* INCLUDED_userload_h */ - Index: whocmds.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/whocmds.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- whocmds.h 15 Aug 2002 20:55:23 -0000 1.2 +++ whocmds.h 18 Aug 2002 22:59:22 -0000 1.3 @@ -87,13 +87,12 @@ /* * Prototypes */ -extern void do_who(struct Client* sptr, struct Client* acptr, struct Channel* repchan, - int fields, char* qrt); +extern void do_who(struct Client *sptr, struct Client *acptr, + struct Channel *repchan, int fields, char *qrt); /* Quitarlo en cuando sea posible */ -extern int m_who(aClient *cptr, aClient *sptr, int parc, char *parv[]); +extern int m_who(aClient *cptr, aClient *sptr, int parc, char *parv[]); extern int m_whois(aClient *cptr, aClient *sptr, int parc, char *parv[]); #endif /* INCLUDED_whocmds_h */ - Index: whowas.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/whowas.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- whowas.h 18 Aug 2002 22:49:41 -0000 1.4 +++ whowas.h 18 Aug 2002 22:59:22 -0000 1.5 @@ -21,7 +21,7 @@ #ifndef INCLUDED_whowas_h #define INCLUDED_whowas_h #ifndef INCLUDED_sys_types_h -#include <sys/types.h> /* size_t */ +#include <sys/types.h> /* size_t */ #define INCLUDED_sys_types_h #endif #include "h.h" @@ -65,7 +65,7 @@ /* * Proto types */ -extern struct Whowas* whowashash[]; +extern struct Whowas *whowashash[]; extern unsigned int hash_whowas_name(const char *name); @@ -75,6 +75,6 @@ extern void initwhowas(void); extern void count_whowas_memory(int *wwu, size_t *wwm, int *wwa, size_t *wwam); -extern int m_whowas(aClient *cptr, aClient *sptr, int parc, char *parv[]); //QUITARLO +extern int m_whowas(aClient *cptr, aClient *sptr, int parc, char *parv[]); //QUITARLO #endif /* INCLUDED_whowas_h */ |
From: Zolty <zo...@us...> - 2002-08-18 22:59:25
|
Update of /cvsroot/irc-dev/ircdh In directory usw-pr-cvs1:/tmp/cvs-serv1402/ircdh Modified Files: CAMBIOS.IRCDEV Log Message: Make indent Index: CAMBIOS.IRCDEV =================================================================== RCS file: /cvsroot/irc-dev/ircdh/CAMBIOS.IRCDEV,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- CAMBIOS.IRCDEV 18 Aug 2002 22:49:41 -0000 1.14 +++ CAMBIOS.IRCDEV 18 Aug 2002 22:59:22 -0000 1.15 @@ -1,4 +1,7 @@ 2002-08-19 Toni Garcia <zo...@ir...> + * "Make indent": A partir de ahora es obligatorio hacer un make indent + ANTES de hacer un commit. + * 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. |
Update of /cvsroot/irc-dev/ircdh In directory usw-pr-cvs1:/tmp/cvs-serv31134/ircdh Modified Files: .cvsignore CAMBIOS.IRCDEV ChangeLog ChangeLog.10 INSTALL configure Added Files: README TODO 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: README --- README for ircu2.10.10.beta Please read this completely before running the server * If you run ircu2.10.10 on the production network and expect more than 1000 local clients to connect you will want to make sure you add -DNDEBUG to the extra CFLAGS setting when you do a make config. * Ircu now uses asserts in a lot of places to insure referential integrity and that impossible situations do not occur. Also memory integrity checking is defaulted to on as well. The asserts and memory checking both use cpu and in the case of memory checking extra memory. We have not had an assert trigger in quite some time but would prefer to leave the checks enabled for beta testing. The asserts insure that if the server is going to core it will do so in well defined places where the problem will be easy to trace, without them the server could core in not so well defined places. If you want to disable the checks, add -DNDEBUG in the extra CFLAGS when you do a make config. * Ircu no longer uses separate C/N lines, the functionality of both has been combined in C:lines, see the example.conf for more information. * Ircu has an different mechanism for defining ports than the previous versions. Please see the example.conf for information on configuring them. Ircu also ignores the port specified on the M:line, you MUST define a server port with a P:line if you want servers to connect to you. * For beta releases, please understand that there may be bugs we haven't found yet, (that's why you're beta testing it in the first place :)). Please report any bugs found in the server to bu...@un... or cod...@un... with as much information as you can provide about how to reproduce the problem. Stack traces for coredumps are usually helpful, however we aren't expecting any of those ;-). * Ircu 2.10.08 is a P10 only server, and cannot be used to host P9 links. On a mostly P10 network this is not a major issue, it does mean that you cannot connect services directly to a 2.10.08 server, but does not preclude it's use as a leaf or a hub. For now, services need to continue to be hosted by 2.10.07 servers. * EXTENDED_NUMERICS is not defined by default, we need to get everyone using 2.10.07 before we can allow it to be turned on anywhere. If you are using 2.10.08 on a network where everyone is up to at least 2.10.07 it is safe to turn them on. We have tested them on testnet and they do work. :) * The masked notices using #*.mask has changed to use $@*.mask instead. Since most of the servers on the net will not understand the new masking mechanism, this probably won't work for a while. The server notice mask ($*.us.undernet.org) still functions properly. This was a trade off between backwards compatibility and the improved protocol, we chose to not maintain backwards compatibility for this command. The #*.mask functionality is easily circumvented, and the command is rarely used it is not considered to be a major issue. * The server no longer sends notices for errors on connections that are suddenly dropped during connection setup. If you really want to see them, we suggest you get a life. :) * Removed: unix domain sockets, uping, m4 preprocessor spawning, dozens of bugs. * New stuff: Added ISUPPORT code to match dalnets. Added connection progress notices. Cleaned up operating system checks. /invite with no arguments lists the channels you're invited to. Many speedups, ipdiffer, faster strncpy, faster inetntoa. Passive lag and numerics now displayed by map command. Server to server tokenization. Much larger TCP windows/kernel buffers for server connections, smaller for clients. Removed BOOT_OPER security hole. Complete listener port specifications including per port virtual hosting and hidden listeners. Default server port for connects (config option). Speed up some channel ops using new Membership struct. Hash table performance stats are available now (basic). Much of the socket code has been rewritten, we now only make one pass through the local client array. Added initial support for PROTOCOL command. Many functions have been made reentrant. Resolver now uses callbacks for all queries. Almost every command that is sent to a server uses full P10 numerics and tokenization, this reduces netburst sizes by at least 10% and many server to server message sizes by 10-50%. Major source code reorginization to support engine model. Parser now uses an indexed table for commands, which elminates the need to do IsServer IsUser IsOper checks and allows much more efficient implementation of user/server/oper command handlers. * For a much longer winded explanation of all this stuff, see the ChangeLog in this directory, or the cvs log at the coder-com web site at http://coder-com.undernet.org/ --- NEW FILE: TODO --- Undernet Server TODO List This list contains things that still need to be done. Remember: Premature optimisation is the root of all evil - Knuth Debugging is at least twice as difficult as programming. So if you write a program that uses all of your ability, you'll never be able to debug it all. High Priority: * something is leaking "a meg a minute" with heap debugging on with 1300+ clients (No idea) Medium Priority: * why do the allocation counts change the first time you rehash after a server boot without changing the conf file: *** Allocations: 416(41848) *** ircd.conf : Rehashing *** Allocations: 424(42006) *** ircd.conf : Rehashing *** Allocations: 424(42006) * Use numeric nicks for numeric replies to remote clients * Finish message handlers. * Clean up ircd.conf processing, lots of sub issues. * Implement PROTOCOL handshaking http://www.xs4all.nl/~carlo17/irc/prot.html * Prepare network code to handle even more connections: http://www.kegel.com/c10k.html * Implement zlib compression for server links. * Cleanups, lots of them. * Document undernet protocol as it is used in doc/rfc1459.unet * Finish tokenization. * Allow for /WHO by IP address. (for finding who's port scanning you for example). Suggested by Nuke Index: .cvsignore =================================================================== RCS file: /cvsroot/irc-dev/ircdh/.cvsignore,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- .cvsignore 26 Jul 2002 21:58:22 -0000 1.1.1.1 +++ .cvsignore 18 Aug 2002 22:49:40 -0000 1.2 @@ -1 +1,2 @@ +makefile Makefile Index: CAMBIOS.IRCDEV =================================================================== RCS file: /cvsroot/irc-dev/ircdh/CAMBIOS.IRCDEV,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- CAMBIOS.IRCDEV 15 Aug 2002 23:10:14 -0000 1.13 +++ CAMBIOS.IRCDEV 18 Aug 2002 22:49:41 -0000 1.14 @@ -1,3 +1,29 @@ +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. + + 2002-08-16 Toni Garcia <zo...@ir...> Documentacion de los numericos utilizados en las redes mundiales para ver los numericos libres y los que estan en conflicto. Index: ChangeLog =================================================================== RCS file: /cvsroot/irc-dev/ircdh/ChangeLog,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- ChangeLog 26 Jul 2002 21:58:22 -0000 1.1.1.1 +++ ChangeLog 18 Aug 2002 22:49:41 -0000 1.2 @@ -1,37 +1,8 @@ # -# ChangeLog for Undernet ircu Servers +# ChangeLog for ircu2.10.10 # # $Id$ # -# Please insert new entries on the top of the list, a one or two line comment -# is sufficient. Please include your name on the entries we know who to blame. -# Please keep lines < 80 chars. -#------------------------------------------------------------------------------- -* Fix bug in extended numerics that set capacity wrong, this does not affect - any servers currently in production, but you must use this version or above - to define them. --Bleep -* Change extended numerics to use original shift mask method and full range - to represent values. --Bleep -* Added hostname hiding compatible with ircu2.10.10 to allow host hiding - for transitioning services, back out pline8 for now. --Bleep -* Fixed default behavior for BADCHAN. supposed to DEFAULT yes, however - should not change each time a make config is done. -- WT -* doc/readme.www: add Runs link update patch for linux info. --Bleep -* channel.c, channel.h: add David M's fixup for local channel oper overrides. - --Bleep -* s_misc.c (date): add Runs Y2K patch --Bleep -* hash.c (hChangeClient): bug fix. If the client pointer matched the first - pointer in the bucket, the change was ignored (returned 0), leaving stale - values in the hash table, eventually causing the server to die for mysterious - reasons. Bug discovered by Quant and Isomer --Bleep -* config-sh.in, channel.h, numeric.h, channel.c, s_debug.c, s_err.c: - add lchanmode patch by CaptJay, add symbols to incredibly long - feature string. Bump patchlevel to .03 --Bleep -* list.h list.c s_conf.h s_conf.c opercmds.c: - badchan patch 2 seperate settings, allow global, and allow local. - currently allow_local is 'unapproved' for use on undernet. --WildThang -* ircd.h, s_serv.h, s_debug.h, ircd.c, s_user.c, s_bsd.c: - removed STAT_MASTER/BOOT_OPER code, original patch by Isomer --Bleep -* s_user.c (m_nick): removed redundant check for acptr --Bleep -* ChangeLog (file): added ChangeLog, and BUGS files, import to ircu2.10 --Bleep - +# Insert new changes at beginning of the change list. +# +* pl6 Index: ChangeLog.10 =================================================================== RCS file: /cvsroot/irc-dev/ircdh/ChangeLog.10,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- ChangeLog.10 26 Jul 2002 21:58:22 -0000 1.1.1.1 +++ ChangeLog.10 18 Aug 2002 22:49:41 -0000 1.2 @@ -5,6 +5,187 @@ # # Insert new changes at beginning of the change list. # +-------------------------- Released 2.10.10.pl20 +* protocol_violation doesn't exist in this version *sigh*. +-------------------------- Released 2.10.10.pl19 +* Fix parse_server() so it doesn't core on an invalid prefix +-------------------------- Released 2.10.10.pl18 (dammit) +* Fix ping so that users can't tell who they're pinging -- Isomer +* Use sendto_one() method of sending numeric replies, rather than u2.10.11's + send_reply--since it hasn't been back-ported to u2.10.10 and since I'm too + lazy to do so. -Kev +* Fix the cores and other interesting behavior as a result of the breakage of + "/mode <nick> -os" -Kev +-------------------------- Released 2.10.10.pl17 +* Admin's complaining that users can't see that their carefully written MOTD + -- Isomer +-------------------------- Released 2.10.10.pl16 +* Oops, missed a "* " in ms_wallops -- Isomer +* Fix typo in ircd.c -- Isomer +* Add prefixes to things before they are sent to clients -- Isomer +* Make ircd.c compile on gcc 3.0 -- mbuna +* fix core in s_user.c, thanks to mbuna -- Isomer +* Make ircd.c compile again :) +* Attempt fixing core with +s, the memory leak etc. Thanks to [Tri]! -- Isomer +* More hub hiding stuff -- Isomer +* Fix bug in unique_name_vector -- Vampire +* Don't send errors on directed privmsgs (suggested by Vampire-) -- Isomer +* Don't core for invalid modes in burst -- Isomer +* Cleanup to m_names.c, thanks to net -- Isomer +* After a long battle, we lost to the superior strength of res.c. + res.c replaced with the original -- Isomer +* Don't report "No such server" on remote commands. oops -- Isomer +* Changed Undernet -> NETWORK, *.undernet.org -> HEAD_IN_SAND_SERVERNAME, + "The Undernet Underworld" -> HEAD_IN_SAND_SERVERINFO -- Isomer +* Remove servernames from /who, someones clinically blind, or stupid. Sigh + -- Isomer +* You now can't /msg a -n but +m or +b'd channel -- Isomer +* Hacked DNS -- Isomer +* Rewrote hop count for /who. -- Isomer +* Removed DNS caching. If it breaks, blame Mr RIP. -- Isomer +-------------------------- Released 2.10.10.pl15 +* Fiddle with /KILL and various exits to make the user experience uniform, + no matter who's doing the killing or where. Previously, differences in + QUITs and in the messages sent to the killed client could help make a + partial map of the network; now that these messages are all uniform, there + is no way to tell. -Kev +* Split ISUPPORT numeric into two numerics, so as not to exceed the 15 + parameter limit imposed by the RFC -Kev +* Turn on HEAD_IN_SAND_REMOTE...oops -Kev +* Send prefixed error messages to other servers, so ERROR doesn't get + interpreted as a prefix -Kev +* Reverse sense of HEAD_IN_SAND_WHO_HOPCOUNT to do what was intended; use a + hopcount of 0 if user is using /who on him/herself -Kev +* Allow a user to see his/her own idle time without having to do + /whois <nick> <nick>; correct spelling of HEAD_IN_SAND_IDLETIME to + HEAD_IN_SAND_WHOIS_IDLETIME -Kev +* Fix a missing ')' in the idle time stuff -Kev +* Include ircd_policy.h in whocmds.c -Kev +* Fixed bug in idle time, thanks hektik -- Isomer +* Update 005 to be compliant with other networks -- Isomer +* Hide hop count -- Isomer +* Hide idletime unless you explicitly ask for it -- Isomer +* /wallops and /wallusers would dump core because of the previous change--my + bad. Now only include user@host when sptr is a client. -Kev +* /wallops and /wallusers would leave out the user@host--noticed because + pl14 broke my script. Fixed. -Kev +* Fix several compile warnings, including the one in table_gen.c -Kev +* Fix a bug in m_silence.c that rendered it uncompilable -Kev +* Hopefully make mode clears during bursts appear to originate from local + server -Kev +* Fix several things to send server<->server protocol messages with numeric + origins -Kev +* Rework directed notices and mass-messages to use numerics and tokens + as appropriate; the latter required the modifications to + sendto_match_butone() -Kev +* Redefined how sendto_match_butone() works, since it's only used with + PRIVMSG or NOTICE -Kev +* Bumped patchlevel to pl15(development) -Kev +* Corrected reverse-sense of HEAD_IN_SAND_REMOTE test in m_whois() -Kev +* Clean up logic in m_whowas(), corrected numeric reply -Kev +* Finally fixed /whois to tell you what your own server is -Kev +* Clean up logic in add_banid() with some well-placed DupString()'s -Kev +* Hide which server performed a nick collision kill -- Isomer +* To allow for remote whois not giving away the remote server, all remote + numerics to clients are remapped to come from the local server :/ -- Isomer +* All remote queries are disabled for users, except /whois -- Isomer + (/whois now uses the second parameter for which server to use, ie: + /whois <ignored> <nick> will query <nick>'s server.) +* Fixed /who showing server name -- Isomer +* Fixed burst showing linking server -- Isomer +* Fixed burst bans showing linked server -- Isomer +* Fixed /whowas showing server name -- Isomer +-------------------------- Released 2.10.10.pl14 (You got any issues with that punk?) +* Changed (then fixed) /LINKS to output an empty links list -- Isomer +* Make netsplit server notice say the right thing +* Final fix for HEAD_IN_SAND_WHOIS_SERVERNAME +* Fix a bug with implementation of HEAD_IN_SAND_NETSPLIT +* Permit users to find out what server they're on, since they already + know -- Kev +* Added HEAD_IN_SAND_WHO_SERVERNAME to cover final source of server + names -- Kev +* Fixed wallops, wallusers now sends wallops to local clients, + wallusers to servers. +* Added host to /kill messages -- Isomer +* Fixed whois (opers can see server names) -- Isomer +* Implement walluser -- Bleep +* stats fixed -- Isomer +* trace disabled from non opers -- Isomer +* server name removed from whois (but not /who, shrug!) -- Isomer +* netsplits are now represented with "*.net *.split" -- Isomer +* Done /links -- Isomer +* Modifications to map as suggested by nighty -- Isomer +* Wallops is the only code that uses sendto_ops_butone now, this + isolates wallops entirely. No server notices sent by wallops. +* HEAD_IN_SAND_SNOTICES done -- Bleep +* HEAD_IN_SAND_WALLOPS done -- Bleep +* HEAD_IN_SAND_DESYNC done -- Bleep +* HEAD_IN_SAND_MAP done -- Isomer +* According to CFV-165, buring our head in the sand to try and +* hide from DoS - First pass -- Isomer +* As requested by hop: hidden keys are shown as "*" not "" -- Isomer +* As requested by Buff: allow admins to *disable* below behavour -- Isomer +* As requested by Adriel, compile time option to disable mo_wallops + -- Isomer +-------------------------- Released 2.10.10.pl13 +* Don't allow two copies of the server to start -- Isomer/Kev +-------------------------- Released 2.10.10.pl12 +* Release 2.10.10.pl12 before Mr_RIP threatens physical violence -- Isomer +* Don't 'hubhide' nick's in /trace (oops!) -- Isomer +* Allow K:line by realname, updated client connection logging -- Gte- +* ircd/m_join.c: use ERR_BANNEDFROMCHAN instead of ERR_BADCHANNAME -- Kev +--------------------------- Released 2.10.10.pl11.(release) +* Fixed G-lined (reason), thanks to dfx -- Isomer +* Added reason to the "G-lined (reason)" quit messages. -- Isomer +* Removed 'for nick[1.2.3.4]' from quit messages, they're redundant + and make hub hiding more reliable --Isomer +* ircd/s_user.c (hunt_server): add 'No such server' message back + --Isomer +* ircd/s_bsd.c: remove ALWAYSFLUSH - the problem wasn't ircu's fault + -- Isomer +* ircd/m_names.c (m_names): don't add a space if the user's a + zombie; fixes an overrun where we generate a huge number of spaces + in the names reply without length-checking them properly -- Kev +* added 'ALWAYSFLUSH', if you thought the furgeson flusher was bad... + --Isomer +* Fixed /USERHOST again. Horribly embarrased. Thanks again Liandrin + --Isomer +* Added extra field to /stats Y showing how many people are in that class. + Information was previously available via /trace, however tended to flood + you off if you weren't on a good connection. Requested by Mr_RIP + -- Isomer +* Fixed 'BADCHAN' resetting itself to 'Y', reported by Gator --Isomer +--------------------------- Released 2.10.10.pl10 +* Released 2.10.10.pl10 +* Backported /names optimisation from 2.10.11. + '/names 0' now returns verbose listing, '/names' simply returns + ENDOFNAMES. Disallow harmfull /names usage. --Gte +* Fixed ERR_NOSUCHNICK bug in userhost, thanks to Liandrin --Isomer +* Conceal more bugs in IPcheck --Isomer +* Add 'POST' as a unregistered command to disconnect people abusing web + proxies --Isomer. +* Conceal bugs in IPcheck --Isomer +* Fix for changing the wrong define --Isomer +* Fix for the easter buggy. --Isomer +* Fix for rpong --Run +* Fix for other IPcheck bug, thanks BLMet. --Bleep +* Fix for IPcheck bug, rewrite IPcheck from scratch (mostly), + add changes for new code to s_user.c, ircd.c --Bleep +* Shorten connection timeout for auth queries to 60 seconds + If connection is from localhost use the server alias for the + client host. --Bleep +* Fix for ident bug --Isomer +* Fix for rping/rpong --Gte +* Add m_pong to parser handler --Bleep +* Fix for EXTENDED_NUMERICS bug doh!!! --Bleep +* Fix for Max Undernet Server bug --Bleep +* Fix for PRIVMSG<->NOTICE translation from hubs --Bleep +* Fix for Bogus protocol strings for P9 servers --Bleep +* Hookup UPING code again, cleanups --Bleep +* Convert numerics back to mask and shift extended numerics + follow same mechanism --Bleep +* Fixed bogus errno return on Solaris --Bleep +* Fixed core on RPING bug, tokenized RPING --Bleep * Remove add_local_domain entirely, unused --Bleep * Merge u2_10_10_beta06 create branch u2_10_10_beta07 --Bleep * Remove size_t from socket calls, audit usage of size_t Index: INSTALL =================================================================== RCS file: /cvsroot/irc-dev/ircdh/INSTALL,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- INSTALL 26 Jul 2002 21:58:22 -0000 1.1.1.1 +++ INSTALL 18 Aug 2002 22:49:41 -0000 1.2 @@ -1,39 +1,84 @@ - INSTALL file by Run <ca...@ru...> - +INSTALL file by Run <ca...@ru...> + Updated by Isomer <is...@co...> This is the UnderNet IRC daemon. The installation of the IRC daemon (ircd) exists of the following steps: -1) Untar the package. +1) Retrieve the package. 2) cd into the base directory. -3 )`./configure' +3) `./configure' 4) `make config' 5) `make' 6) `make install' -1) Untar the package +1) Retrieve the package. ==================== -The name of the package is something like `ircu2.x.y.z.tgz', where -"x.y.z" is the current release (at the time of writing we have -ircu2.10.00.beta3.tgz). +The recommended way to get the ircu package now is to use CVS. CVS makes +upgrades a lot less painful and lets you get the latest package. -You need `gzip', the GNU unzip command, to uncompress this package. -You can download this from every GNU ftp site for almost any Operating system. +1.1) The first thing you need to do is 'authenticate' yourself against the +server. -If you have GNU tar, type: +This is done with: -tar xzf ircu2.x.y.z.tgz +cvs -d :pserver:an...@co...:/home/coder-com/cvs login -where "ircu2.x.y.z.tgz" is the name of the package. +(we recommend that you cut and paste the above line to use it :) +When it prompts you for a password enter 'anoncvs'. -If your tar doesn't support the 'z' flag, you can type alternatively: +1.2) Then you have to decide which of the trees you want to use: -gzip -dc ircu2.x.y.z.tgz | tar xf - +irc2.10 - This is the *STABLE* tree. If in doubt use this one! -Both methods result in a directory "ircu2.x.y.z" in your current directory. +beta - This tree is undergoing testing before being promoted to ircu2.10 + It may be buggy. Use on the undernet production network is prohibited, + except for certain authorised servers. + +alpha - This is the development tree, if you are planning on making patches + to be submitted to the main source tree we recommend you use this + tree. However this tree is *not* guaranteed to compile, and should + be concidered HIGHLY unstable. It is not intended for production + use. + +to check out the tree, type: + +cvs -d :pserver:an...@co...:/home/coder-com/cvs checkout + -P irc2.10 + +The above two lines shouldn't have an enter between them. if you want to +use another tree, replace 'irc2.10' with the tree you want to use. This +will create a directory irc2.10, and put all the files in there. + +to get the latest version, from within the tree type "cvs update -dP". + +For more information see the coder-com website at +http://coder-com.undernet.org/ + +The old (tried and true) method that works even when the website isn't being +DoS'd (sigh) is included below. Using the method below means you /cant/ +just type 'cvs update -dP' to get the latest version. + The name of the package is something like `ircu2.x.y.z.tgz', where + "x.y.z" is the current release (at the time of writing we have + ircu2.10.00.beta3.tgz). + + You need `gzip', the GNU unzip command, to uncompress this package. + You can download this from every GNU ftp site for almost any Operating system. + + If you have GNU tar, type: + + tar xzf ircu2.x.y.z.tgz + + where "ircu2.x.y.z.tgz" is the name of the package. + + If your tar doesn't support the 'z' flag, you can type alternatively: + + gzip -dc ircu2.x.y.z.tgz | tar xf - + + Both methods result in a directory "ircu2.x.y.z" in your current directory. + 2) cd into the base directory ============================= @@ -41,6 +86,8 @@ cd ircu2.x.y.z +or ircu2.10 if you used cvs. + where "ircu2.x.y.z" is the name of the unpacked directory. 3) `./configure' @@ -49,6 +96,9 @@ This will generate 'config/setup.h', your Operating System dependend configuration. +If this produces a 'Permission Denied' error message, then try typing +`chmod a+x ./configure` first to give yourself permission to run the file. + 4) `make config' ================ @@ -71,6 +121,14 @@ to be supported in future releases, you best make a patch that actually fixes the problem. +If you have problems here with it complaining about unresolved symbols in +res.o, try "make config" again and add -lresolv to LDFLAGS. Note, there is +no 'e' on the end of resolv. It's not a typo, it's supposed to be like +that. + +If you have problems here with it complaining about unresolved symbols +possibly in s_user.c for 'crypt', add -lcrypt to LDFLAGS. + 6) `make install' ================= @@ -102,3 +160,5 @@ doesn't start. Don't use a server with DEBUGMODE defined on a production net. + +If things still don't work, try emailing cod...@un... Index: configure =================================================================== RCS file: /cvsroot/irc-dev/ircdh/configure,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- configure 26 Jul 2002 21:58:22 -0000 1.1.1.1 +++ configure 18 Aug 2002 22:49:41 -0000 1.2 @@ -2,7 +2,7 @@ chmod u+x config/install-sh config/configure ircd/crypt/sums ircd/crypt/crypter cd config if test ! -f config.cache && test -r ../../.config.cache; then - cp ../../.config.cache config.cache; + cp ../../.config.cache config.cache; fi ./configure echo timestamp > ../doc/stamp-m @@ -14,3 +14,9 @@ cd .. cd zlib ./configure +echo +echo ATENCION: En este ircd se esta haciendo una limpieza de sources, con lo +echo que implica que puede que no se compile bajo ciertas maquinas o que se +echo compila pero sale "warnings". +echo +echo Estamos trabajando en ello. IRC-Dev.Net 2002 |
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] |
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; /* |
From: Zolty <zo...@us...> - 2002-08-18 22:49:44
|
Update of /cvsroot/irc-dev/ircdh/config In directory usw-pr-cvs1:/tmp/cvs-serv31134/ircdh/config Modified Files: Configure.in config-sh.in configure configure.in setup.h.in 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. Index: Configure.in =================================================================== RCS file: /cvsroot/irc-dev/ircdh/config/Configure.in,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- Configure.in 26 Jul 2002 21:58:22 -0000 1.1.1.1 +++ Configure.in 18 Aug 2002 22:49:41 -0000 1.2 @@ -477,6 +477,11 @@ echo "/*" > $CONFIG_H echo " * Automatically generated C config: don't edit" >> $CONFIG_H echo " */" >> $CONFIG_H +echo "#ifndef INCLUDED_config_h" >> $CONFIG_H +echo "#define INCLUDED_config_h" >> $CONFIG_H +echo "#ifndef INCLUDED_setup_h" >> $CONFIG_H +echo "#include \"setup.h\"">> $CONFIG_H +echo "#endif" >> $CONFIG_H echo "#define AUTOCONF_INCLUDED" >> $CONFIG_H CONFIG_IN=./config-sh @@ -509,6 +514,8 @@ fi . $CONFIG_IN + +echo "#endif /* INCLUDED_config_h */" >> $CONFIG_H mv $CONFIG_H config.h $RM -f .config.old Index: config-sh.in =================================================================== RCS file: /cvsroot/irc-dev/ircdh/config/config-sh.in,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- config-sh.in 15 Aug 2002 20:55:23 -0000 1.4 +++ config-sh.in 18 Aug 2002 22:49:41 -0000 1.5 @@ -58,6 +58,21 @@ endmenu mainmenu_option next_comment +comment 'Debugging (do not define this on production servers)' + bool 'Do you want to enable debugging output' DEBUGMODE + bool 'Do you want to enable asserts and memory allocation checking' CONFIG_NDEBUG + EXTRA_CPPFLAGS="" + if [ "$CONFIG_NDEBUG" = "n" ]; then + if [ -z "$EXTRA_CPPFLAGS" ]; then + EXTRA_CPPFLAGS="-DNDEBUG" + else + EXTRA_CPPFLAGS="-DNDEBUG $EXTRA_CPPFLAGS" + fi + fi + bool 'Are you testing on a host without DNS' NODNS +endmenu + +mainmenu_option next_comment comment 'Compile stuff' if [ "$prefix" = "NONE" ]; then prefix=/usr/local @@ -111,7 +126,6 @@ if [ "$IRCDLIBS" = "none" ]; then IRCDLIBS="" fi - EXTRA_CPPFLAGS="" if [ -n "$EXTRA_INCLUDEDIRS" ]; then for i in $EXTRA_INCLUDEDIRS; do if [ -z "$EXTRA_CPPFLAGS" ]; then @@ -122,9 +136,9 @@ done fi if [ -z "$EXTRA_CPPFLAGS" ]; then - CPPFLAGS=-I../include + CPPFLAGS="-I../include -I../config" else - CPPFLAGS="-I../include $EXTRA_CPPFLAGS" + CPPFLAGS="-I../include -I../config $EXTRA_CPPFLAGS" fi echo "EXTRA_CPPFLAGS=\"$EXTRA_CPPFLAGS\"" >>$CONFIG echo "CPPFLAGS=\"$CPPFLAGS\"" >>$CONFIG @@ -172,7 +186,6 @@ echo " SECURITY: Then don't install the daemon SUID or SGID !" fi fi - bool 'Set up a Unix domain socket to connect clients/servers' UNIXPORT bool 'Do you need virtual hosting' VIRTUAL_HOST PREV_HUB=$HUB bool 'Will you connect to more then one server at a time' HUB @@ -181,30 +194,6 @@ fi endmenu -mainmenu_option next_comment -comment 'Debugging (do not define this on production servers)' - bool 'Do you want to enable debugging output' DEBUGMODE - bool 'Do you want memory- allocation and/or leak checking' DEBUGMALLOC - if [ "$DEBUGMALLOC" = "y" ]; then - bool 'Do you want to have boundary checking' MEMMAGICNUMS - bool 'Do you want memory leak testing (stats M)' MEMLEAKSTATS y - if [ "$MEMLEAKSTATS" = "y" ]; then - if [ "$MEMMAGICNUMS" = "y" ]; then - echo "You will have extra info on allocated sizes too (MEMSIZESTATS)" - define_bool MEMSIZESTATS $MEMSIZESTATS - else - bool 'Do you want extra info on allocated sizes' MEMSIZESTATS y - fi - bool 'Do you want support for a time interval with /stats M' MEMTIMESTATS y - fi - else - define_bool MEMMAGICNUMS $MEMMAGICNUMS - define_bool MEMLEAKSTATS $MEMLEAKSTATS - define_bool MEMSIZESTATS $MEMSIZESTATS - define_bool MEMTIMESTATS $MEMTIMESTATS - fi - bool 'Are you testing on a host without DNS' NODNS -endmenu mainmenu_option next_comment comment 'Paths and files' @@ -310,6 +299,7 @@ int 'Max receive queue for clients (bytes)' CLIENT_FLOOD 2048 int 'Maximum number of network connections (23 - (FD_SETSIZE-4))' MAXCONNECTIONS 252 int 'Default client listen port' PORTNUM 6667 +# int 'Default port for connections to other servers' SERVER_PORT 4400 int 'Nickname history length' NICKNAMEHISTORYLENGTH 800 bool 'Allow Opers to see (dis)connects of local clients' ALLOW_SNO_CONNEXIT if [ "$ALLOW_SNO_CONNEXIT" = "y" ]; then @@ -325,10 +315,12 @@ fi bool 'Do you want support for the old I:*:ONE:*:: construct (read help text!)' USEONE n bool 'Send a short message instead of the MOTD to connecting clients' NODEFAULTMOTD y + bool 'Kill connecting clients when forward and reverse DNS mismatch' KILL_IPMISMATCH n endmenu mainmenu_option next_comment comment 'Oper commands' + bool 'Allow opers to wallop' OPER_WALLOPS bool 'Allow (local) Opers to see all local invisible users' SHOW_INVISIBLE_USERS y if [ "$SHOW_INVISIBLE_USERS" = "y" ]; then bool 'Allow Opers to see all invisible users' SHOW_ALL_INVISIBLE_USERS y @@ -357,6 +349,7 @@ bool 'Allow local/global opers to set modes on local channels' OPER_MODE_LCHAN y bool 'Allow local/global opers to walk through local channels modes' OPER_WALK_THROUGH_LMODES n bool 'Prevent local/global opers from being kicked or deoped on local channels' NO_OPER_DEOP_LCHAN n + endmenu mainmenu_option next_comment @@ -402,11 +395,6 @@ # bool 'HISPANO/ESNET: ZLIB compression between servers - ESNET' ZLIB_ESNET y # fi int 'Max auto connects per class (1!)' MAXIMUM_LINKS 1 - echo '* Never define this on a production server:' - bool 'Enable message logging' MSGLOG_ENABLED - if [ "$MSGLOG_ENABLED" = "y" ]; then - int 'Message log size' MSGLOG_SIZE 128 - fi if [ "$OPER_KILL" = "y" ]; then bool 'Only allow KILLs of local clients' LOCAL_KILL_ONLY else Index: configure =================================================================== RCS file: /cvsroot/irc-dev/ircdh/config/configure,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- configure 26 Jul 2002 21:58:23 -0000 1.1.1.1 +++ configure 18 Aug 2002 22:49:41 -0000 1.2 @@ -769,185 +769,11 @@ fi -echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:774: checking how to run the C preprocessor" >&5 -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then -if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then [...1950 lines suppressed...] + trap '' 1 2 15 cat > confcache <<\EOF # This file is a shell script that caches the results of configure @@ -3703,7 +2984,6 @@ s%@mandir@%$mandir%g s%@CC@%$CC%g s%@CPP@%$CPP%g -s%@LIBOBJS@%$LIBOBJS%g s%@AWK@%$AWK%g s%@SET_MAKE@%$SET_MAKE%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g @@ -3716,6 +2996,7 @@ s%@ac_cv_header_poll_h@%$ac_cv_header_poll_h%g s%@ac_cv_header_syslog_h@%$ac_cv_header_syslog_h%g s%@unet_cv_func_poll_syscall@%$unet_cv_func_poll_syscall%g +s%@OSDEP_C@%$OSDEP_C%g CEOF EOF Index: configure.in =================================================================== RCS file: /cvsroot/irc-dev/ircdh/config/configure.in,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- configure.in 26 Jul 2002 21:58:23 -0000 1.1.1.1 +++ configure.in 18 Aug 2002 22:49:41 -0000 1.2 @@ -22,10 +22,9 @@ dnl UNIX Variants dnl Allow the use of BSD functions on AIX. -AC_AIX +dnl AC_AIX dnl Allow the use of POSIX functions on several OS. -AC_ISC_POSIX -AC_MINIX +dnl AC_ISC_POSIX dnl ANSIfy the C compiler whenever possible. AM_PROG_CC_STDC dnl Use -O3 instead of -O2. @@ -50,11 +49,9 @@ dnl Checks for header files. AC_HEADER_STDC -AC_HEADER_SYS_WAIT -AC_CHECK_HEADERS(malloc.h sys/malloc.h fcntl.h string.h strings.h sys/file.h sys/ioctl.h sys/time.h syslog.h unistd.h memory.h errno.h net/errno.h sys/cdefs.h) dnl Checks for typedefs, structures, and compiler characteristics. -AC_C_CONST +dnl AC_C_CONST AC_C_BIGENDIAN AC_TYPE_SIZE_T AC_HEADER_TIME @@ -68,15 +65,9 @@ unet_DEFINE_TIME_T_FMT dnl Checks for library functions. -AC_PROG_GCC_TRADITIONAL -AC_FUNC_MEMCMP -AC_FUNC_SETVBUF_REVERSED -AC_TYPE_SIGNAL -AC_FUNC_VPRINTF -AC_CHECK_FUNCS(strchr memcpy memmove) -AC_CHECK_FUNCS(gethostname gettimeofday mkdir strerror strtoken) -AC_CHECK_FUNCS(select socket uname) -AC_CHECK_FUNCS(setrlimit inet_netof getrusage times res_init) +dnl AC_PROG_GCC_TRADITIONAL +dnl AC_FUNC_MEMCMP +dnl AC_FUNC_VPRINTF dnl Do we have a system call poll? unet_FUNC_POLL_SYSCALL @@ -116,6 +107,33 @@ AC_SUBST(ac_cv_header_poll_h) AC_SUBST(ac_cv_header_syslog_h) AC_SUBST(unet_cv_func_poll_syscall) + +dnl Check OS for os_dep files. +uname=`uname` +AC_MSG_CHECKING(for OS type) +case "$uname" in + *inux*) + AC_MSG_RESULT($uname found.) + OSDEP_C="os_linux.c" + ;; + *olaris*) + AC_MSG_RESULT($uname found.) + OSDEP_C="os_solaris.c" + ;; + *SunOS*) + AC_MSG_RESULT($uname found.) + OSDEP_C="os_solaris.c" + ;; + *BSD*) + AC_MSG_RESULT($uname found.) + OSDEP_C="os_bsd.c" + ;; + *) + AC_MSG_RESULT(Unknown OS. Using generic routines.) + OSDEP_C="os_generic.c" + ;; +esac +AC_SUBST(OSDEP_C) dnl Finally really generate all output files: AC_OUTPUT(config-sh Configure ../Makefile ../ircd/Makefile ../doc/Makefile Makefile, [echo timestamp > stamp-h;],) Index: setup.h.in =================================================================== RCS file: /cvsroot/irc-dev/ircdh/config/setup.h.in,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- setup.h.in 26 Jul 2002 21:58:23 -0000 1.1.1.1 +++ setup.h.in 18 Aug 2002 22:49:41 -0000 1.2 @@ -16,12 +16,36 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA * 02111-1307, USA. */ + +/* Define to `int' if <sys/types.h> doesn't define. */ +#undef gid_t + +/* Define if system calls automatically restart after interruption + by a signal. */ +#undef HAVE_RESTARTABLE_SYSCALLS + +/* Define to `unsigned' if <sys/types.h> doesn't define. */ +#undef size_t + +/* Define if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Define if you can safely include both <sys/time.h> and <time.h>. */ +#undef TIME_WITH_SYS_TIME + +/* Define if your <sys/time.h> declares struct tm. */ +#undef TM_IN_SYS_TIME + +/* Define to `int' if <sys/types.h> doesn't define. */ +#undef uid_t + +/* Define if your processor stores words with the most significant + byte first (like Motorola and SPARC, unlike Intel and VAX). */ +#undef WORDS_BIGENDIAN + /* Define if you have the resolv library (-lresolv) */ #undef HAVE_LIB_RESOLV -/* Define if you have the setrlimit function */ -#undef HAVE_SETRLIMIT - /* Define one of these, depending on wether you have POSIX, BSD or SYSV non-blocking stuff */ #undef NBLOCK_POSIX @@ -49,191 +73,20 @@ /* Define this to the printf signed format for time_t */ #undef STIME_T_FMT -/* Define if you don't have `vprintf' but do have `_doprnt.' */ -#undef HAVE_DOPRNT - -/* Define if you have the <errno.h> header file. */ -#undef HAVE_ERRNO_H - -/* Define if you have the <fcntl.h> header file. */ -#undef HAVE_FCNTL_H - -/* Define if you have the `gethostname' function. */ -#undef HAVE_GETHOSTNAME - -/* Define if you have the `getrusage' function. */ -#undef HAVE_GETRUSAGE - -/* Define if you have the `gettimeofday' function. */ -#undef HAVE_GETTIMEOFDAY - -/* Define if you have the `inet_netof' function. */ -#undef HAVE_INET_NETOF - -/* Define if you have the <inttypes.h> header file. */ -#undef HAVE_INTTYPES_H - -/* Define if you have the `crypt' library (-lcrypt). */ -#undef HAVE_LIBCRYPT - -/* Define if you have the <malloc.h> header file. */ -#undef HAVE_MALLOC_H - -/* Define if you have the `memcpy' function. */ -#undef HAVE_MEMCPY - -/* Define if you have the `memmove' function. */ -#undef HAVE_MEMMOVE - -/* Define if you have the <memory.h> header file. */ -#undef HAVE_MEMORY_H - -/* Define if you have the `mkdir' function. */ -#undef HAVE_MKDIR - -/* Define if you have the <net/errno.h> header file. */ -#undef HAVE_NET_ERRNO_H - -/* Define if you have the <poll.h> header file. */ -#undef HAVE_POLL_H - -/* Define if system calls automatically restart after interruption by a - signal. */ -#undef HAVE_RESTARTABLE_SYSCALLS - -/* Define if you have the `res_init' function. */ -#undef HAVE_RES_INIT - -/* Define if you have the `select' function. */ -#undef HAVE_SELECT - -/* Define if you have the `setrlimit' function. */ -#undef HAVE_SETRLIMIT - -/* Define if you have the `socket' function. */ -#undef HAVE_SOCKET - -/* Define if you have the <stdlib.h> header file. */ -#undef HAVE_STDLIB_H - -/* Define if you have the `strchr' function. */ -#undef HAVE_STRCHR - -/* Define if you have the `strerror' function. */ -#undef HAVE_STRERROR - -/* Define if you have the <strings.h> header file. */ -#undef HAVE_STRINGS_H - -/* Define if you have the <string.h> header file. */ -#undef HAVE_STRING_H - -/* Define if you have the `strtoken' function. */ -#undef HAVE_STRTOKEN - -/* Define if you have the <syslog.h> header file. */ -#undef HAVE_SYSLOG_H - -/* Define if you have the <sys/cdefs.h> header file. */ -#undef HAVE_SYS_CDEFS_H - -/* Define if you have the <sys/file.h> header file. */ -#undef HAVE_SYS_FILE_H - -/* Define if you have the <sys/ioctl.h> header file. */ -#undef HAVE_SYS_IOCTL_H - -/* Define if you have the <sys/malloc.h> header file. */ -#undef HAVE_SYS_MALLOC_H - -/* Define if you have the <sys/time.h> header file. */ -#undef HAVE_SYS_TIME_H - -/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */ -#undef HAVE_SYS_WAIT_H - -/* Define if you have the `times' function. */ -#undef HAVE_TIMES - -/* Define if you have the `uname' function. */ -#undef HAVE_UNAME - -/* Define if you have the <unistd.h> header file. */ -#undef HAVE_UNISTD_H - -/* Define if you have the `vprintf' function. */ -#undef HAVE_VPRINTF - -/* Define as the return type of signal handlers (`int' or `void'). */ -#undef RETSIGTYPE - -/* Define if the `setvbuf' function takes the buffering type as its second - argument and the buffer pointer as the third, as on System V before release - 3. */ -#undef SETVBUF_REVERSED - -/* The size of a `int', as computed by sizeof. */ +/* The number of bytes in a int. */ #undef SIZEOF_INT -/* The size of a `long', as computed by sizeof. */ +/* The number of bytes in a long. */ #undef SIZEOF_LONG -/* The size of a `short', as computed by sizeof. */ +/* The number of bytes in a short. */ #undef SIZEOF_SHORT -/* The size of a `size_t', as computed by sizeof. */ +/* The number of bytes in a size_t. */ #undef SIZEOF_SIZE_T -/* Define if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Define if you can safely include both <sys/time.h> and <time.h>. */ -#undef TIME_WITH_SYS_TIME - -/* Define if your <sys/time.h> declares `struct tm'. */ -#undef TM_IN_SYS_TIME - -/* Define if your processor stores words with the most significant byte first - (like Motorola and SPARC, unlike Intel and VAX). */ -#undef WORDS_BIGENDIAN - -/* Define if on AIX 3. - System headers sometimes define this. - We just want to avoid a redefinition error message. */ -#ifndef _ALL_SOURCE -# undef _ALL_SOURCE -#endif - -/* Define if on MINIX. */ -#undef _MINIX - -/* Define if the system does not provide POSIX.1 features except with this - defined. */ -#undef _POSIX_1_SOURCE - -/* Define if you need to in order for `stat' and other things to work. */ -#undef _POSIX_SOURCE - -/* Define to empty if `const' does not conform to ANSI C. */ -#undef const - -/* Define to `int' if <sys/types.h> doesn't define. */ -#undef gid_t - -/* Define to `short' if <sys/types.h> does not define. */ -#undef int16_t - -/* Define to `long' if <sys/types.h> does not define. */ -#undef int32_t - -/* Define to `unsigned' if <sys/types.h> does not define. */ -#undef size_t - -/* Define to `unsigned short' if <sys/types.h> does not define. */ -#undef u_int16_t - -/* Define to `unsigned long' if <sys/types.h> does not define. */ -#undef u_int32_t +/* Define if you have the <poll.h> header file. */ +#undef HAVE_POLL_H -/* Define to `int' if <sys/types.h> doesn't define. */ -#undef uid_t +/* Define if you have the crypt library (-lcrypt). */ +#undef HAVE_LIBCRYPT |
From: Zolty <zo...@us...> - 2002-08-15 23:10:18
|
Update of /cvsroot/irc-dev/ircdh/include In directory usw-pr-cvs1:/tmp/cvs-serv7150/ircdh/include Modified Files: numeric.h Log Message: 2002-08-16 Toni Garcia <zo...@ir...> Documentacion de los numericos utilizados en las redes mundiales para ver los numericos libres y los que estan en conflicto. * Se cambia el numerico del USERIP del 307/378 al nuevo 340 que es el que utiliza en undernet. Index: numeric.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/numeric.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- numeric.h 27 Jul 2002 15:02:47 -0000 1.2 +++ numeric.h 15 Aug 2002 23:10:14 -0000 1.3 @@ -15,14 +15,12 @@ * 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 INCLUDED_numeric_h +#define INCLUDED_numeric_h -#ifndef NUMERIC_H -#define NUMERIC_H - -/*============================================================================= - * Macro's - */ /* * Reserve numerics 000-099 for server-client connections where the client @@ -33,19 +31,27 @@ #define RPL_YOURHOST 2 #define RPL_CREATED 3 #define RPL_MYINFO 4 -#define RPL_ISUPPORT 5 +#define RPL_ISUPPORT 5 /* Undernet/Dalnet extension */ +/* RPL_BOUNCE 5 IRCnet extension */ +/* RPL_MAP 6 Unreal */ +/* RPL_MAPEND 7 Unreal */ #define RPL_SNOMASK 8 /* Undernet extension */ #define RPL_STATMEMTOT 9 /* Undernet extension */ #define RPL_STATMEM 10 /* Undernet extension */ +/* RPL_REDIR 10 EFNet extension */ +/* RPL_YOURCOOKIE 14 IRCnet extension */ #define RPL_MAP 15 /* Undernet extension */ #define RPL_MAPMORE 16 /* Undernet extension */ #define RPL_MAPEND 17 /* Undernet extension */ -/* RPL_YOURCOOKIE 14 IRCnet extension */ +/* RPL_YOURID 42 IRCnet extension */ +/* RPL_ATTEMPTINGJUNC 50 IRCnet extension */ +/* RPL_ATTEMPTINGREROUTE 51 IRCnet extension */ /* * Errors are in the range from 400-599 currently and are grouped by what * commands they come from. */ +/* ERR_FIRSTERROR 400 unused */ #define ERR_NOSUCHNICK 401 #define ERR_NOSUCHSERVER 402 #define ERR_NOSUCHCHANNEL 403 @@ -53,42 +59,59 @@ #define ERR_TOOMANYCHANNELS 405 #define ERR_WASNOSUCHNICK 406 #define ERR_TOOMANYTARGETS 407 +/* ERR_NOSUCHSERVICE 408 IRCnet extension */ +/* ERR_NOCOLORSONCHAN 408 Dalnet extension */ #define ERR_NOORIGIN 409 #define ERR_NORECIPIENT 411 #define ERR_NOTEXTTOSEND 412 #define ERR_NOTOPLEVEL 413 #define ERR_WILDTOPLEVEL 414 - +/* ERR_BADMASK 415 IRCnet extension */ #define ERR_QUERYTOOLONG 416 /* Undernet extension */ +/* ERR_TOOMANYMATCHES 416 IRCnet extension */ +/* ERR_LENGTHTRUNCATED 419 Aircd */ #define ERR_UNKNOWNCOMMAND 421 #define ERR_NOMOTD 422 #define ERR_NOADMININFO 423 /* ERR_FILEERROR 424 removed from RFC1459 */ +/* ERR_TOOMANYAWAY 429 Dalnet extension */ + #define ERR_NONICKNAMEGIVEN 431 #define ERR_INVALIDNICKNAME 432 #define ERR_NICKNAMEINUSE 433 #if defined(BDD) #define ERR_NICKREGISTERED ERR_NICKNAMEINUSE #endif +/* ERR_SERVICENAMEINUSE 434 ? */ +/* ERR_NORULES 434 Unreal */ +/* ERR_SERVICECONFUSED 435 ? */ +/* ERR_BANONCHAN 435 Dalnet */ #define ERR_NICKCOLLISION 436 #define ERR_BANNICKCHANGE 437 /* Undernet extension */ +/* ERR_UNAVAILRESOURCE 437 IRCnet extension */ #define ERR_NICKTOOFAST 438 /* Undernet extension */ +/* ERR_DEAD 438 IRCnet reserved for later use */ #define ERR_TARGETTOOFAST 439 /* Undernet extension */ - +/* ERR_SERVICESDOWN 440 Dalnet extension */ #define ERR_USERNOTINCHANNEL 441 #define ERR_NOTONCHANNEL 442 #define ERR_USERONCHANNEL 443 /* ERR_NOLOGIN 444 removed from RFC1459 */ /* ERR_SUMMONDISABLED 445 removed from RFC1459 */ /* ERR_USERSDISABLED 446 removed from RFC1459 */ +/* ERR_NONICKCHANGE 447 Unreal */ #define ERR_NOTREGISTERED 451 /* ERR_IDCOLLISION 452 IRCnet extension */ /* ERR_NICKLOST 453 IRCnet extension */ +/* ERR_HOSTILENAME 455 Unreal */ + +/* ERR_NOHIDING 459 Unreal */ +/* ERR_NOTFORHALFOPS 460 Unreal */ #define ERR_NEEDMOREPARAMS 461 #define ERR_ALREADYREGISTRED 462 #define ERR_NOPERMFORHOST 463 @@ -97,77 +120,130 @@ #define ERR_YOUWILLBEBANNED 466 #define ERR_KEYSET 467 /* Undernet extension */ #define ERR_INVALIDUSERNAME 468 /* Undernet extension */ - +/* ERR_ONLYSERVERSCANCHANGE 468 Dalnet extension */ +/* ERR_LINKSET 469 Dalnet extension */ +/* ERR_LINKCHANNEL 470 Unreal */ +/* ERR_KICKEDFROMCHAN 470 Aircd */ #define ERR_CHANNELISFULL 471 #define ERR_UNKNOWNMODE 472 #define ERR_INVITEONLYCHAN 473 #define ERR_BANNEDFROMCHAN 474 #define ERR_BADCHANNELKEY 475 #define ERR_BADCHANMASK 476 /* Undernet extension */ -#define ERR_NEEDREGGEDNICK 477 /* DalNet Extention */ +#define ERR_NEEDREGGEDNICK 477 /* DalNet & Undernet Extention */ #define ERR_BANLISTFULL 478 /* Undernet extension */ #define ERR_BADCHANNAME 479 /* EFNet extension */ - /* 479 Undernet extension badchan */ + /* 479 Undernet extension badchan */ +/* ERR_LINKFAIL 479 Unreal */ +/* ERR_CANNOTKNOCK 480 Unreal */ +/* ERR_NOULINE 480 Austnet */ #define ERR_NOPRIVILEGES 481 #define ERR_CHANOPRIVSNEEDED 482 #define ERR_CANTKILLSERVER 483 #define ERR_ISCHANSERVICE 484 /* Undernet extension */ +/* ERR_DESYNC 484 Dalnet extension */ +/* ERR_ATTACKDENY 484 Unreal */ +/* ERR_RESTRICTED 484 IRCnet extension */ +/* ERR_UNIQOPRIVSNEEDED 485 IRCnet extension */ +/* ERR_KILLDENY 485 Unreal */ +/* ERR_CANTKICKADMIN 485 PTlink */ +#if defined(BDD) +#define ERR_NONONREG 486 /* Dalnet extension */ +#endif +/* ERR_HTMDISABLED 486 Unreal */ /* ERR_CHANTOORECENT 487 IRCnet extension */ /* ERR_TSLESSCHAN 488 IRCnet extension */ #define ERR_VOICENEEDED 489 /* Undernet extension */ #define ERR_NOOPERHOST 491 #define ERR_OPERCLASSFULL 492 /* Hispano extension */ +/* ERR_NOSERVICEHOST 492 IRCnet extension */ +/* ERR_NOFEATURE 493 Undernet extension */ #define ERR_NOOPERCLASS 493 /* Hispano extension */ +/* ERR_BADFEATVALUE 494 Undernet extension */ #define ERR_SILECANTBESHOWN 494 /* Hispano extension */ - +/* ERR_BADLOGTYPE 495 Undernet extension */ +/* ERR_BADLOGSYS 496 Undernet extension */ +/* ERR_BADLOGVALUE 497 Undernet extension */ #define ERR_ISOPERLCHAN 498 /* Undernet extension */ #define ERR_UMODEUNKNOWNFLAG 501 #define ERR_USERSDONTMATCH 502 +/* ERR_GHOSTEDCLIENT 503 EFNet extension */ +/* ERR_VWORLDWARN 503 Austnet */ +#define ERR_ISSILENCING 510 /* Hispano extension */ #define ERR_SILELISTFULL 511 /* Undernet extension */ -#ifdef WATCH +/* ERR_NOSUCHGLINE 512 Undernet extension */ #define ERR_TOOMANYWATCH 512 /* Dalnet extension */ -#endif - +/* ERR_NOTIFYFULL 512 Aircd */ #define ERR_BADPING 513 /* Undernet extension */ -#define ERR_NOSUCHGLINE 514 /* Undernet extension */ +/* ERR_NEEDPONG 513 Dalnet extension */ +/* ERR_NOSUCHJUPE 514 Undernet extension */ +#define ERR_NOSUCHGLINE 514 /* Hispano extension */ +/* ERR_TOOMANYDCC 514 Dalnet extension */ +/* ERR_BADEXPIRE 515 Undernet extension */ +/* ERR_DONTCHEAT 516 Undernet extension */ +/* ERR_DISABLED 517 Undernet extension */ +/* ERR_LONGMASK 518 Undernet extension */ +/* ERR_NOINVITE 518 Unreal */ +/* ERR_TOOMANYUSERS 519 Undernet extension */ +/* ERR_ADMONLY 519 Unreal */ +/* ERR_MASKTOOWIDE 520 Undernet extension */ +/* ERR_OPERONLY 520 Unreal */ +/* ERR_WHOTRUNC 520 Austnet */ +/* ERR_LISTSYNTAX 521 Dalnet extension */ +/* ERR_WHOSYNTAX 522 Dalnet extension */ +/* ERR_WHOLIMEXCEED 523 Dalnet extension */ + +/* ERR_NOTLOWEROPLEVEL 550 Undernet extension */ +/* ERR_NOTMANAGER 551 Undernet extension */ +/* ERR_CHANSECURED 552 Undernet extension */ +/* ERR_UPASSSET 553 Undernet extension */ +/* ERR_UPASSNOTSET 554 Undernet extension */ +/* ERR_LASTERROR 555 Undernet extension */ + /* * Numberic replies from server commands. * These are currently in the range 200-399. */ -#define RPL_NONE 300 +#define RPL_NONE 300 /* Unused */ #define RPL_AWAY 301 #define RPL_USERHOST 302 #define RPL_ISON 303 -#define RPL_TEXT 304 +#define RPL_TEXT 304 /* Unused */ #define RPL_UNAWAY 305 #define RPL_NOWAWAY 306 +/* RPL_NOTAWAY 306 Aircd */ #if defined(BDD) #define RPL_WHOISREGNICK 307 /* Hispano extension */ +/* RPL_SUSERHOST 307 Austnet */ +/* RPL_WHOISADMIN 308 Dalnet extension */ +/* RPL_NOTIFYACTION 308 Aircd */ +/* RPL_RULESSTART 308 Unreal */ +/* RPL_WHOISSADMIN 309 Dalnet extension */ +/* RPL_NICKTRACE 309 Aircd */ +/* RPL_ENDOFRULES 309 Unreal */ +/* RPL_WHOISHELPER 309 Austnet */ #define RPL_WHOISHELPOP 310 /* Hispano extension */ -#else -#define RPL_USERIP 307 /* Undernet extension */ +/* RPL_WHOISSVCMSG 310 Dalnet extension */ +/* RPL_WHOISHELPOP 310 Unreal */ +/* RPL_WHOISSERVICE 310 Austnet */ #endif - #define RPL_WHOISUSER 311 /* See also RPL_ENDOFWHOIS */ #define RPL_WHOISSERVER 312 #define RPL_WHOISOPERATOR 313 - #define RPL_WHOWASUSER 314 /* See also RPL_ENDOFWHOWAS */ #define RPL_ENDOFWHO 315 /* See RPL_WHOREPLY/RPL_WHOSPCRPL */ - /* RPL_WHOISCHANOP 316 removed from RFC1459 */ - #define RPL_WHOISIDLE 317 - #define RPL_ENDOFWHOIS 318 /* See RPL_WHOISUSER/RPL_WHOISSERVER/ RPL_WHOISOPERATOR/RPL_WHOISIDLE */ #define RPL_WHOISCHANNELS 319 - +/* RPL_WHOIS_HIDDEN 320 Anothernet +h, ick! */ +/* RPL_WHOISSPECIAL 320 Unreal */ #define RPL_LISTSTART 321 #define RPL_LIST 322 #define RPL_LISTEND 323 @@ -175,28 +251,33 @@ /* RPL_CHANNELPASSIS 325 IRCnet extension */ /* RPL_NOCHANPASS 326 IRCnet extension */ /* RPL_CHPASSUNKNOWN 327 IRCnet extension */ +/* RPL_CHANNEL_URL 328 Dalnet */ #define RPL_CREATIONTIME 329 - +/* RPL_WHOWAS_TIME 330 ? */ #define RPL_NOTOPIC 331 #define RPL_TOPIC 332 #define RPL_TOPICWHOTIME 333 /* Undernet extension */ #define RPL_LISTUSAGE 334 /* Undernet extension */ -/* RPL_CHANPASSOK 338 IRCnet extension */ -/* RPL_BADCHANPASS 339 IRCnet extension */ +/* RPL_WHOISACTUALLY 338 Undernet & Dalnet extension */ +/* RPL_CHANPASSOK 338 IRCnet extension */ +/* RPL_BADCHANPASS 339 IRCnet & Dalnet extension */ +#define RPL_USERIP 340 /* Undernet extension */ #define RPL_INVITING 341 /* RPL_SUMMONING 342 removed from RFC1459 */ + +/* RPL_INVITELIST 346 IRCnet & Undernet extension */ +/* RPL_ENDOFINVITELIST 347 IRCnet & Undernet extension */ /* RPL_EXCEPTLIST 348 IRCnet extension */ /* RPL_ENDOFEXCEPTLIST 349 IRCnet extension */ #define RPL_VERSION 351 - #define RPL_WHOREPLY 352 /* See also RPL_ENDOFWHO */ #define RPL_NAMREPLY 353 /* See also RPL_ENDOFNAMES */ #define RPL_WHOSPCRPL 354 /* Undernet extension, See also RPL_ENDOFWHO */ -#define RPL_KILLDONE 361 +#define RPL_KILLDONE 361 /* Unused */ #define RPL_CLOSING 362 #define RPL_CLOSEEND 363 #define RPL_LINKS 364 @@ -208,26 +289,37 @@ #define RPL_INFO 371 #define RPL_MOTD 372 -#define RPL_INFOSTART 373 +#define RPL_INFOSTART 373 /* Unused */ #define RPL_ENDOFINFO 374 #define RPL_MOTDSTART 375 #define RPL_ENDOFMOTD 376 - +/* RPL_KICKEXPIRED 377 Aircd */ +/* RPL_SPAM 377 Austnet */ #if defined(BDD) #define RPL_WHOISHOST 378 /* Hispano extension */ +/* RPL_BANEXPIRED 378 Aircd */ #define RPL_WHOISMODES 379 /* Hispano extension */ -#define RPL_USERIP 380 /* Undernet extension FIXED */ +/* RPL_KICKLINKED 379 Aircd */ #endif - +/* RPL_BANLINKED 380 Aircd */ #define RPL_YOUREOPER 381 #define RPL_REHASHING 382 -#define RPL_MYPORTIS 384 -#define RPL_NOTOPERANYMORE 385 /* Extension to RFC1459 */ - +/* RPL_YOURSERVICE 383 Various */ +#define RPL_MYPORTIS 384 /* Unused */ +#define RPL_NOTOPERANYMORE 385 /* Extension to RFC1459, not used */ +/* RPL_QLIST 386 Unreal */ +/* RPL_ENDOFQLIST 387 Unreal */ +/* RPL_ALIST 388 Unreal */ +/* RPL_ENDOFALIST 389 Unreal */ #if defined(BDD) #define RPL_WHOISSUSPNICK 390 /* Hispano extension */ #endif #define RPL_TIME 391 +/* RPL_START_USERS 392 Dalnet,EFNet,IRCnet */ +/* RPL_USERS 393 Dalnet,EFNet,IRCnet */ +/* RPL_END_USERS 394 Dalnet,EFNet,IRCnet */ +/* RPL_NOUSERS 395 Dalnet,EFNet,IRCnet */ + #define RPL_TRACELINK 200 #define RPL_TRACECONNECTING 201 @@ -238,36 +330,65 @@ #define RPL_TRACESERVER 206 #define RPL_TRACENEWTYPE 208 #define RPL_TRACECLASS 209 - +/* RPL_STATS 210 Aircd, used instead of having + multiple stats numerics */ +/* RPL_TRACERECONNECT 210 IRCnet extension */ #define RPL_STATSLINKINFO 211 #define RPL_STATSCOMMANDS 212 #define RPL_STATSCLINE 213 -#define RPL_STATSNLINE 214 +#define RPL_STATSNLINE 214 /* Unused */ +/* RPL_STATSOLDNLINE 214 Unreal */ #define RPL_STATSILINE 215 #define RPL_STATSKLINE 216 #define RPL_STATSPLINE 217 /* Undernet extenstion */ +/* RPL_STATSQLINE 217 Various */ #define RPL_STATSYLINE 218 #define RPL_ENDOFSTATS 219 /* See also RPL_STATSDLINE */ - +/* RPL_STATSPLINE 220 EFNet - Because 217 was for old Q: lines */ +/* RPL_STATSBLINE 220 Dalnet extension */ #define RPL_UMODEIS 221 +/* RPL_SQLINE_NICK 222 Dalnet extension */ +/* RPL_STATSELINE 223 Dalnet extension */ +/* RPL_STATSGLINE 223 Unreal */ +/* RPL_STATSFLINE 224 Dalnet & EFNet extension */ +/* RPL_STATSTLINE 224 Unreal */ +/* RPL_STATSDLINE 225 EFNet extension */ +/* RPL_STATSZLINE 225 Dalnet extension */ +/* RPL_STATSELINE 225 Unreal */ +/* RPL_STATSCOUNT 226 Dalnet extension */ +/* RPL_STATSNLINE 226 Unreal */ +/* RPL_STATSGLINE 227 Dalnet extension */ +/* RPL_STATSVLINE 227 Unreal */ -#define RPL_SERVICEINFO 231 -#define RPL_ENDOFSERVICES 232 -#define RPL_SERVICE 233 -#define RPL_SERVLIST 234 -#define RPL_SERVLISTEND 235 - -#define RPL_STATSELINE 239 /* EFNet extension */ +#define RPL_SERVICEINFO 231 /* Unused */ +#define RPL_ENDOFSERVICES 232 /* Unused */ +/* RPL_RULES 232 Unreal */ +#define RPL_SERVICE 233 /* Unused */ +#define RPL_SERVLIST 234 /* Unused */ +#define RPL_SERVLISTEND 235 /* Unused */ +/* RPL_STATSVERBOSE 236 Undernet extension */ +/* RPL_STATSENGINE 237 Undernet extension */ +/* RPL_STATSFLINE 238 Undernet extension */ +/* RPL_STATSIAUTH 239 IRCnet extension */ +#define RPL_STATSELINE 239 /* EFNet extension. ELINES */ +/* RPL_STATSVLINE 240 IRCnet extension */ +/* RPL_STATSXLINE 240 Austnet */ #define RPL_STATSLLINE 241 #define RPL_STATSUPTIME 242 #define RPL_STATSOLINE 243 #define RPL_STATSHLINE 244 -/* RPL_STATSSLINE 245 Reserved */ +/* RPL_STATSSLINE 245 Reserved / Dalnet, EFNet, IRCnet*/ #define RPL_STATSTLINE 246 /* Undernet extension */ +/* RPL_STATSULINE 246 Dalnet extension */ +/* RPL_STATSSPING 246 IRCnet extension */ #define RPL_STATSGLINE 247 /* Undernet extension */ +/* RPL_STATSBLINE 247 IRCnet extension */ +/* RPL_STATSXLINE 247 EFNet extension */ #define RPL_STATSULINE 248 /* Undernet extension */ +/* RPL_STATSDEFINE 248 IRCnet extension */ #define RPL_STATSDEBUG 249 /* Extension to RFC1459 */ #define RPL_STATSCONN 250 /* Undernet extension */ +/* RPL_STATSDLINE 250 IRCnet extension */ #define RPL_LUSERCLIENT 251 #define RPL_LUSEROP 252 @@ -279,22 +400,55 @@ #define RPL_ADMINLOC2 258 #define RPL_ADMINEMAIL 259 -#define RPL_TRACELOG 261 +#define RPL_TRACELOG 261 /* Unused */ #define RPL_TRACEPING 262 /* Extension to RFC1459 */ +/* RPL_TRACEEND 262 EFNet & IRCnet extension */ +/* RPL_LOAD_THROTTLED 263 EFNet extension */ +/* RPL_TRYAGAIN 263 IRCnet extension */ +/* RPL_LOAD2HI 263 Dalnet extension */ -#define RPL_LOCALUSERS 265 /* Dal.Net: localusers */ -#define RPL_GLOBALUSERS 266 /* Dal.Net: globalusers */ - +#define RPL_LOCALUSERS 265 /* Dal.Net: localusers - Hispano extension */ +/* RPL_CURRENT_LOCAL 265 Dalnet & EFNet extension */ +#define RPL_GLOBALUSERS 266 /* Dal.Net: globalusers - Hispano extension */ +/* RPL_CURRENT_GLOBAL 266 Dalnet & EFNet extension */ +/* RPL_START_NETSTAT 267 Aircd */ +/* RPL_NETSTAT 268 Aircd */ +/* RPL_END_NETSTAT 269 Aircd */ +/* RPL_PRIVS 270 Undernet extension */ #define RPL_SILELIST 271 /* Undernet extension */ #define RPL_ENDOFSILELIST 272 /* Undernet extension */ - +/* RPL_NOTIFY 273 Aircd */ /* RPL_STATSDELTA 274 IRCnet extension */ +/* RPL_STATSDELTA 274 Aircd */ #define RPL_STATSDLINE 275 /* Undernet extension */ #define RPL_GLIST 280 /* Undernet extension */ #define RPL_ENDOFGLIST 281 /* Undernet extension */ +/* RPL_JUPELIST 282 Undernet extension */ +/* RPL_ENDOFJUPELIST 283 Undernet extension */ +/* RPL_FEATURE 284 Undernet extension */ +/* RPL_CHANINFO_HANDLE 285 Aircd */ +/* RPL_CHANINFO_USERS 286 Aircd */ +/* RPL_CHANINFO_CHOPS 287 Aircd */ +/* RPL_CHANINFO_VOICES 288 Aircd */ +/* RPL_CHANINFO_AWAY 289 Aircd */ +/* RPL_CHANINFO_OPERS 290 Aircd */ +/* RPL_HELPHDR 290 Dalnet extension */ +/* RPL_CHANINFO_BANNED 291 Aircd */ +/* RPL_HELPOP 291 Dalnet extension */ +/* RPL_CHANINFO_BANS 292 Aircd */ +/* RPL_HELPTLR 292 Dalnet extension */ +/* RPL_CHANINFO_INVITE 293 Aircd */ +/* RPL_HELPHLP 293 Dalnet extension */ +/* RPL_CHANINFO_INVITES 294 Aircd */ +/* RPL_HELPFWD 294 Dalnet extension */ +/* RPL_CHANINFO_KICK 295 Aircd */ +/* RPL_HELPIGN 295 Dalnet extension */ +/* RPL_CHANINFO_KICKS 296 Aircd */ + +/* RPL_END_CHANINFO 299 Aircd */ + -#ifdef WATCH /* * Numericos para WATCH * @@ -310,6 +464,19 @@ #define RPL_WATCHLIST 606 /* Dalnet extension */ #define RPL_ENDOFWATCHLIST 607 /* Dalnet extension */ -#endif /* WATCH */ -#endif /* NUMERIC_H */ +/* RPL_MAPMORE 610 Unreal */ + +/* RPL_MAPMORE 615 PTlink */ + +/* RPL_DCCSTATUS 617 Dalnet extension */ +/* RPL_DCCLIST 618 Dalnet extension */ +/* RPL_ENDOFDCCLIST 619 Dalnet extension */ +/* RPL_DCCINFO 620 Dalnet extension */ + +/* RPL_DUMPING 640 Unreal */ +/* RPL_DUMPRPL 641 Unreal */ +/* RPL_EODUMP 642 Unreal */ + + +#endif /* INCLUDED_numeric_h */ |
From: Zolty <zo...@us...> - 2002-08-15 23:10:18
|
Update of /cvsroot/irc-dev/ircdh In directory usw-pr-cvs1:/tmp/cvs-serv7150/ircdh Modified Files: CAMBIOS.IRCDEV TODO_IRCDEV Log Message: 2002-08-16 Toni Garcia <zo...@ir...> Documentacion de los numericos utilizados en las redes mundiales para ver los numericos libres y los que estan en conflicto. * Se cambia el numerico del USERIP del 307/378 al nuevo 340 que es el que utiliza en undernet. Index: CAMBIOS.IRCDEV =================================================================== RCS file: /cvsroot/irc-dev/ircdh/CAMBIOS.IRCDEV,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- CAMBIOS.IRCDEV 15 Aug 2002 20:55:23 -0000 1.12 +++ CAMBIOS.IRCDEV 15 Aug 2002 23:10:14 -0000 1.13 @@ -1,3 +1,11 @@ +2002-08-16 Toni Garcia <zo...@ir...> + Documentacion de los numericos utilizados en las redes mundiales para ver + los numericos libres y los que estan en conflicto. + + * Se cambia el numerico del USERIP del 307/378 al nuevo 340 que es el que + utiliza en undernet. + + 2002-08-15 Toni Garcia <zo...@ir...> Comienzo de la ordenacion del codigo. * Muevo todos los defines del whocmds.c al .h ya que nos hara falta cuando Index: TODO_IRCDEV =================================================================== RCS file: /cvsroot/irc-dev/ircdh/TODO_IRCDEV,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- TODO_IRCDEV 26 Jul 2002 22:48:43 -0000 1.2 +++ TODO_IRCDEV 15 Aug 2002 23:10:14 -0000 1.3 @@ -14,3 +14,27 @@ - Comando WALLUSERS Media - Version Windows WIN32/WIN64 Muy Baja +- Cambios en varios numericos Media + + +Cambios en varios numericos +------------------------------------------------------------------ +Mover numerico de /STATS E, 239 (Hispano) al 223 (Dalnet). + +Por colision de numericos con nuevas features de undernet, hay que +mover los numericos nuevos del /OPER. Son los siguientes: + 492 ERR_OPERCLASSFULL + 493 ERR_NOOPERCLASS +Buscar un sitio adecuado para los dos numericos. + +Y el de Silence: + 494 ERR_SILECANTBESHOWN +Hay que mover al 509 al lado del 510 y 511 que tienen que ver con +el silence. + +El numerico de ERR_NOSUCHGLINE que movimos en su dia del 512 al 514, hay +que volver a cambiarlo, ya que se usa para el JUPE, cosa interesante +para el ircd. + +Seria conveniente avisar a Undernet de los numericos utilizados para +que los reserven. |
From: Zolty <zo...@us...> - 2002-08-15 23:10:18
|
Update of /cvsroot/irc-dev/ircdh/ircd In directory usw-pr-cvs1:/tmp/cvs-serv7150/ircdh/ircd Modified Files: s_err.c Log Message: 2002-08-16 Toni Garcia <zo...@ir...> Documentacion de los numericos utilizados en las redes mundiales para ver los numericos libres y los que estan en conflicto. * Se cambia el numerico del USERIP del 307/378 al nuevo 340 que es el que utiliza en undernet. Index: s_err.c =================================================================== RCS file: /cvsroot/irc-dev/ircdh/ircd/s_err.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- s_err.c 27 Jul 2002 15:02:48 -0000 1.3 +++ s_err.c 15 Aug 2002 23:10:15 -0000 1.4 @@ -353,7 +353,7 @@ {RPL_WHOISHELPOP, "%s :Es un OPERador de los servicios de red"}, #else /* 307 */ - {RPL_USERIP, ":"}, + {0, (char *)NULL}, /* 308 */ {0, (char *)NULL}, /* 309 */ @@ -420,7 +420,7 @@ /* 339 */ {0, (char *)NULL}, /* 340 */ - {0, (char *)NULL}, + {RPL_USERIP, ":"}, /* 341 */ {RPL_INVITING, "%s %s"}, /* 342 */ @@ -504,16 +504,14 @@ {RPL_WHOISHOST, "%s :Dirección VIRTUAL %s"}, /* 379 */ {RPL_WHOISMODES, "%s :Utiliza los modos [%s]"}, -/* 380 */ - {RPL_USERIP, ":"}, #else /* 378 */ {0, (char *)NULL}, /* 379 */ {0, (char *)NULL}, +#endif /* 380 */ {0, (char *)NULL}, -#endif /* 381 */ {RPL_YOUREOPER, ":You are now an IRC Operator"}, /* 382 */ |
Update of /cvsroot/irc-dev/ircdh/include In directory usw-pr-cvs1:/tmp/cvs-serv7124/ircdh/include Modified Files: IPcheck.h channel.h class.h hash.h ircd.h list.h map.h match.h msg.h numnicks.h opercmds.h packet.h parse.h patchlevel.h querycmds.h random.h res.h s_auth.h s_bsd.h s_conf.h s_debug.h s_misc.h s_numeric.h s_serv.h s_user.h send.h struct.h support.h sys.h userload.h version.h whocmds.h whowas.h Added Files: ircd_defs.h Log Message: 2002-08-15 Toni Garcia <zo...@ir...> Comienzo de la ordenacion del codigo. * Muevo todos los defines del whocmds.c al .h ya que nos hara falta cuando pongamos cada comando, un *.c. * Se hacen cambios en muchos variables globales con el fin de facilitar la lectura e interpretacion. Son los siguientes: time_t now; => time_t CurrentTime; struct Client client; => struct Client *GlobalClientList; struct lusers_st nrof; => struct UserStatistics UserStats; struct stats *ircstp; => struct ServerStatistics *ServerStats; struct ConfItem *conf; => struct ConfItem *GlobalConfList; struct DSlink; => struct DLink; * Empiezo a eliminar los alias de structs, ejempo "aClient" pasa a ser "struct Client". Y en algunas funciones agrego "const" cuando han de mantener la variable de forma constante. * Se desactivan temporalmente WATCH y ESNET_ZLIB mientras se va ordenando el codigo, en breves dias estaran activados. * En los archivos .h de la carpeta include meto las cabeceras con el $Id: de control de RCS asi como los nuevos defines al estilo Undernet. * Se mueven los defines *LEN y similiares al nuevo fichero ircd_defs.h. --- NEW FILE: ircd_defs.h --- /* * IRC - Internet Relay Chat, include/ircd_defs.h * 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 2, 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. * * Commentary by Bleep (Thomas Helvey) * * $Id: */ #ifndef INCLUDED_ircd_defs_h #define INCLUDED_ircd_defs_h /* * Definitions used everywhere in the server * NOTE: Changing any of these definitions is equivalent to a protocol * revision. Every server on a given network must also use the same sizes. */ /* * NICKLEN is the maximum length allowed for a nickname * * Because certain networks are very helpful in finding bugs, the below * is a default that can easily be overridden in CFLAGS. Just add * -DNICKLEN=15 to CFLAGS and save your config in .., and you can forget about * it. Thanks for helping debug guys. */ #ifndef NICKLEN #define NICKLEN 9 #endif /* * USERLEN is the maximum length allowed of a user name including an optional * leading '~' if the user name has not been authenticated by an auth (RFC 931) * server query. */ #define USERLEN 10 /* * HOSTLEN is exactly long enough to hold one (1) segment of FQDN or hostname. * This is due to an historical misinterpretation of RFC 1034. * 3.1. Name space specifications and terminology * * The domain name space is a tree structure. Each node and leaf on the * tree corresponds to a resource set (which may be empty). The domain * system makes no distinctions between the uses of the interior nodes and * leaves, and this memo uses the term "node" to refer to both. * * Each node has a label, which is zero to 63 octets in length. Brother * nodes may not have the same label, although the same label can be used * for nodes which are not brothers. One label is reserved, and that is * the null (i.e., zero length) label used for the root. * * This has proven not to be a problem in the past as connections with FQDN's * of greater than 63 characters are rejected by the server, and most FQDN's * are shorter. It is possible to have a valid FQDN longer than 63 characters. */ #define HOSTLEN 63 /* * REALLEN is the maximum length for user supplied information about a client * connection (gcos). This information is set at client/server registration * time. */ #define REALLEN 50 /* * PASSWDLEN is the maximum length for a password used for connecting servers * and clients. */ #define PASSWDLEN 20 /* * SOCKIPLEN is the length of a dotted quad ip address "XXX.XXX.XXX.XXX" */ #define SOCKIPLEN 15 /* * TOPICLEN is the maximum length for channel topics */ #define TOPICLEN 160 /* * KICKLEN is the maximum length for kick comments */ #define KICKLEN 160 /* * AWAYLEN is the maximum length for away messages */ #define AWAYLEN 160 /* * QUITLEN is the maximum length for quit messages and kill comments */ #define QUITLEN 250 /* * BUFSIZE is exactly long enough to hold one protocol message (RFC 1459) * including the line termination (\r\n). */ #define BUFSIZE 512 /* WARNING: *DONT* CHANGE THIS!!!! */ #define MAXTARGETS 20 #define STARTTARGETS 10 #define RESERVEDTARGETS 12 #endif /* INCLUDED_ircd_defs_h */ Index: IPcheck.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/IPcheck.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- IPcheck.h 26 Jul 2002 21:58:23 -0000 1.1.1.1 +++ IPcheck.h 15 Aug 2002 20:55:23 -0000 1.2 @@ -1,10 +1,25 @@ -#ifndef IPCHECK_H -#define IPCHECK_H - -/*============================================================================= - * Proto types +/* + * IPcheck.h + * + * $Id: */ +#ifndef INCLUDED_ipcheck_h +#define INCLUDED_ipcheck_h + +#ifndef INCLUDED_sys_types_h +#include <sys/types.h> /* time_t, size_t */ +#define INCLUDED_sys_types_h +#endif +#ifndef INCLUDED_netinet_in_h +#include <netinet/in.h> /* in_addr */ +#define INCLUDED_netinet_in_h +#endif + + +/* + * Prototypes + */ extern int IPcheck_local_connect(aClient *cptr); extern void IPcheck_connect_fail(aClient *cptr); extern void IPcheck_connect_succeeded(aClient *cptr); Index: channel.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/channel.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- channel.h 6 Aug 2002 18:45:19 -0000 1.2 +++ channel.h 15 Aug 2002 20:55:23 -0000 1.3 @@ -16,14 +16,23 @@ * 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 INCLUDED_channel_h +#define INCLUDED_channel_h +#ifndef INCLUDED_ircd_defs_h +#include "ircd_defs.h" /* NICKLEN */ +#endif +#ifndef INCLUDED_sys_types_h +#include <sys/types.h> +#define INCLUDED_sys_types_h +#endif -#include "list.h" - -#ifndef CHANNEL_H -#define CHANNEL_H +struct SLink; +struct Client; -/*============================================================================= +/* * General defines */ @@ -31,17 +40,16 @@ #define MODEBUFLEN 200 #define KEYLEN 23 -#define KICKLEN 160 /* Hispano extension */ -#define TOPICLEN 160 #define CHANNELLEN 64 #define MAXBANS 30 #define MAXBANLENGTH 1024 -/*============================================================================= +/* * Macro's */ #define ChannelExists(n) (FindChannel(n) != NullChn) +/* Borrar */ #define NullChn ((aChannel *)0) #define CREATE 1 /* whether a channel should be * created or just tested for existance */ @@ -54,7 +62,6 @@ #define CHFL_BAN 0x0020 /* ban channel flag */ #define CHFL_BAN_IPMASK 0x0040 /* ban mask is an IP-number mask */ #define CHFL_BAN_OVERLAPPED 0x0080 /* ban overlapped, need bounce */ -#define CHFL_OVERLAP (CHFL_CHANOP|CHFL_VOICE) #define CHFL_BURST_JOINED 0x0100 /* Just joined by net.junction */ #define CHFL_BURST_BAN 0x0200 /* Ban part of last BURST */ #define CHFL_BURST_BAN_WIPEOUT 0x0400 /* Ban will be wiped at end of BURST */ @@ -62,6 +69,10 @@ #define CHFL_BANNED 0x1000 /* Channel member is banned */ #define CHFL_SILENCE_IPMASK 0x2000 /* silence mask is an IP-number mask */ +#define CHFL_OVERLAP (CHFL_CHANOP|CHFL_VOICE) +#define CHFL_BANVALIDMASK (CHFL_BANVALID | CHFL_BANNED) +#define CHFL_VOICED_OR_OPPED (CHFL_CHANOP | CHFL_VOICE) + /* Channel Visibility macros */ #define MODE_CHANOP CHFL_CHANOP @@ -200,4 +211,4 @@ extern aChannel *channel; -#endif /* CHANNEL_H */ +#endif /* INCLUDED_channel_h */ Index: class.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/class.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- class.h 26 Jul 2002 21:58:23 -0000 1.1.1.1 +++ class.h 15 Aug 2002 20:55:23 -0000 1.2 @@ -16,15 +16,22 @@ * 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 INCLUDED_class_h +#define INCLUDED_class_h +#ifndef INCLUDED_sys_types_h +#include <sys/types.h> +#define INCLUDED_sys_types_h +#endif -#ifndef CLASS_H -#define CLASS_H +struct Client; +struct ConfItem; -/*========================================================================= +/* * Structures */ - struct ConfClass { unsigned int conClass; unsigned int conFreq; @@ -35,7 +42,7 @@ struct ConfClass *next; }; -/*============================================================================= +/* * Macro's */ @@ -59,7 +66,7 @@ #define MarkDelete(x) do { MaxLinks(x) = (unsigned int)-1; } while(0) #define IsMarkedDelete(x) (MaxLinks(x) == (unsigned int)-1) -/*============================================================================= +/* * Proto types */ @@ -79,4 +86,4 @@ extern aConfClass *classes; -#endif /* CLASS_H */ +#endif /* INCLUDED_class_h */ Index: hash.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/hash.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- hash.h 26 Jul 2002 21:58:23 -0000 1.1.1.1 +++ hash.h 15 Aug 2002 20:55:23 -0000 1.2 @@ -15,29 +15,33 @@ * 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 HASH_H -#define HASH_H +#ifndef INCLUDED_hash_h +#define INCLUDED_hash_h -#include "s_serv.h" /* For STAT_* values and StatusMask() macro */ +struct Client; +struct Channel; +struct Watch; -/*============================================================================= +/* * general defines */ /* Now client and channel hash table must be of the same size */ -#define HASHSIZE 32000 +#define HASHSIZE 32000 -/*============================================================================= +/* * Structures */ -/*============================================================================= +/* * Macros for internal use */ -/*============================================================================= +/* * Externally visible pseudofunctions (macro interface to internal functions) */ @@ -47,6 +51,7 @@ #define SeekUser(name) hSeekClient((name), StatusMask(STAT_USER)) #define SeekServer(name) hSeekClient((name), StatusMask(STAT_ME) | \ StatusMask(STAT_SERVER) ) +#define SeekWatch(name) hSeekWatch((name)) /* Safer macros with sanity check on name, WARNING: these are _macros_, no side effects allowed on <name> ! */ @@ -54,19 +59,23 @@ #define FindClient(name) (BadPtr((name))?NULL:SeekClient(name)) #define FindUser(name) (BadPtr((name))?NULL:SeekUser(name)) #define FindServer(name) (BadPtr((name))?NULL:SeekServer(name)) +#define FindWatch(name) (BadPtr((name))?NULL:SeekWatch(name)) -/*============================================================================= +/* * Proto types */ extern void hash_init(void); /* Call me on startup */ -extern int hAddClient(aClient *cptr); -extern int hAddChannel(aChannel *chptr); -extern int hRemClient(aClient *cptr); -extern int hChangeClient(aClient *cptr, char *newname); -extern int hRemChannel(aChannel *chptr); -extern aClient *hSeekClient(char *name, int TMask); -extern aChannel *hSeekChannel(char *name); +extern int hAddClient(struct Client *cptr); +extern int hAddChannel(struct Channel *chptr); +extern int hAddWatch(struct Watch *wptr); +extern int hRemClient(struct Client *cptr); +extern int hChangeClient(struct Client *cptr, const char *newname); +extern int hRemChannel(struct Channel *chptr); +extern int hRemWatch(struct Watch *wptr); +extern struct Client *hSeekClient(const char *name, int TMask); +extern struct Channel *hSeekChannel(const char *name); +extern struct Watch *hSeekWatch(const char *name); extern int m_hash(aClient *cptr, aClient *sptr, int parc, char *parv[]); @@ -78,13 +87,4 @@ extern int dbh_hash_registro(char *clave, int hash_size); #endif /* BDD */ -#ifdef WATCH -extern int hAddWatch(aWatch * wptr); -extern int hRemWatch(aWatch * wptr); -extern aWatch *hSeekWatch(char *nick); - -#define SeekWatch(nick) hSeekWatch((nick)) -#define FindWatch(nick) (BadPtr((nick))?NULL:SeekWatch(nick)) -#endif /* WATCH */ - -#endif /* HASH_H */ +#endif /* INCLUDED_hash_h */ Index: ircd.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/ircd.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- ircd.h 26 Jul 2002 21:58:23 -0000 1.1.1.1 +++ ircd.h 15 Aug 2002 20:55:23 -0000 1.2 @@ -1,11 +1,27 @@ -#ifndef IRCD_H -#define IRCD_H +/* + * ircd.h + * + * $Id: + */ +#ifndef INCLUDED_ircd_h +#define INCLUDED_ircd_h +#ifndef INCLUDED_config_h +//#include "config.h" +#endif +#ifndef INCLUDED_struct_h +#include "struct.h" /* struct Client */ +#endif +#ifndef INCLUDED_sys_types_h +#include <sys/types.h> /* size_t, time_t */ +#endif -/*============================================================================= - * Macro's + +/* + * Macros */ -#define TStime() (now + TSoffset) +#define TStime() (CurrentTime + TSoffset) +#define OLDEST_TS 780000000 /* Any TS older than this is bogus */ #define BadPtr(x) (!(x) || (*(x) == '\0')) /* Miscellaneous defines */ @@ -16,7 +32,7 @@ #define BASE_VERSION "u2.10" /* Flags for bootup options (command line flags) */ - +/* NO SE USA CONSOLE, INETD y AUTODIE */ #define BOOT_CONSOLE 1 #define BOOT_QUICK 2 #define BOOT_DEBUG 4 @@ -24,7 +40,7 @@ #define BOOT_TTY 16 #define BOOT_AUTODIE 32 -/*============================================================================= +/* * Proto types */ @@ -37,18 +53,21 @@ extern void restart(char *mesg); extern void server_reboot(void); -extern aClient me; -extern time_t now; -extern aClient *client; +extern struct Client me; +extern time_t CurrentTime; +extern struct Client *GlobalClientList; extern time_t TSoffset; extern unsigned int bootopt; extern time_t nextdnscheck; extern time_t nextconnect; -extern int dorehash; +extern int GlobalRehashFlag; +extern int GlobalRestartFlag; extern time_t nextping; -extern unsigned short int portnum; extern char *configfile; -extern int debuglevel; +extern int debuglevel; extern char *debugmode; -#endif /* IRCD_H */ +/* Borrar cuando sea necesario */ +extern unsigned short int portnum; + +#endif /* INCLUDED_ircd_h */ Index: list.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/list.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- list.h 26 Jul 2002 21:58:23 -0000 1.1.1.1 +++ list.h 15 Aug 2002 20:55:23 -0000 1.2 @@ -1,27 +1,31 @@ -#ifndef LIST_H -#define LIST_H - -/*============================================================================= - * General defines - */ +/* + * list.h + * + * $Id: +*/ +#ifndef INCLUDED_list_h +#define INCLUDED_list_h +#ifndef INCLUDED_sys_types_h +#include <sys/types.h> /* time_t, size_t */ +#define INCLUDED_sys_types_h +#endif -/*============================================================================= - * Macro's - */ +struct Client; +struct Channel; +struct ConfItem; +struct Watch; -/* ============================================================================ +/* * Structures */ struct SLink { struct SLink *next; union { - aClient *cptr; + struct Client *cptr; struct Channel *chptr; struct ConfItem *aconf; -#ifdef WATCH - aWatch *wptr; -#endif + struct Watch *wptr; char *cp; struct { char *banstr; @@ -32,18 +36,20 @@ unsigned int flags; }; -struct DSlink { - struct DSlink *next; - struct DSlink *prev; +struct DLink { + struct DLink *next; + struct DLink *prev; union { - aClient *cptr; + struct Client *cptr; struct Channel *chptr; - struct ConfItem *aconf; - char *cp; +/* borrar */ +// struct ConfItem *aconf; +// char *cp; +/* fin borrar */ + char *ch; } value; }; -#ifdef WATCH struct Watch { struct Watch *next; struct SLink *watch; /* Cadena de punteros a lista aUser */ @@ -51,40 +57,42 @@ time_t lasttime; /* TS de ultimo cambio de estado del nick */ }; -#endif /* WATCH */ -/*============================================================================= +/* * Proto types */ -extern void free_link(Link *lp); -extern Link *make_link(void); -extern Link *find_user_link(Link *lp, aClient *ptr); +extern void free_link(struct SLink *lp); +extern struct SLink *make_link(void); +extern struct SLink *find_user_link(struct SLink *lp, struct Client *ptr); +extern void init_list(void); +extern struct Client *make_client(struct Client *from, int status); +extern void free_client(struct Client *cptr); +extern struct Server *make_server(struct Client *cptr); +extern void remove_client_from_list(struct Client *cptr); +extern void add_client_to_list(struct Client *cptr); +extern struct DLink *add_dlink(struct DLink **lpp, struct Client *cp); +extern void remove_dlink(struct DLink **lpp, struct DLink *lp); +extern struct ConfItem *make_conf(void); +extern void delist_conf(struct ConfItem *aconf); +extern void free_conf(struct ConfItem *aconf); +extern void send_listinfo(struct Client *cptr, char *name); + +/* provisional */ extern void initlists(void); extern void outofmemory(void); -extern aClient *make_client(aClient *from, int status); -extern void free_client(aClient *cptr); extern struct User *make_user(aClient *cptr); -extern struct Server *make_server(aClient *cptr); extern void free_user(struct User *user, aClient *cptr); -extern void remove_client_from_list(aClient *cptr); -extern void add_client_to_list(aClient *cptr); -extern Dlink *add_dlink(Dlink **lpp, aClient *cp); -extern void remove_dlink(Dlink **lpp, Dlink *lp); -extern struct ConfItem *make_conf(void); -extern void delist_conf(struct ConfItem *aconf); -extern void free_conf(struct ConfItem *aconf); extern aGline *make_gline(int is_ipmask, char *host, char *reason, char *name, time_t expire); extern aGline *find_gline(aClient *cptr, aGline **pgline); extern void free_gline(aGline *agline, aGline *pgline); -extern void send_listinfo(aClient *cptr, char *name); #ifdef BADCHAN extern int bad_channel(char *name); #endif -#ifdef WATCH -extern aWatch *make_watch(char *nick); -extern void free_watch(aWatch * wptr); -#endif /* WATCH */ -#endif /* LIST_H */ +extern struct Watch *make_watch(const char *nick); +extern void free_watch(struct Watch *wptr); + +#endif /* INCLUDED_list_h */ + Index: map.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/map.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- map.h 26 Jul 2002 21:58:23 -0000 1.1.1.1 +++ map.h 15 Aug 2002 20:55:23 -0000 1.2 @@ -1,10 +1,20 @@ -#ifndef MAP_H -#define MAP_H +/* + * map.h + * + * $Id: + */ +#ifndef INCLUDED_map_h +#define INCLUDED_map_h -/*============================================================================= - * Proto types +struct Client; + +/* + * Prototypes */ +/* borrar */ extern int m_map(aClient *cptr, aClient *sptr, int parc, char *parv[]); -#endif /* MAP_H */ +void dump_map(struct Client *cptr, struct Client *server, char *mask, int prompt_length); + +#endif /* INCLUDED_map_h */ Index: match.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/match.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- match.h 26 Jul 2002 21:58:23 -0000 1.1.1.1 +++ match.h 15 Aug 2002 20:55:23 -0000 1.2 @@ -1,6 +1,20 @@ -#ifndef MATCH_H -#define MATCH_H +/* + * match.h + * + * $Id: +*/ +#ifndef INCLUDED_match_h +#define INCLUDED_match_h +#ifndef INCLUDED_sys_types_h +#include <sys/types.h> /* XXX - broken BSD system headers */ +#define INCLUDED_sys_types_h +#endif +#ifndef INCLUDED_netinet_in_h +#include <netinet/in.h> /* struct in_addr */ +#define INCLUDED_netinet_in_h +#endif +/* BORRAR */ /*============================================================================= * System headers used by this header file */ @@ -8,20 +22,23 @@ #include <netinet/in.h> #include <arpa/inet.h> -/*============================================================================= +/* * Structures */ - struct in_mask { struct in_addr bits; struct in_addr mask; int fall; }; -/*============================================================================= - * Proto types +/* + * Prototypes */ +/* + * XXX - match returns 0 if a match is found. Smelly interface + * needs to be fixed. --Bleep + */ extern int mmatch(const char *old_mask, const char *new_mask); extern int match(const char *ma, const char *na); extern char *collapse(char *pattern); @@ -32,4 +49,5 @@ extern int mmexec(const char *wcm, int wminlen, const char *rcm, int rminlen); extern int matchcompIP(struct in_mask *imask, const char *mask); -#endif /* MATCH_H */ +#endif /* INCLUDED_match_h */ + Index: msg.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/msg.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- msg.h 26 Jul 2002 21:58:23 -0000 1.1.1.1 +++ msg.h 15 Aug 2002 20:55:23 -0000 1.2 @@ -16,19 +16,25 @@ * 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 INCLUDED_msg_h +#define INCLUDED_msg_h +#ifndef INCLUDED_ircd_handler_h +//#include "ircd_handler.h" +#endif -#ifndef MSG_H -#define MSG_H +struct Client; -/*============================================================================= +/* * General defines */ #define MAXPARA 15 -/*----------------------------------------------------------------------------- - * Macro's +/* + * Macros */ /* Index: numnicks.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/numnicks.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- numnicks.h 26 Jul 2002 21:58:23 -0000 1.1.1.1 +++ numnicks.h 15 Aug 2002 20:55:23 -0000 1.2 @@ -1,5 +1,5 @@ /* - * IRC - Internet Relay Chat, include/h.h + * IRC - Internet Relay Chat, include/numnicks.h * Copyright (C) 1996 - 1997 Carlo Wood * * This program is free software; you can redistribute it and/or modify Index: opercmds.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/opercmds.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- opercmds.h 26 Jul 2002 21:58:23 -0000 1.1.1.1 +++ opercmds.h 15 Aug 2002 20:55:23 -0000 1.2 @@ -1,7 +1,18 @@ -#ifndef OPERCMDS_H -#define OPERCMDS_H +/* + * opercmds.h + * + * $Id: + */ +#ifndef INCLUDED_opercmds_h +#define INCLUDED_opercmds_h +#ifndef INCLUDED_sys_types_h +#include <sys/types.h> +#define INCLUDED_sys_types_h +#endif -/*============================================================================= +struct Client; + +/* * General defines */ Index: packet.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/packet.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- packet.h 26 Jul 2002 21:58:23 -0000 1.1.1.1 +++ packet.h 15 Aug 2002 20:55:23 -0000 1.2 @@ -1,11 +1,25 @@ -#ifndef PACKET_H -#define PACKET_H - -/*============================================================================= - * Proto types +/* + * packet.h + * + * $Id: */ +#ifndef INCLUDED_packet_h +#define INCLUDED_packet_h +#ifndef INCLUDED_sys_types_h +#include <sys/types.h> +#define INCLUDED_sys_types_h +#endif + +struct Client; +/* + * Prototypes + */ +/*eliminar */ extern int dopacket(aClient *cptr, char *buffer, int length); -extern int client_dopacket(aClient *cptr, size_t length); -#endif /* PACKET_H */ +extern int server_dopacket(struct Client *cptr, const char *buffer, int length); +extern int client_dopacket(struct Client *cptr, size_t length); + +#endif /* INCLUDED_packet_h */ + Index: parse.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/parse.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- parse.h 26 Jul 2002 21:58:23 -0000 1.1.1.1 +++ parse.h 15 Aug 2002 20:55:23 -0000 1.2 @@ -1,12 +1,19 @@ -#ifndef PARSE_H -#define PARSE_H +/* + * parse.h + * + * $Id: + */ +#ifndef INCLUDED_parse_h +#define INCLUDED_parse_h -/*============================================================================= - * Proto types +struct Client; + +/* + * Prototypes */ -extern int parse_client(aClient *cptr, char *buffer, char *bufend); -extern int parse_server(aClient *cptr, char *buffer, char *bufend); +extern int parse_client(struct Client *cptr, char *buffer, char *bufend); +extern int parse_server(struct Client *cptr, char *buffer, char *bufend); extern void initmsgtree(void); -#endif /* PARSE_H */ +#endif /* INCLUDED_parse_h */ Index: patchlevel.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/patchlevel.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- patchlevel.h 26 Jul 2002 23:58:43 -0000 1.2 +++ patchlevel.h 15 Aug 2002 20:55:23 -0000 1.3 @@ -14,6 +14,9 @@ * 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: + * */ /* Index: querycmds.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/querycmds.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- querycmds.h 26 Jul 2002 21:58:23 -0000 1.1.1.1 +++ querycmds.h 15 Aug 2002 20:55:23 -0000 1.2 @@ -1,84 +1,97 @@ -#ifndef QUERYCMDS_H -#define QUERYCMDS_H +/* + * querycmds.h + * + * $Id: + */ +#ifndef INCLUDED_querycmds_h +#define INCLUDED_querycmds_h -/*============================================================================= +struct Client; + +/* * Structs */ -struct lusers_st { +struct UserStatistics { /* Local connections: */ unsigned int unknowns; /* IsUnknown() || IsConnecting() || IsHandshake() */ unsigned int local_servers; /* IsServer() && MyConnect() */ unsigned int local_clients; /* IsUser() && MyConnect() */ + /* Global counts: */ unsigned int servers; /* IsServer() || IsMe() */ unsigned int clients; /* IsUser() */ + /* Global user mode changes: */ unsigned int inv_clients; /* IsUser() && IsInvisible() */ unsigned int opers; /* IsUser() && IsOper() */ + /* Misc: */ unsigned int channels; }; -/*============================================================================= +extern struct UserStatistics UserStats; + +/* * Macros */ /* Macros for remote connections: */ -#define Count_newremoteclient(nrof,cptr) \ +#define Count_newremoteclient(UserStats, cptr) \ do { \ - ++nrof.clients; \ + ++UserStats.clients; \ ++cptr->user->server->serv->clients; \ - if (nrof.clients >= max_global_count) \ + if (UserStats.clients >= max_global_count) \ { \ - max_global_count = nrof.clients; \ + max_global_count = UserStats.clients; \ max_global_count_TS = TStime(); \ } \ } while(0) -#define Count_newremoteserver(nrof) (++nrof.servers) -#define Count_remoteclientquits(nrof,cptr) \ +#define Count_newremoteserver(UserStats) (++UserStats.servers) +#define Count_remoteclientquits(UserStats, cptr) \ do { \ - --nrof.clients; \ + --UserStats.clients; \ if (!IsServer(cptr)) \ --cptr->user->server->serv->clients; \ } while(0) -#define Count_remoteserverquits(nrof) (--nrof.servers) +#define Count_remoteserverquits(UserStats) (--UserStats.servers) /* Macros for local connections: */ -#define Count_newunknown(nrof) (++nrof.unknowns) -#define Count_unknownbecomesclient(cptr, nrof) \ +#define Count_newunknown(UserStats) (++UserStats.unknowns) +#define Count_unknownbecomesclient(cptr, UserStats) \ do { \ - --nrof.unknowns; ++nrof.local_clients; ++nrof.clients; \ + --UserStats.unknowns; ++UserStats.local_clients; ++UserStats.clients; \ if (match("*" DOMAINNAME, cptr->sockhost) == 0) \ ++current_load.local_count; \ - if (nrof.local_clients > max_client_count) { \ - max_client_count = nrof.local_clients; \ + if (UserStats.local_clients > max_client_count) \ + { \ + max_client_count = UserStats.local_clients; \ max_client_count_TS = TStime(); \ } \ - if (nrof.clients >= max_global_count) \ + if (UserStats.clients >= max_global_count) \ { \ - max_global_count = nrof.clients; \ + max_global_count = UserStats.clients; \ max_global_count_TS = TStime(); \ } \ - if (nrof.local_clients + nrof.local_servers > max_connection_count) \ + if (UserStats.local_clients + UserStats.local_servers > max_connection_count) \ { \ - max_connection_count = nrof.local_clients + nrof.local_servers; \ + max_connection_count = UserStats.local_clients + UserStats.local_servers; \ } \ } while(0) -#define Count_unknownbecomesserver(nrof) do { --nrof.unknowns; ++nrof.local_servers; ++nrof.servers; } while(0) -#define Count_clientdisconnects(cptr, nrof) \ +#define Count_unknownbecomesserver(UserStats) do { --UserStats.unknowns; ++UserStats.local_servers; ++UserStats.servers; } while(0) +#define Count_clientdisconnects(cptr, UserStats) \ do \ { \ - --nrof.local_clients; --nrof.clients; \ + --UserStats.local_clients; --UserStats.clients; \ if (match("*" DOMAINNAME, cptr->sockhost) == 0) \ --current_load.local_count; \ } while(0) -#define Count_serverdisconnects(nrof) do { --nrof.local_servers; --nrof.servers; } while(0) +#define Count_serverdisconnects(UserStats) do { --UserStats.local_servers; --UserStats.servers; } while(0) #define Count_unknowndisconnects(nrof) (--nrof.unknowns) -/*============================================================================= - * Proto types +/* + * Prototypes */ extern int m_version(aClient *cptr, aClient *sptr, int parc, char *parv[]); @@ -90,6 +103,4 @@ extern int m_admin(aClient *cptr, aClient *sptr, int parc, char *parv[]); extern int m_motd(aClient *cptr, aClient *sptr, int parc, char *parv[]); -extern struct lusers_st nrof; - -#endif /* QUERYCMDS_H */ +#endif /* INCLUDED_querycmds_h */ Index: random.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/random.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- random.h 26 Jul 2002 21:58:23 -0000 1.1.1.1 +++ random.h 15 Aug 2002 20:55:23 -0000 1.2 @@ -1,10 +1,15 @@ -#ifndef RANDOM_H -#define RANDOM_H +/* + * random.h + * + * $Id: + */ +#ifndef INCLUDED_random_h +#define INCLUDED_random_h -/*============================================================================= +/* * Proto types */ extern unsigned int ircrandom(void); -#endif /* RANDOM_H */ +#endif /* INCLUDED_random_h */ Index: res.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/res.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- res.h 26 Jul 2002 21:58:23 -0000 1.1.1.1 +++ res.h 15 Aug 2002 20:55:23 -0000 1.2 @@ -1,5 +1,16 @@ -#ifndef RES_H -#define RES_H +/* + * irc2.7.2/ircd/res.h (C)opyright 1992 Darren Reed. + * + * $Id: + */ +#ifndef INCLUDED_res_h +#define INCLUDED_res_h + +#ifndef INCLUDED_sys_types_h +#include <sys/types.h> /* time_t */ +#define INCLUDED_sys_types_h +#endif + #include <netinet/in.h> #include <netdb.h> Index: s_auth.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/s_auth.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- s_auth.h 26 Jul 2002 21:58:23 -0000 1.1.1.1 +++ s_auth.h 15 Aug 2002 20:55:23 -0000 1.2 @@ -1,5 +1,34 @@ -#ifndef S_AUTH_H -#define S_AUTH_H +/* + * IRC - Internet Relay Chat, include/s_auth.h + * + * 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: + */ +#ifndef INCLUDED_s_auth_h +#define INCLUDED_s_auth_h +#ifndef INCLUDED_sys_types_h +#include <sys/types.h> +#define INCLUDED_sys_types_h +#endif +#ifndef INCLUDED_config_h +//#include "config.h" +#endif + +struct Client; + /*============================================================================= * Proto types Index: s_bsd.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/s_bsd.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- s_bsd.h 26 Jul 2002 21:58:24 -0000 1.1.1.1 +++ s_bsd.h 15 Aug 2002 20:55:23 -0000 1.2 @@ -1,8 +1,27 @@ -#ifndef S_BSD_H -#define S_BSD_H +/* + * s_bsd.h + * + * $Id: + */ +#ifndef INCLUDED_s_bsd_h +#define INCLUDED_s_bsd_h +#ifndef INCLUDED_config_h +//#include "config.h" +#endif +#ifndef INCLUDED_sys_types_h +#include <sys/types.h> /* size_t, time_t */ +#define INCLUDED_sys_types_h +#endif +struct Client; +struct ConfItem; +struct Listener; +struct DNSReply; + +/* prov */ #include <netdb.h> #include "s_conf.h" + /*============================================================================= * Macro's Index: s_conf.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/s_conf.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- s_conf.h 27 Jul 2002 15:02:47 -0000 1.2 +++ s_conf.h 15 Aug 2002 20:55:23 -0000 1.3 @@ -1,21 +1,44 @@ -#ifndef S_CONF_H -#define S_CONF_H +/* + * s_conf.h + * + * $Id: + */ +#ifndef INCLUDED_s_conf_h +#define INCLUDED_s_conf_h +#ifndef INCLUDED_time_h +#include <time.h> /* struct tm */ +#define INCLUDED_time_h +#endif +#ifndef INCLUDED_sys_types_h +#include <sys/types.h> +#define INCLUDED_sys_types_h +#endif +#ifndef INCLUDED_netinet_in_h +#include <netinet/in.h> /* struct in_addr */ +#define INCLUDED_netinet_in_h +#endif +struct Client; +struct SLink; +struct TRecord; +struct hostent; + +/* Provisional */ #include "list.h" -#include <netinet/in.h> #include <netdb.h> -/*============================================================================= +/* * General defines */ -/*----------------------------------------------------------------------------- - * Macro's +/* + * Macros */ #define CONF_ILLEGAL 0x80000000 #define CONF_MATCH 0x40000000 #define CONF_CLIENT 0x0002 +/* #define CONF_SERVER 0x0004 */ #define CONF_CONNECT_SERVER 0x0004 #define CONF_NOCONNECT_SERVER 0x0008 #define CONF_LOCOP 0x0010 @@ -50,7 +73,7 @@ #define IsIllegal(x) ((x)->status & CONF_ILLEGAL) -/*============================================================================= +/* * Structures */ @@ -62,11 +85,9 @@ char *passwd; char *name; unsigned short int port; - time_t hold; /* Hold action until this time - (calendar time) */ -#ifndef VMSP + time_t hold; /* Hold action until this time (calendar time) */ + int dns_pending; /* a dns request is pending */ struct ConfClass *confClass; /* Class of connection */ -#endif struct ConfItem *next; }; @@ -75,11 +96,11 @@ struct MotdItem *next; }; -struct trecord { +struct TRecord { char *hostmask; struct MotdItem *tmotd; struct tm tmotd_tm; - struct trecord *next; + struct TRecord *next; }; enum AuthorizationCheckResult { @@ -91,43 +112,69 @@ ACR_BAD_SOCKET }; -/*============================================================================= +/* + * GLOBALS + */ +extern struct ConfItem *GlobalConfList; +extern int GlobalConfCount; +extern struct tm motd_tm; +extern struct MotdItem *motd; +extern struct MotdItem *rmotd; +extern struct TRecord *tdata; + +/* * Proto types */ +extern struct ConfItem *attach_confs_byhost(struct Client *cptr, + const char *host, int statmask); +extern struct ConfItem *find_conf_byhost(struct SLink* lp, const char *host, + int statmask); +extern struct ConfItem *find_conf_byname(struct SLink* lp, const char *name, + int statmask); +extern struct ConfItem *conf_find_server(const char *name); +const char *conf_eval_crule(struct ConfItem *conf); -extern aConfItem *find_conf_host(Link *lp, char *host, int statmask); +extern void det_confs_butmask(struct Client *cptr, int mask); +extern int attach_iline(struct Client *cptr); +extern int detach_conf(struct Client *cptr, struct ConfItem *aconf); +//extern int attach_conf(struct Client *cptr, struct ConfItem *aconf); +extern struct ConfItem *find_admin(void); +extern struct ConfItem *find_me(void); +extern struct ConfItem *find_conf_exact(const char *name, + const char *user, + const char *host, int statmask); +extern enum AuthorizationCheckResult conf_check_client(struct Client *cptr); +extern int conf_check_server(struct Client *cptr); +extern struct ConfItem *find_conf_name(const char *name, int statmask); + +/* viejos */ +extern struct ConfItem *find_conf_host(Link *lp, char *host, int statmask); extern void det_confs_butmask(aClient *cptr, int mask); extern enum AuthorizationCheckResult attach_Iline(aClient *cptr, struct hostent *hp, char *sockhost); extern aConfItem *count_cnlines(Link *lp); -extern int detach_conf(aClient *cptr, aConfItem *aconf); extern enum AuthorizationCheckResult attach_conf(aClient *cptr, aConfItem *aconf); -extern aConfItem *find_admin(void); -extern aConfItem *find_me(void); extern aConfItem *attach_confs(aClient *cptr, const char *name, int statmask); extern aConfItem *attach_confs_host(aClient *cptr, char *host, int statmask); -extern aConfItem *find_conf_exact(char *name, char *user, char *host, - int statmask); extern aConfItem *find_conf(Link *lp, const char *name, int statmask); extern aConfItem *find_conf_ip(Link *lp, char *ip, char *user, int statmask); -extern int rehash(aClient *cptr, int sig); +extern struct ConfItem* find_conf_name(const char* name, int statmask); +/* Viejos */ + +extern int rehash(struct Client *cptr, int sig); extern int initconf(int opt); extern void read_tlines(void); -extern int find_kill(aClient *cptr); -extern int find_restrict(aClient *cptr); -extern int m_killcomment(aClient *sptr, char *parv, char *filename); -extern aMotdItem *read_motd(char *motdfile); +extern int find_kill(struct Client *cptr); +extern int find_restrict(struct Client *cptr); +extern int m_killcomment(struct Client *sptr, char *parv, char *filename); +extern struct MotdItem *read_motd(const char* motdfile); -extern aConfItem *conf; +/* MIRAR */ #ifdef ESNET_NEG extern aConfItem *conf_negociacion; #endif extern aGline *gline; extern aGline *badchan; -extern struct tm motd_tm; -extern aMotdItem *motd; -extern aMotdItem *rmotd; -extern atrecord *tdata; -#endif /* S_CONF_H */ +#endif /* INCLUDED_s_conf_h */ Index: s_debug.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/s_debug.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- s_debug.h 26 Jul 2002 21:58:24 -0000 1.1.1.1 +++ s_debug.h 15 Aug 2002 20:55:23 -0000 1.2 @@ -1,15 +1,30 @@ -#ifndef S_DEBUG_H -#define S_DEBUG_H - +/* + * s_debug.h + * + * $Id: + */ +#ifndef INCLUDED_s_debug_h +#define INCLUDED_s_debug_h +#ifndef INCLUDED_config_h +//#include "config.h" +#endif +#ifndef INCLUDED_ircd_defs_h +#include "ircd_defs.h" /* Needed for HOSTLEN */ +#endif +#ifndef INCLUDED_stdarg_h #include <stdarg.h> -#ifdef MSGLOG_ENABLED -#include "struct.h" /* Needed for HOSTLEN */ +#define INCLUDED_stdarg_h #endif +struct Client; + +#include "struct.h" /* Needed for HOSTLEN */ +//#endif + #ifdef DEBUGMODE -/*============================================================================= - * Macro's +/* + * Macros */ #define Debug(x) debug x @@ -19,26 +34,24 @@ * defined debugging levels */ #define DEBUG_FATAL 0 -#define DEBUG_ERROR 1 /* report_error() and other - errors that are found */ +#define DEBUG_ERROR 1 /* report_error() and other errors that are found */ #define DEBUG_NOTICE 3 #define DEBUG_DNS 4 /* used by all DNS related routines - a *lot* */ #define DEBUG_INFO 5 /* general usful info */ #define DEBUG_NUM 6 /* numerics */ #define DEBUG_SEND 7 /* everything that is sent out */ -#define DEBUG_DEBUG 8 /* anything to do with debugging, - ie unimportant :) */ +#define DEBUG_DEBUG 8 /* everything that is received */ #define DEBUG_MALLOC 9 /* malloc/free calls */ #define DEBUG_LIST 10 /* debug list use */ -/*============================================================================= +/* * proto types */ extern void vdebug(int level, const char *form, va_list vl); extern void debug(int level, const char *form, ...) __attribute__ ((format(printf, 2, 3))); -extern void send_usage(aClient *cptr, char *nick); +extern void send_usage(struct Client *cptr, char *nick); #else /* !DEBUGMODE */ @@ -47,7 +60,8 @@ #endif /* !DEBUGMODE */ -extern void count_memory(aClient *cptr, char *nick); +extern void open_debugfile(void); +extern void count_memory(struct Client *cptr, char *nick); extern char serveropts[]; /*============================================================================= Index: s_misc.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/s_misc.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- s_misc.h 26 Jul 2002 21:58:24 -0000 1.1.1.1 +++ s_misc.h 15 Aug 2002 20:55:23 -0000 1.2 @@ -1,12 +1,25 @@ -#ifndef S_MISC_H -#define S_MISC_H - -/*============================================================================= - * General defines +/* + * s_misc.h + * + * $Id: */ +#ifndef INCLUDED_s_misc_h +#define INCLUDED_s_misc_h +#ifndef INCLUDED_stdarg_h +#include <stdarg.h> /* va_list */ +#define INCLUDED_stdarg_h +#endif +#ifndef INCLUDED_sys_types_h +#include <sys/types.h> /* time_t */ +#define INCLUDED_sys_types_h +#endif -/*----------------------------------------------------------------------------- - * Macro's + +struct Client; +struct ConfItem; + +/* + * Macros */ #define CPTR_KILLED -2 @@ -15,7 +28,7 @@ * Structures */ -struct stats { +struct ServerStatistics { unsigned int is_cl; /* number of client connections */ unsigned int is_sv; /* number of server connections */ unsigned int is_ni; /* connection but no idea who it was */ @@ -40,35 +53,45 @@ unsigned int is_fake; /* MODE 'fakes' */ unsigned int is_asuc; /* successful auth requests */ unsigned int is_abad; /* bad auth requests */ - unsigned int is_udp; /* packets recv'd on udp port */ unsigned int is_loc; /* local connections made */ + unsigned int uping_recv; /* UDP Pings received */ +unsigned int is_udp; /* PROVISIONAL */ }; -/*============================================================================= - * Proto types +/* + * Prototypes */ -extern int check_registered(aClient *sptr); -extern int check_registered_user(aClient *sptr); -extern int exit_client(aClient *cptr, aClient *bcptr, - aClient *sptr, char *comment); +extern int check_registered(struct Client *sptr); +extern int check_registered_user(struct Client *sptr); +extern int exit_client(struct Client *cptr, struct Client *bcptr, + struct Client *sptr, const char *comment); extern char *myctime(time_t value); + +/* OBSOLETO */ extern char *get_client_name(aClient *sptr, int showip); #if defined(BDD) && defined(BDD_VIP) extern char *get_visible_name(aClient *acptr, aClient *sptr); #endif extern int exit_client_msg(aClient *cptr, aClient *bcptr, - aClient *sptr, char *pattern, ...) __attribute__ ((format(printf, 4, 5))); + aClient *sptr, const char *pattern, ...) __attribute__ ((format(printf, 4, 5))); +/* de momento no +extern int exit_client_msg(struct Client *cptr, struct Client *bcptr, + struct Client *sptr, const char *pattern, ...); +**/ + extern void initstats(void); extern char *date(time_t clock); -extern char *get_client_host(aClient *cptr); -extern void get_sockhost(aClient *cptr, char *host); +extern char *get_client_host(struct Client *cptr); +extern void get_sockhost(struct Client *cptr, char *host); +/* Borrar */ extern char *my_name_for_link(char *name, aConfItem *aconf); -extern int vexit_client_msg(aClient *cptr, aClient *bcptr, - aClient *sptr, char *pattern, va_list vl); +extern int vexit_client_msg(struct Client *cptr, struct Client *bcptr, + struct Client *sptr, const char *pattern, va_list vl); +/* borrar */ extern void checklist(void); extern void tstats(aClient *cptr, char *name); -extern struct stats *ircstp; +extern struct ServerStatistics *ServerStats; -#endif /* S_MISC_H */ +#endif /* INCLUDED_s_misc_h */ Index: s_numeric.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/s_numeric.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- s_numeric.h 26 Jul 2002 21:58:24 -0000 1.1.1.1 +++ s_numeric.h 15 Aug 2002 20:55:23 -0000 1.2 @@ -1,11 +1,18 @@ -#ifndef S_NUMERIC_H -#define S_NUMERIC_H +/* + * s_numeric.h + * + * $Id: + */ +#ifndef INCLUDED_s_numeric_h +#define INCLUDED_s_numeric_h -/*============================================================================= - * Proto types +struct Client; + +/* + * Prototypes */ -extern int do_numeric(int numeric, int nnn, aClient *cptr, aClient *sptr, +extern int do_numeric(int numeric, int nnn, struct Client *cptr, struct Client *sptr, int parc, char *parv[]); -#endif /* S_NUMERIC_H */ +#endif /* INCLUDED_s_numeric_h */ Index: s_serv.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/s_serv.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- s_serv.h 26 Jul 2002 21:58:24 -0000 1.1.1.1 +++ s_serv.h 15 Aug 2002 20:55:23 -0000 1.2 @@ -1,15 +1,38 @@ -#ifndef S_SERV_H -#define S_SERV_H +/* + * s_serv.h + * + * $Id: + */ +#ifndef INCLUDED_s_serv_h +#define INCLUDED_s_serv_h +#ifndef INCLUDED_sys_types_h +#include <sys/types.h> +#define INCLUDED_sys_types_h +#endif +struct ConfItem; +struct Client; + +/* Borrar cuando sea necesario */ #include "struct.h" -/*============================================================================= - * General defines +/* + * Prototypes */ +/* +extern int exit_new_server(struct Client *cptr, struct Client *sptr, + char *host, time_t timestamp, char *fmt, ...); +*/ +extern int exit_new_server(struct Client *cptr, struct Client *sptr, + char *host, time_t timestamp, char *fmt, ...) + __attribute__ ((format(printf, 5, 6))); + +extern int a_kills_b_too(struct Client *a, struct Client *b); +extern int server_estab(struct Client *cptr, struct ConfItem *aconf); + + +// #endif /* INCLUDED_s_serv_h */ -/*----------------------------------------------------------------------------- - * Macro's - */ #ifdef CHECK_TS_LINKS #define CHECK_TS_MAX_LINKS 30 /* 30 segundos de desfase maximo Index: s_user.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/s_user.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- s_user.h 26 Jul 2002 21:58:24 -0000 1.1.1.1 +++ s_user.h 15 Aug 2002 20:55:23 -0000 1.2 @@ -1,8 +1,20 @@ -#ifndef S_USER_H -#define S_USER_H +/* + * s_user.h + * + * $Id: + */ +#ifndef INCLUDED_s_user_h +#define INCLUDED_s_user_h +#ifndef INCLUDED_sys_types_h +#include <sys/types.h> +#define INCLUDED_sys_types_h +#endif -/*============================================================================= - * Macro's +struct Client; +struct User; + +/* + * Macros */ /* @@ -31,8 +43,14 @@ #define MATCH_SERVER 1 #define MATCH_HOST 2 -/*============================================================================= - * Proto types +#define COOKIE_VERIFIED 0xffffffff + +extern struct SLink *opsarray[]; + +typedef char* (*InfoFormatter)(struct Client* who, char* buf); + +/* + * Prototypes */ extern int m_umode(aClient *cptr, aClient *sptr, int parc, char *parv[]); Index: send.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/send.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- send.h 26 Jul 2002 21:58:24 -0000 1.1.1.1 +++ send.h 15 Aug 2002 20:55:23 -0000 1.2 @@ -1,15 +1,27 @@ -#ifndef SEND_H -#define SEND_H +/* + * send.h + * + * $Id: + */ +#ifndef INCLUDED_send_h +#define INCLUDED_send_h +#ifndef INCLUDED_stdarg_h +#include <stdarg.h> /* va_list */ +#define INCLUDED_stdarg_h +#endif -/*============================================================================= - * Macros +struct Channel; +struct Client; +struct DBuf; + + +/* + * Prototypes */ +/* Borrar en cuando sea necesario */ #define LastDeadComment(cptr) ((cptr)->info) -/*============================================================================= - * Proto types - */ extern void sendto_one(aClient *to, char *pattern, ...) __attribute__ ((format(printf, 2, 3))); Index: struct.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/struct.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- struct.h 6 Aug 2002 18:45:19 -0000 1.2 +++ struct.h 15 Aug 2002 20:55:23 -0000 1.3 @@ -34,17 +34,6 @@ * General defines */ -#define NICKLEN 9 -#define USERLEN 10 -#define HOSTLEN 63 -#define REALLEN 50 -#define PASSWDLEN 20 -#define AWAYLEN 160 /* Hispano extension */ -#define QUITLEN 250 /* Hispano extension */ -#define BUFSIZE 512 /* WARNING: *DONT* CHANGE THIS!!!! */ -#define MAXTARGETS 20 -#define STARTTARGETS 10 -#define RESERVEDTARGETS 12 #define MAXLEN 490 /*----------------------------------------------------------------------------- @@ -155,8 +144,8 @@ struct Server { struct Server *nexts; struct Client *up; /* Server one closer to me */ - struct DSlink *down; /* List with downlink servers */ - struct DSlink *updown; /* own Dlink in up->serv->down struct */ + struct DLink *down; /* List with downlink servers */ + struct DLink *updown; /* own Dlink in up->serv->down struct */ aClient **client_list; /* List with client pointers on this server */ struct User *user; /* who activated this connection */ struct ConfItem *nline; /* N-line pointer for this server */ @@ -187,10 +176,8 @@ struct SLink *channel; /* chain of channel pointer blocks */ struct SLink *invited; /* chain of invite pointer blocks */ struct SLink *silence; /* chain of silence pointer blocks */ -#ifdef WATCH struct SLink *watch; /* Cadena de punteros a lista aWatch */ int cwatch; /* Contador de entradas de lista WATCH */ -#endif /* WATCH */ char *away; /* pointer to away message */ time_t last; unsigned int refcnt; /* Number of times this block is referenced */ Index: support.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/support.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- support.h 26 Jul 2002 21:58:24 -0000 1.1.1.1 +++ support.h 15 Aug 2002 20:55:23 -0000 1.2 @@ -1,5 +1,24 @@ -#ifndef SUPPORT_H -#define SUPPORT_H +/* + * support.h + * + * $Id: + */ +#ifndef INCLUDED_support_h +#define INCLUDED_support_h +#ifndef INCLUDED_config_h +//#include "config.h" +#define INCLUDED_config_h +#endif +#if 0 +#ifndef INCLUDED_sys_types_h +#include <sys/types.h> /* broken BSD system headers */ +#define INCLUDED_sys_types_h +#endif +#endif /* 0 */ + +/* + * Prototypes + */ #include <netinet/in.h> Index: sys.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/sys.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- sys.h 26 Jul 2002 21:58:24 -0000 1.1.1.1 +++ sys.h 15 Aug 2002 20:55:23 -0000 1.2 @@ -15,13 +15,19 @@ * 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 INCLUDED_sys_h +#define INCLUDED_sys_h +#ifndef INCLUDED_config_h +//#include "config.h" +#endif -#ifndef __sys_include__ -#define __sys_include__ - +/* BORRAR CUANDO SEA NECESARIO */ #include "../config/config.h" #include "../config/setup.h" +#include "ircd_defs.h" #ifdef __osf__ #define _OSF_SOURCE @@ -34,6 +40,7 @@ #define SUNOS4 #endif #endif +/* AQUI ACABA */ #if WORDS_BIGENDIAN # define BIT_ZERO_ON_LEFT @@ -317,4 +324,4 @@ #endif #endif /* !HAVE_SYS_CDEFS_H */ -#endif /* __sys_include__ */ +#endif /* INCLUDED_sys_h */ Index: userload.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/userload.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- userload.h 26 Jul 2002 21:58:24 -0000 1.1.1.1 +++ userload.h 15 Aug 2002 20:55:23 -0000 1.2 @@ -19,12 +19,15 @@ * 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 INCLUDED_userload_h +#define INCLUDED_userload_h -#ifndef USERLOAD_H -#define USERLOAD_H +struct Client; -/*============================================================================= +/* * Structures */ @@ -34,14 +37,15 @@ unsigned int conn_count; }; -/*============================================================================= +/* * Proto types */ extern void update_load(void); -extern void calc_load(aClient *sptr); +extern void calc_load(struct Client *sptr); extern void initload(void); extern struct current_load_st current_load; -#endif /* USERLOAD_H */ +#endif /* INCLUDED_userload_h */ + Index: version.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/version.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- version.h 26 Jul 2002 21:58:24 -0000 1.1.1.1 +++ version.h 15 Aug 2002 20:55:23 -0000 1.2 @@ -1,9 +1,14 @@ -#ifndef VERSION_H -#define VERSION_H +/* + * version.h + * + * $Id: + */ +#ifndef INCLUDED_version_h +#define INCLUDED_version_h extern const char *version; extern const char *creation; extern const char *infotext[]; extern const char *generation; -#endif /* VERSION_H */ +#endif /* INCLUDED_version_h */ Index: whocmds.h =================================================================== RCS file: /cvsroot/irc-dev/ircdh/include/whocmds.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- whocmds.h 26 Jul 2002 21:58:24 -0000 1.1.1.1 +++ whocmds.h 15 Aug 2002 20:55:23 -0000 1.2 @@ -1,15 +1,99 @@ -#ifndef WHOCMDS_H -#define WHOCMDS_H +/* + * whocmds.h + * + * $Id: + */ +#ifndef INCLUDED_whocmds_h +#define INCLUDED_whocmds_h +#ifndef INCLUDED_config_h +//#include "config.h" +#endif -/*============================================================================= - * Macro's +struct Client; +struct Channel; + +/* + * m_who() + * m_who with support routines rewritten by Nemesi, August 1997 + * - Alghoritm have been flattened (no more recursive) + * - Several bug fixes + * - Strong performance improvement + * - Added possibility to have specific fields in the output + * See readme.who for further details. */ -/*============================================================================= - * Proto types +/* Macros used only in here by m_who and its support functions */ + +#define WHOSELECT_OPER 1 +#define WHOSELECT_EXTRA 2 + +#define WHO_FIELD_QTY 1 +#define WHO_FIELD_CHA 2 +#define WHO_FIELD_UID 4 +#define WHO_FIELD_NIP 8 +#define WHO_FIELD_HOS 16 +#define WHO_FIELD_SER 32 +#define WHO_FIELD_NIC 64 +#define WHO_FIELD_FLA 128 +#define WHO_FIELD_DIS 256 +#define WHO_FIELD_REN 512 + +#define WHO_FIELD_DEF ( WHO_FIELD_NIC | WHO_FIELD_UID | WHO_FIELD_HOS | WHO_FIELD_SER ) + +#define IS_VISIBLE_USER(s,ac) ((s==ac) || (!IsInvisible(ac))) + +#if defined(SHOW_INVISIBLE_LUSERS) || defined(SHOW_ALL_INVISIBLE_USERS) +#if defined(BDD) && defined(WHOX_HELPERS) +#define SEE_LUSER(s, ac, b) (IS_VISIBLE_USER(s, ac) || ((b & WHOSELECT_EXTRA) && MyConnect(ac) && (IsAnOper(s)||IsHelpOp(s)))) +#else +#define SEE_LUSER(s, ac, b) (IS_VISIBLE_USER(s, ac) || ((b & WHOSELECT_EXTRA) && MyConnect(ac) && IsAnOper(s))) +#endif /* WHOX_HELPERS */ +#else +#define SEE_LUSER(s, ac, b) (IS_VISIBLE_USER(s, ac)) +#endif + +#ifdef SHOW_ALL_INVISIBLE_USERS +#if defined(BDD) && defined(WHOX_HELPERS) +#define SEE_USER(s, ac, b) (SEE_LUSER(s, ac, b) || ((b & WHOSELECT_EXTRA) && (IsOper(s)||IsHelpOp(s)))) +#else +#define SEE_USER(s, ac, b) (SEE_LUSER(s, ac, b) || ((b & WHOSELECT_EXTRA) && IsOper(s))) +#endif /* WHOX_HELPERS */ +#else +#define SEE_USER(s, ac, b) (SEE_LUSER(s, ac, b)) +#endif + +#ifdef UNLIMIT_OPER_QUERY +#if defined(BDD) +#define SHOW_MORE(sptr, counter) (IsAnOper(sptr) || IsHelpOp(sptr) || (!(counter-- < 0)) ) +#else +#define SHOW_MORE(sptr, counter) (IsAnOper(sptr) || (!(counter-- < 0)) ) +#endif /* Helper */ +#else +#define SHOW_MORE(sptr, counter) (!(counter-- < 0)) +#endif + +#ifdef OPERS_SEE_IN_S... [truncated message content] |
From: Zolty <zo...@us...> - 2002-08-15 20:55:26
|
Update of /cvsroot/irc-dev/ircdh/config In directory usw-pr-cvs1:/tmp/cvs-serv7124/ircdh/config Modified Files: config-sh.in Log Message: 2002-08-15 Toni Garcia <zo...@ir...> Comienzo de la ordenacion del codigo. * Muevo todos los defines del whocmds.c al .h ya que nos hara falta cuando pongamos cada comando, un *.c. * Se hacen cambios en muchos variables globales con el fin de facilitar la lectura e interpretacion. Son los siguientes: time_t now; => time_t CurrentTime; struct Client client; => struct Client *GlobalClientList; struct lusers_st nrof; => struct UserStatistics UserStats; struct stats *ircstp; => struct ServerStatistics *ServerStats; struct ConfItem *conf; => struct ConfItem *GlobalConfList; struct DSlink; => struct DLink; * Empiezo a eliminar los alias de structs, ejempo "aClient" pasa a ser "struct Client". Y en algunas funciones agrego "const" cuando han de mantener la variable de forma constante. * Se desactivan temporalmente WATCH y ESNET_ZLIB mientras se va ordenando el codigo, en breves dias estaran activados. * En los archivos .h de la carpeta include meto las cabeceras con el $Id: de control de RCS asi como los nuevos defines al estilo Undernet. * Se mueven los defines *LEN y similiares al nuevo fichero ircd_defs.h. Index: config-sh.in =================================================================== RCS file: /cvsroot/irc-dev/ircdh/config/config-sh.in,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- config-sh.in 27 Jul 2002 09:55:54 -0000 1.3 +++ config-sh.in 15 Aug 2002 20:55:23 -0000 1.4 @@ -398,9 +398,9 @@ fi bool 'HISPANO/ESNET: XMODE Networking' XMODE_ESNET y bool 'HISPANO/ESNET: Dinamic Negotiation link-by-link' ESNET_NEG y - if [ "$ESNET_NEG" = "y" ]; then - bool 'HISPANO/ESNET: ZLIB compression between servers - ESNET' ZLIB_ESNET y - fi +# if [ "$ESNET_NEG" = "y" ]; then +# bool 'HISPANO/ESNET: ZLIB compression between servers - ESNET' ZLIB_ESNET y +# fi int 'Max auto connects per class (1!)' MAXIMUM_LINKS 1 echo '* Never define this on a production server:' bool 'Enable message logging' MSGLOG_ENABLED @@ -415,10 +415,7 @@ int 'KILL nick chase time limit (30)' KILLCHASETIMELIMIT 30 int 'Max number of channels per user (recommended: 5)' MAXCHANNELSPERUSER 10 int 'Max number of silence masks (15!)' MAXSILES 15 - bool 'Enable notifies nicks witch WATCH' WATCH y - if [ "$WATCH" = "y" ]; then - int 'Max number of WATCH entries (128)' MAXWATCH 128 - fi + int 'Max number of WATCH entries (128)' MAXWATCH 128 int 'Expected average banmask length (40!)' AVBANLEN 40 eval define_macro MAXSILELENGTH \'\($AVBANLEN * MAXSILES\)\' echo '* These are default values, used for class 0:' |
From: Zolty <zo...@us...> - 2002-08-15 20:55:26
|
Update of /cvsroot/irc-dev/ircdh In directory usw-pr-cvs1:/tmp/cvs-serv7124/ircdh Modified Files: CAMBIOS.IRCDEV Log Message: 2002-08-15 Toni Garcia <zo...@ir...> Comienzo de la ordenacion del codigo. * Muevo todos los defines del whocmds.c al .h ya que nos hara falta cuando pongamos cada comando, un *.c. * Se hacen cambios en muchos variables globales con el fin de facilitar la lectura e interpretacion. Son los siguientes: time_t now; => time_t CurrentTime; struct Client client; => struct Client *GlobalClientList; struct lusers_st nrof; => struct UserStatistics UserStats; struct stats *ircstp; => struct ServerStatistics *ServerStats; struct ConfItem *conf; => struct ConfItem *GlobalConfList; struct DSlink; => struct DLink; * Empiezo a eliminar los alias de structs, ejempo "aClient" pasa a ser "struct Client". Y en algunas funciones agrego "const" cuando han de mantener la variable de forma constante. * Se desactivan temporalmente WATCH y ESNET_ZLIB mientras se va ordenando el codigo, en breves dias estaran activados. * En los archivos .h de la carpeta include meto las cabeceras con el $Id: de control de RCS asi como los nuevos defines al estilo Undernet. * Se mueven los defines *LEN y similiares al nuevo fichero ircd_defs.h. Index: CAMBIOS.IRCDEV =================================================================== RCS file: /cvsroot/irc-dev/ircdh/CAMBIOS.IRCDEV,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- CAMBIOS.IRCDEV 6 Aug 2002 18:45:19 -0000 1.11 +++ CAMBIOS.IRCDEV 15 Aug 2002 20:55:23 -0000 1.12 @@ -1,3 +1,30 @@ +2002-08-15 Toni Garcia <zo...@ir...> + Comienzo de la ordenacion del codigo. + * Muevo todos los defines del whocmds.c al .h ya que nos hara falta cuando + pongamos cada comando, un *.c. + + * Se hacen cambios en muchos variables globales con el fin de facilitar la + lectura e interpretacion. Son los siguientes: + time_t now; => time_t CurrentTime; + struct Client client; => struct Client *GlobalClientList; + struct lusers_st nrof; => struct UserStatistics UserStats; + struct stats *ircstp; => struct ServerStatistics *ServerStats; + struct ConfItem *conf; => struct ConfItem *GlobalConfList; + struct DSlink; => struct DLink; + + * Empiezo a eliminar los alias de structs, ejempo "aClient" pasa a ser "struct + Client". Y en algunas funciones agrego "const" cuando han de mantener la + variable de forma constante. + + * Se desactivan temporalmente WATCH y ESNET_ZLIB mientras se va ordenando el + codigo, en breves dias estaran activados. + + * En los archivos .h de la carpeta include meto las cabeceras con el $Id: + de control de RCS asi como los nuevos defines al estilo Undernet. + + * Se mueven los defines *LEN y similiares al nuevo fichero ircd_defs.h. + + 2002-08-06 Toni Garcia <zo...@ir...> Sincronizacion con u2.10.H.05.16 y varios cambios. * include/{struct.h|channel.h}: Nuevas macros KICKLEN, AWAYLEN y QUITLEN |