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