Functions for keeping a whitelist of nodes we always allow in, and whom we try to keep a connection to.
#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. |
|
Number of seconds between checking the whitelist file for updates.
|
|
Number of seconds between each connection attempt to a whitelisted node.
|
|
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.
|