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

Added IPv4/IPv6 filter support for tcp trace tools #3565

Merged
merged 6 commits into from
Aug 12, 2021

Conversation

hariharan-a
Copy link
Contributor

Added command line optional argument [-4 | -6] similar to ping/traceroute to support filtering IPv4/IPv6 tcp stats.

@yonghong-song
Copy link
Collaborator

[buildbot, test this please]

Copy link
Collaborator

@yonghong-song yonghong-song left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think adding -4 -6 make sense as a lot of tools already have "-4" "-6" options like ping, ss etc. Could you also add new options to man pages? Thanks!

@@ -40,6 +40,8 @@ def positive_float(val):
./tcpconnlat -t # include timestamps
./tcpconnlat -p 181 # only trace PID 181
./tcpconnlat -L # include LPORT while printing outputs
./tcpconnlat -4 # trace IPv4 family only
./tcpconnlat -6 # trace IPv6 family ony
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

family only

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Fixed typo and added options to man pages.

@yonghong-song
Copy link
Collaborator

[buildbot, ok to test]

@brendangregg
Copy link
Member

Looks good, thanks, and follows the precedent of -4/-6 from other network tools. Thanks for updating all the man pages and example files.

@brendangregg brendangregg merged commit 04893e3 into iovisor:master Aug 12, 2021
@anakryiko
Copy link
Contributor

@hariharan-a Would you be able to check libbpf-tools and see about adding the same feature there?

@hariharan-a
Copy link
Contributor Author

@hariharan-a Would you be able to check libbpf-tools and see about adding the same feature there?

Sure. I will check.

brho pushed a commit to brho/bcc that referenced this pull request Nov 3, 2021
* Added IPv4/IPv6 filter support for tcp trace tools

* Fixed a typo

* Added usage for TCP syn backlog

* Fixed a typo

* Fixed a typo

* Added man support for IPv4/IPv6 family filters
CrackerCat pushed a commit to CrackerCat/bcc that referenced this pull request Jul 31, 2024
* Added IPv4/IPv6 filter support for tcp trace tools

* Fixed a typo

* Added usage for TCP syn backlog

* Fixed a typo

* Fixed a typo

* Added man support for IPv4/IPv6 family filters
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

Successfully merging this pull request may close these issues.

4 participants