ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/include/conf_class.h
Revision: 1785
Committed: Sat Jan 26 22:40:55 2013 UTC (13 years, 6 months ago) by michael
Content type: text/x-chdr
File size: 2770 byte(s)
Log Message:
- Forward-port -r1784 [Fix bug where idle time sometimes is 0 even if the
  client didn't send any private message]

File Contents

# User Rev Content
1 michael 1633 /*
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 michael 1635 * \version $Id$
25 michael 1633 */
26    
27    
28     #ifndef INCLUDED_conf_class_h
29     #define INCLUDED_conf_class_h
30    
31 michael 1785 #define CLASS_FLAGS_FAKE_IDLE 0x01
32     #define CLASS_FLAGS_RANDOM_IDLE 0x02
33     #define CLASS_FLAGS_HIDE_IDLE_FROM_OPERS 0x04
34 michael 1783
35 michael 1785
36 michael 1633 struct ClassItem
37     {
38     char *name;
39     dlink_node node;
40     dlink_list list_ipv4; /* base of per cidr ipv4 client link list */
41     dlink_list list_ipv6; /* base of per cidr ipv6 client link list */
42 michael 1644 unsigned int ref_count;
43 michael 1633 unsigned int max_sendq;
44     unsigned int max_recvq;
45 michael 1644 unsigned int con_freq;
46     unsigned int ping_freq;
47     unsigned int max_total;
48     unsigned int max_local;
49     unsigned int max_global;
50     unsigned int max_ident;
51     unsigned int max_perip;
52 michael 1783 unsigned int min_idle;
53     unsigned int max_idle;
54 michael 1644 unsigned int cidr_bitlen_ipv4;
55     unsigned int cidr_bitlen_ipv6;
56     unsigned int number_per_cidr;
57 michael 1783 unsigned int flags;
58 michael 1644 unsigned int active;
59 michael 1633 };
60    
61     /* address of default class conf */
62     extern struct ClassItem *class_default;
63    
64     extern struct ClassItem *class_make(void);
65 michael 1783 extern struct ClassItem *get_class_ptr(const dlink_list *const);
66 michael 1633 extern const dlink_list *class_get_list(void);
67     extern void class_free(struct ClassItem *);
68     extern void class_init(void);
69     extern const char *get_client_class(const dlink_list *const);
70 michael 1644 extern unsigned int get_client_ping(const dlink_list *const);
71 michael 1633 extern unsigned int get_sendq(const dlink_list *const);
72     extern unsigned int get_recvq(const dlink_list *const);
73     extern struct ClassItem *class_find(const char *, int);
74     extern void class_mark_for_deletion(void);
75     extern void class_delete_marked(void);
76     extern void destroy_cidr_class(struct ClassItem *);
77     extern int cidr_limit_reached(int, struct irc_ssaddr *, struct ClassItem *);
78     extern void remove_from_cidr_check(struct irc_ssaddr *, struct ClassItem *);
79 michael 1647 extern void rebuild_cidr_list(struct ClassItem *);
80 michael 1633 #endif

Properties

Name Value
svn:eol-style native
svn:keywords Id Revision