summaryrefslogtreecommitdiffstats
path: root/src/intf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/intf.c')
-rw-r--r--src/intf.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/intf.c b/src/intf.c
index 7f1e98b..6c55571 100644
--- a/src/intf.c
+++ b/src/intf.c
@@ -205,3 +205,17 @@ int tsnif_list(struct tsnif_handle *h)
return trans_send(&h->trans, &msg);
}
+
+int tsnif_enum(struct tsnif_handle *h, cb_tsnif_enum_t cb)
+{
+ struct tsnif_term *term, *t;
+ int err = 0;
+
+ list_for_each_entry_safe(term, t, &h->terms, list) {
+ err = cb(term);
+ if (err)
+ break;
+ }
+
+ return err;;
+}