From fa145fdf73d663eb69751800911cdd2853689dee Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Sat, 1 Dec 2018 11:33:31 +0100 Subject: src: introduce simple hints on incorrect object MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # nft add counter x test # nft list counter x test Error: No such file or directory; did you mean obj ‘test’ in table ip ‘x’? list counter x text ^^^^ Signed-off-by: Pablo Neira Ayuso --- include/rule.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/rule.h b/include/rule.h index 85b9f80d..88fed62e 100644 --- a/include/rule.h +++ b/include/rule.h @@ -392,6 +392,9 @@ void obj_free(struct obj *obj); void obj_add_hash(struct obj *obj, struct table *table); struct obj *obj_lookup(const struct table *table, const char *name, uint32_t type); +struct obj *obj_lookup_fuzzy(const char *obj_name, + const struct nft_cache *cache, + const struct table **t); void obj_print(const struct obj *n, struct output_ctx *octx); void obj_print_plain(const struct obj *obj, struct output_ctx *octx); const char *obj_type_name(uint32_t type); -- cgit v1.2.3