46 #define MIN_CONN_BANDWIDTH 3
48 #define MAX_INTERNET_HNAMES 10
49 #define MAX_INTERNET_HNAME_SZ 64
50 #define INET_HOST_PING_TIMEOUT 3
51 #define IGW_HOST_PING_TIMEOUT 10
52 #define INET_NEXT_PING_WAIT 10
54 #define IGW_BW_DELTA 1
58 #define MAXIGWS MAXGROUPNODE
61 #define RTTABLE_IGW 221
62 #define RTTABLE_ALISHIELD 245
65 #define FWMARK_ALISHIELD 25
68 #undef INET_NEXT_PING_WAIT
69 #define INET_NEXT_PING_WAIT 5
75 #define IGW_TUNNELED 1
76 #define IGW_ACTIVE (1<<1)
78 #define IGW_RTRULE (1<<2)
101 #define INET_GW_PACK_SZ (sizeof(u_char)*2 + MAX_IP_SZ)
116 #define IGWS_PACK_SZ(hdr) \
118 size_t _sz; int _pi; \
119 _sz=sizeof(struct inet_gw_pack_hdr); \
120 for(_pi=0; _pi<(hdr)->levels; _pi++) \
121 _sz+=INET_GW_PACK_SZ*((hdr)->gws[_pi]); \
125 #define MAX_IGWS_PACK_SZ(levels) (sizeof(struct inet_gw_pack_hdr) + \
126 INET_GW_PACK_SZ*MAXIGWS*(levels))
171 #define MAX_IGW_PER_QSPN_CHUNK 16
202 inet_gw ***my_new_igws, u_char my_bandwidth,
222 char *dev,
int upload_bw,
int dnload_bw);
229 int igw_store_bblock(bnode_hdr *bblock_hdr, bnode_chunk *bchunk, u_char level);
230 char *
pack_igws(
inet_gw **igws,
int *igws_counter,
int levels,
int *pack_sz);
233 inet_gw ***new_igws,
int **new_igws_counter);
void igw_update_gnode_bw(int *, inet_gw **, inet_gw *, int, int, int)
Definition: igs.c:588
#define INT_TYPE_16BIT
Definition: endianness.h:36
u_char bandwidth
Definition: igs.h:96
u_int ip[4]
Definition: igs.h:91
int igw_del(inet_gw **igws, int *igws_counter, inet_gw *igw, int level)
Definition: igs.c:527
int16_t gws[(14+(1+1))]
Definition: igs.h:105
#define MAX_MULTIPATH_ROUTES
Definition: route.h:26
static const int_info inet_gw_pack_hdr_iinfo
Definition: igs.h:109
int igw_exec_masquerade_sh(char *script, int stop)
Definition: igs.c:853
int igw_store_bblock(bnode_hdr *bblock_hdr, bnode_chunk *bchunk, u_char level)
Definition: igs.c:1276
inet_gw * igw_find_node(inet_gw **igws, int level, map_node *node)
Definition: igs.c:546
void reset_igws(inet_gw **igws, int *igws_counter, int levels)
Definition: igs.c:195
#define MAX_LEVELS
Definition: gmap.h:107
u_char gid
Definition: igs.h:92
inet_gw * igw_add_node(inet_gw **igws, int *igws_counter, int level, int gid, map_node *node, int ip[4], u_char bandwidth)
Definition: igs.c:509
int igw_replace_def_igws(inet_gw **igws, int *igws_counter, inet_gw **my_igws, int max_levels, int family)
Definition: igs.c:968
void free_internet_hosts(char **hnames, int hosts)
Definition: igs.c:149
int igw_exec_tcshaper_sh(char *script, int stop, char *dev, int upload_bw, int dnload_bw)
Definition: igs.c:872
int igw_del_node(inet_gw **, int *, int, map_node *)
Definition: igs.c:572
int active_gws
Definition: igs.h:182
void free_my_igws(inet_gw ***my_igs)
Definition: igs.c:266
u_char flags
Definition: igs.h:146
#define MAX_IP_INT
Definition: inet.h:24
void * igw_monitor_igws_t(void *null)
Definition: igs.c:795
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)
Definition: igs.c:231
void init_internet_gateway_search(void)
Definition: igs.c:277
u_char levels
Definition: igs.h:107
map_node * int_map
Definition: qspn-empiric.h:122
inet_gw * igw_find_ip(inet_gw **igws, int level, u_int ip[4])
Definition: igs.c:557
void close_internet_gateway_search(void)
Definition: igs.c:473
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)
Definition: igs.c:1433
void igw_order(inet_gw **igws, int *igws_counter, inet_gw **my_igws, int level)
Definition: igs.c:656
igw_nexthop multigw_nh[24]
Definition: igs.h:183
char ** parse_internet_hosts(char *str, int *hosts)
Definition: igs.c:140
#define INT_INFO
Definition: endianness.h:90
void reset_igw_nexthop(igw_nexthop *igwn)
Definition: igs.c:943
struct inet_gw_pack_hdr _PACKED_
map_node * node
Definition: igs.h:93
char * igw_build_bentry(u_char level, size_t *pack_sz, int *new_bblocks)
Definition: igs.c:1181
void init_igws(inet_gw ***igws, int **igws_counter, int levels)
Definition: igs.c:187
u_char table
Definition: igs.h:148
void * igw_check_inet_conn_t(void *null)
Definition: igs.c:714
void free_igws(inet_gw **igws, int *igws_counter, int levels)
Definition: igs.c:209
#define LLIST_HDR(_struct)
Definition: llist.c:44
void reset_igw_rules(void)
Definition: igs.c:951
int family
Definition: if.c:34
inet_prefix nexthop
Definition: igs.h:144
int igw_check_inet_conn(void)
Definition: igs.c:694
int str_to_inet_gw(char *str, inet_prefix *gw, char **dev)
Definition: igs.c:104
char * pack_igws(inet_gw **igws, int *igws_counter, int levels, int *pack_sz)
Definition: igs.c:1388
char flags
Definition: igs.h:95
u_char tunl
Definition: igs.h:149
u_char bandwidth_in_8bit(u_int x)
Definition: igs.c:61