X-Git-Url: http://git.onelab.eu/?p=distributedratelimiting.git;a=blobdiff_plain;f=drl%2Fraterouter.h;h=2594f12c7763f151580cf598b82f5fad2d9ea728;hp=28c6c7f3938c89613de5be7b6b15290408059993;hb=f83340496f632165030cc92cd98408a87082f6b1;hpb=0be9704d6b24d09ebd55beedec52758cb88c570b diff --git a/drl/raterouter.h b/drl/raterouter.h index 28c6c7f..2594f12 100644 --- a/drl/raterouter.h +++ b/drl/raterouter.h @@ -34,7 +34,8 @@ 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 }; +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}; /* The comm library also has definitions for comfabrics. This prevents us * from defining them twice. */ @@ -42,6 +43,7 @@ enum accountings { ACT_STANDARD = 1, ACT_SAMPLEHOLD = 2, ACT_SIMPLE = 3 }; /* global constants */ #define IDENT_CLEAN_INTERVAL 5 /* in seconds */ + #define LIMITER_LISTEN_PORT 9001 /** @@ -56,7 +58,9 @@ enum accountings { ACT_STANDARD = 1, ACT_SAMPLEHOLD = 2, ACT_SIMPLE = 3 }; * * This is used for FPS only. See estimate.c */ -#define FLOW_START_THRESHOLD (4096) +#define FLOW_START_THRESHOLD (6000) + +#define CLOSE_ENOUGH (0.99) /** * All fields come from the ip protocol header. @@ -71,6 +75,12 @@ enum accountings { ACT_STANDARD = 1, ACT_SAMPLEHOLD = 2, ACT_SIMPLE = 3 }; */ #define FLOWKEYSIZE (13) +/* Causes each identity to track every flow in two tables. One table is as + * 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 + /* forward declare some structs */ struct limiter; struct identity;