This commit adds a Stats(table, chain string) method that parses the output of -L -v -n -x (verbose, numeric, exact).
My application allows an operator to add blocking rules to a given table, and periodically polls for packet and byte statistics to determine how much traffic hits each rule.
Here's an example of how I'm hooking this into the application. Hopefully some others will find it useful.
This commit adds a
Stats(table, chain string)
method that parses the output of-L -v -n -x
(verbose, numeric, exact).My application allows an operator to add blocking rules to a given table, and periodically polls for packet and byte statistics to determine how much traffic hits each rule.
Here's an example of how I'm hooking this into the application. Hopefully some others will find it useful.