X-Git-Url: http://git.harvie.cz/?p=svn%2FPrometheus-QoS%2F.git;a=blobdiff_plain;f=ipstruct.h;h=80810fcaffcc0ec999070298780b66858286c32e;hp=ea797499a7d2328e0b97cf116a3973c73c1d73a9;hb=421c0c00daa7f89134ffdd703f86712a571a42cd;hpb=0b9c3c198771800cc6c5fbacfc0272549626bcfd diff --git a/ipstruct.h b/ipstruct.h index ea79749..80810fc 100644 --- a/ipstruct.h +++ b/ipstruct.h @@ -1,3 +1,5 @@ +/* Modified by: xChaos, 20131029 */ + struct IP { char *addr; @@ -8,11 +10,15 @@ struct IP int max; int mark; int prio; + int aggregated; int fixedprio; int group; int lmsid; + int pps_limit; unsigned long long direct; unsigned long long proxy; + unsigned long long traffic_down; + unsigned long long traffic_up; unsigned long long upload; unsigned long long traffic; unsigned long long credit; @@ -21,6 +27,8 @@ struct IP unsigned long pktsdown; struct Keyword *keyword; int v6; + int mask; + struct IP *uplink; list(IP); }; @@ -37,7 +45,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 */ @@ -48,12 +56,49 @@ 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); }; -void TheIP(char *ipaddr); +struct Macro +{ + char *rewrite_from; + char *rewrite_to; + list(Macro); +}; + +struct QosFreeInterface +{ + char *name; + int _eoln; + list(QosFreeInterface); +}; + +struct Index +{ + char *addr; + char *id; + struct Index *parent; + int bitmask; + int children; + int ipv6; + list(Index); +}; + +struct Interface +{ + char *name; + long long speed; + int is_upstream; + char *chain; + char *idxprefix; + list(Interface); +}; + +void TheIP(char *ipaddr, int is_network); /* function implemented in parsehosts.c */