X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drl%2Fstandard.h;h=27a3d8cc2e57f9c9884809d0ebf7e3bade06822e;hb=845a86c2059f50aef544fffde2534064d4048ed4;hp=59c45f7d8c50aa14433be633bb542a55b1973024;hpb=0be9704d6b24d09ebd55beedec52758cb88c570b;p=distributedratelimiting.git diff --git a/drl/standard.h b/drl/standard.h index 59c45f7..27a3d8c 100644 --- a/drl/standard.h +++ b/drl/standard.h @@ -11,12 +11,12 @@ #include /** The number of hash buckets in the table. */ -#define FLOW_HASH_SIZE 1024 +#define STD_FLOW_HASH_SIZE 1024 /** The number of seconds after which a flow is considered to be inactive. * Inactive flows will be removed from the table during the next call to the * cleanup function. */ -#define FLOW_IDLE_TIME 10 +#define STD_FLOW_IDLE_TIME 15 /** Representation of a flow in a standard table. */ typedef struct std_flow { @@ -86,7 +86,7 @@ struct std_flow_table { /* Table structures. */ /** Hash buckets - each is a list of flows. */ - struct std_flow *flows[FLOW_HASH_SIZE]; + struct std_flow *flows[STD_FLOW_HASH_SIZE]; /** The head of the linked list of flows. */ struct std_flow *flows_head; @@ -137,7 +137,7 @@ int standard_table_sample(standard_flow_table table, const key_flow *key); /** * Cleans the table by removing flow entires for any flow that hasn't seen a - * new packet in the interval specified by FLOW_IDLE_TIME seconds. + * new packet in the interval specified by STD_FLOW_IDLE_TIME seconds. */ int standard_table_cleanup(standard_flow_table table);