bcc
bcc copied to clipboard
Only trace ipv4 not working without kernel CONF_IPV6 set
I have a systematic issue to use only trace IPv4 family for tcpconnect and network performance tools. A python error code notices that ipv6 structs are undefined...
So I am not able to use network tools because my kernel do not compile conf_ipv6. Is it normal? Network BCC tools hard depends on CONF_IPV6 ? It wasn't written to readme requierments so I am asking if they is a way to do it without this dependency. Perhaps I can rewrite your python codes to exclude ipv6 support.
BCC is an amazing tools suites. Good continuation.
Best regard,
Please post the error logs or stacktrace here.
I have a fix and it works on my branch.
You've provided options to monitor only ipv4 kernel socket but to bcc compile only ipv4 wasn't actually supported. Ipv4 only has to be propagate to kernel without ipv6 headers.
I have experimented and tested ok on my branch. I will fullfill it for all network BCC monitoring application.
Branch for tcpconnect.py: https://github.com/K-PANIK/bcc/tree/feature/ipv4_without_ivp6_kernel
Commit: https://github.com/K-PANIK/bcc/commit/3c42ab2bee3f90cdce7fda20baf09749d4bd89bf
I have noticed that bcc source code is not factorised. For example, struct ipv4_data_t is redefined in all source tcp*.py and is sometimes heterogeneously defined. Same for ipv6 struct definition. I think you can do better.
Regards, K.P
Would you might opening a new PR. I think we can use the existing -4, -6 options.
Ofcourse these options have to be used. Currently, if -4 is used , bcc try to compile ipv6 headers for monitoring stats too, and then python scripts display only ipv4 stats. Remember my case, my kernel config_ipv6 is not set.
Just a question, tools/tcp*.py are they template or official tools for users?
They are official tools maintained by the community and are shipped on many distros now.