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

whitelist.h File Reference


Detailed Description

Needs brief description here.

Functions for keeping a whitelist of nodes we always allow in, and whom we try to keep a connection to.

Author:
Vidar Madsen
Date:
2002

#include "common.h"
#include "lib/host_addr.h"

Go to the source code of this file.

Data Structures

struct  whitelist

Defines

#define WHITELIST_RETRY_DELAY   30
 Number of seconds between each connection attempt to a whitelisted node.

#define WHITELIST_CHECK_INTERVAL   60
 Number of seconds between checking the whitelist file for updates.


Functions

gboolean whitelist_check (const host_addr_t addr)
 Check the given IP agains the entries in the whitelist.

void whitelist_init (void)
 Called on startup.

void whitelist_close (void)
 Frees all entries in the whitelist.

guint whitelist_connect (void)
 Attempts to connect to the nodes we have whitelisted.

void whitelist_reload (void)
 Reloads the whitelist.


Define Documentation

#define WHITELIST_CHECK_INTERVAL   60
 

Number of seconds between checking the whitelist file for updates.

#define WHITELIST_RETRY_DELAY   30
 

Number of seconds between each connection attempt to a whitelisted node.


Function Documentation

gboolean whitelist_check const host_addr_t  ha  ) 
 

Check the given IP agains the entries in the whitelist.

Also, it will periodically check the whitelist file for updates, and reload it if it has changed.

Parameters:
ha the host address to check.
Returns:
TRUE if found, and FALSE if not.

void whitelist_close void   ) 
 

Frees all entries in the whitelist.

guint whitelist_connect void   ) 
 

Attempts to connect to the nodes we have whitelisted.

Only entries with a specified port will be tried.

Returns:
the number of new nodes that are connected to.

void whitelist_init void   ) 
 

Called on startup.

Loads the whitelist into memory.

void whitelist_reload void   ) 
 

Reloads the whitelist.


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