一,函数
void * bpf_rdonly_cast (const void *obj, __u32 btf_id) __ksym __weak
二,定义
__CORE_RELO(src, field, info) __builtin_preserve_field_info((src)->field,BPF_FIELD_##info)
__CORE_BITFIELD_PROBE_READ(dst, src, fld)
bpf_probe_read_kernel( \
(void *)dst, \
__CORE_RELO(src, fld, BYTE_SIZE), \
(const void *)src + __CORE_RELO(src, fld, BYTE_OFFSET))
BPF_CORE_READ_BITFIELD_PROBED(s, field)
({ \
unsigned long long val = 0; \
\
__CORE_BITFIELD_PROBE_READ(&val, s, field); \
val <<= __CORE_RELO(s, field, LSHIFT_U64); \
if (__CORE_RELO(s, field, SIGNED)) \
val = ((long long)val) >> __CORE_RELO(s, field, RSHIFT_U64); \
else \
val =