[MINOR] Allow listing of stick table by key
diff --git a/doc/configuration.txt b/doc/configuration.txt
index dde0c54..a21c43a 100644
--- a/doc/configuration.txt
+++ b/doc/configuration.txt
@@ -9519,15 +9519,18 @@
>>> # table: front_pub, type: 0, size:204800, used:171454
>>> # table: back_rdp, type: 0, size:204800, used:0
-show table <name> [ data.<type> <operator> <value> ]
+show table <name> [ data.<type> <operator> <value> ] | [ key <key> ]
Dump contents of stick-table <name>. In this mode, a first line of generic
information about the table is reported as with "show table", then all
entries are dumped. Since this can be quite heavy, it is possible to specify
- a filter in order to specify what entries to display. The filter then applies
- to the stored data (see "stick-table" in section 4.2). One stored data type
- has to be specified in <type>, and this data type must be stored in the table
- otherwise an error is reported. The data is compared according to <operator>
- with the 64-bit integer <value>. Operators are the same as with the ACLs :
+ a filter in order to specify what entries to display.
+
+ When the "data." form is used the filter applies to the stored data (see
+ "stick-table" in section 4.2). A stored data type must be specified
+ in <type>, and this data type must be stored in the table otherwise an
+ error is reported. The data is compared according to <operator> with the
+ 64-bit integer <value>. Operators are the same as with the ACLs :
+
- eq : match entries whose data is equal to this value
- ne : match entries whose data is not equal to this value
- le : match entries whose data is less than or equal to this value
@@ -9535,6 +9538,11 @@
- lt : match entries whose data is less than this value
- gt : match entries whose data is greater than this value
+ When the key form is used the filter applies to the key of
+ the stick table entry (see "stick-table" in section 4.2).
+ The stick table must be of type ip otherwise an error will
+ be reported.
+
Example :
$ echo "show table http_proxy" | socat stdio /tmp/sock1
>>> # table: http_proxy, type: 0, size:204800, used:2
@@ -9554,6 +9562,12 @@
>>> 0x80e6a80: key=127.0.0.2 use=0 exp=3594740 gpc0=1 conn_rate(30000)=10 \
bytes_out_rate(60000)=191
+ $ echo "show table http_proxy key 127.0.0.2" | \
+ socat stdio /tmp/sock1
+ >>> # table: http_proxy, type: 0, size:204800, used:2
+ >>> 0x80e6a80: key=127.0.0.2 use=0 exp=3594740 gpc0=1 conn_rate(30000)=10 \
+ bytes_out_rate(60000)=191
+
When the data criterion applies to a dynamic value dependent on time such as
a bytes rate, the value is dynamically computed during the evaluation of the
entry in order to decide whether it has to be dumped or not. This means that