From d20a326e09591a8687502e7b3ed6e176084d7c69 Mon Sep 17 00:00:00 2001 From: Mark Stemm Date: Wed, 5 Jan 2022 14:16:56 -0800 Subject: [PATCH] Skip EPF_TABLE_ONLY fields with --list -N When listing fields with -N (names only), also skip fields with the EPF_TABLE_ONLY flag. (Skipping fields without -N is handled in libs, in the as_string() method). Signed-off-by: Mark Stemm --- userspace/engine/falco_engine.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/userspace/engine/falco_engine.cpp b/userspace/engine/falco_engine.cpp index a413a278..88944244 100644 --- a/userspace/engine/falco_engine.cpp +++ b/userspace/engine/falco_engine.cpp @@ -136,6 +136,12 @@ void falco_engine::list_fields(std::string &source, bool verbose, bool names_onl { for(auto &field : fld_class.fields) { + // Skip fields with the EPF_TABLE_ONLY flag. + if(field.tags.find("EPF_TABLE_ONLY") != field.tags.end()) + { + continue; + } + printf("%s\n", field.name.c_str()); } }