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

TCPStream/UDPSocket tos/set_tos methods #3545

Closed
dvolodin7 opened this issue Feb 22, 2021 · 0 comments · Fixed by #4366
Closed

TCPStream/UDPSocket tos/set_tos methods #3545

dvolodin7 opened this issue Feb 22, 2021 · 0 comments · Fixed by #4366
Assignees
Labels
A-tokio Area: The main tokio crate C-feature-request Category: A feature request. M-net Module: tokio/net

Comments

@dvolodin7
Copy link

Is your feature request related to a problem? Please describe.
Some network applications rely on proper marking of egress packets using ToS/DSCP fields. Routing protocols,
management traffic, VoIP applications and so on.

ToS can be set on socket level using setsockopt call, using IPPROTO_IP level and IP_TOS option.
TCPStream and UDPSocket already have functions:

  • ttl
  • set_ttl

for getting an setting TTL field. TTL is manipulated via the same setsockopt/getsockopt calls.

Describe the solution you'd like
Adding methods

  • tos
  • set_tos

for getting socket's ToS settings will be good addition for a large spectre of network applications.

Describe alternatives you've considered
Direct usage of setsockopt on raw socket handle still possible, and can be used as workaround.

Additional context
N/A

@dvolodin7 dvolodin7 added A-tokio Area: The main tokio crate C-feature-request Category: A feature request. labels Feb 22, 2021
@Darksonn Darksonn added the M-net Module: tokio/net label Feb 22, 2021
@taiki-e taiki-e self-assigned this Dec 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate C-feature-request Category: A feature request. M-net Module: tokio/net
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants