openthread / ot-br-posix

OpenThread Border Router, a Thread border router for POSIX-based platforms.
https://openthread.io/
BSD 3-Clause "New" or "Revised" License
420 stars 235 forks source link

[infra if] add infra if icmp6 nd receiving #2547

Closed Irving-cl closed 4 weeks ago

Irving-cl commented 1 month ago

This PR implements Icmp6Nd receiving in the InfraIf module.

The method is used to receive ICMPv6 ND messages (on host) and forward them to the NCP. The implementation of this method is the same as OT posix implementation. In this PR, the forwarding to NCP hasn't been implemented. It will be later integrated with NcpSpinel.

This PR also adds a test case to verify that HandleIcmp6Nd is called correctly when the infrastructure interface receives an ICMP6 ND message.

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 75.86207% with 21 lines in your changes missing coverage. Please review.

Project coverage is 45.68%. Comparing base (2b41187) to head (c0469e8). Report is 840 commits behind head on main.

Files with missing lines Patch % Lines
src/ncp/posix/infra_if.cpp 71.42% 10 Missing and 2 partials :warning:
tests/gtest/test_infra_if.cpp 80.00% 8 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2547 +/- ## =========================================== - Coverage 55.77% 45.68% -10.10% =========================================== Files 87 102 +15 Lines 6890 12296 +5406 Branches 0 900 +900 =========================================== + Hits 3843 5617 +1774 - Misses 3047 6374 +3327 - Partials 0 305 +305 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.