path: root/include/misspell.h
diff options
authorPablo Neira Ayuso <>2018-11-30 18:04:10 +0100
committerPablo Neira Ayuso <>2018-11-30 19:10:38 +0100
commit7dbbdc150292fa9076ce8e3b2c6a8937214d03e0 (patch)
tree43b41cc835eef37a216239146c856de29d1a77e3 /include/misspell.h
parentfc931169d9cec785aea65b3146c80afdb994798a (diff)
src: provide suggestion for misspelled object name
Use this from the lookup path, to check for misspellings: # nft add table filter # nft add chain filtre test Error: No such file or directory; did you mean table ‘filter’ in family ip? add chain filtre test ^^^^^^ Signed-off-by: Pablo Neira Ayuso <>
Diffstat (limited to 'include/misspell.h')
1 files changed, 13 insertions, 0 deletions
diff --git a/include/misspell.h b/include/misspell.h
new file mode 100644
index 00000000..ba01e741
--- /dev/null
+++ b/include/misspell.h
@@ -0,0 +1,13 @@
+#ifndef _MISSPELL_H_
+#define _MISSPELL_H_
+struct string_misspell_state {
+ unsigned int min_distance;
+ void *obj;
+void string_misspell_init(struct string_misspell_state *st);
+int string_misspell_update(const char *a, const char *b,
+ void *obj, struct string_misspell_state *st);