[net] move slaac module from utils to net - #11955
Conversation
This commit moves the `SlaacAddress` module from `src/core/utils` to `src/core/net`. This change also updates the namespace from `ot::Utils` to `ot::Ip6` and updates all includes and usages throughout the codebase. The `SlaacAddress` module was originally placed in `core/utils` as SLAAC management was historically handled by the platform. Now that the OpenThread stack manages SLAAC directly, this logic is better placed under `core/net`.
Library files
|
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request correctly moves the SlaacAddress module from src/core/utils to src/core/net, which is a more logical location for this functionality given its direct relation to networking. The namespace is also appropriately updated from ot::Utils to ot::Ip6. All changes, including updates to build files and usages throughout the codebase, have been applied consistently. The refactoring is clean and well-executed, and I have no further comments.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #11955 +/- ##
==========================================
- Coverage 75.37% 73.78% -1.59%
==========================================
Files 653 656 +3
Lines 93494 104026 +10532
==========================================
+ Hits 70467 76759 +6292
- Misses 23027 27267 +4240
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull Request Overview
This PR moves the SlaacAddress module from src/core/utils to src/core/net to better reflect its purpose within the OpenThread stack's network layer, updating the namespace from ot::Utils to ot::Ip6.
- Updates namespace from
ot::Utils::Slaactoot::Ip6::Slaacthroughout codebase - Moves SLAAC module files from utils directory to net directory
- Updates all include statements and references to use the new location and namespace
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/core/thread/network_data_leader.cpp | Updates namespace reference from Utils::Slaac to Ip6::Slaac |
| src/core/thread/dua_manager.cpp | Updates namespace reference from Utils::Slaac to Ip6::Slaac |
| src/core/net/slaac_address.hpp | Changes namespace from Utils to Ip6, removes Ip6:: prefixes from types now in same namespace |
| src/core/net/slaac_address.cpp | Changes namespace from Utils to Ip6, removes Ip6:: prefixes for local types |
| src/core/net/ip6.hpp | Adds core-ip6-slaac to documentation groups |
| src/core/instance/instance.hpp | Updates include path and type references for moved SLAAC module |
| src/core/common/settings.hpp | Updates include path and type reference for SLAAC secret key |
| src/core/common/notifier.cpp | Updates namespace reference from Utils::Slaac to Ip6::Slaac |
| src/core/api/ip6_api.cpp | Updates namespace references from Utils::Slaac to Ip6::Slaac |
| src/core/CMakeLists.txt | Moves slaac_address.cpp from utils to net directory in build |
| src/core/BUILD.gn | Moves slaac_address source files from utils to net directory |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
This commit moves the
SlaacAddressmodule fromsrc/core/utilstosrc/core/net.This change also updates the namespace from
ot::Utilstoot::Ip6and updates all includes and usages throughout the codebase.The
SlaacAddressmodule was originally placed incore/utilsas SLAAC management was historically handled by the platform. Now that the OpenThread stack manages SLAAC directly, this logic is better placed undercore/net.