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