-
Notifications
You must be signed in to change notification settings - Fork 239
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
[border agent] add UDP Proxy module for Thread commissioning #2717
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2717 +/- ##
===========================================
- Coverage 55.77% 43.82% -11.95%
===========================================
Files 87 113 +26
Lines 6890 13569 +6679
Branches 0 965 +965
===========================================
+ Hits 3843 5947 +2104
- Misses 3047 7303 +4256
- Partials 0 319 +319 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
d513312
to
ab1e9e1
Compare
7c3cbee
to
b4e24ee
Compare
Could you help take a look at this PR when you have a chance? This one is a little bit long so maybe first let's align on the interfaces of the module For now I didn't add a general UDP platform module because the border agent is the only user. We can refactor it into a general UDP platform module when there are more users. |
b4e24ee
to
685cf48
Compare
685cf48
to
9e88a24
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.
Great to see we are on the way to deprecate platform UDP.
f345da8
to
87c7d35
Compare
@bukepo As discussed, updated the module to be generic so that it can also work for other cases (not only for Border Agent). |
87c7d35
to
612d4bd
Compare
f5fc67b
to
90a9808
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.
90a9808
to
55066e0
Compare
55066e0
to
8ddb9a9
Compare
This PR adds a UDP Proxy module to do Thread commissioning under NCP architecture.
This PR is one of sub-task to support Border Agent under NCP mode. The UDP Proxy will also be used to do Thread commisssioning under RCP architecture and replace
OT_PLATFORM_UDP
.Based on the OT border agent state changes (HandleBorderAgentStateChange), the module simply starts/stops listening on an UDP ephemeral port and if starts, sets a mapping between OT border agent UDP port and the port on host. And then it does bidrectional UDP forwarding:
Dependencies::UdpForward
will be implemented as OT UDP forwarding to OT core.SendToPeer
will send a UDP packet to the remote peer using the local host port (that maps to OT border agent port) as the source port.The module hasn't been integrated with the application and put in use. This PR adds a unit test for the module.
This module can also be used for other cases.