-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathipstruct.h
More file actions
120 lines (108 loc) · 2.69 KB
/
ipstruct.h
File metadata and controls
120 lines (108 loc) · 2.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
/* Modified by: xChaos, 20200104 */
#define MONITORINGTRHU_CTU
struct IP
{
char *addr;
char *name;
char *sharing;
int min;
int desired;
int max;
int mark;
int prio;
int aggregated;
int fixedprio;
int group;
char *code;
int pps_limit;
unsigned long long direct;
unsigned long long proxy;
unsigned long long traffic_down;
unsigned long long traffic_up;
unsigned long long upload;
unsigned long long traffic;
unsigned long long credit;
unsigned long long realquota;
unsigned long pktsup;
unsigned long pktsdown;
struct Keyword *keyword;
#ifdef MONITORINGTRHU_CTU
char *technology_str;
char *ruian_id_str;
#endif
int v6;
int mask;
struct IP *uplink;
list(IP);
};
struct Group
{
int min;
int count;
int desired;
int id;
list(Group);
};
struct Keyword
{
char *key;
float asymetry_ratio; /* ratio for ADSL-like upload */
int asymetry_fixed; /* fixed treshold for ADSL-like upload */
int data_limit; /* hard shaping: apply magic_treshold if max*data_limit MB exceeded */
int data_prio; /* soft shaping (qos): reduce HTB prio if max*data_prio MB exceeded */
long fixed_limit; /* fixed data limit for setting lower HTB ceil */
long fixed_prio; /* fixed data lmit for setting lower HTB prio */
int reserve_min; /* bonus for nominal HTB rate bandwidth (in kbps) */
int reserve_max; /* malus for nominal HTB ceil (in kbps) */
// int divide_max; /* relative malus: new_ceil=rate+(old_ceil-rate)/divide_max */
// int htb_ceil_bonus_divide; /* relative bonus: new_ceil=old_ceil+old_ceil/htb_ceil_bonus_divide */
int default_prio; /* default HTB priority for this keyword */
int download_aggregation; /* apply agregation with -s start_shaping switch */
int upload_aggregation; /* apply agregation with -s start_shaping switch */
char *html_color;
int ip_count;
char *leaf_discipline;
int allowed_avgmtu; /* this is for calculating packet limits, 0 = no limit*/
list(Keyword);
};
struct Macro
{
char *rewrite_from;
char *rewrite_to;
list(Macro);
};
struct QosFreeInterface
{
char *name;
int _eoln;
list(QosFreeInterface);
};
struct Index
{
char *addr;
char *id;
struct Index *parent;
int bitmask;
int children;
int ipv6;
list(Index);
};
struct Interface
{
char *name;
long long speed;
int is_upstream;
char *chain;
char *idxprefix;
list(Interface);
};
void TheIP(char *ipaddr, int is_network);
/* function implemented in parsehosts.c */
#ifdef MONITORINGTRHU_CTU
struct Technology
{
char *filename;
list(Technology);
};
extern struct Technology *technologies, *technology;
#endif