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

Go to the source code of this file.

Data Structures

struct  map_rnode
 
struct  map_node
 
struct  int_map_hdr
 
struct  qspn_queue
 
struct  qstat
 
struct  q_pkt
 
struct  q_opt
 

Macros

#define Q_OPEN
 
#define MAXGROUPNODE   20
 
#define MAXROUTES   5
 
#define MAXRTT   10 /*Max node <--> node rtt (in sec)*/
 
#define MAXLINKS   MAXROUTES
 
#define MAP_ME   1 /*The root_node, in other words, me ;)*/
 
#define MAP_VOID   (1<<1) /*It indicates a non existent node*/
 
#define MAP_HNODE
 
#define MAP_BNODE
 
#define MAP_ERNODE   (1<<4) /*It is an External Rnode*/
 
#define MAP_GNODE   (1<<5) /*It is a gnode*/
 
#define MAP_RNODE   (1<<6) /*If a node has this set, it is one of the rnodes*/
 
#define MAP_UPDATE
 
#define QSPN_CLOSED
 
#define QSPN_OPENED   (1<<9) /*It puts a link in a QSPN_OPEN state*/
 
#define QSPN_OLD
 
#define QSPN_STARTER
 
#define QSPN_OPENER
 
#define QSPN_BACKPRO   (1<<13)
 
#define MAP_RNODE_PACK_SZ   (sizeof(int *)+sizeof(u_int)*2)
 
#define MAP_NODE_PACK_SZ   (sizeof(u_short)*2 + sizeof(u_int))
 
#define MAXRNODEBLOCK   (MAXLINKS * MAXGROUPNODE * sizeof(map_rnode))
 
#define MAXRNODEBLOCK_PACK_SZ   (MAXLINKS * MAXGROUPNODE * MAP_RNODE_PACK_SZ)
 
#define INTMAP_END(mapstart)   ((sizeof(map_node)*MAXGROUPNODE)+(mapstart))
 
#define INT_MAP_BLOCK_SZ(int_map_sz, rblock_sz)   (sizeof(struct int_map_hdr)+(int_map_sz)+(rblock_sz))
 
#define OP_REQUEST   82
 
#define OP_CLOSE   OP_REQUEST
 
#define OP_OPEN   28
 
#define OP_REPLY   69
 
#define OP_BACKPRO   66
 
#define QPKT_REPLY   1
 

Functions

void thread_joint (int joint, void *(*start_routine)(void *), void *nopt)
 
void gen_rnd_map (int start_node, int back_link, int back_link_rtt)
 
int print_map (map_node *map, char *map_file)
 
void * show_temp_stat (void *)
 
void print_data (char *file)
 
int store_tracer_pkt (struct q_opt *qopt)
 
void * send_qspn_backpro (void *argv)
 
void * send_qspn_reply (void *argv)
 
void * send_qspn_pkt (void *argv)
 

Variables

INT_INFO map_rnode_iinfo
 
INT_INFO map_node_iinfo
 
struct int_map_hdr _PACKED_
 
INT_INFO int_map_hdr_iinfo
 
pthread_mutex_t mutex [20]
 
int total_threads =0
 
int disable_joint =0
 
map_nodeint_map
 
struct qspn_queueqspn_q [20]
 
int time_stat
 
struct qstat gbl_stat
 
struct qstat node_stat [20]
 
short rt_stat [20][20]
 
short rt_total [20]
 
struct q_pkt ** pkt_db [20]
 
int pkt_dbc [20]
 

Macro Definition Documentation

#define INT_MAP_BLOCK_SZ (   int_map_sz,
  rblock_sz 
)    (sizeof(struct int_map_hdr)+(int_map_sz)+(rblock_sz))
#define INTMAP_END (   mapstart)    ((sizeof(map_node)*MAXGROUPNODE)+(mapstart))
#define MAP_BNODE
Value:
(1<<3) /*The node is a border_node. If this
flag is set to a root_node, this means
that we are a bnode at the root_node's
level*/
#define MAP_ERNODE   (1<<4) /*It is an External Rnode*/
#define MAP_GNODE   (1<<5) /*It is a gnode*/
#define MAP_HNODE
Value:
(1<<2) /*Hooking node. The node is currently
hooking*/
#define MAP_ME   1 /*The root_node, in other words, me ;)*/
#define MAP_NODE_PACK_SZ   (sizeof(u_short)*2 + sizeof(u_int))
#define MAP_RNODE   (1<<6) /*If a node has this set, it is one of the rnodes*/
#define MAP_RNODE_PACK_SZ   (sizeof(int *)+sizeof(u_int)*2)
#define MAP_UPDATE
Value:
(1<<7) /*If it is set, the corresponding route
in the krnl will be updated*/
#define MAP_VOID   (1<<1) /*It indicates a non existent node*/
#define MAXGROUPNODE   20
#define MAXLINKS   MAXROUTES
#define MAXRNODEBLOCK   (MAXLINKS * MAXGROUPNODE * sizeof(map_rnode))
#define MAXRNODEBLOCK_PACK_SZ   (MAXLINKS * MAXGROUPNODE * MAP_RNODE_PACK_SZ)
#define MAXROUTES   5
#define MAXRTT   10 /*Max node <--> node rtt (in sec)*/
#define OP_BACKPRO   66
#define OP_CLOSE   OP_REQUEST
#define OP_OPEN   28
#define OP_REPLY   69
#define OP_REQUEST   82
#define Q_OPEN
#define QPKT_REPLY   1
#define QSPN_BACKPRO   (1<<13)
#define QSPN_CLOSED
Value:
(1<<8) /*This flag is set only to the rnodes,
it puts a link in a QSPN_CLOSED state*/
#define QSPN_OLD
Value:
(1<<10) /*If a node isn't updated by the current
qspn_round it is marked with QSPN_ROUND.
If in the next qspn_round the same node
isn't updated it is removed from the map.*/
#define QSPN_OPENED   (1<<9) /*It puts a link in a QSPN_OPEN state*/
#define QSPN_OPENER
Value:
(1<<12) /*If the root_node sent a new qspn_open
it is a qspn_opener*/
#define QSPN_STARTER
Value:
(1<<11) /*The root node is marked with this flag
if it is a qspn_starter*/

Function Documentation

void gen_rnd_map ( int  start_node,
int  back_link,
int  back_link_rtt 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void print_data ( char *  file)

Here is the caller graph for this function:

int print_map ( map_node map,
char *  map_file 
)

Here is the caller graph for this function:

void* send_qspn_backpro ( void *  argv)

Here is the call graph for this function:

Here is the caller graph for this function:

void* send_qspn_pkt ( void *  argv)

Here is the call graph for this function:

Here is the caller graph for this function:

void* send_qspn_reply ( void *  argv)

Here is the call graph for this function:

Here is the caller graph for this function:

void* show_temp_stat ( void *  )

Here is the caller graph for this function:

int store_tracer_pkt ( struct q_opt qopt)

Here is the call graph for this function:

Here is the caller graph for this function:

void thread_joint ( int  joint,
void *(*)(void *)  start_routine,
void *  nopt 
)

Here is the caller graph for this function:

Variable Documentation

int disable_joint =0
struct qstat gbl_stat
map_node* int_map
INT_INFO int_map_hdr_iinfo
Initial value:
= { 2,
{ sizeof(char), sizeof(char)+sizeof(size_t) },
{ 1, 1 }
}
#define INT_TYPE_32BIT
Definition: endianness.h:35
INT_INFO map_node_iinfo
Initial value:
= { 3,
{ 0, sizeof(short), sizeof(short)+sizeof(int) },
{ 1, 1, 1 }
}
#define INT_TYPE_16BIT
Definition: endianness.h:36
#define INT_TYPE_32BIT
Definition: endianness.h:35
INT_INFO map_rnode_iinfo
Initial value:
= { 3,
{ INT_TYPE_32BIT, INT_TYPE_32BIT, INT_TYPE_32BIT },
{ 0, sizeof(int), sizeof(int)*2 },
{ 1, 1, 1 }
}
#define INT_TYPE_32BIT
Definition: endianness.h:35
pthread_mutex_t mutex[20]
struct qstat node_stat[20]
struct q_pkt** pkt_db[20]
int pkt_dbc[20]
struct qspn_queue* qspn_q[ 20 ]
short rt_stat[20][20]
short rt_total[20]
int time_stat
int total_threads =0