Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

ban.h

Go to the documentation of this file.
00001 /*
00002  * $Id: ban.h,v 1.6 2005/08/17 13:44:05 cbiere Exp $
00003  *
00004  * Copyright (c) 2002-2003, Raphael Manfredi
00005  *
00006  *----------------------------------------------------------------------
00007  * This file is part of gtk-gnutella.
00008  *
00009  *  gtk-gnutella is free software; you can redistribute it and/or modify
00010  *  it under the terms of the GNU General Public License as published by
00011  *  the Free Software Foundation; either version 2 of the License, or
00012  *  (at your option) any later version.
00013  *
00014  *  gtk-gnutella is distributed in the hope that it will be useful,
00015  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  *  GNU General Public License for more details.
00018  *
00019  *  You should have received a copy of the GNU General Public License
00020  *  along with gtk-gnutella; if not, write to the Free Software
00021  *  Foundation, Inc.:
00022  *      59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023  *----------------------------------------------------------------------
00024  */
00025 
00036 #ifndef _core_ban_h_
00037 #define _core_ban_h_
00038 
00039 #include <glib.h>
00040 #include "lib/host_addr.h"
00041 
00042 struct gnutella_socket;
00043 
00048 typedef enum {
00049     BAN_OK      = 0,        
00050     BAN_FIRST   = 1,        
00051     BAN_FORCE   = 2,        
00052     BAN_MSG     = 3         
00053 } ban_type_t;
00054 
00055 void ban_init(void);
00056 void ban_close(void);
00057 ban_type_t ban_allow(const host_addr_t addr);
00058 void ban_record(const host_addr_t addr, const gchar *msg);
00059 void ban_force(struct gnutella_socket *s);
00060 gint ban_delay(const host_addr_t addr);
00061 gchar *ban_message(const host_addr_t addr);
00062 gboolean ban_is_banned(const host_addr_t addr);
00063 void ban_max_recompute(void);
00064 
00065 const gchar *ban_vendor(const gchar *vendor);
00066 
00067 #endif  /* _core_ban_h_ */
00068 
00069 /* vi: set ts=4 sw=4 cindent: */

Generated on Sun Feb 12 10:49:55 2006 for Gtk-Gnutella by doxygen 1.3.6