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