do not write empty logs when started
[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 Index
76 {
77 char *addr;
78 char *id;
79 struct Index *parent;
80 int bitmask;
81 int children;
82 int ipv6;
83 list(Index);
84 };
85
86 struct Interface
87 {
88 char *name;
89 long long speed;
90 int is_upstream;
91 char *chain;
92 char *idxprefix;
93 list(Interface);
94 };
95
96 void TheIP(char *ipaddr, int is_network);
97 /* function implemented in parsehosts.c */
This page took 0.293403 seconds and 4 git commands to generate.