X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=include%2Fs_misc.h;h=1fb82b0e97cb4c2de855364055bee28dbfdc34d8;hb=3d59398668e6f0977c147c5efeefe7582d05b25b;hp=90a9eb83ca44842561649e289be079ccc81ce33a;hpb=19570001d07baa87f2165b8826c8ae1237ac9ddf;p=ircu2.10.12-pk.git diff --git a/include/s_misc.h b/include/s_misc.h index 90a9eb8..1fb82b0 100644 --- a/include/s_misc.h +++ b/include/s_misc.h @@ -1,7 +1,6 @@ -/* - * s_misc.h - * - * $Id$ +/** @file s_misc.h + * @brief Miscellaneous support functions and declarations. + * @version $Id$ */ #ifndef INCLUDED_s_misc_h #define INCLUDED_s_misc_h @@ -31,21 +30,31 @@ struct ConfItem; * Structures */ +#ifdef HAVE_INTTYPES_H +# ifndef INCLUDED_inttypes_h +# include +# define INCLUDED_inttypes_h +# endif +#else +# ifdef HAVE_STDINT_H +# ifndef INCLUDED_stdint_h +# include +# define INCLUDED_stdint_h +# endif +# endif +#endif + /** Structure used to count many server-wide statistics. */ 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 */ - unsigned short int is_cbs; /**< bytes sent to clients */ - unsigned short int is_cbr; /**< bytes received to clients */ - unsigned short int is_sbs; /**< bytes sent to servers */ - unsigned short int is_sbr; /**< bytes received to servers */ - unsigned int is_cks; /**< k-bytes sent to clients */ - unsigned int is_ckr; /**< k-bytes received to clients */ - unsigned int is_sks; /**< k-bytes sent to servers */ - unsigned int is_skr; /**< k-bytes received to servers */ - time_t is_cti; /**< time spent connected by clients */ - time_t is_sti; /**< time spent connected by servers */ + uint64_t is_cbs; /**< bytes sent to clients */ + uint64_t is_cbr; /**< bytes received to clients */ + uint64_t is_sbs; /**< bytes sent to servers */ + uint64_t is_sbr; /**< bytes received to servers */ + uint64_t is_cti; /**< time spent connected by clients */ + uint64_t is_sti; /**< time spent connected by servers */ unsigned int is_ac; /**< connections accepted */ unsigned int is_ref; /**< accepts refused */ unsigned int is_unco; /**< unknown commands */ @@ -74,7 +83,6 @@ 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 void get_sockhost(struct Client *cptr, char *host); extern int vexit_client_msg(struct Client *cptr, struct Client *bcptr, struct Client *sptr, const char *pattern, va_list vl); extern void tstats(struct Client *cptr, const struct StatDesc *sd,