Skip to content

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?

@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

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