Skip to content

Libbpf userspace function btf_dump__dump_type_data

0.5.0

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 a struct btf_dump object
  • id: BTF type ID
  • data: pointer to BTF type data
  • data_sz: size of BTF type data
  • opts: pointer to a struct 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

0.5.0

indent_level

0.5.0

compact

0.5.0

no newlines/indentation

skip_names

0.5.0

skip member/type names

emit_zeroes

0.5.0

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