-
Notifications
You must be signed in to change notification settings - Fork 354
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Recvmsg: return packet info (dst addr and nw i/f)
This extends `ddsrt_recvmsg` to not only return the packet's source address, but also its destination address and the interface on which it was received. If the operating system does not provide this information, they can be set to "unknown". The additional information is valuable because, at least on Linux, one sometimes receives multicast packets from an interface on which one did not join the multicast group for reasons I am yet to discover. This allows detecting such cases. It also makes it possible to make a more informed guess about which interface is the most suitable choice for communicating with a node X, and it also seems likely that receiving a multicast from X is a good indicator that sending a multicast to node X will work. This commit does not use the information other than for writing it in the trace. Current implementation is verified to work on macOS, Linux and Windows for IPv4 and IPv6. Signed-off-by: Erik Boasson <[email protected]>
- Loading branch information
Showing
30 changed files
with
564 additions
and
249 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.