};
struct tlvdb;
-typedef bool (*tlv_cb)(void *data, const struct tlv *tlv);
+typedef bool (*tlv_cb)(void *data, const struct tlv *tlv, int level, bool is_leaf);
struct tlvdb *tlvdb_fixed(tlv_tag_t tag, size_t len, const unsigned char *value);
struct tlvdb *tlvdb_external(tlv_tag_t tag, size_t len, const unsigned char *value);
void tlvdb_add(struct tlvdb *tlvdb, struct tlvdb *other);
-void tlvdb_visit(const struct tlvdb *tlvdb, tlv_cb cb, void *data);
+void tlvdb_visit(const struct tlvdb *tlvdb, tlv_cb cb, void *data, int level);
const struct tlv *tlvdb_get(const struct tlvdb *tlvdb, tlv_tag_t tag, const struct tlv *prev);
bool tlv_parse_tl(const unsigned char **buf, size_t *len, struct tlv *tlv);