/[svn]/ircd-hybrid/trunk/include/conf_class.h
ViewVC logotype

Contents of /ircd-hybrid/trunk/include/conf_class.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1633 - (show annotations)
Sun Nov 4 15:51:30 2012 UTC (7 years, 9 months ago) by michael
File MIME type: text/x-csrc
File size: 2526 byte(s)
- Add conf_class.c, conf_class.h

1 /*
2 * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
3 *
4 * Copyright (C) 2002 by the past and present ircd coders, and others.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19 * USA
20 */
21
22 /*! \file
23 * \brief Configuration managment for class{} blocks
24 * \version $Id: conf_class.h,v 1.54 2007/10/21 21:57:05 devil Exp $
25 */
26
27
28 #ifndef INCLUDED_conf_class_h
29 #define INCLUDED_conf_class_h
30
31 struct ClassItem
32 {
33 char *name;
34 dlink_node node;
35 dlink_list list_ipv4; /* base of per cidr ipv4 client link list */
36 dlink_list list_ipv6; /* base of per cidr ipv6 client link list */
37 unsigned int max_sendq;
38 unsigned int max_recvq;
39 int con_freq;
40 int ping_freq;
41 int ping_warning;
42 int max_total;
43 int max_local;
44 int max_global;
45 int max_ident;
46 int max_perip;
47 int ref_count;
48 int cidr_bitlen_ipv4;
49 int cidr_bitlen_ipv6;
50 int number_per_cidr;
51 int active;
52 };
53
54 /* address of default class conf */
55 extern struct ClassItem *class_default;
56
57 extern struct ClassItem *class_make(void);
58 extern const dlink_list *class_get_list(void);
59 extern void class_free(struct ClassItem *);
60 extern void class_init(void);
61 extern const char *get_client_class(const dlink_list *const);
62 extern unsigned int get_client_ping(const dlink_list *const, int *);
63 extern unsigned int get_sendq(const dlink_list *const);
64 extern unsigned int get_recvq(const dlink_list *const);
65 extern struct ClassItem *class_find(const char *, int);
66 extern void class_mark_for_deletion(void);
67 extern void class_delete_marked(void);
68 extern void *check_client(va_list args);
69 extern void destroy_cidr_class(struct ClassItem *);
70 extern void rebuild_cidr_class(struct ClassItem *, struct ClassItem *);
71 extern int cidr_limit_reached(int, struct irc_ssaddr *, struct ClassItem *);
72 extern void remove_from_cidr_check(struct irc_ssaddr *, struct ClassItem *);
73 #endif

svnadmin@ircd-hybrid.org
ViewVC Help
Powered by ViewVC 1.1.28