#include "andna_cache.h"
#include "pkts.h"
Go to the source code of this file.
#define ANDNA_HOOK_TIMEOUT 8 /* seconds */ |
#define ANDNA_MAX_NEW_GNODES 1024 |
#define ANDNA_PKT_FORWARD (1<<1) /* Forward this pkt, plz */ |
#define ANDNA_PKT_JUST_CHECK |
#define ANDNA_PKT_REV_RESOLVE (1<<2) /* Give me your hostnames */ |
#define ANDNA_PKT_SNSD_DEL (1<<4) /* SNSD delete request */ |
#define ANDNA_PKT_UPDATE 1 /* Update the hostname */ |
#define ANDNA_REG_SIGNED_BLOCK_SZ |
Value:
sizeof(char))
#define ANDNA_SIGNATURE_LEN
Definition: andna_cache.h:47
#define ANDNA_REG_PKT_SZ
Definition: andna.h:118
#define ANDNA_REV_RESOLVE_RQ_TIMEOUT 60 |
#define ETC_RESOLV_CONF "/etc/resolv.conf" |
#define ETC_RESOLV_CONF_BAK "/etc/resolv.conf.bak" |
#define MY_NAMESERV "nameserver 127.0.0.1" |
#define MY_NAMESERV_IPV6 "nameserver ::1" |
#define SINGLE_ACACHE_PKT_SZ |
( |
|
hgnodes | ) |
|
Value:
u_short hgnodes
Definition: andna.h:196
#define MAX_IP_SZ
Definition: inet.h:25
int andna_check_counter |
( |
PACKET |
pkt | ) |
|
void andna_close |
( |
void |
| ) |
|
void* andna_hook |
( |
void * |
| ) |
|
int andna_load_caches |
( |
void |
| ) |
|
void* andna_main |
( |
void * |
| ) |
|
void* andna_maintain_hnames_active |
( |
void * |
null | ) |
|
If we don't have rnodes, it's useless to try anything
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 | ) |
|
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_hname |
( |
char * |
hname, |
|
|
int |
service, |
|
|
u_char |
proto, |
|
|
int * |
records |
|
) |
| |
int andna_save_caches |
( |
void |
| ) |
|
void andna_update_hnames |
( |
int |
only_new_hname | ) |
|
andna_cache* get_single_andna_c |
( |
u_int |
hash[4], |
|
|
u_int |
hash_gnode[4] |
|
) |
| |
int put_andna_cache |
( |
PACKET |
rq_pkt | ) |
|
int put_counter_cache |
( |
PACKET |
rq_pkt | ) |
|
int put_single_acache |
( |
PACKET |
rpkt | ) |
|
int recv_spread_single_acache |
( |
PACKET |
rpkt | ) |
|
int spread_single_acache |
( |
u_int |
hash[4] | ) |
|
Initial value:= { 1,
{ (1<<1) },
{ ( 4 *sizeof(int)) *2 + 140 },
{ 1 },
}
const int_info andna_resolve_reply_pkt_iinfo |
|
static |
Initial value:= { 1,
{ 1 },
{ 0 },
{ 1 }
}
const int_info andna_resolve_rq_pkt_iinfo |
|
static |
Initial value:= { 1,
{ 1 },
{ ( 4 *sizeof(int)) *2+sizeof(char) },
{ 1 },
}
int last_counter_pkt_id[(5 *3+1)] |
int last_reg_pkt_id[(5 *3+1)] |
int last_spread_acache_pkt_id[(5 *3+1)] |
Initial value:= { 1,
{ (1<<1) },
{ ( 4 *sizeof(int)) *2 },
{ 1 },
}
const int_info spread_acache_pkt_info = { 0, { 0 }, { 0 }, { 0 } } |
|
static |