The Netsukuku Project
0.0.9
An Alternative routing method
|
#include "includes.h"
#include "crypto.h"
#include "andna_cache.h"
#include "snsd_cache.h"
#include "common.h"
#include "hash.h"
Macros | |
#define | MAX_SNSD_LINE_SZ (ANDNA_MAX_HNAME_LEN*4) |
Functions | |
void | andna_caches_init (int family) |
u_int | andna_32bit_hash (char *hname) |
void | lcl_new_keyring (lcl_cache_keyring *keyring) |
void | lcl_destroy_keyring (lcl_cache_keyring *keyring) |
lcl_cache * | lcl_cache_new (char *hname) |
void | lcl_cache_free (lcl_cache *alcl) |
void | lcl_cache_destroy (lcl_cache *head, int *counter) |
lcl_cache * | lcl_cache_find_hname (lcl_cache *alcl, char *hname) |
lcl_cache * | lcl_cache_find_hash (lcl_cache *alcl, u_int hash) |
int | is_lcl_hname_registered (lcl_cache *alcl) |
lcl_cache * | lcl_get_registered_hnames (lcl_cache *alcl) |
andna_cache_queue * | ac_queue_findpubk (andna_cache *ac, char *pubk) |
andna_cache_queue * | ac_queue_add (andna_cache *ac, char *pubkey) |
void | ac_queue_del (andna_cache *ac, andna_cache_queue *acq) |
void | ac_queue_del_expired (andna_cache *ac) |
void | ac_queue_destroy (andna_cache *ac) |
andna_cache * | andna_cache_findhash (int hash[4]) |
andna_cache * | andna_cache_gethash (int hash[4]) |
andna_cache * | andna_cache_addhash (int hash[4]) |
int | andna_cache_del_ifexpired (andna_cache *ac) |
void | andna_cache_del_expired (void) |
void | andna_cache_destroy (void) |
counter_c_hashes * | cc_hashes_add (counter_c *cc, int hash[4]) |
void | cc_hashes_del (counter_c *cc, counter_c_hashes *cch) |
void | cc_hashes_del_expired (counter_c *cc) |
void | cc_hashes_destroy (counter_c *cc) |
counter_c_hashes * | cc_findhash (counter_c *cc, int hash[4]) |
counter_c * | counter_c_findpubk (char *pubk) |
counter_c * | counter_c_add (inet_prefix *rip, char *pubkey) |
void | counter_c_del_expired (void) |
void | counter_c_destroy (void) |
rh_cache * | rh_cache_new_hash (u_int hash, time_t timestamp) |
rh_cache * | rh_cache_new (char *hname, time_t timestamp) |
rh_cache * | rh_cache_add_hash (u_int hash, time_t timestamp) |
rh_cache * | rh_cache_add (char *hname, time_t timestamp) |
rh_cache * | rh_cache_find_hash (u_int hash) |
rh_cache * | rh_cache_find_hname (char *hname) |
void | rh_cache_del (rh_cache *rhc) |
void | rh_cache_del_expired (void) |
void | rh_cache_flush (void) |
char * | pack_lcl_keyring (lcl_cache_keyring *keyring, size_t *pack_sz) |
int | unpack_lcl_keyring (lcl_cache_keyring *keyring, char *pack, size_t pack_sz) |
char * | pack_lcl_cache (lcl_cache *local_cache, size_t *pack_sz) |
lcl_cache * | unpack_lcl_cache (char *pack, size_t pack_sz, int *counter) |
int | pack_andna_cache_queue (char *pack, size_t tot_pack_sz, andna_cache_queue *acq, int pack_type) |
int | pack_single_andna_cache (char *pack, size_t tot_pack_sz, andna_cache *ac, int pack_type) |
char * | pack_andna_cache (andna_cache *acache, size_t *pack_sz, int pack_type) |
andna_cache_queue * | unpack_acq_llist (char *pack, size_t pack_sz, size_t *unpacked_sz, andna_cache *ac, int pack_type) |
andna_cache * | unpack_andna_cache (char *pack, size_t pack_sz, int *counter, int pack_type) |
char * | pack_counter_cache (counter_c *countercache, size_t *pack_sz) |
counter_c * | unpack_counter_cache (char *pack, size_t pack_sz, int *counter) |
char * | pack_rh_cache (rh_cache *rhcache, size_t *pack_sz) |
rh_cache * | unpack_rh_cache (char *pack, size_t pack_sz, int *counter) |
int | save_lcl_keyring (lcl_cache_keyring *keyring, char *file) |
int | load_lcl_keyring (lcl_cache_keyring *keyring, char *file) |
int | save_lcl_cache (lcl_cache *lcl, char *file) |
lcl_cache * | load_lcl_cache (char *file, int *counter) |
int | save_andna_cache (andna_cache *acache, char *file) |
andna_cache * | load_andna_cache (char *file, int *counter) |
int | save_counter_c (counter_c *countercache, char *file) |
counter_c * | load_counter_c (char *file, int *counter) |
int | save_rh_cache (rh_cache *rh, char *file) |
rh_cache * | load_rh_cache (char *file, int *counter) |
int | load_hostnames (char *file, lcl_cache **old_alcl_head, int *old_alcl_counter) |
int | load_snsd (char *file, lcl_cache *alcl_head) |
int | add_resolv_conf (char *hname, char *file) |
int | del_resolv_conf (char *hname, char *file) |
Variables | |
int | net_family |
#define MAX_SNSD_LINE_SZ (ANDNA_MAX_HNAME_LEN*4) |
andna_cache_queue* ac_queue_add | ( | andna_cache * | ac, |
char * | pubkey | ||
) |
void ac_queue_del | ( | andna_cache * | ac, |
andna_cache_queue * | acq | ||
) |
void ac_queue_del_expired | ( | andna_cache * | ac | ) |
void ac_queue_destroy | ( | andna_cache * | ac | ) |
andna_cache_queue* ac_queue_findpubk | ( | andna_cache * | ac, |
char * | pubk | ||
) |
int add_resolv_conf | ( | char * | hname, |
char * | file | ||
) |
u_int andna_32bit_hash | ( | char * | hname | ) |
andna_cache* andna_cache_addhash | ( | int | hash[4] | ) |
void andna_cache_del_expired | ( | void | ) |
int andna_cache_del_ifexpired | ( | andna_cache * | ac | ) |
void andna_cache_destroy | ( | void | ) |
andna_cache* andna_cache_findhash | ( | int | hash[4] | ) |
andna_cache* andna_cache_gethash | ( | int | hash[4] | ) |
void andna_caches_init | ( | int | family | ) |
counter_c_hashes* cc_findhash | ( | counter_c * | cc, |
int | hash[4] | ||
) |
counter_c_hashes* cc_hashes_add | ( | counter_c * | cc, |
int | hash[4] | ||
) |
void cc_hashes_del | ( | counter_c * | cc, |
counter_c_hashes * | cch | ||
) |
void cc_hashes_del_expired | ( | counter_c * | cc | ) |
void cc_hashes_destroy | ( | counter_c * | cc | ) |
counter_c* counter_c_add | ( | inet_prefix * | rip, |
char * | pubkey | ||
) |
void counter_c_del_expired | ( | void | ) |
void counter_c_destroy | ( | void | ) |
counter_c* counter_c_findpubk | ( | char * | pubk | ) |
int del_resolv_conf | ( | char * | hname, |
char * | file | ||
) |
int is_lcl_hname_registered | ( | lcl_cache * | alcl | ) |
void lcl_cache_destroy | ( | lcl_cache * | head, |
int * | counter | ||
) |
void lcl_cache_free | ( | lcl_cache * | alcl | ) |
lcl_cache* lcl_cache_new | ( | char * | hname | ) |
void lcl_destroy_keyring | ( | lcl_cache_keyring * | keyring | ) |
void lcl_new_keyring | ( | lcl_cache_keyring * | keyring | ) |
andna_cache* load_andna_cache | ( | char * | file, |
int * | counter | ||
) |
counter_c* load_counter_c | ( | char * | file, |
int * | counter | ||
) |
int load_hostnames | ( | char * | file, |
lcl_cache ** | old_alcl_head, | ||
int * | old_alcl_counter | ||
) |
lcl_cache* load_lcl_cache | ( | char * | file, |
int * | counter | ||
) |
int load_lcl_keyring | ( | lcl_cache_keyring * | keyring, |
char * | file | ||
) |
rh_cache* load_rh_cache | ( | char * | file, |
int * | counter | ||
) |
int load_snsd | ( | char * | file, |
lcl_cache * | alcl_head | ||
) |
char* pack_andna_cache | ( | andna_cache * | acache, |
size_t * | pack_sz, | ||
int | pack_type | ||
) |
int pack_andna_cache_queue | ( | char * | pack, |
size_t | tot_pack_sz, | ||
andna_cache_queue * | acq, | ||
int | pack_type | ||
) |
char* pack_counter_cache | ( | counter_c * | countercache, |
size_t * | pack_sz | ||
) |
char* pack_lcl_cache | ( | lcl_cache * | local_cache, |
size_t * | pack_sz | ||
) |
char* pack_lcl_keyring | ( | lcl_cache_keyring * | keyring, |
size_t * | pack_sz | ||
) |
char* pack_rh_cache | ( | rh_cache * | rhcache, |
size_t * | pack_sz | ||
) |
int pack_single_andna_cache | ( | char * | pack, |
size_t | tot_pack_sz, | ||
andna_cache * | ac, | ||
int | pack_type | ||
) |
rh_cache* rh_cache_add | ( | char * | hname, |
time_t | timestamp | ||
) |
rh_cache* rh_cache_add_hash | ( | u_int | hash, |
time_t | timestamp | ||
) |
void rh_cache_del | ( | rh_cache * | rhc | ) |
void rh_cache_del_expired | ( | void | ) |
rh_cache* rh_cache_find_hash | ( | u_int | hash | ) |
rh_cache* rh_cache_find_hname | ( | char * | hname | ) |
void rh_cache_flush | ( | void | ) |
rh_cache* rh_cache_new | ( | char * | hname, |
time_t | timestamp | ||
) |
rh_cache* rh_cache_new_hash | ( | u_int | hash, |
time_t | timestamp | ||
) |
int save_andna_cache | ( | andna_cache * | acache, |
char * | file | ||
) |
int save_counter_c | ( | counter_c * | countercache, |
char * | file | ||
) |
int save_lcl_cache | ( | lcl_cache * | lcl, |
char * | file | ||
) |
int save_lcl_keyring | ( | lcl_cache_keyring * | keyring, |
char * | file | ||
) |
int save_rh_cache | ( | rh_cache * | rh, |
char * | file | ||
) |
andna_cache_queue* unpack_acq_llist | ( | char * | pack, |
size_t | pack_sz, | ||
size_t * | unpacked_sz, | ||
andna_cache * | ac, | ||
int | pack_type | ||
) |
andna_cache* unpack_andna_cache | ( | char * | pack, |
size_t | pack_sz, | ||
int * | counter, | ||
int | pack_type | ||
) |
counter_c* unpack_counter_cache | ( | char * | pack, |
size_t | pack_sz, | ||
int * | counter | ||
) |
lcl_cache* unpack_lcl_cache | ( | char * | pack, |
size_t | pack_sz, | ||
int * | counter | ||
) |
int unpack_lcl_keyring | ( | lcl_cache_keyring * | keyring, |
char * | pack, | ||
size_t | pack_sz | ||
) |
rh_cache* unpack_rh_cache | ( | char * | pack, |
size_t | pack_sz, | ||
int * | counter | ||
) |
int net_family |