File: statserv.h

package info (click to toggle)
hybserv 1.9.2-4.1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 2,852 kB
  • ctags: 1,854
  • sloc: ansic: 37,037; sh: 3,178; makefile: 337
file content (47 lines) | stat: -rw-r--r-- 1,430 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
 * statserv.h
 * Hybserv2 Services by Hybserv2 team
 *
 * $Id: statserv.h 1350 2005-11-29 11:40:00Z kreator $
 */

#ifndef INCLUDED_statserv_h
#define INCLUDED_statserv_h

#include "stdinc.h"
#include "config.h"

#ifdef STATSERVICES

/* StatServ flags */
#define SS_DOMAIN        0x00000001 /* struct contains a domain, not host */

/* Stores info for clients' hostnames */
struct HostHash
{
	struct HostHash *hnext;
	char *hostname;
	time_t lastseen;        /* last time someone had this host */
	long currclients;       /* current clients from this host */
	long curropers;         /* current opers from this host */
	long currunique;        /* current unique clients from this host */
	long curridentd;        /* current clients running identd */
	long maxclients;        /* max clients seen from this host */
	time_t maxclients_ts;   /* time max clients were seen */
	long maxunique;         /* max unique (not cloned) clients from this host */
	time_t maxunique_ts;    /* time unique clients were seen */
	long maxopers;          /* max opers seen from this host */
	time_t maxopers_ts;     /* time max opers were seen */
	int flags;              /* is it a hostname or domain? */
};

void ss_process(char *, char *);
void ExpireStats(time_t);
void DoPings(void);
struct HostHash *FindHost(char *);
struct HostHash *FindDomain(char *);
char *GetDomain(char *);

#endif /* STATSERVICES */

#endif /* INCLUDED_statserv_h */