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