aya-rs/aya

aya-tool does not generate types for `ip_vs_conn`

DavidVentura opened this issue · 1 comments

As stated in the title, aya-tool does not seem to find anything for ip_vs_conn.

$ RUST_LOG=debug aya-tool generate ip_vs_conn
/* automatically generated by rust-bindgen 0.70.1 */
$

but bpftool can find it

$ sudo bpftool btf list | grep -i ip_vs
196: name [ip_vs]  size 32753B
$ sudo bpftool btf dump id 196 | grep -A 10 "STRUCT 'ip_vs_conn'"
[139419] STRUCT 'ip_vs_conn' size=288 vlen=32
        'c_list' type_id=57 bits_offset=0
        'cport' type_id=1840 bits_offset=128
        'dport' type_id=1840 bits_offset=144
        'vport' type_id=1840 bits_offset=160
        'af' type_id=20 bits_offset=176
        'caddr' type_id=32854 bits_offset=192
        'vaddr' type_id=32854 bits_offset=320
        'daddr' type_id=32854 bits_offset=448
        'flags' type_id=20967 bits_offset=576
        'protocol' type_id=11 bits_offset=608
...

Am I using the tool wrong? Is this intended? For now I'm using bindgen directly for this struct, which is fine, but I got spoiled by aya-tool

In general, how to generate bindings is not clear for me, example:

Kernel name: trace_event_raw_event_inet_sock_set_state
Aya-name: trace_event_raw_inet_sock_set_state

Kernel name: trace_event_raw_event_tcp_event_sk_skb
Aya-name: trace_event_raw_tcp_event_sk_skb

is it always "remove the second event_"?