X-Git-Url: http://git.onelab.eu/?p=distributedratelimiting.git;a=blobdiff_plain;f=drl%2Fraterouter.h;h=06f8069e4a58d2a08da63684ce56456806ce3f3a;hp=2594f12c7763f151580cf598b82f5fad2d9ea728;hb=3cc87c8471668009b3426013fded8c6ec5a382da;hpb=f83340496f632165030cc92cd98408a87082f6b1 diff --git a/drl/raterouter.h b/drl/raterouter.h index 2594f12..06f8069 100644 --- a/drl/raterouter.h +++ b/drl/raterouter.h @@ -34,8 +34,10 @@ enum policies { POLICY_GRD = 1, POLICY_FPS = 2 }; enum commfabrics { COMM_MESH = 1, COMM_GOSSIP = 2 }; -enum accountings { ACT_STANDARD = 1, ACT_SAMPLEHOLD = 2, ACT_SIMPLE = 3, ACT_MULTIPLE = 4}; -enum dampenings { DAMPEN_NONE = 0, DAMPEN_TEST = 1, DAMPEN_FAILED = 2, DAMPEN_PASSED = 3, DAMPEN_SKIP = 4}; +enum accountings { ACT_STANDARD = 1, ACT_SAMPLEHOLD = 2, ACT_SIMPLE = 3, ACT_MULTIPLE = 4 }; +enum dampenings { DAMPEN_NONE = 0, DAMPEN_TEST = 1, DAMPEN_FAILED = 2, DAMPEN_PASSED = 3, DAMPEN_SKIP = 4 }; +enum memberships { SWIM = 1, ZOOKEEPER = 2 }; +enum failure_behaviors { PANIC = 1, QUORUM = 2 }; /* The comm library also has definitions for comfabrics. This prevents us * from defining them twice. */ @@ -58,9 +60,11 @@ enum dampenings { DAMPEN_NONE = 0, DAMPEN_TEST = 1, DAMPEN_FAILED = 2, DAMPEN_PA * * This is used for FPS only. See estimate.c */ -#define FLOW_START_THRESHOLD (6000) +#define FLOW_START_THRESHOLD (10000) -#define CLOSE_ENOUGH (0.99) +#define CLOSE_ENOUGH (0.90) + +#define GRD_BIG_DROP (0.90) /** * All fields come from the ip protocol header. @@ -79,7 +83,11 @@ enum dampenings { DAMPEN_NONE = 0, DAMPEN_TEST = 1, DAMPEN_FAILED = 2, DAMPEN_PA * specified in the config file. The second is a standard table with * "perfect" accounting so that we can compare the two. Turn this off for * any type of production setting. */ -#define SHADOW_ACCTING +//#define SHADOW_ACCTING + +/* Turn this on to simulate network partitions. + * Turn off for production settings. */ +#define ALLOW_PARTITION /* forward declare some structs */ struct limiter;