#define INCLUDE_PATHS_MAX 16
extern unsigned int numeric_output;
+extern unsigned int handle_output;
extern unsigned int debug_level;
extern const char *include_paths[INCLUDE_PATHS_MAX];
#include <erec.h>
unsigned int numeric_output;
+unsigned int handle_output;
#ifdef DEBUG
unsigned int debug_level;
#endif
OPT_INCLUDEPATH = 'I',
OPT_NUMERIC = 'n',
OPT_DEBUG = 'd',
+ OPT_HANDLE_OUTPUT = 'a',
OPT_INVALID = '?',
};
-#define OPTSTRING "hvf:iI:vn"
+#define OPTSTRING "hvf:iI:vna"
static const struct option options[] = {
{
.has_arg = 1,
},
#endif
+ {
+ .name = "handle",
+ .val = OPT_HANDLE_OUTPUT,
+ },
{
.name = NULL
}
" -n/--numeric When specified once, show network addresses numerically.\n"
" When specified twice, also show Internet protocols,\n"
" Internet services, user IDs and group IDs numerically.\n"
+" -a/--handle Output rule handle.\n"
" -I/--includepath <directory> Add <directory> to the paths searched for include files.\n"
#ifdef DEBUG
" --debug <level [,level...]> Specify debugging level (scanner, parser, eval, netlink, all)\n"
}
break;
#endif
+ case OPT_HANDLE_OUTPUT:
+ handle_output++;
+ break;
case OPT_INVALID:
exit(NFT_EXIT_FAILURE);
}