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

hosts.h

Go to the documentation of this file.
00001 /*
00002  * $Id: hosts.h,v 1.4 2005/08/07 22:32:08 cbiere Exp $
00003  *
00004  * Copyright (c) 2001-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 
00026 #ifndef _core_hosts_h_
00027 #define _core_hosts_h_
00028 
00029 #include <glib.h>
00030 
00031 #include "if/core/hosts.h"
00032 
00033 /*
00034  * Global Data
00035  */
00036 
00037 extern GList *sl_caught_hosts;
00038 extern gboolean host_low_on_pongs;
00039 
00040 /*
00041  * Global Functions
00042  */
00043 
00044 void host_init(void);
00045 void host_timer(void);
00046 void host_add(const host_addr_t addr, guint16, gboolean);
00047 void host_add_semi_pong(const host_addr_t addr, guint16 port);
00048 void host_shutdown(void);
00049 void host_close(void);
00050 
00051 const gchar *host_to_string(const gnet_host_t *h);
00052 
00053 void parse_netmasks(const gchar *value);
00054 gboolean host_is_nearby(const host_addr_t addr);
00055 gboolean host_is_valid(const host_addr_t addr, guint16 port);
00056 
00057 guint host_hash(gconstpointer key);
00058 gint host_eq(gconstpointer v1, gconstpointer v2);
00059 gint host_cmp(gconstpointer v1, gconstpointer v2);
00060 
00061 #endif /* _core_hosts_h_ */

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