Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aya-tool does not generate types for ip_vs_conn #1037

Open
DavidVentura opened this issue Sep 22, 2024 · 1 comment
Open

aya-tool does not generate types for ip_vs_conn #1037

DavidVentura opened this issue Sep 22, 2024 · 1 comment

Comments

@DavidVentura
Copy link

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

@DavidVentura
Copy link
Author

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_"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant