Hello,
I'm trying to describe an extension of the bpf(2) syscall where there is a new union in a struct akin to the following.
struct {
union {
__u32 relative_fd;
__u32 relative_id;
};
__u32 flags;
};
The union is interpreted as a BPF ID or an FD depending on whether the flag BPF_F_ID is set. That flag is however not the only possible value, so BPF_F_AFTER|BPF_F_ID for instance would be acceptable.
Is there any way I can make the description more specific to cover this, by having two descriptions for the struct with one where BPF_F_ID is always set? Something like:
bpf_tcx [
id bpf_tcx_id
fd bpf_tcx_fd
]
bpf_tcx_id {
relative_id bpf_id
flags flags[bpf_attach_flags, int32, BPF_F_ID] # BPF_F_ID always set.
}
bpf_tcx_id {
relative_fd bpf_fd
flags flags[bpf_attach_flags, int32]
}
Thank you,
Paul