The Netsukuku Project  0.0.9
An Alternative routing method
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
andna_cache.c File Reference
#include "includes.h"
#include "crypto.h"
#include "andna_cache.h"
#include "snsd_cache.h"
#include "common.h"
#include "hash.h"
Include dependency graph for andna_cache.c:

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_cachelcl_cache_new (char *hname)
 
void lcl_cache_free (lcl_cache *alcl)
 
void lcl_cache_destroy (lcl_cache *head, int *counter)
 
lcl_cachelcl_cache_find_hname (lcl_cache *alcl, char *hname)
 
lcl_cachelcl_cache_find_hash (lcl_cache *alcl, u_int hash)
 
int is_lcl_hname_registered (lcl_cache *alcl)
 
lcl_cachelcl_get_registered_hnames (lcl_cache *alcl)
 
andna_cache_queueac_queue_findpubk (andna_cache *ac, char *pubk)
 
andna_cache_queueac_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_cacheandna_cache_findhash (int hash[4])
 
andna_cacheandna_cache_gethash (int hash[4])
 
andna_cacheandna_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_hashescc_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_hashescc_findhash (counter_c *cc, int hash[4])
 
counter_ccounter_c_findpubk (char *pubk)
 
counter_ccounter_c_add (inet_prefix *rip, char *pubkey)
 
void counter_c_del_expired (void)
 
void counter_c_destroy (void)
 
rh_cacherh_cache_new_hash (u_int hash, time_t timestamp)
 
rh_cacherh_cache_new (char *hname, time_t timestamp)
 
rh_cacherh_cache_add_hash (u_int hash, time_t timestamp)
 
rh_cacherh_cache_add (char *hname, time_t timestamp)
 
rh_cacherh_cache_find_hash (u_int hash)
 
rh_cacherh_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_cacheunpack_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_queueunpack_acq_llist (char *pack, size_t pack_sz, size_t *unpacked_sz, andna_cache *ac, int pack_type)
 
andna_cacheunpack_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_cunpack_counter_cache (char *pack, size_t pack_sz, int *counter)
 
char * pack_rh_cache (rh_cache *rhcache, size_t *pack_sz)
 
rh_cacheunpack_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_cacheload_lcl_cache (char *file, int *counter)
 
int save_andna_cache (andna_cache *acache, char *file)
 
andna_cacheload_andna_cache (char *file, int *counter)
 
int save_counter_c (counter_c *countercache, char *file)
 
counter_cload_counter_c (char *file, int *counter)
 
int save_rh_cache (rh_cache *rh, char *file)
 
rh_cacheload_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
 

Macro Definition Documentation

#define MAX_SNSD_LINE_SZ   (ANDNA_MAX_HNAME_LEN*4)

Function Documentation

andna_cache_queue* ac_queue_add ( andna_cache ac,
char *  pubkey 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void ac_queue_del ( andna_cache ac,
andna_cache_queue acq 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void ac_queue_del_expired ( andna_cache ac)

Here is the call graph for this function:

Here is the caller graph for this function:

void ac_queue_destroy ( andna_cache ac)

Here is the call graph for this function:

Here is the caller graph for this function:

andna_cache_queue* ac_queue_findpubk ( andna_cache ac,
char *  pubk 
)

Here is the caller graph for this function:

int add_resolv_conf ( char *  hname,
char *  file 
)

Here is the call graph for this function:

Here is the caller graph for this function:

u_int andna_32bit_hash ( char *  hname)

Here is the call graph for this function:

Here is the caller graph for this function:

andna_cache* andna_cache_addhash ( int  hash[4])

Here is the call graph for this function:

Here is the caller graph for this function:

void andna_cache_del_expired ( void  )

Here is the call graph for this function:

Here is the caller graph for this function:

int andna_cache_del_ifexpired ( andna_cache ac)

Here is the call graph for this function:

Here is the caller graph for this function:

void andna_cache_destroy ( void  )

Here is the call graph for this function:

Here is the caller graph for this function:

andna_cache* andna_cache_findhash ( int  hash[4])

Here is the caller graph for this function:

andna_cache* andna_cache_gethash ( int  hash[4])

Here is the call graph for this function:

Here is the caller graph for this function:

void andna_caches_init ( int  family)

Here is the caller graph for this function:

counter_c_hashes* cc_findhash ( counter_c cc,
int  hash[4] 
)

Here is the caller graph for this function:

counter_c_hashes* cc_hashes_add ( counter_c cc,
int  hash[4] 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void cc_hashes_del ( counter_c cc,
counter_c_hashes cch 
)

Here is the caller graph for this function:

void cc_hashes_del_expired ( counter_c cc)

Here is the call graph for this function:

Here is the caller graph for this function:

void cc_hashes_destroy ( counter_c cc)

Here is the call graph for this function:

Here is the caller graph for this function:

counter_c* counter_c_add ( inet_prefix rip,
char *  pubkey 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void counter_c_del_expired ( void  )

Here is the call graph for this function:

Here is the caller graph for this function:

void counter_c_destroy ( void  )

Here is the call graph for this function:

Here is the caller graph for this function:

counter_c* counter_c_findpubk ( char *  pubk)

Here is the caller graph for this function:

int del_resolv_conf ( char *  hname,
char *  file 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int is_lcl_hname_registered ( lcl_cache alcl)

Here is the caller graph for this function:

void lcl_cache_destroy ( lcl_cache head,
int *  counter 
)

Here is the call graph for this function:

Here is the caller graph for this function:

lcl_cache* lcl_cache_find_hash ( lcl_cache alcl,
u_int  hash 
)

Here is the caller graph for this function:

lcl_cache* lcl_cache_find_hname ( lcl_cache alcl,
char *  hname 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void lcl_cache_free ( lcl_cache alcl)

Here is the call graph for this function:

Here is the caller graph for this function:

lcl_cache* lcl_cache_new ( char *  hname)

Here is the call graph for this function:

Here is the caller graph for this function:

void lcl_destroy_keyring ( lcl_cache_keyring keyring)

Here is the caller graph for this function:

lcl_cache* lcl_get_registered_hnames ( lcl_cache alcl)

Here is the call graph for this function:

Here is the caller graph for this function:

void lcl_new_keyring ( lcl_cache_keyring keyring)

Here is the call graph for this function:

Here is the caller graph for this function:

andna_cache* load_andna_cache ( char *  file,
int *  counter 
)

Here is the call graph for this function:

Here is the caller graph for this function:

counter_c* load_counter_c ( char *  file,
int *  counter 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int load_hostnames ( char *  file,
lcl_cache **  old_alcl_head,
int *  old_alcl_counter 
)

Here is the call graph for this function:

Here is the caller graph for this function:

lcl_cache* load_lcl_cache ( char *  file,
int *  counter 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int load_lcl_keyring ( lcl_cache_keyring keyring,
char *  file 
)

Here is the call graph for this function:

Here is the caller graph for this function:

rh_cache* load_rh_cache ( char *  file,
int *  counter 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int load_snsd ( char *  file,
lcl_cache alcl_head 
)

Here is the call graph for this function:

Here is the caller graph for this function:

char* pack_andna_cache ( andna_cache acache,
size_t *  pack_sz,
int  pack_type 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int pack_andna_cache_queue ( char *  pack,
size_t  tot_pack_sz,
andna_cache_queue acq,
int  pack_type 
)

Here is the call graph for this function:

Here is the caller graph for this function:

char* pack_counter_cache ( counter_c countercache,
size_t *  pack_sz 
)

Here is the call graph for this function:

Here is the caller graph for this function:

char* pack_lcl_cache ( lcl_cache local_cache,
size_t *  pack_sz 
)

Here is the call graph for this function:

Here is the caller graph for this function:

char* pack_lcl_keyring ( lcl_cache_keyring keyring,
size_t *  pack_sz 
)

Here is the call graph for this function:

Here is the caller graph for this function:

char* pack_rh_cache ( rh_cache rhcache,
size_t *  pack_sz 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int pack_single_andna_cache ( char *  pack,
size_t  tot_pack_sz,
andna_cache ac,
int  pack_type 
)

Here is the call graph for this function:

Here is the caller graph for this function:

rh_cache* rh_cache_add ( char *  hname,
time_t  timestamp 
)

Here is the call graph for this function:

rh_cache* rh_cache_add_hash ( u_int  hash,
time_t  timestamp 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void rh_cache_del ( rh_cache rhc)

Here is the call graph for this function:

Here is the caller graph for this function:

void rh_cache_del_expired ( void  )

Here is the call graph for this function:

Here is the caller graph for this function:

rh_cache* rh_cache_find_hash ( u_int  hash)

Here is the call graph for this function:

Here is the caller graph for this function:

rh_cache* rh_cache_find_hname ( char *  hname)

Here is the call graph for this function:

void rh_cache_flush ( void  )

Here is the call graph for this function:

Here is the caller graph for this function:

rh_cache* rh_cache_new ( char *  hname,
time_t  timestamp 
)

Here is the call graph for this function:

rh_cache* rh_cache_new_hash ( u_int  hash,
time_t  timestamp 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int save_andna_cache ( andna_cache acache,
char *  file 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int save_counter_c ( counter_c countercache,
char *  file 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int save_lcl_cache ( lcl_cache lcl,
char *  file 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int save_lcl_keyring ( lcl_cache_keyring keyring,
char *  file 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int save_rh_cache ( rh_cache rh,
char *  file 
)

Here is the call graph for this function:

Here is the caller graph for this function:

andna_cache_queue* unpack_acq_llist ( char *  pack,
size_t  pack_sz,
size_t *  unpacked_sz,
andna_cache ac,
int  pack_type 
)

Here is the call graph for this function:

Here is the caller graph for this function:

andna_cache* unpack_andna_cache ( char *  pack,
size_t  pack_sz,
int *  counter,
int  pack_type 
)

Here is the call graph for this function:

Here is the caller graph for this function:

counter_c* unpack_counter_cache ( char *  pack,
size_t  pack_sz,
int *  counter 
)

Here is the call graph for this function:

Here is the caller graph for this function:

lcl_cache* unpack_lcl_cache ( char *  pack,
size_t  pack_sz,
int *  counter 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int unpack_lcl_keyring ( lcl_cache_keyring keyring,
char *  pack,
size_t  pack_sz 
)

Here is the call graph for this function:

Here is the caller graph for this function:

rh_cache* unpack_rh_cache ( char *  pack,
size_t  pack_sz,
int *  counter 
)

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

int net_family