00001 /* 00002 * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). 00003 * packet.h: A header for the packet functions. 00004 * 00005 * Copyright (C) 2002 by the past and present ircd coders, and others. 00006 * 00007 * This program is free software; you can redistribute it and/or modify 00008 * it under the terms of the GNU General Public License as published by 00009 * the Free Software Foundation; either version 2 of the License, or 00010 * (at your option) any later version. 00011 * 00012 * This program is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU General Public License 00018 * along with this program; if not, write to the Free Software 00019 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 00020 * USA 00021 * 00022 * $Id: packet.h 163 2005-10-20 21:09:02Z adx $ 00023 */ 00024 00025 #ifndef INCLUDED_packet_h 00026 #define INCLUDED_packet_h 00027 00028 #include "fdlist.h" 00029 00030 /* 00031 * this hides in here rather than in defaults.h because it really shouldn't 00032 * be tweaked unless you *REALLY REALLY* know what you're doing! 00033 * Remember, messages are only anti-flooded on incoming from the client, not on 00034 * incoming from a server for a given client, so if you tweak this you risk 00035 * allowing a client to flood differently depending upon where they are on 00036 * the network.. 00037 * -- adrian 00038 */ 00039 /* MAX_FLOOD is the amount of lines in a 'burst' we allow from a client, 00040 * anything beyond MAX_FLOOD is limited to about one line per second. 00041 * 00042 * MAX_FLOOD_CONN is the amount of lines we allow from a client who has 00043 * just connected. this allows clients to rejoin multiple channels 00044 * without being so heavily penalised they excess flood. 00045 */ 00046 #define MAX_FLOOD 5 00047 #define MAX_FLOOD_BURST MAX_FLOOD * 8 00048 00049 struct Callback; 00050 00051 void *iorecv_default(va_list); 00052 extern struct Callback *iorecv_cb; 00053 extern struct Callback *iorecvctrl_cb; 00054 00055 PF read_ctrl_packet; 00056 PF read_packet; 00057 PF flood_recalc; 00058 void flood_endgrace(struct Client *); 00059 00060 #endif /* INCLUDED_packet_h */