From 99fc209e6a465ccb6ea96ef81116e8d931e2261c Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Tue, 14 May 2013 19:49:13 +0200 Subject: cli: complete basic functionality of the interactive mode This patch adds missing code to get basic interactive mode operative via `nft -i', including parsing, evaluation, command execution via netlink and error reporting. Autocomplete is not yet implemented. Signed-off-by: Pablo Neira Ayuso --- include/nftables.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/nftables.h b/include/nftables.h index 66bfab30..0eab1e50 100644 --- a/include/nftables.h +++ b/include/nftables.h @@ -25,7 +25,7 @@ extern unsigned int debug_level; extern const char *include_paths[INCLUDE_PATHS_MAX]; struct parser_state; -extern int cli_init(void *scanner, struct parser_state *state); +extern int cli_init(struct parser_state *state); extern void cli_exit(void); extern void cli_display(const char *fmt, va_list ap) __fmtstring(1, 0); @@ -101,4 +101,6 @@ struct input_descriptor { off_t line_offset; }; +int nft_run(void *scanner, struct parser_state *state, struct list_head *msgs); + #endif /* NFTABLES_NFTABLES_H */ -- cgit v1.2.3