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

Allow for QOS/DSCP to be set #172

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Allow for QOS/DSCP to be set #172

wants to merge 1 commit into from

Conversation

psaab
Copy link

@psaab psaab commented Jan 17, 2024

No description provided.

@r3inbowari
Copy link
Collaborator

Hello, thank you for your PR. Should there be a range limit on the value of uc.Dscp?

speedtest.go Outdated Show resolved Hide resolved
@psaab
Copy link
Author

psaab commented Jan 17, 2024 via email

@psaab
Copy link
Author

psaab commented Jan 17, 2024

Done

@r3inbowari
Copy link
Collaborator

r3inbowari commented Jan 18, 2024

Good work.

Additionally, we need to ensure that all platforms compile successfully.
For example, under Windows, we can not found the traffic class macro named IPV6_TCLASS. And the actual file descriptor parameters in syscall.SetsockoptInt() should be wrapped by uint Handle, etc.

ref

https://learn.microsoft.com/en-us/answers/questions/1137447/hot-to-set-traffic-class-of-ipv6-socket

@@ -29,6 +29,7 @@ var (
noDownload = kingpin.Flag("no-download", "Disable download test.").Bool()
noUpload = kingpin.Flag("no-upload", "Disable upload test.").Bool()
pingMode = kingpin.Flag("ping-mode", "Select a method for Ping. (support icmp/tcp/http)").Default("http").String()
tos = kingpin.Flag("tos", "type of service field in IP header").Short('Q').Int()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
tos = kingpin.Flag("tos", "type of service field in IP header").Short('Q').Int()
tos = kingpin.Flag("tos", "type of service field in IP header").Short('Q').Uint8()

Limit the size of the tos field to 8 bits.

@r3inbowari r3inbowari added the build breaking build breaking label Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build breaking build breaking
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants