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

Go to the source code of this file.

Data Structures

struct  free_nodes_hdr
 

Macros

#define MAX_FIRST_RADAR_SCANS
 
#define HOOKING_IP_10   0xa000001 /* 10.0.0.1 */
 
#define HOOKING_IP_172   0xac100001 /* 172.16.0.1 */
 
#define HOOKING_IPV6   0xfec00000 /* fec0:: */
 
#define HOOK_RQ_TIMEOUT   8 /* seconds */
 
#define FREE_NODES_SZ(nodes)
 
#define QSPN_ROUND_PKT_SZ(levels)
 

Functions

int put_free_nodes (PACKET rq_pkt)
 
int put_qspn_round (PACKET rq_pkt)
 
int put_ext_map (PACKET rq_pkt)
 
int put_int_map (PACKET rq_pkt)
 
int put_bnode_map (PACKET rq_pkt)
 
int create_gnodes (inet_prefix *ip, int final_level)
 
void set_ip_and_def_gw (char *dev, inet_prefix ip)
 
int hook_init (void)
 
int netsukuku_hook (map_gnode *hook_gnode, int hook_level)
 

Variables

int total_hooks
 
u_int hook_join_rate
 
u_int rnodes_rehooked
 
struct free_nodes_hdr _PACKED_
 
static const int_info free_nodes_hdr_iinfo
 
static const int_info qspn_round_pkt_iinfo
 

Macro Definition Documentation

#define FREE_NODES_SZ (   nodes)
Value:
(sizeof(struct free_nodes_hdr) +\
(sizeof(u_char) * (nodes)))
Definition: hook.h:65
u_char nodes
Definition: hook.h:72
#define HOOK_RQ_TIMEOUT   8 /* seconds */
#define HOOKING_IP_10   0xa000001 /* 10.0.0.1 */
#define HOOKING_IP_172   0xac100001 /* 172.16.0.1 */
#define HOOKING_IPV6   0xfec00000 /* fec0:: */
#define MAX_FIRST_RADAR_SCANS
Value:
1 /* How many time we have to retry
the first radar_scan if we
didn't found anything */
#define QSPN_ROUND_PKT_SZ (   levels)
Value:
(sizeof(u_char) + \
((levels) * sizeof(int32_t)) + \
((levels) * sizeof(struct timeval))+\
(GCOUNT_LEVELS * sizeof(u_int)))
#define GCOUNT_LEVELS
Definition: qspn.h:69

Function Documentation

int create_gnodes ( inet_prefix ip,
int  final_level 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int hook_init ( void  )

Here is the call graph for this function:

Here is the caller graph for this function:

int netsukuku_hook ( map_gnode hook_gnode,
int  hook_level 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int put_bnode_map ( PACKET  rq_pkt)

Here is the call graph for this function:

Here is the caller graph for this function:

int put_ext_map ( PACKET  rq_pkt)

Here is the call graph for this function:

Here is the caller graph for this function:

int put_free_nodes ( PACKET  rq_pkt)

Here is the call graph for this function:

Here is the caller graph for this function:

int put_int_map ( PACKET  rq_pkt)

Here is the call graph for this function:

Here is the caller graph for this function:

int put_qspn_round ( PACKET  rq_pkt)

Here is the call graph for this function:

Here is the caller graph for this function:

void set_ip_and_def_gw ( char *  dev,
inet_prefix  ip 
)

Variable Documentation

const int_info free_nodes_hdr_iinfo
static
Initial value:
= { 1, { 1 },
{ sizeof(struct free_nodes_hdr)-sizeof(uint32_t) },
{ 1 }
}
Definition: hook.h:65
u_int hook_join_rate
const int_info qspn_round_pkt_iinfo
static
Initial value:
= { 3,
{ 1 , 1 , 1 },
{ sizeof(char), -1 , -1 },
{ -1 , -1 , ( (14+ ( 1 + 1 ) ) - 1 + 1 ) }
}
u_int rnodes_rehooked
int total_hooks