Libbpf userspace function btf_dump__dump_type_data
Dump BTF type data.
Definition
int btf_dump__dump_type_data(struct btf_dump *d, __u32 id, const void *data, size_t data_sz, const struct btf_dump_type_data_opts *opts);
Parameters
d
: pointer to astruct btf_dump
objectid
: BTF type IDdata
: pointer to BTF type datadata_sz
: size of BTF type dataopts
: pointer to astruct btf_dump_type_data_opts
object
Return
0
, on success; -errno
, on error.
struct btf_dump_type_data_opts
struct btf_dump_type_data_opts {
/* size of this struct, for forward/backward compatibility */
size_t sz;
const char *indent_str;
int indent_level;
/* below match "show" flags for bpf_show_snprintf() */
bool compact;
bool skip_names;
bool emit_zeroes;
size_t :0;
};
indent_str
indent_level
compact
no newlines/indentation
skip_names
skip member/type names
emit_zeroes
show 0-valued fields
Usage
Docs could be improved
This part of the docs is incomplete, contributions are very welcome
Example
Docs could be improved
This part of the docs is incomplete, contributions are very welcome