* add a separate "show extended" option to "list" and "get" commands showing all accounting object properties in separate columns: name, packet & byte counters, threshold exceeded indicator and the threshold value itself. Signed-off-by: Michael Zintakis <michael.zintakis@xxxxxxxxxxxxxx> --- src/nfacct.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/nfacct.c b/src/nfacct.c index f2ece72..4504143 100644 --- a/src/nfacct.c +++ b/src/nfacct.c @@ -289,6 +289,8 @@ static int nfacct_cmd_list(int argc, char *argv[]) NFACCT_GET_NEXT_ARG(); if (nfacct_matches(argv[0],"bytes")) { flags = NFACCT_SNPRINTF_F_BONLY; + } else if (nfacct_matches(argv[0],"extended")) { + flags = NFACCT_SNPRINTF_F_EXTENDED; } else { NFACCT_RET_ARG_ERR(); } @@ -617,6 +619,8 @@ static int nfacct_cmd_get(int argc, char *argv[]) NFACCT_GET_NEXT_ARG(); if (nfacct_matches(argv[0],"bytes")) { flags = NFACCT_SNPRINTF_F_BONLY; + } else if (nfacct_matches(argv[0],"extended")) { + flags = NFACCT_SNPRINTF_F_EXTENDED; } else { NFACCT_RET_ARG_ERR(); } @@ -788,12 +792,13 @@ static const char help_msg[] = " version\t\tDisplay version and disclaimer\n" " help\t\t\tDisplay this help message\n\n" "Parameters:\n" - " LST_PARAMS := [ reset ] [ show bytes ] [ format FMT_SPEC ]\n" + " LST_PARAMS := [ reset ] [ show SHOW_SPEC ] [ format FMT_SPEC ]\n" "\t\t[ sort SORT_SPEC ] [ xml ]\n" " ADD_PARAMS := [ replace ] [ format FMT_SPEC ] " "[ threshold [NUMBER | '-'] ]\n" - " GET_PARAMS := [ reset ] [ show bytes ] [ format FMT_SPEC ] [ xml ]\n" + " GET_PARAMS := [ reset ] [ show SHOW_SPEC ] [ format FMT_SPEC ] [ xml ]\n" " RST_PARAMS := [ flush ] [ replace ]\n" + " SHOW_SPEC := { bytes | extended }\n" " FMT_SPEC := { [FMT] | [,] | [FMT] ... }\n" " SORT_SPEC := { none | name | packets | bytes | threshold }" " FMT := { def | raw | 3pl | iec | kib | mib | gib | tib | pib |" -- 1.8.3.1 -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html