Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /* Copyright (c) 2020 Facebook */
0003 #ifndef __BTF_HELPERS_H
0004 #define __BTF_HELPERS_H
0005 
0006 #include <stdio.h>
0007 #include <bpf/btf.h>
0008 
0009 int fprintf_btf_type_raw(FILE *out, const struct btf *btf, __u32 id);
0010 const char *btf_type_raw_dump(const struct btf *btf, int type_id);
0011 int btf_validate_raw(struct btf *btf, int nr_types, const char *exp_types[]);
0012 
0013 #define VALIDATE_RAW_BTF(btf, raw_types...)             \
0014     btf_validate_raw(btf,                       \
0015              sizeof((const char *[]){raw_types})/sizeof(void *),\
0016              (const char *[]){raw_types})
0017 
0018 const char *btf_type_c_dump(const struct btf *btf);
0019 #endif