![]() |
The Netsukuku Project
0.0.9
An Alternative routing method
|
#include "route.h"

Go to the source code of this file.
Data Structures | |
| struct | internet_gateway |
| struct | inet_gw_pack_hdr |
| struct | default_inet_gw_nexthop |
Macros | |
| #define | MIN_CONN_BANDWIDTH 3 /* 16 Kb/s */ |
| #define | MAX_INTERNET_HNAMES 10 |
| #define | MAX_INTERNET_HNAME_SZ 64 |
| #define | INET_HOST_PING_TIMEOUT 3 |
| #define | IGW_HOST_PING_TIMEOUT 10 |
| #define | INET_NEXT_PING_WAIT 10 |
| #define | IGW_BW_DELTA |
| #define | MAXIGWS |
| #define | RTTABLE_IGW 221 /* Routing tables from 221 to 244 */ |
| #define | RTTABLE_ALISHIELD |
| #define | FWMARK_ALISHIELD 25 |
| #define | IGW_TUNNELED 1 |
| #define | IGW_ACTIVE |
| #define | IGW_RTRULE |
| #define | INET_GW_PACK_SZ (sizeof(u_char)*2 + MAX_IP_SZ) |
| #define | IGWS_PACK_SZ(hdr) |
| #define | MAX_IGWS_PACK_SZ(levels) |
| #define | MAX_IGW_PER_QSPN_CHUNK |
Typedefs | |
| typedef struct internet_gateway | inet_gw |
| typedef struct default_inet_gw_nexthop | igw_nexthop |
Functions | |
| u_char | bandwidth_in_8bit (u_int x) |
| int | str_to_inet_gw (char *str, inet_prefix *gw, char **dev) |
| char ** | parse_internet_hosts (char *str, int *hosts) |
| void | free_internet_hosts (char **hnames, int hosts) |
| void | init_my_igw (void) |
| void | init_igws (inet_gw ***igws, int **igws_counter, int levels) |
| void | reset_igws (inet_gw **igws, int *igws_counter, int levels) |
| void | free_igws (inet_gw **igws, int *igws_counter, int levels) |
| void | init_my_igws (inet_gw **igws, int *igws_counter, inet_gw ***my_new_igws, u_char my_bandwidth, map_node *cur_node, quadro_group *qg) |
| void | free_my_igws (inet_gw ***my_igs) |
| void | init_internet_gateway_search (void) |
| void | close_internet_gateway_search (void) |
| inet_gw * | igw_add_node (inet_gw **igws, int *igws_counter, int level, int gid, map_node *node, int ip[4], u_char bandwidth) |
| int | igw_del (inet_gw **igws, int *igws_counter, inet_gw *igw, int level) |
| inet_gw * | igw_find_node (inet_gw **igws, int level, map_node *node) |
| inet_gw * | igw_find_ip (inet_gw **igws, int level, u_int ip[4]) |
| int | igw_del_node (inet_gw **, int *, int, map_node *) |
| void | igw_update_gnode_bw (int *, inet_gw **, inet_gw *, int, int, int) |
| void | igw_order (inet_gw **igws, int *igws_counter, inet_gw **my_igws, int level) |
| int | igw_check_inet_conn (void) |
| void * | igw_check_inet_conn_t (void *null) |
| void * | igw_monitor_igws_t (void *null) |
| int | igw_exec_masquerade_sh (char *script, int stop) |
| int | igw_exec_tcshaper_sh (char *script, int stop, char *dev, int upload_bw, int dnload_bw) |
| void | reset_igw_nexthop (igw_nexthop *igwn) |
| void | reset_igw_rules (void) |
| int | igw_replace_def_igws (inet_gw **igws, int *igws_counter, inet_gw **my_igws, int max_levels, int family) |
| char * | igw_build_bentry (u_char level, size_t *pack_sz, int *new_bblocks) |
| int | igw_store_bblock (bnode_hdr *bblock_hdr, bnode_chunk *bchunk, u_char level) |
| char * | pack_igws (inet_gw **igws, int *igws_counter, int levels, int *pack_sz) |
| int | unpack_igws (char *pack, size_t pack_sz, map_node *int_map, map_gnode **ext_map, int levels, inet_gw ***new_igws, int **new_igws_counter) |
Variables | |
| struct inet_gw_pack_hdr | _PACKED_ |
| static const int_info | inet_gw_pack_hdr_iinfo = { 1, { (1<<1) }, { 0 }, { (14+ ( 1 + 1 ) ) } } |
| int | active_gws |
| igw_nexthop | multigw_nh [24] |
| #define FWMARK_ALISHIELD 25 |
| #define IGW_ACTIVE |
| #define IGW_BW_DELTA |
| #define IGW_HOST_PING_TIMEOUT 10 |
| #define IGW_RTRULE |
| #define IGW_TUNNELED 1 |
| #define IGWS_PACK_SZ | ( | hdr | ) |
| #define INET_GW_PACK_SZ (sizeof(u_char)*2 + MAX_IP_SZ) |
| #define INET_HOST_PING_TIMEOUT 3 |
| #define INET_NEXT_PING_WAIT 10 |
| #define MAX_IGW_PER_QSPN_CHUNK |
| #define MAX_IGWS_PACK_SZ | ( | levels | ) |
| #define MAX_INTERNET_HNAME_SZ 64 |
| #define MAX_INTERNET_HNAMES 10 |
| #define MAXIGWS |
| #define MIN_CONN_BANDWIDTH 3 /* 16 Kb/s */ |
| #define RTTABLE_ALISHIELD |
| #define RTTABLE_IGW 221 /* Routing tables from 221 to 244 */ |
| typedef struct default_inet_gw_nexthop igw_nexthop |
| typedef struct internet_gateway inet_gw |
| u_char bandwidth_in_8bit | ( | u_int | x | ) |

| void close_internet_gateway_search | ( | void | ) |


| void free_igws | ( | inet_gw ** | igws, |
| int * | igws_counter, | ||
| int | levels | ||
| ) |


| void free_internet_hosts | ( | char ** | hnames, |
| int | hosts | ||
| ) |

| void free_my_igws | ( | inet_gw *** | my_igs | ) |

| inet_gw* igw_add_node | ( | inet_gw ** | igws, |
| int * | igws_counter, | ||
| int | level, | ||
| int | gid, | ||
| map_node * | node, | ||
| int | ip[4], | ||
| u_char | bandwidth | ||
| ) |


| char* igw_build_bentry | ( | u_char | level, |
| size_t * | pack_sz, | ||
| int * | new_bblocks | ||
| ) |


| int igw_check_inet_conn | ( | void | ) |


| void* igw_check_inet_conn_t | ( | void * | null | ) |




| int igw_exec_masquerade_sh | ( | char * | script, |
| int | stop | ||
| ) |


| int igw_exec_tcshaper_sh | ( | char * | script, |
| int | stop, | ||
| char * | dev, | ||
| int | upload_bw, | ||
| int | dnload_bw | ||
| ) |




| void* igw_monitor_igws_t | ( | void * | null | ) |




| int igw_replace_def_igws | ( | inet_gw ** | igws, |
| int * | igws_counter, | ||
| inet_gw ** | my_igws, | ||
| int | max_levels, | ||
| int | family | ||
| ) |


| int igw_store_bblock | ( | bnode_hdr * | bblock_hdr, |
| bnode_chunk * | bchunk, | ||
| u_char | level | ||
| ) |



| void init_igws | ( | inet_gw *** | igws, |
| int ** | igws_counter, | ||
| int | levels | ||
| ) |


| void init_internet_gateway_search | ( | void | ) |


| void init_my_igw | ( | void | ) |
| void init_my_igws | ( | inet_gw ** | igws, |
| int * | igws_counter, | ||
| inet_gw *** | my_new_igws, | ||
| u_char | my_bandwidth, | ||
| map_node * | cur_node, | ||
| quadro_group * | qg | ||
| ) |


| char* pack_igws | ( | inet_gw ** | igws, |
| int * | igws_counter, | ||
| int | levels, | ||
| int * | pack_sz | ||
| ) |


| char** parse_internet_hosts | ( | char * | str, |
| int * | hosts | ||
| ) |


| void reset_igw_nexthop | ( | igw_nexthop * | igwn | ) |

| void reset_igw_rules | ( | void | ) |


| void reset_igws | ( | inet_gw ** | igws, |
| int * | igws_counter, | ||
| int | levels | ||
| ) |

| int str_to_inet_gw | ( | char * | str, |
| inet_prefix * | gw, | ||
| char ** | dev | ||
| ) |


| int unpack_igws | ( | char * | pack, |
| size_t | pack_sz, | ||
| map_node * | int_map, | ||
| map_gnode ** | ext_map, | ||
| int | levels, | ||
| inet_gw *** | new_igws, | ||
| int ** | new_igws_counter | ||
| ) |


| struct inet_gw_pack_hdr _PACKED_ |
| int active_gws |
|
static |
| igw_nexthop multigw_nh[24] |