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

Functions

void snsd_cache_init (int family)
 
u_char str_to_snsd_proto (char *proto_name)
 
const char * snsd_proto_to_str (u_char proto)
 
int str_to_snsd_service (char *str, int *service, u_char *proto)
 
struct servent * snsd_service_to_str (int service, u_char proto, char **service_str, char **proto_str)
 
snsd_servicesnsd_find_service (snsd_service *sns, u_short service, u_char proto)
 
snsd_servicesnsd_add_service (snsd_service **head, u_short service, u_char proto)
 
snsd_priosnsd_find_prio (snsd_prio *snp, u_char prio)
 
snsd_priosnsd_add_prio (snsd_prio **head, u_char prio)
 
snsd_nodesnsd_find_node_by_record (snsd_node *snd, u_int record[4])
 
snsd_nodesnsd_add_node (snsd_node **head, u_short *counter, u_short max_records, u_int record[4])
 
snsd_nodesnsd_add_first_node (snsd_node **head, u_short *counter, u_short max_records, u_int record[4])
 
snsd_nodesnsd_add_mainip (snsd_service **head, u_short *counter, u_short max_records, u_int record[4])
 
void snsd_node_llist_del (snsd_node **head, u_short *counter)
 
void snsd_prio_llist_del (snsd_prio **head)
 
void snsd_service_llist_del (snsd_service **head)
 
void snsd_record_del_selected (snsd_service **head, u_short *snd_counter, snsd_service *selected)
 
int snsd_pack_node (char *pack, size_t free_sz, snsd_node *node)
 
snsd_nodesnsd_unpack_node (char *pack)
 
int snsd_pack_all_nodes (char *pack, size_t pack_sz, snsd_node *head)
 
snsd_nodesnsd_unpack_all_nodes (char *pack, size_t pack_sz, size_t *unpacked_sz, u_short *nodes_counter)
 
int snsd_pack_prio (char *pack, size_t free_sz, snsd_prio *prio)
 
snsd_priosnsd_unpack_prio (char *pack, size_t pack_sz, size_t *unpacked_sz, u_short *nodes_counter)
 
int snsd_pack_all_prios (char *pack, size_t pack_sz, snsd_prio *head)
 
snsd_priosnsd_unpack_all_prios (char *pack, size_t pack_sz, size_t *unpacked_sz, u_short *nodes_counter)
 
int snsd_pack_service (char *pack, size_t free_sz, snsd_service *service)
 
snsd_servicesnsd_unpack_service (char *pack, size_t pack_sz, size_t *unpacked_sz, u_short *nodes_counter)
 
int snsd_pack_all_services (char *pack, size_t pack_sz, snsd_service *head)
 
snsd_servicesnsd_unpack_all_service (char *pack, size_t pack_sz, size_t *unpacked_sz, u_short *nodes_counter)
 
int snsd_count_nodes (snsd_node *head)
 
int snsd_count_prio_nodes (snsd_prio *head)
 
int snsd_count_service_nodes (snsd_service *head)
 
snsd_nodesnsd_choose_wrand (snsd_node *head)
 
snsd_priosnsd_highest_prio (snsd_prio *head)
 
snsd_nodesnsd_find_mainip (snsd_service *sns)
 
void snsd_unset_all_flags (snsd_service *sns, u_char flag)
 
snsd_nodesnsd_node_llist_copy (snsd_node *snd)
 
snsd_priosnsd_prio_llist_copy (snsd_prio *snp)
 
int is_equal_to_serv_proto (snsd_service *sns, u_short service, u_char proto)
 
snsd_servicesnsd_service_llist_copy (snsd_service *sns, int service, u_char proto)
 
void snsd_merge_node (snsd_node **head, u_short *snsd_counter, snsd_node *new)
 
void snsd_node_llist_merge (snsd_node **dst, u_short *snsd_counter, snsd_node *src)
 
void snsd_merge_prio (snsd_prio **head, u_short *snsd_counter, snsd_prio *new)
 
void snsd_prio_llist_merge (snsd_prio **dst, u_short *snsd_counter, snsd_prio *src)
 
void snsd_merge_service (snsd_service **head, u_short *snsd_counter, snsd_service *new)
 
void snsd_service_llist_merge (snsd_service **dst, u_short *snsd_counter, snsd_service *src)
 
void snsd_dump_node (snsd_node *snd, int single)
 
void snsd_dump_prio (snsd_prio *snp, int single, int level)
 
void snsd_dump_service (snsd_service *sns, int single, int level)
 

Variables

int net_family
 

Function Documentation

int is_equal_to_serv_proto ( snsd_service sns,
u_short  service,
u_char  proto 
)

Here is the caller graph for this function:

snsd_node* snsd_add_first_node ( snsd_node **  head,
u_short *  counter,
u_short  max_records,
u_int  record[4] 
)

Here is the call graph for this function:

snsd_node* snsd_add_mainip ( snsd_service **  head,
u_short *  counter,
u_short  max_records,
u_int  record[4] 
)

Here is the call graph for this function:

Here is the caller graph for this function:

snsd_node* snsd_add_node ( snsd_node **  head,
u_short *  counter,
u_short  max_records,
u_int  record[4] 
)

Here is the call graph for this function:

Here is the caller graph for this function:

snsd_prio* snsd_add_prio ( snsd_prio **  head,
u_char  prio 
)

Here is the call graph for this function:

Here is the caller graph for this function:

snsd_service* snsd_add_service ( snsd_service **  head,
u_short  service,
u_char  proto 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void snsd_cache_init ( int  family)

Here is the caller graph for this function:

snsd_node* snsd_choose_wrand ( snsd_node head)

Here is the call graph for this function:

int snsd_count_nodes ( snsd_node head)

Here is the caller graph for this function:

int snsd_count_prio_nodes ( snsd_prio head)

Here is the call graph for this function:

Here is the caller graph for this function:

int snsd_count_service_nodes ( snsd_service head)

Here is the call graph for this function:

void snsd_dump_node ( snsd_node snd,
int  single 
)

Here is the caller graph for this function:

void snsd_dump_prio ( snsd_prio snp,
int  single,
int  level 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void snsd_dump_service ( snsd_service sns,
int  single,
int  level 
)

Here is the call graph for this function:

snsd_node* snsd_find_mainip ( snsd_service sns)

Here is the caller graph for this function:

snsd_node* snsd_find_node_by_record ( snsd_node snd,
u_int  record[4] 
)

Here is the caller graph for this function:

snsd_prio* snsd_find_prio ( snsd_prio snp,
u_char  prio 
)

Here is the caller graph for this function:

snsd_service* snsd_find_service ( snsd_service sns,
u_short  service,
u_char  proto 
)

Here is the caller graph for this function:

snsd_prio* snsd_highest_prio ( snsd_prio head)
void snsd_merge_node ( snsd_node **  head,
u_short *  snsd_counter,
snsd_node new 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void snsd_merge_prio ( snsd_prio **  head,
u_short *  snsd_counter,
snsd_prio new 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void snsd_merge_service ( snsd_service **  head,
u_short *  snsd_counter,
snsd_service new 
)

Here is the call graph for this function:

Here is the caller graph for this function:

snsd_node* snsd_node_llist_copy ( snsd_node snd)

Here is the caller graph for this function:

void snsd_node_llist_del ( snsd_node **  head,
u_short *  counter 
)

Here is the caller graph for this function:

void snsd_node_llist_merge ( snsd_node **  dst,
u_short *  snsd_counter,
snsd_node src 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int snsd_pack_all_nodes ( char *  pack,
size_t  pack_sz,
snsd_node head 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int snsd_pack_all_prios ( char *  pack,
size_t  pack_sz,
snsd_prio head 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int snsd_pack_all_services ( char *  pack,
size_t  pack_sz,
snsd_service head 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int snsd_pack_node ( char *  pack,
size_t  free_sz,
snsd_node node 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int snsd_pack_prio ( char *  pack,
size_t  free_sz,
snsd_prio prio 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int snsd_pack_service ( char *  pack,
size_t  free_sz,
snsd_service service 
)

Here is the call graph for this function:

Here is the caller graph for this function:

snsd_prio* snsd_prio_llist_copy ( snsd_prio snp)

Here is the call graph for this function:

Here is the caller graph for this function:

void snsd_prio_llist_del ( snsd_prio **  head)

Here is the call graph for this function:

Here is the caller graph for this function:

void snsd_prio_llist_merge ( snsd_prio **  dst,
u_short *  snsd_counter,
snsd_prio src 
)

Here is the call graph for this function:

Here is the caller graph for this function:

const char* snsd_proto_to_str ( u_char  proto)

Here is the caller graph for this function:

void snsd_record_del_selected ( snsd_service **  head,
u_short *  snd_counter,
snsd_service selected 
)

Here is the call graph for this function:

Here is the caller graph for this function:

snsd_service* snsd_service_llist_copy ( snsd_service sns,
int  service,
u_char  proto 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void snsd_service_llist_del ( snsd_service **  head)

Here is the call graph for this function:

Here is the caller graph for this function:

void snsd_service_llist_merge ( snsd_service **  dst,
u_short *  snsd_counter,
snsd_service src 
)

Here is the call graph for this function:

Here is the caller graph for this function:

struct servent* snsd_service_to_str ( int  service,
u_char  proto,
char **  service_str,
char **  proto_str 
)

Here is the call graph for this function:

snsd_node* snsd_unpack_all_nodes ( char *  pack,
size_t  pack_sz,
size_t *  unpacked_sz,
u_short *  nodes_counter 
)

Here is the call graph for this function:

Here is the caller graph for this function:

snsd_prio* snsd_unpack_all_prios ( char *  pack,
size_t  pack_sz,
size_t *  unpacked_sz,
u_short *  nodes_counter 
)

Here is the call graph for this function:

Here is the caller graph for this function:

snsd_service* snsd_unpack_all_service ( char *  pack,
size_t  pack_sz,
size_t *  unpacked_sz,
u_short *  nodes_counter 
)

Here is the call graph for this function:

Here is the caller graph for this function:

snsd_node* snsd_unpack_node ( char *  pack)

Here is the call graph for this function:

Here is the caller graph for this function:

snsd_prio* snsd_unpack_prio ( char *  pack,
size_t  pack_sz,
size_t *  unpacked_sz,
u_short *  nodes_counter 
)

Here is the call graph for this function:

Here is the caller graph for this function:

snsd_service* snsd_unpack_service ( char *  pack,
size_t  pack_sz,
size_t *  unpacked_sz,
u_short *  nodes_counter 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void snsd_unset_all_flags ( snsd_service sns,
u_char  flag 
)

Here is the caller graph for this function:

u_char str_to_snsd_proto ( char *  proto_name)

Here is the caller graph for this function:

int str_to_snsd_service ( char *  str,
int *  service,
u_char *  proto 
)

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

int net_family