-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[simulation] support simulating radio over IPv6 #10194
Conversation
Size Report of OpenThread
|
13ac684
to
9fb08a1
Compare
inet_pton(AF_INET, UTILS_SOCKET_GROUP_ADDR, &mreq.imr_multiaddr); | ||
for (struct ifaddrs *ifa = ifaddr; ifa != NULL; ifa = ifa->ifa_next) | ||
{ | ||
if (ifa->ifa_addr == NULL || strcmp(ifa->ifa_name, aLocalHost) != 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ifa_name
seems to be the interface name. https://man7.org/linux/man-pages/man3/getifaddrs.3.html
It's comparing the interface name with an IP address. Is this expected?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aLocalHost
can be an interface name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we rename the parameter aLocalHost
and the global variable gLocalHost
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with renaming it in a separate PR.
14c3669
to
777ebea
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall. Thanks.
Some style and smaller suggestions below.
This commit adds support to simulate Thread radio over IPv6. With this commit, a simulation will be simulated over either IPv6 or IPv4. If it's simulated on IPv6, it communicates with other simulation nodes in IPv6 group `ff02::116`. And if it's simulated on IPv4, it communicates with other simulation nodes in IPv4 group `224.0.0.116`. Note that simulating virtual time is not included in this commit.
All make sense! Fixed and uploaded. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. 👍
This commit renames command line argument --local-host to --local-interface to reduce confusion as discussed in openthread#10194.
This commit renames command line argument --local-host to --local-interface to reduce confusion as discussed in openthread#10194. This commit also add help message for local interface.
This commit renames command line argument --local-host to --local-interface to reduce confusion as discussed in openthread#10194. This commit also add help message for local interface.
This commit renames command line argument --local-host to --local-interface to reduce confusion as discussed in #10194. This commit also add help message for local interface.
This commit adds support to simulate Thread radio over IPv6.
With this commit, a simulation will be simulated over either IPv6 or IPv4. If it's simulated on IPv6, it communicates with other simulation nodes in IPv6 group
ff02::116
. And if it's simulated on IPv4, it communicates with other simulation nodes in IPv4 group224.0.0.116
.Note that simulating virtual time is not included in this commit.