The Netsukuku Project  0.0.9
An Alternative routing method
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
hook.c File Reference
#include "includes.h"
#include "common.h"
#include "libnetlink.h"
#include "ll_map.h"
#include "inet.h"
#include "if.h"
#include "krnl_route.h"
#include "iptunnel.h"
#include "endianness.h"
#include "bmap.h"
#include "route.h"
#include "request.h"
#include "pkts.h"
#include "tracer.h"
#include "qspn.h"
#include "hook.h"
#include "rehook.h"
#include "radar.h"
#include "netsukuku.h"
Include dependency graph for hook.c:

Functions

void hook_reset (void)
 
int hook_fill_rq (map_node *dst_rnode, PACKET *pkt, u_char rq)
 
int verify_free_nodes_hdr (inet_prefix *to, struct free_nodes_hdr *fn_hdr)
 
int get_free_nodes (map_node *dst_rnode, struct free_nodes_hdr *fn_hdr, u_char *nodes)
 
int put_free_nodes (PACKET rq_pkt)
 
int get_qspn_round (map_node *dst_rnode, struct timeval to_rtt, struct timeval *qtime, int *qspn_id, int *qspn_gcount)
 
int put_qspn_round (PACKET rq_pkt)
 
int put_ext_map (PACKET rq_pkt)
 
map_gnode ** get_ext_map (map_node *dst_rnode, quadro_group *new_quadg)
 
int put_int_map (PACKET rq_pkt)
 
map_nodeget_int_map (map_node *dst_rnode, map_node **new_root)
 
int put_bnode_map (PACKET rq_pkt)
 
map_bnode ** get_bnode_map (map_node *dst_rnode, u_int **bmap_nodes)
 
int put_internet_gws (PACKET rq_pkt)
 
inet_gw ** get_internet_gws (map_node *dst_rnode, int **igws_counter)
 
void hook_set_all_ips (inet_prefix ip, interface *ifs, int ifs_n)
 
int create_gnodes (inet_prefix *ip, int final_level)
 
void create_new_qgroup (int hook_level)
 
int update_join_rate (map_gnode *hook_gnode, int hook_level, u_int *old_gcount, u_int *gnode_count, struct free_nodes_hdr *fn_hdr)
 
int hook_init (void)
 
int hook_first_radar_scan (map_gnode *hook_gnode, int hook_level, quadro_group *old_quadg)
 
int hook_get_free_nodes (int hook_level, struct free_nodes_hdr *fn_hdr, u_char *fnodes, inet_prefix *gnode_ipstart, u_int *new_gcount, struct rnode_list **ret_rnl)
 
int hook_choose_new_ip (map_gnode *hook_gnode, int hook_level, struct free_nodes_hdr *fn_hdr, u_char *fnodes, inet_prefix *gnode_ipstart)
 
int hook_get_ext_map (int hook_level, int new_gnode, struct rnode_list *rnl, struct free_nodes_hdr *fn_hdr, map_gnode **old_ext_map, quadro_group *old_quadg)
 
void hook_get_int_map (void)
 
void hook_get_bnode_map (void)
 
void hook_get_igw (void)
 
void hook_finish (int new_gnode, struct free_nodes_hdr *fn_hdr)
 
int netsukuku_hook (map_gnode *hook_gnode, int hook_level)
 

Variables

int free_the_tmp_cur_node
 
int we_are_rehooking
 

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:

void create_new_qgroup ( int  hook_level)

Here is the call graph for this function:

Here is the caller graph for this function:

map_bnode** get_bnode_map ( map_node dst_rnode,
u_int **  bmap_nodes 
)

Here is the call graph for this function:

Here is the caller graph for this function:

map_gnode** get_ext_map ( map_node dst_rnode,
quadro_group new_quadg 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int get_free_nodes ( map_node dst_rnode,
struct free_nodes_hdr fn_hdr,
u_char *  nodes 
)

Here is the call graph for this function:

Here is the caller graph for this function:

map_node* get_int_map ( map_node dst_rnode,
map_node **  new_root 
)

Here is the call graph for this function:

Here is the caller graph for this function:

inet_gw** get_internet_gws ( map_node dst_rnode,
int **  igws_counter 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int get_qspn_round ( map_node dst_rnode,
struct timeval  to_rtt,
struct timeval *  qtime,
int *  qspn_id,
int *  qspn_gcount 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int hook_choose_new_ip ( map_gnode hook_gnode,
int  hook_level,
struct free_nodes_hdr fn_hdr,
u_char *  fnodes,
inet_prefix gnode_ipstart 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int hook_fill_rq ( map_node dst_rnode,
PACKET pkt,
u_char  rq 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void hook_finish ( int  new_gnode,
struct free_nodes_hdr fn_hdr 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int hook_first_radar_scan ( map_gnode hook_gnode,
int  hook_level,
quadro_group old_quadg 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void hook_get_bnode_map ( void  )

Here is the call graph for this function:

Here is the caller graph for this function:

int hook_get_ext_map ( int  hook_level,
int  new_gnode,
struct rnode_list rnl,
struct free_nodes_hdr fn_hdr,
map_gnode **  old_ext_map,
quadro_group old_quadg 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int hook_get_free_nodes ( int  hook_level,
struct free_nodes_hdr fn_hdr,
u_char *  fnodes,
inet_prefix gnode_ipstart,
u_int *  new_gcount,
struct rnode_list **  ret_rnl 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void hook_get_igw ( void  )

Here is the call graph for this function:

Here is the caller graph for this function:

void hook_get_int_map ( void  )

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:

void hook_reset ( void  )

Here is the call graph for this function:

Here is the caller graph for this function:

void hook_set_all_ips ( inet_prefix  ip,
interface ifs,
int  ifs_n 
)

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_internet_gws ( 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:

int update_join_rate ( map_gnode hook_gnode,
int  hook_level,
u_int *  old_gcount,
u_int *  gnode_count,
struct free_nodes_hdr fn_hdr 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int verify_free_nodes_hdr ( inet_prefix to,
struct free_nodes_hdr fn_hdr 
)

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

int free_the_tmp_cur_node
int we_are_rehooking