+extern int ctf_version (int);
+
+extern int ctf_func_info (ctf_dict_t *, unsigned long, ctf_funcinfo_t *);
+extern int ctf_func_args (ctf_dict_t *, unsigned long, uint32_t, ctf_id_t *);
+extern int ctf_func_type_info (ctf_dict_t *, ctf_id_t, ctf_funcinfo_t *);
+extern int ctf_func_type_args (ctf_dict_t *, ctf_id_t, uint32_t, ctf_id_t *);
+
+extern ctf_id_t ctf_lookup_by_name (ctf_dict_t *, const char *);
+extern ctf_id_t ctf_lookup_by_symbol (ctf_dict_t *, unsigned long);
+extern ctf_id_t ctf_lookup_by_symbol_name (ctf_dict_t *, const char *);
+extern ctf_id_t ctf_symbol_next (ctf_dict_t *, ctf_next_t **,
+ const char **name, int functions);
+extern ctf_id_t ctf_lookup_variable (ctf_dict_t *, const char *);
+
+extern ctf_id_t ctf_type_resolve (ctf_dict_t *, ctf_id_t);
+extern char *ctf_type_aname (ctf_dict_t *, ctf_id_t);
+extern char *ctf_type_aname_raw (ctf_dict_t *, ctf_id_t);
+extern ssize_t ctf_type_lname (ctf_dict_t *, ctf_id_t, char *, size_t);
+extern char *ctf_type_name (ctf_dict_t *, ctf_id_t, char *, size_t);
+extern const char *ctf_type_name_raw (ctf_dict_t *, ctf_id_t);
+extern ssize_t ctf_type_size (ctf_dict_t *, ctf_id_t);
+extern ssize_t ctf_type_align (ctf_dict_t *, ctf_id_t);
+extern int ctf_type_kind (ctf_dict_t *, ctf_id_t);
+extern int ctf_type_kind_forwarded (ctf_dict_t *, ctf_id_t);
+extern ctf_id_t ctf_type_reference (ctf_dict_t *, ctf_id_t);
+extern ctf_id_t ctf_type_pointer (ctf_dict_t *, ctf_id_t);
+extern int ctf_type_encoding (ctf_dict_t *, ctf_id_t, ctf_encoding_t *);
+extern int ctf_type_visit (ctf_dict_t *, ctf_id_t, ctf_visit_f *, void *);
+extern int ctf_type_cmp (ctf_dict_t *, ctf_id_t, ctf_dict_t *, ctf_id_t);
+extern int ctf_type_compat (ctf_dict_t *, ctf_id_t, ctf_dict_t *, ctf_id_t);
+
+extern int ctf_member_info (ctf_dict_t *, ctf_id_t, const char *,
+ ctf_membinfo_t *);
+extern int ctf_array_info (ctf_dict_t *, ctf_id_t, ctf_arinfo_t *);
+
+extern const char *ctf_enum_name (ctf_dict_t *, ctf_id_t, int);
+extern int ctf_enum_value (ctf_dict_t *, ctf_id_t, const char *, int *);
+
+extern void ctf_label_set (ctf_dict_t *, const char *);
+extern const char *ctf_label_get (ctf_dict_t *);
+
+extern const char *ctf_label_topmost (ctf_dict_t *);
+extern int ctf_label_info (ctf_dict_t *, const char *, ctf_lblinfo_t *);
+
+extern int ctf_member_count (ctf_dict_t *, ctf_id_t);
+extern int ctf_member_iter (ctf_dict_t *, ctf_id_t, ctf_member_f *, void *);
+extern ssize_t ctf_member_next (ctf_dict_t *, ctf_id_t, ctf_next_t **,
+ const char **name, ctf_id_t *membtype,
+ int flags);
+extern int ctf_enum_iter (ctf_dict_t *, ctf_id_t, ctf_enum_f *, void *);
+extern const char *ctf_enum_next (ctf_dict_t *, ctf_id_t, ctf_next_t **,
+ int *);
+extern int ctf_type_iter (ctf_dict_t *, ctf_type_f *, void *);
+extern int ctf_type_iter_all (ctf_dict_t *, ctf_type_all_f *, void *);
+extern ctf_id_t ctf_type_next (ctf_dict_t *, ctf_next_t **,
+ int *flag, int want_hidden);
+extern int ctf_label_iter (ctf_dict_t *, ctf_label_f *, void *);
+extern int ctf_label_next (ctf_dict_t *, ctf_next_t **, const char **); /* TBD */
+extern int ctf_variable_iter (ctf_dict_t *, ctf_variable_f *, void *);
+extern ctf_id_t ctf_variable_next (ctf_dict_t *, ctf_next_t **,
+ const char **);
+extern int ctf_archive_iter (const ctf_archive_t *, ctf_archive_member_f *,
+ void *);
+extern ctf_dict_t *ctf_archive_next (const ctf_archive_t *, ctf_next_t **,
+ const char **, int skip_parent, int *errp);
+
+/* This function alone does not currently operate on CTF files masquerading
+ as archives, and returns -EINVAL: the raw data is no longer available. It is
+ expected to be used only by archiving tools, in any case, which have no need
+ to deal with non-archives at all. */
+extern int ctf_archive_raw_iter (const ctf_archive_t *,
+ ctf_archive_raw_member_f *, void *);
+extern char *ctf_dump (ctf_dict_t *, ctf_dump_state_t **state,
+ ctf_sect_names_t sect, ctf_dump_decorate_f *,
+ void *arg);
+
+/* Error-warning reporting: an 'iterator' that returns errors and warnings from
+ the error/warning list, in order of emission. Errors and warnings are popped
+ after return: the caller must free the returned error-text pointer. */
+extern char *ctf_errwarning_next (ctf_dict_t *, ctf_next_t **,
+ int *is_warning, int *errp);
+
+extern ctf_id_t ctf_add_array (ctf_dict_t *, uint32_t,