![]() |
The Netsukuku Project
0.0.9
An Alternative routing method
|
#include "includes.h"#include "inet.h"#include "endianness.h"#include "map.h"#include "gmap.h"#include "bmap.h"#include "route.h"#include "request.h"#include "tracer.h"#include "qspn.h"#include "radar.h"#include "netsukuku.h"#include "daemon.h"#include "crypto.h"#include "snsd_cache.h"#include "andna_cache.h"#include "andna.h"#include "andns.h"#include "dns_wrapper.h"#include "hash.h"#include "common.h"
Functions | |
| int | andna_load_caches (void) |
| int | andna_save_caches (void) |
| void | andna_resolvconf_modify (void) |
| void | andna_resolvconf_restore (void) |
| void | andna_init (void) |
| void | andna_close (void) |
| void | andna_hash_by_family (int family, void *msg, u_int hash[4]) |
| void | andna_hash (int family, void *msg, int len, u_int hash[4], u_int ip_hash[4]) |
| int | is_hgnode_excluded (quadro_group *qg, u_int **excluded_hgnode, int tot_excluded_hgnodes, int lvl) |
| int | is_hgnodeip_excluded (inet_prefix *hgnodeip, u_int **excluded_hgnode, int tot_excluded_hgnodes) |
| int | random_gid_level_0 (quadro_group *qg, inet_prefix *to, int exclude_me) |
| int | find_hash_gnode_recurse (quadro_group qg, int level, inet_prefix *to, u_int **excluded_hgnode, int tot_excluded_hgnodes, int exclude_me) |
| int | find_hash_gnode (u_int hash[4], inet_prefix *to, u_int **excluded_hgnode, int tot_excluded_hgnodes, int exclude_me) |
| int | andna_flood_pkt (PACKET *rpkt, int exclude_rfrom) |
| int | andna_find_flood_pkt_id (int *ids_array, int pkt_id) |
| int | andna_add_flood_pkt_id (int *ids_array, int pkt_id) |
| int | andna_register_hname (lcl_cache *alcl, snsd_service *snsd_delete) |
| int | andna_recv_reg_rq (PACKET rpkt) |
| int | andna_check_counter (PACKET pkt) |
| int | andna_recv_check_counter (PACKET rpkt) |
| snsd_service * | andna_resolve_hash_locally (u_int hname_hash[4], int service, u_char proto, int *records) |
| snsd_service * | andna_resolve_hash (u_int hname_hash[4], int service, u_char proto, int *records) |
| snsd_service * | andna_resolve_hname (char *hname, int service, u_char proto, int *records) |
| int | andna_recv_resolve_rq (PACKET rpkt) |
| lcl_cache * | andna_reverse_resolve (inet_prefix ip) |
| int | andna_recv_rev_resolve_rq (PACKET rpkt) |
| andna_cache * | get_single_andna_c (u_int hash[4], u_int hash_gnode[4]) |
| int | put_single_acache (PACKET rpkt) |
| int | spread_single_acache (u_int hash[4]) |
| int | recv_spread_single_acache (PACKET rpkt) |
| andna_cache * | get_andna_cache (map_node *dst_rnode, int *counter) |
| int | put_andna_cache (PACKET rq_pkt) |
| counter_c * | get_counter_cache (map_node *dst_rnode, int *counter) |
| int | put_counter_cache (PACKET rq_pkt) |
| void * | andna_hook (void *null) |
| void * | andna_min_update_retry (void *void_alcl) |
| void | andna_update_hnames (int only_new_hname) |
| void * | andna_maintain_hnames_active (void *null) |
| void * | andna_main (void *null) |
| int andna_add_flood_pkt_id | ( | int * | ids_array, |
| int | pkt_id | ||
| ) |


| int andna_check_counter | ( | PACKET | pkt | ) |


| void andna_close | ( | void | ) |


| int andna_find_flood_pkt_id | ( | int * | ids_array, |
| int | pkt_id | ||
| ) |

| int andna_flood_pkt | ( | PACKET * | rpkt, |
| int | exclude_rfrom | ||
| ) |


| void andna_hash | ( | int | family, |
| void * | msg, | ||
| int | len, | ||
| u_int | hash[4], | ||
| u_int | ip_hash[4] | ||
| ) |


| void andna_hash_by_family | ( | int | family, |
| void * | msg, | ||
| u_int | hash[4] | ||
| ) |


| void* andna_hook | ( | void * | null | ) |


| void andna_init | ( | void | ) |


| int andna_load_caches | ( | void | ) |


| void* andna_main | ( | void * | null | ) |


| void* andna_maintain_hnames_active | ( | void * | null | ) |
If we don't have rnodes, it's useless to try anything


| void* andna_min_update_retry | ( | void * | void_alcl | ) |


| int andna_recv_check_counter | ( | PACKET | rpkt | ) |


| int andna_recv_reg_rq | ( | PACKET | rpkt | ) |
Check if the counter of number of updates matches with the pkt
Has the registration request been sent too early ?
Set the mainip flag only to the real mainip record, in this way we're sure that there is only one.
Broadcast the request to the entire gnode of level 1 to let the other nodes register the hname.


| int andna_recv_resolve_rq | ( | PACKET | rpkt | ) |


| int andna_recv_rev_resolve_rq | ( | PACKET | rpkt | ) |


| int andna_register_hname | ( | lcl_cache * | alcl, |
| snsd_service * | snsd_delete | ||
| ) |


| void andna_resolvconf_modify | ( | void | ) |


| void andna_resolvconf_restore | ( | void | ) |


| snsd_service* andna_resolve_hash | ( | u_int | hname_hash[4], |
| int | service, | ||
| u_char | proto, | ||
| int * | records | ||
| ) |


| snsd_service* andna_resolve_hash_locally | ( | u_int | hname_hash[4], |
| int | service, | ||
| u_char | proto, | ||
| int * | records | ||
| ) |


| snsd_service* andna_resolve_hname | ( | char * | hname, |
| int | service, | ||
| u_char | proto, | ||
| int * | records | ||
| ) |


| lcl_cache* andna_reverse_resolve | ( | inet_prefix | ip | ) |


| int andna_save_caches | ( | void | ) |


| void andna_update_hnames | ( | int | only_new_hname | ) |


| int find_hash_gnode | ( | u_int | hash[4], |
| inet_prefix * | to, | ||
| u_int ** | excluded_hgnode, | ||
| int | tot_excluded_hgnodes, | ||
| int | exclude_me | ||
| ) |


| int find_hash_gnode_recurse | ( | quadro_group | qg, |
| int | level, | ||
| inet_prefix * | to, | ||
| u_int ** | excluded_hgnode, | ||
| int | tot_excluded_hgnodes, | ||
| int | exclude_me | ||
| ) |


| andna_cache* get_andna_cache | ( | map_node * | dst_rnode, |
| int * | counter | ||
| ) |




| andna_cache* get_single_andna_c | ( | u_int | hash[4], |
| u_int | hash_gnode[4] | ||
| ) |


| int is_hgnode_excluded | ( | quadro_group * | qg, |
| u_int ** | excluded_hgnode, | ||
| int | tot_excluded_hgnodes, | ||
| int | lvl | ||
| ) |


| int is_hgnodeip_excluded | ( | inet_prefix * | hgnodeip, |
| u_int ** | excluded_hgnode, | ||
| int | tot_excluded_hgnodes | ||
| ) |

| int put_andna_cache | ( | PACKET | rq_pkt | ) |


| int put_counter_cache | ( | PACKET | rq_pkt | ) |


| int put_single_acache | ( | PACKET | rpkt | ) |


| int random_gid_level_0 | ( | quadro_group * | qg, |
| inet_prefix * | to, | ||
| int | exclude_me | ||
| ) |


| int recv_spread_single_acache | ( | PACKET | rpkt | ) |


| int spread_single_acache | ( | u_int | hash[4] | ) |

