d4383b32fc4192e98ce6d18f01dd2976e966b680
[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 fixedprio;
14 int group;
15 int lmsid;
16 int pps_limit;
17 unsigned long long direct;
18 unsigned long long proxy;
19 unsigned long long upload;
20 unsigned long long traffic;
21 unsigned long long credit;
22 unsigned long long realquota;
23 unsigned long pktsup;
24 unsigned long pktsdown;
25 struct Keyword *keyword;
26 int v6;
27 int mask;
28 struct IP *uplink;
29 list(IP);
30 };
31
32 struct Group
33 {
34 int min;
35 int count;
36 int desired;
37 int id;
38 list(Group);
39 };
40
41 struct Keyword
42 {
43 char *key;
44
45 float asymetry_ratio; /* ratio for ADSL-like upload */
46 int asymetry_fixed; /* fixed treshold for ADSL-like upload */
47 int data_limit; /* hard shaping: apply magic_treshold if max*data_limit MB exceeded */
48 int data_prio; /* soft shaping (qos): reduce HTB prio if max*data_prio MB exceeded */
49 long fixed_limit; /* fixed data limit for setting lower HTB ceil */
50 long fixed_prio; /* fixed data lmit for setting lower HTB prio */
51 int reserve_min; /* bonus for nominal HTB rate bandwidth (in kbps) */
52 int reserve_max; /* malus for nominal HTB ceil (in kbps) */
53 // int divide_max; /* relative malus: new_ceil=rate+(old_ceil-rate)/divide_max */
54 // int htb_ceil_bonus_divide; /* relative bonus: new_ceil=old_ceil+old_ceil/htb_ceil_bonus_divide */
55 int default_prio; /* default HTB priority for this keyword */
56 int download_aggregation; /* apply agregation with -s start_shaping switch */
57 int upload_aggregation; /* apply agregation with -s start_shaping switch */
58 char *html_color;
59 int ip_count;
60 char *leaf_discipline;
61 int allowed_avgmtu; /* this is for calculating packet limits, 0 = no limit*/
62 list(Keyword);
63 };
64
65 struct Macro
66 {
67 char *rewrite_from;
68 char *rewrite_to;
69 list(Macro);
70 };
71
72 void TheIP(char *ipaddr, int is_network);
73 /* function implemented in parsehosts.c */
This page took 0.551272 seconds and 3 git commands to generate.