The Netsukuku Project  0.0.9
An Alternative routing method
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
bmap.h File Reference
#include "gmap.h"
Include dependency graph for bmap.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  _PACKED_
 
struct  _PACKED_
 
struct  bnode_maps_hdr
 

Macros

#define BMAP_UPDATE
 
#define MAP_BNODE_PACK_SZ   MAP_NODE_PACK_SZ
 
#define MAXGROUPBNODE
 
#define MAXBNODE_LINKS
 
#define MAXBNODE_RNODEBLOCK   (MAXBNODE_LINKS*MAXGROUPBNODE*MAP_RNODE_PACK_SZ)
 
#define bnode_ptr   brdcast /*Don't kill me*/
 
#define bnode_map_hdr   int_map_hdr
 
#define bnode_map_sz   int_map_sz
 
#define BMAP_LEVELS(levels)   (levels-1)
 
#define BMAP_MAX_LEVELS   (BMAP_LEVELS(MAX_LEVELS))
 
#define GET_BMAP_LEVELS(family)   (BMAP_LEVELS(GET_LEVELS((family))))
 
#define BNODE_HDR_SZ(levels)   (sizeof(bnode_hdr)+sizeof(u_char)*(levels))
 
#define BNODEBLOCK_SZ(levels, links)
 

Typedefs

typedef map_node map_bnode
 

Functions

void bmap_levels_init (u_char levels, map_bnode ***bmap, u_int **bmap_nodes)
 
void bmap_levels_free (map_bnode **bmap, u_int *bmap_nodes)
 
void bmap_counter_init (u_char levels, u_int **bnodes_closed, u_int **bnodes_opened)
 
void bmap_counter_free (u_int *bnodes_closed, u_int *bnodes_opened)
 
void bmap_counter_reset (u_char levels, u_int *counter)
 
int map_add_bnode (map_bnode **bmap, u_int *bmap_nodes, u_int bnode, u_int links)
 
map_bnodemap_bnode_del (map_bnode *bmap, u_int *bmap_nodes, map_bnode *bnode)
 
int bmap_del_rnode_by_level (map_bnode *, int, map_gnode **, int)
 
int map_find_bnode (map_bnode *bmap, int bmap_nodes, int node)
 
int map_find_bnode_rnode (map_bnode *bmap, int bmap_nodes, void *n)
 
int map_count_bnode_rnode (map_bnode *bmap, int bmap_nodes, void *n)
 
int bmaps_count_bnode_rnode (map_bnode **bmap, int *bmap_nodes, int levels, void *n)
 
int map_del_bnode_rnode (map_bnode **bmap, int *bmap_nodes, void *n)
 
int bmaps_del_bnode_rnode (map_bnode **bmap, int *bmap_nodes, int levels, void *n)
 
void map_set_bnode_flag (map_bnode *bmap, int bmap_nodes, int flags)
 
void bmaps_set_bnode_flag (map_bnode **bmap, int *bmap_nodes, int levels, int flags)
 
char * pack_all_bmaps (map_bnode **, u_int *, map_gnode **, quadro_group, size_t *)
 
map_bnode ** unpack_all_bmaps (char *, u_char, map_gnode **, u_int **, int, int)
 
int save_bmap (map_bnode **, u_int *, map_gnode **, quadro_group, char *)
 
map_bnode ** load_bmap (char *, map_gnode **, u_char, u_int **)
 

Variables

static const int_info bnode_hdr_iinfo = { 1, { (1<<1) }, { sizeof(char) }, { 1 } }
 
static const int_info bnode_chunk_iinfo = { 1, { 1 }, { sizeof(char)*2 }, { 1 } }
 
struct bnode_maps_hdr _PACKED_
 
static const int_info bnode_maps_hdr_iinfo = { 1, { 1 }, { sizeof(char) }, { 1 } }
 

Macro Definition Documentation

#define BMAP_LEVELS (   levels)    (levels-1)
#define BMAP_MAX_LEVELS   (BMAP_LEVELS(MAX_LEVELS))
#define BMAP_UPDATE
Value:
MAP_UPDATE /* At each new qspn_round all the bnodes flags are set
to BMAP_UPDATE, thus when tracer_store_pkt() updates
them for the first time during the new round, it
deletes their rnodes. */
#define MAP_UPDATE
Definition: map.h:43
#define BNODE_HDR_SZ (   levels)    (sizeof(bnode_hdr)+sizeof(u_char)*(levels))
#define bnode_map_hdr   int_map_hdr
#define bnode_map_sz   int_map_sz
#define bnode_ptr   brdcast /*Don't kill me*/
#define BNODEBLOCK_SZ (   levels,
  links 
)
Value:
(BNODE_HDR_SZ((levels)) + \
(sizeof(bnode_chunk)*(links)))
#define BNODE_HDR_SZ(levels)
Definition: bmap.h:101
#define GET_BMAP_LEVELS (   family)    (BMAP_LEVELS(GET_LEVELS((family))))
#define MAP_BNODE_PACK_SZ   MAP_NODE_PACK_SZ
#define MAXBNODE_LINKS
Value:
(MAXGROUPNODE*2)/*The maximum number of gnodes a
bnode is linked to*/
#define MAXGROUPNODE
Definition: map.h:26
#define MAXBNODE_RNODEBLOCK   (MAXBNODE_LINKS*MAXGROUPBNODE*MAP_RNODE_PACK_SZ)
#define MAXGROUPBNODE
Value:
MAXGROUPNODE /*the maximum number of bnodes in
a gnode is equal to the maximum
number of nodes*/
#define MAXGROUPNODE
Definition: map.h:26

Typedef Documentation

Function Documentation

void bmap_counter_free ( u_int *  bnodes_closed,
u_int *  bnodes_opened 
)

Here is the caller graph for this function:

void bmap_counter_init ( u_char  levels,
u_int **  bnodes_closed,
u_int **  bnodes_opened 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void bmap_counter_reset ( u_char  levels,
u_int *  counter 
)

Here is the caller graph for this function:

int bmap_del_rnode_by_level ( map_bnode ,
int  ,
map_gnode **  ,
int   
)

Here is the call graph for this function:

void bmap_levels_free ( map_bnode **  bmap,
u_int *  bmap_nodes 
)

Here is the caller graph for this function:

void bmap_levels_init ( u_char  levels,
map_bnode ***  bmap,
u_int **  bmap_nodes 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int bmaps_count_bnode_rnode ( map_bnode **  bmap,
int *  bmap_nodes,
int  levels,
void *  n 
)

Here is the call graph for this function:

int bmaps_del_bnode_rnode ( map_bnode **  bmap,
int *  bmap_nodes,
int  levels,
void *  n 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void bmaps_set_bnode_flag ( map_bnode **  bmap,
int *  bmap_nodes,
int  levels,
int  flags 
)

Here is the call graph for this function:

Here is the caller graph for this function:

map_bnode** load_bmap ( char *  ,
map_gnode **  ,
u_char  ,
u_int **   
)

Here is the call graph for this function:

Here is the caller graph for this function:

int map_add_bnode ( map_bnode **  bmap,
u_int *  bmap_nodes,
u_int  bnode,
u_int  links 
)

Here is the call graph for this function:

Here is the caller graph for this function:

map_bnode* map_bnode_del ( map_bnode bmap,
u_int *  bmap_nodes,
map_bnode bnode 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int map_count_bnode_rnode ( map_bnode bmap,
int  bmap_nodes,
void *  n 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int map_del_bnode_rnode ( map_bnode **  bmap,
int *  bmap_nodes,
void *  n 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int map_find_bnode ( map_bnode bmap,
int  bmap_nodes,
int  node 
)

Here is the caller graph for this function:

int map_find_bnode_rnode ( map_bnode bmap,
int  bmap_nodes,
void *  n 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void map_set_bnode_flag ( map_bnode bmap,
int  bmap_nodes,
int  flags 
)

Here is the caller graph for this function:

char* pack_all_bmaps ( map_bnode **  ,
u_int *  ,
map_gnode **  ,
quadro_group  ,
size_t *   
)

Here is the call graph for this function:

Here is the caller graph for this function:

int save_bmap ( map_bnode **  ,
u_int *  ,
map_gnode **  ,
quadro_group  ,
char *   
)

Here is the call graph for this function:

Here is the caller graph for this function:

map_bnode** unpack_all_bmaps ( char *  ,
u_char  ,
map_gnode **  ,
u_int **  ,
int  ,
int   
)

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

const int_info bnode_chunk_iinfo = { 1, { 1 }, { sizeof(char)*2 }, { 1 } }
static
const int_info bnode_hdr_iinfo = { 1, { (1<<1) }, { sizeof(char) }, { 1 } }
static
const int_info bnode_maps_hdr_iinfo = { 1, { 1 }, { sizeof(char) }, { 1 } }
static