openthread / ot-commissioner

OpenThread Commissioner, a Thread commissioner for joining new Thread devices and managing Thread networks.
https://openthread.io/
BSD 3-Clause "New" or "Revised" License
49 stars 36 forks source link

[cli] update `borderagent discover` to allow network interface selection for mDNS binding #259

Closed ZhangLe2016 closed 4 months ago

ZhangLe2016 commented 4 months ago

Within the OTBR practice application, the BR host will have several interfaces. When users want to discover the border agent using mDNS, they'll need to choose the specific interface the border agent is bound to.

This change introduces a new option for the CLI command borderagent dicover. Users can now specify a network interface using the syntax borderagent discover <timeout> <network interface>. The chosen interface will be used for mDNS binding through socket options.

codecov-commenter commented 4 months ago

Codecov Report

Attention: Patch coverage is 70.83333% with 7 lines in your changes are missing coverage. Please review.

Project coverage is 72.91%. Comparing base (cc2edbf) to head (28dbb7b). Report is 4 commits behind head on main.

:exclamation: Current head 28dbb7b differs from pull request most recent head af38b65. Consider uploading reports for the commit af38b65 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #259 +/- ## ========================================== - Coverage 72.98% 72.91% -0.07% ========================================== Files 72 72 Lines 7477 7496 +19 ========================================== + Hits 5457 5466 +9 - Misses 2020 2030 +10 ``` | [Files](https://app.codecov.io/gh/openthread/ot-commissioner/pull/259?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openthread) | Coverage Δ | | |---|---|---| | [src/app/border\_agent\_functions\_mock.cpp](https://app.codecov.io/gh/openthread/ot-commissioner/pull/259?src=pr&el=tree&filepath=src%2Fapp%2Fborder_agent_functions_mock.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openthread#diff-c3JjL2FwcC9ib3JkZXJfYWdlbnRfZnVuY3Rpb25zX21vY2suY3Bw) | `100.00% <100.00%> (ø)` | | | [src/app/border\_agent\_functions\_mock.hpp](https://app.codecov.io/gh/openthread/ot-commissioner/pull/259?src=pr&el=tree&filepath=src%2Fapp%2Fborder_agent_functions_mock.hpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openthread#diff-c3JjL2FwcC9ib3JkZXJfYWdlbnRfZnVuY3Rpb25zX21vY2suaHBw) | `100.00% <100.00%> (ø)` | | | [src/app/br\_discover.cpp](https://app.codecov.io/gh/openthread/ot-commissioner/pull/259?src=pr&el=tree&filepath=src%2Fapp%2Fbr_discover.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openthread#diff-c3JjL2FwcC9icl9kaXNjb3Zlci5jcHA=) | `85.71% <66.66%> (-3.76%)` | :arrow_down: | | [src/app/cli/interpreter.cpp](https://app.codecov.io/gh/openthread/ot-commissioner/pull/259?src=pr&el=tree&filepath=src%2Fapp%2Fcli%2Finterpreter.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openthread#diff-c3JjL2FwcC9jbGkvaW50ZXJwcmV0ZXIuY3Bw) | `79.52% <66.66%> (-0.38%)` | :arrow_down: | ... and [2 files with indirect coverage changes](https://app.codecov.io/gh/openthread/ot-commissioner/pull/259/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openthread)