Functions for keeping a whitelist of nodes we always allow in, and whom we try to keep a connection to.
#include "common.h"
#include "whitelist.h"
#include "settings.h"
#include "nodes.h"
#include "lib/file.h"
#include "lib/glib-missing.h"
#include "lib/tm.h"
#include "lib/walloc.h"
#include "lib/override.h"
Functions | |
RCSID ("$Id:whitelist.c, v 1.14 2005/09/10 08:17:29 daichik Exp $") | |
void | whitelist_retrieve (void) |
Loads the whitelist into memory. | |
guint | whitelist_connect (void) |
Attempts to connect to the nodes we have whitelisted. | |
void | whitelist_init (void) |
Called on startup. | |
void | whitelist_close (void) |
Frees all entries in the whitelist. | |
void | whitelist_reload (void) |
Reloads the whitelist. | |
gboolean | whitelist_check (const host_addr_t ha) |
Check the given IP agains the entries in the whitelist. | |
Variables | |
GSList * | sl_whitelist = NULL |
const gchar | whitelist_file [] = "whitelist" |
time_t | whitelist_mtime |
time_t | whitelist_checked |
gchar * | whitelist_path = NULL |
|
|
|
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.
|
|
Frees all entries in the whitelist.
|
|
Attempts to connect to the nodes we have whitelisted. Only entries with a specified port will be tried.
|
|
Called on startup. Loads the whitelist into memory. |
|
Reloads the whitelist.
|
|
Loads the whitelist into memory.
|
|
|
|
|
|
|
|
|
|
|