This source file includes following definitions.
- btf_type_by_id
- btf_name_by_offset
   1 
   2 
   3 
   4 #ifndef _LINUX_BTF_H
   5 #define _LINUX_BTF_H 1
   6 
   7 #include <linux/types.h>
   8 
   9 struct btf;
  10 struct btf_member;
  11 struct btf_type;
  12 union bpf_attr;
  13 
  14 extern const struct file_operations btf_fops;
  15 
  16 void btf_put(struct btf *btf);
  17 int btf_new_fd(const union bpf_attr *attr);
  18 struct btf *btf_get_by_fd(int fd);
  19 int btf_get_info_by_fd(const struct btf *btf,
  20                        const union bpf_attr *attr,
  21                        union bpf_attr __user *uattr);
  22 
  23 
  24 
  25 
  26 
  27 
  28 
  29 
  30 
  31 
  32 
  33 
  34 
  35 
  36 
  37 
  38 
  39 
  40 
  41 
  42 
  43 const struct btf_type *btf_type_id_size(const struct btf *btf,
  44                                         u32 *type_id,
  45                                         u32 *ret_size);
  46 void btf_type_seq_show(const struct btf *btf, u32 type_id, void *obj,
  47                        struct seq_file *m);
  48 int btf_get_fd_by_id(u32 id);
  49 u32 btf_id(const struct btf *btf);
  50 bool btf_member_is_reg_int(const struct btf *btf, const struct btf_type *s,
  51                            const struct btf_member *m,
  52                            u32 expected_offset, u32 expected_size);
  53 int btf_find_spin_lock(const struct btf *btf, const struct btf_type *t);
  54 bool btf_type_is_void(const struct btf_type *t);
  55 
  56 #ifdef CONFIG_BPF_SYSCALL
  57 const struct btf_type *btf_type_by_id(const struct btf *btf, u32 type_id);
  58 const char *btf_name_by_offset(const struct btf *btf, u32 offset);
  59 #else
  60 static inline const struct btf_type *btf_type_by_id(const struct btf *btf,
  61                                                     u32 type_id)
  62 {
  63         return NULL;
  64 }
  65 static inline const char *btf_name_by_offset(const struct btf *btf,
  66                                              u32 offset)
  67 {
  68         return NULL;
  69 }
  70 #endif
  71 
  72 #endif