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

Go to the source code of this file.

Data Structures

struct  qspn_buffer
 

Macros

#define QSPN_WAIT_ROUND
 
#define QSPN_WAIT_ROUND_MS   QSPN_WAIT_ROUND*1000
 
#define QSPN_WAIT_DELTA_MS
 
#define QSPN_WAIT_ROUND_LVL(level)
 
#define QSPN_WAIT_ROUND_MS_LVL(level)   (QSPN_WAIT_ROUND_LVL(level)*1000)
 
#define QSPN_WAIT_DELTA_MS_LVL(level)
 
#define GCOUNT_LEVELS   (MAX_LEVELS-ZERO_LEVEL+UNITY_LEVEL)
 

Functions

void qspn_time_reset (int start_level, int end_level, int levels)
 
void qspn_reset_counters (u_char levels)
 
void qspn_reset (u_char levels)
 
void qspn_init (u_char levels)
 
void qspn_free (void)
 
void qspn_set_map_vars (u_char level, map_node **map, map_node **root_node, int *root_node_pos, map_gnode **gmap)
 
void qspn_b_clean (u_char level)
 
int qspn_b_add (struct qspn_buffer *qb, u_char replier, u_short flags)
 
int qspn_b_find_reply (struct qspn_buffer *qb, int sub_id)
 
struct qspn_bufferqspn_b_find_rnode (struct qspn_buffer *qb, map_node *rnode)
 
int qspn_b_del_dead_rnodes (struct qspn_buffer **qb, map_node *root_node)
 
void qspn_b_del_all_dead_rnodes (void)
 
int qspn_round_left (u_char level)
 
void update_qspn_time (u_char level, u_int new_qspn_time)
 
void qspn_inc_gcount (u_int *gcount, int level, int inc)
 
void qspn_dec_gcount (u_int *gcount, int level, int dec)
 
void qspn_reset_gcount (u_int *gcount, int level, int value)
 
void qspn_backup_gcount (u_int *old_gcount, int *gcount)
 
void qspn_new_round (u_char level, int new_qspn_id, u_int new_qspn_time)
 
int qspn_send (u_char level)
 
int qspn_close (PACKET rpkt)
 
int qspn_open (PACKET rpkt)
 

Variables

struct qspn_buffer ** qspn_b
 
int * qspn_send_mutex
 
u_int qspn_gnode_count [((14+(1+1))-1+1)]
 
u_int qspn_old_gcount [((14+(1+1))-1+1)]
 

Macro Definition Documentation

#define GCOUNT_LEVELS   (MAX_LEVELS-ZERO_LEVEL+UNITY_LEVEL)
#define QSPN_WAIT_DELTA_MS
Value:
64 /*If a qspn_round is sent while
qspn_round_left() < QSPN_WAIT_DELTA_MS,
then it is acceptable*/
#define QSPN_WAIT_DELTA_MS_LVL (   level)
Value:
((level)*(QSPN_WAIT_DELTA_MS/2) + \
#define QSPN_WAIT_DELTA_MS
Definition: qspn.h:28
#define QSPN_WAIT_ROUND
Value:
32 /*This is a crucial value. It is the number of
seconds to be waited before the next qspn_round
can be sent*/
#define QSPN_WAIT_ROUND_LVL (   level)
Value:
((level)*(QSPN_WAIT_ROUND/2) + \
QSPN_WAIT_ROUND/((level)+1))
#define QSPN_WAIT_ROUND
Definition: qspn.h:24
#define QSPN_WAIT_ROUND_MS   QSPN_WAIT_ROUND*1000
#define QSPN_WAIT_ROUND_MS_LVL (   level)    (QSPN_WAIT_ROUND_LVL(level)*1000)

Function Documentation

int qspn_b_add ( struct qspn_buffer qb,
u_char  replier,
u_short  flags 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void qspn_b_clean ( u_char  level)

Here is the caller graph for this function:

void qspn_b_del_all_dead_rnodes ( void  )

Here is the call graph for this function:

Here is the caller graph for this function:

int qspn_b_del_dead_rnodes ( struct qspn_buffer **  qb,
map_node root_node 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int qspn_b_find_reply ( struct qspn_buffer qb,
int  sub_id 
)

Here is the caller graph for this function:

struct qspn_buffer* qspn_b_find_rnode ( struct qspn_buffer qb,
map_node rnode 
)

Here is the caller graph for this function:

void qspn_backup_gcount ( u_int *  old_gcount,
int *  gcount 
)

Here is the caller graph for this function:

int qspn_close ( PACKET  rpkt)

Here is the call graph for this function:

Here is the caller graph for this function:

void qspn_dec_gcount ( u_int *  gcount,
int  level,
int  dec 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void qspn_free ( void  )

Here is the caller graph for this function:

void qspn_inc_gcount ( u_int *  gcount,
int  level,
int  inc 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void qspn_init ( u_char  levels)

Here is the call graph for this function:

Here is the caller graph for this function:

void qspn_new_round ( u_char  level,
int  new_qspn_id,
u_int  new_qspn_time 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int qspn_open ( PACKET  rpkt)

Here is the call graph for this function:

Here is the caller graph for this function:

void qspn_reset ( u_char  levels)

Here is the call graph for this function:

Here is the caller graph for this function:

void qspn_reset_counters ( u_char  levels)

Here is the call graph for this function:

Here is the caller graph for this function:

void qspn_reset_gcount ( u_int *  gcount,
int  level,
int  value 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int qspn_round_left ( u_char  level)

Here is the caller graph for this function:

int qspn_send ( u_char  level)

Here is the call graph for this function:

Here is the caller graph for this function:

void qspn_set_map_vars ( u_char  level,
map_node **  map,
map_node **  root_node,
int *  root_node_pos,
map_gnode **  gmap 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void qspn_time_reset ( int  start_level,
int  end_level,
int  levels 
)

Here is the caller graph for this function:

void update_qspn_time ( u_char  level,
u_int  new_qspn_time 
)

Here is the caller graph for this function:

Variable Documentation

struct qspn_buffer** qspn_b
u_int qspn_gnode_count[((14+(1+1))-1+1)]
u_int qspn_old_gcount[((14+(1+1))-1+1)]
int* qspn_send_mutex