Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in

Issue 294280043: internet: Add a tos field to InetSockAddress (Closed)

Can't Edit
Can't Publish+Mail
Start Review
6 years ago by Stefano Avallone
5 years, 10 months ago


internet: Add a tos field to InetSockAddress

Patch Set 1 #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+55 lines, -20 lines) Patch
M src/internet/model/udp-socket-impl.h View 2 chunks +3 lines, -1 line 0 comments Download
M src/internet/model/udp-socket-impl.cc View 7 chunks +11 lines, -8 lines 4 comments Download
M src/network/utils/inet-socket-address.h View 3 chunks +9 lines, -0 lines 0 comments Download
M src/network/utils/inet-socket-address.cc View 4 chunks +32 lines, -11 lines 0 comments Download


Total messages: 3
Stefano Avallone
Hello, I would kindly ask you to provide a preliminary feedback on the solution drafted ...
6 years ago (2016-04-20 17:17:44 UTC) #1
Tom Henderson
Overall, like the idea; just think that it needs to be tied together with existing ...
6 years ago (2016-05-05 22:27:27 UTC) #2
Stefano Avallone
5 years, 11 months ago (2016-06-15 16:15:15 UTC) #3
File src/internet/model/udp-socket-impl.cc (right):

src/internet/model/udp-socket-impl.cc:377: m_defaultTos = transport.GetTos ();
Good idea! Done.

src/internet/model/udp-socket-impl.cc:523: if (tos)
> This seems flexible in that users can set the Tos once for the socket using
> Connect (InetSocketAddress) or set it on a packet-by-packet basis by using
> SendTo (InetSocketAddress).

I think this is the current behavior: this DoSendTo function is eventually
called by both Send and SendTo. In the former case, the TOS set by Bind or
Connect is passed to this function (by DoSend). In the latter case, the TOS
included in the address passed to SendTo is passed to this function.

However, on second thought I realized that the sendto function of the C socket
API does not allow to specify a TOS value for a single packet. If we want to
adhere to Linux (and I am correct), we should ignore the Tos value in the
InetSocketAddress passed to SendTo.

What do you think? (btw, I am fine if we want to be more flexible than Linux)
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b