]>
Commit | Line | Data |
---|---|---|
189935b1 | 1 | /* |
2 | * Userload module by Michael L. VanLoon (mlv) <michaelv@iastate.edu> | |
3 | * Written 2/93. Originally grafted into irc2.7.2g 4/93. | |
4 | * Rewritten 9/97 by Carlo Wood for ircu2.10.01. | |
5 | * | |
6 | * IRC - Internet Relay Chat, ircd/userload.h | |
7 | * Copyright (C) 1990 University of Oulu, Computing Center | |
8 | * | |
9 | * This program is free software; you can redistribute it and/or modify | |
10 | * it under the terms of the GNU General Public License as published by | |
11 | * the Free Software Foundation; either version 1, or (at your option) | |
12 | * any later version. | |
13 | * | |
14 | * This program is distributed in the hope that it will be useful, | |
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | * GNU General Public License for more details. | |
18 | * | |
19 | * You should have received a copy of the GNU General Public License | |
20 | * along with this program; if not, write to the Free Software | |
21 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | |
22 | */ | |
23 | /** @file | |
24 | * @brief Userload tracking and statistics. | |
25 | * @version $Id: userload.h,v 1.6 2004/10/05 04:21:36 entrope Exp $ | |
26 | */ | |
27 | #ifndef INCLUDED_userload_h | |
28 | #define INCLUDED_userload_h | |
29 | ||
30 | struct Client; | |
31 | struct StatDesc; | |
32 | ||
33 | /* | |
34 | * Structures | |
35 | */ | |
36 | ||
37 | /** Tracks load of various types of users. */ | |
38 | struct current_load_st { | |
39 | unsigned int client_count; /**< Count of locally connected clients. */ | |
40 | unsigned int local_count; /**< This field is updated but apparently meaningless. */ | |
41 | unsigned int conn_count; /**< Locally connected clients plus servers. */ | |
42 | }; | |
43 | ||
44 | /* | |
45 | * Proto types | |
46 | */ | |
47 | ||
48 | extern void update_load(void); | |
49 | extern void calc_load(struct Client *sptr, const struct StatDesc *sd, | |
50 | char *param); | |
51 | extern void initload(void); | |
52 | ||
53 | extern struct current_load_st current_load; | |
54 | ||
55 | #endif /* INCLUDED_userload_h */ |