X-Git-Url: https://git.harvie.cz/?a=blobdiff_plain;f=ipstruct.h;h=d4383b32fc4192e98ce6d18f01dd2976e966b680;hb=dccb32271f7c04bfcfa0fd44ffff02a0f1b628de;hp=ad5bf38fc7318bd80e9be31aa4dbcaff0818ac52;hpb=cdfd88eb2cfba828e5bfc3f77eba37b3cba286ce;p=svn%2FPrometheus-QoS%2F.git diff --git a/ipstruct.h b/ipstruct.h index ad5bf38..d4383b3 100644 --- a/ipstruct.h +++ b/ipstruct.h @@ -13,6 +13,7 @@ struct IP int fixedprio; int group; int lmsid; + int pps_limit; unsigned long long direct; unsigned long long proxy; unsigned long long upload; @@ -24,6 +25,7 @@ struct IP struct Keyword *keyword; int v6; int mask; + struct IP *uplink; list(IP); }; @@ -40,7 +42,7 @@ struct Keyword { char *key; - int asymetry_ratio; /* ratio for ADSL-like upload */ + float asymetry_ratio; /* ratio for ADSL-like upload */ int asymetry_fixed; /* fixed treshold for ADSL-like upload */ int data_limit; /* hard shaping: apply magic_treshold if max*data_limit MB exceeded */ int data_prio; /* soft shaping (qos): reduce HTB prio if max*data_prio MB exceeded */ @@ -51,12 +53,21 @@ struct Keyword // int divide_max; /* relative malus: new_ceil=rate+(old_ceil-rate)/divide_max */ // int htb_ceil_bonus_divide; /* relative bonus: new_ceil=old_ceil+old_ceil/htb_ceil_bonus_divide */ int default_prio; /* default HTB priority for this keyword */ + int download_aggregation; /* apply agregation with -s start_shaping switch */ + int upload_aggregation; /* apply agregation with -s start_shaping switch */ char *html_color; int ip_count; char *leaf_discipline; - + int allowed_avgmtu; /* this is for calculating packet limits, 0 = no limit*/ list(Keyword); }; +struct Macro +{ + char *rewrite_from; + char *rewrite_to; + list(Macro); +}; + void TheIP(char *ipaddr, int is_network); /* function implemented in parsehosts.c */