X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/blobdiff_plain/212380e3f42f585dc1ea927402252eb943f91f7b..cffd37ee3718677abdb8df905abdb8660f3af8da:/include/ircd_defs.h diff --git a/include/ircd_defs.h b/include/ircd_defs.h index 66918e3..686cea4 100644 --- a/include/ircd_defs.h +++ b/include/ircd_defs.h @@ -22,7 +22,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * - * $Id: ircd_defs.h 865 2006-02-16 14:05:37Z nenolod $ + * $Id: ircd_defs.h 3512 2007-06-06 16:20:40Z nenolod $ */ /* @@ -30,10 +30,11 @@ * Otherwise there are no user servicable part here. * */ - /* ircd_defs.h - Global size definitions for record entries used - * througout ircd. Please think 3 times before adding anything to this - * file. - */ + +/* ircd_defs.h - Global size definitions for record entries used + * througout ircd. Please think 3 times before adding anything to this + * file. + */ #ifndef INCLUDED_ircd_defs_h #define INCLUDED_ircd_defs_h @@ -48,8 +49,17 @@ #define AFP(a,b) #endif +/* + * This ensures that __attribute__((deprecated)) is not used in for example + * sun CC, since it's a GNU-specific extension. -nenolod + */ +#ifdef __GNUC__ +#define IRC_DEPRECATED __attribute__((deprecated)) +#else +#define IRC_DEPRECATED +#endif -#include "s_log.h" +#include "logger.h" #include "send.h" #ifdef SOFT_ASSERT @@ -84,14 +94,6 @@ # error Incorrect config.h for this revision of ircd. #endif -/* - * This defines the version of the data structures used in the ircd. - * In the event of a mismatch (i.e. this is incremented due to a major - * change that cannot be accomidated for in the ircd), then a hard - * restart occurs. - */ -#define CHARYBDIS_DV 0x00010200 /* 1.2.0 */ - #define HOSTLEN 63 /* Length of hostname. Updated to */ /* comply with RFC1123 */ @@ -101,9 +103,14 @@ #define LOC_CHANNELLEN 50 /* reason length of klines, parts, quits etc */ -#define REASONLEN TOPICLEN /* in charybdis, reasonlen is controlled via topiclen */ -#define AWAYLEN TOPICLEN /* ditto for awaylen */ -#define KILLLEN TOPICLEN /* and killlen. have a nice day. --nenolod */ +/* for quit messages, note that a client exit server notice + * :012345678901234567890123456789012345678901234567890123456789123 NOTICE * :*** Notice -- Client exiting: 012345678901234567 (0123456789@012345678901234567890123456789012345678901234567890123456789123) [] [1111:2222:3333:4444:5555:6666:7777:8888] + * takes at most 246 bytes (including CRLF and '\0') and together with the + * quit reason should fit in 512 */ +#define REASONLEN 260 /* kick/part/quit */ +#define BANREASONLEN 390 /* kline/dline */ +#define AWAYLEN TOPICLEN +#define KILLLEN 200 /* with Killed (nick ()) added this should fit in quit */ /* 23+1 for \0 */ #define KEYLEN 24 @@ -124,47 +131,23 @@ #define CLIENT_PARSE_ERROR -1 #define CLIENT_OK 1 -#ifdef IPV6 +#ifdef RB_IPV6 #ifndef AF_INET6 #error "AF_INET6 not defined" #endif -#else /* #ifdef IPV6 */ +#else /* #ifdef RB_IPV6 */ #ifndef AF_INET6 #define AF_INET6 AF_MAX /* Dummy AF_INET6 declaration */ #endif -#endif /* #ifdef IPV6 */ - +#endif /* #ifdef RB_IPV6 */ -#ifdef IPV6 -#define irc_sockaddr_storage sockaddr_storage -#else -#define irc_sockaddr_storage sockaddr -#define ss_family sa_family -#ifdef SOCKADDR_IN_HAS_LEN -#define ss_len sa_len -#endif -#endif - -#ifdef IPV6 +#ifdef RB_IPV6 #define PATRICIA_BITS 128 #else #define PATRICIA_BITS 32 #endif -#ifdef SOCKADDR_IN_HAS_LEN -#define SET_SS_LEN(x, y) (x).ss_len = (y) -#define GET_SS_LEN(x) x.ss_len -#else -#define SET_SS_LEN(x, y) -#ifdef IPV6 -#define GET_SS_LEN(x) x.ss_family == AF_INET ? sizeof(struct sockaddr_in) : sizeof(struct sockaddr_in6) -#else -#define GET_SS_LEN(x) sizeof(struct sockaddr_in) -#endif -#endif - - #endif /* INCLUDED_ircd_defs_h */