X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drl%2Fstandard.h;h=27a3d8cc2e57f9c9884809d0ebf7e3bade06822e;hb=845a86c2059f50aef544fffde2534064d4048ed4;hp=d5799d6024235dbe65fa7cb97f9ab3609f6680c0;hpb=d21104e4fb6400d420027b865833cae78697cda3;p=distributedratelimiting.git diff --git a/drl/standard.h b/drl/standard.h index d5799d6..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 30 +#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);