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

Functions

int pos_from_node (map_node *node, map_node *map)
 
map_nodenode_from_pos (int pos, map_node *map)
 
void postoip (u_int map_pos, inet_prefix ipstart, inet_prefix *ret)
 
void maptoip (u_int mapstart, u_int mapoff, inet_prefix ipstart, inet_prefix *ret)
 
int iptomap (u_int mapstart, inet_prefix ip, inet_prefix ipstart, map_node **ret)
 
map_nodeinit_map (size_t len)
 
void free_map (map_node *map, size_t count)
 
map_rnodernode_insert (map_rnode *buf, size_t pos, map_rnode *new)
 
map_rnodemap_rnode_insert (map_node *node, size_t pos, map_rnode *new)
 
map_rnodernode_add (map_node *node, map_rnode *new)
 
void rnode_swap (map_rnode *one, map_rnode *two)
 
void rnode_del (map_node *node, size_t pos)
 
void rnode_destroy (map_node *node)
 
int rnode_find (map_node *node, void *n)
 
void map_node_del (map_node *node)
 
void reset_int_map (map_node *map, int maxgroupnode)
 
int rnode_trtt_compar (const void *a, const void *b)
 
void rnode_trtt_order (map_node *node)
 
void map_routes_order (map_node *map)
 
u_int get_route_trtt (map_node *node, u_short route)
 
int merge_maps (map_node *base, map_node *new, map_node *base_root, map_node *new_root)
 
int mod_rnode_addr (map_rnode *rnode, int *map_start, int *new_start)
 
int get_rnode_block (int *map, map_node *node, map_rnode *rblock, int rstart)
 
map_rnodemap_get_rblock (map_node *map, int *addr_map, int maxgroupnode, int *count)
 
int store_rnode_block (int *map, map_node *node, map_rnode *rblock, int rstart)
 
int map_store_rblock (map_node *map, int *addr_map, int maxgroupnode, map_rnode *rblock)
 
int verify_int_map_hdr (struct int_map_hdr *imap_hdr, int maxgroupnode, int maxrnodeblock)
 
void pack_map_node (map_node *node, char *pack)
 
void unpack_map_node (map_node *node, char *pack)
 
char * pack_map (map_node *map, int *addr_map, int maxgroupnode, map_node *root_node, size_t *pack_sz)
 
map_nodeunpack_map (char *pack, int *addr_map, map_node **new_root, int maxgroupnode, int maxrnodeblock)
 
int save_map (map_node *map, map_node *root_node, char *file)
 
map_nodeload_map (char *file, map_node **new_root)
 

Variables

int errno
 

Function Documentation

void free_map ( map_node map,
size_t  count 
)

Here is the caller graph for this function:

int get_rnode_block ( int *  map,
map_node node,
map_rnode rblock,
int  rstart 
)

Here is the caller graph for this function:

u_int get_route_trtt ( map_node node,
u_short  route 
)

Here is the caller graph for this function:

map_node* init_map ( size_t  len)

Here is the caller graph for this function:

int iptomap ( u_int  mapstart,
inet_prefix  ip,
inet_prefix  ipstart,
map_node **  ret 
)

Here is the call graph for this function:

Here is the caller graph for this function:

map_node* load_map ( char *  file,
map_node **  new_root 
)

Here is the caller graph for this function:

map_rnode* map_get_rblock ( map_node map,
int *  addr_map,
int  maxgroupnode,
int *  count 
)

Here is the caller graph for this function:

void map_node_del ( map_node node)

Here is the call graph for this function:

Here is the caller graph for this function:

map_rnode* map_rnode_insert ( map_node node,
size_t  pos,
map_rnode new 
)

Here is the caller graph for this function:

void map_routes_order ( map_node map)

Here is the call graph for this function:

int map_store_rblock ( map_node map,
int *  addr_map,
int  maxgroupnode,
map_rnode rblock 
)

Here is the caller graph for this function:

void maptoip ( u_int  mapstart,
u_int  mapoff,
inet_prefix  ipstart,
inet_prefix ret 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int merge_maps ( map_node base,
map_node new,
map_node base_root,
map_node new_root 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int mod_rnode_addr ( map_rnode rnode,
int *  map_start,
int *  new_start 
)

Here is the caller graph for this function:

map_node* node_from_pos ( int  pos,
map_node map 
)

Here is the caller graph for this function:

char* pack_map ( map_node map,
int *  addr_map,
int  maxgroupnode,
map_node root_node,
size_t *  pack_sz 
)

Here is the caller graph for this function:

void pack_map_node ( map_node node,
char *  pack 
)

Here is the caller graph for this function:

int pos_from_node ( map_node node,
map_node map 
)

Here is the caller graph for this function:

void postoip ( u_int  map_pos,
inet_prefix  ipstart,
inet_prefix ret 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void reset_int_map ( map_node map,
int  maxgroupnode 
)

Here is the call graph for this function:

Here is the caller graph for this function:

map_rnode* rnode_add ( map_node node,
map_rnode new 
)

Here is the caller graph for this function:

void rnode_del ( map_node node,
size_t  pos 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void rnode_destroy ( map_node node)

Here is the caller graph for this function:

int rnode_find ( map_node node,
void *  n 
)

Here is the caller graph for this function:

map_rnode* rnode_insert ( map_rnode buf,
size_t  pos,
map_rnode new 
)

Here is the caller graph for this function:

void rnode_swap ( map_rnode one,
map_rnode two 
)

Here is the caller graph for this function:

int rnode_trtt_compar ( const void *  a,
const void *  b 
)

Here is the caller graph for this function:

void rnode_trtt_order ( map_node node)

Here is the call graph for this function:

Here is the caller graph for this function:

int save_map ( map_node map,
map_node root_node,
char *  file 
)

Here is the caller graph for this function:

int store_rnode_block ( int *  map,
map_node node,
map_rnode rblock,
int  rstart 
)

Here is the caller graph for this function:

map_node* unpack_map ( char *  pack,
int *  addr_map,
map_node **  new_root,
int  maxgroupnode,
int  maxrnodeblock 
)

Here is the caller graph for this function:

void unpack_map_node ( map_node node,
char *  pack 
)

Here is the caller graph for this function:

int verify_int_map_hdr ( struct int_map_hdr imap_hdr,
int  maxgroupnode,
int  maxrnodeblock 
)

Here is the caller graph for this function:

Variable Documentation

int errno