X-Git-Url: http://git.onelab.eu/?p=distributedratelimiting.git;a=blobdiff_plain;f=drl%2Fratetypes.h;h=59a481ab6abb6d13bbe501975540824d2aa9eeac;hp=c88c93191367d45b29e14f1122f6d8d067c2c0f6;hb=19bf89f36a91be2fdd4a0b6c7099f7515507e1e1;hpb=a3995c9ac407020dcdc5c471191b767bb1667d2e diff --git a/drl/ratetypes.h b/drl/ratetypes.h index c88c931..59a481a 100644 --- a/drl/ratetypes.h +++ b/drl/ratetypes.h @@ -41,6 +41,13 @@ typedef struct identity { /** Pointer to the identity's parent in the HTB hierarchy. */ struct identity *parent; + /** Array of the leaves that are limited by this identity. Points into the + * leaves array for the identity's instance. */ + struct leaf **leaves; + + /** The number of leaves for which this identity is responsible. */ + int leaf_count; + /** The fixed (per second) EWMA weight. */ double fixed_ewma_weight; @@ -71,6 +78,8 @@ typedef struct identity { /** FPS previous weight value. */ double last_localweight; + double total_weight; + /** A flag to indicate whether or not the identity is in the flowstart * state. During flowstart, the identity's limit is raised to allow for * flows to grow before incurring losses. */ @@ -79,10 +88,10 @@ typedef struct identity { /* GRD */ /** GRD drop probability information. */ - double localdropprob; + double drop_prob; /** GRD previous drop probability information. */ - double last_localdropprob; + double last_drop_prob; /* Flow accounting machinery. */ @@ -139,6 +148,9 @@ typedef struct leaf { /** The leaf's parent in the hierarchy. This is the identity to which this * leaf belongs. */ identity_t *parent; + + /** GRD: The leaf's packet drop probability. */ + double drop_prob; } leaf_t; /** @@ -194,7 +206,7 @@ typedef struct limiter { uint32_t nodelimit; /** The DRL policy (GRD, FPS) this node is using. */ - enum policies policynum; + enum policies policy; /** The estimate interval (in milliseconds). */ int estintms;