openthread icon indicating copy to clipboard operation
openthread copied to clipboard

[dnssd-server] implement DNS-SD discovery proxy functionality in core

Open abtink opened this issue 2 years ago • 1 comments

This commit implements a generic discovery proxy in the DNS-SD server. It uses a set of newly added otPlatDnssd platform DNS-SD(mDNS) APIs to start or stop browsers, SRV/TXT resolvers, and IPv6/IPv4 address resolvers. These APIs closely match the native OpenThread mDNS implementation.

OpenThread DNS-SD's existing QueryCallback mechanism, enabling customized discovery proxy implementations, remains supported.

This commit includes a comprehensive unit test. This test validates the discovery proxy's behavior, covering: standard use cases, request timeout, s hared resolver/browser usage for multiple queries with the same name, filtering of invalid addresses, and various edge cases.

abtink avatar Apr 19 '24 23:04 abtink

Size Report of OpenThread

Merging #10050 into main(3873c6fcd5a8a9dd01b71e8efe32ef5dc7923bb1).

name branch text data bss total
ot-cli-ftd main 466528 856 66332 533716
#10050 466528 856 66332 533716
+/- 0 0 0 0
ot-ncp-ftd main 435396 760 61544 497700
#10050 435396 760 61544 497700
+/- 0 0 0 0
libopenthread-ftd.a main 235693 95 40278 276066
#10050 235693 95 40278 276066
+/- 0 0 0 0
libopenthread-cli-ftd.a main 57589 0 8075 65664
#10050 57589 0 8075 65664
+/- 0 0 0 0
libopenthread-ncp-ftd.a main 31863 0 5916 37779
#10050 31863 0 5916 37779
+/- 0 0 0 0
ot-cli-mtd main 364528 760 51204 416492
#10050 364528 760 51204 416492
+/- 0 0 0 0
ot-ncp-mtd main 347012 760 46432 394204
#10050 347012 760 46432 394204
+/- 0 0 0 0
libopenthread-mtd.a main 157904 0 25166 183070
#10050 157904 0 25166 183070
+/- 0 0 0 0
libopenthread-cli-mtd.a main 39812 0 8059 47871
#10050 39812 0 8059 47871
+/- 0 0 0 0
libopenthread-ncp-mtd.a main 24743 0 5916 30659
#10050 24743 0 5916 30659
+/- 0 0 0 0
ot-cli-ftd-br main 549872 864 131172 681908
#10050 549888 864 131172 681924
+/- +16 0 0 +16
libopenthread-ftd-br.a main 322994 100 105094 428188
#10050 323587 100 105094 428781
+/- +593 0 0 +593
libopenthread-cli-ftd-br.a main 71450 0 8099 79549
#10050 71450 0 8099 79549
+/- 0 0 0 0
ot-rcp main 62280 564 20604 83448
#10050 62280 564 20604 83448
+/- 0 0 0 0
libopenthread-rcp.a main 9542 0 5052 14594
#10050 9542 0 5052 14594
+/- 0 0 0 0
libopenthread-radio.a main 19042 0 214 19256
#10050 19042 0 214 19256
+/- 0 0 0 0

size-report[bot] avatar Apr 19 '24 23:04 size-report[bot]

Hi @abtink, the name of the commit has changed to "[mle] allow appending pending timestamp TLV with zero seconds" I guess it was by mistake and you just did a rebase of the branch.

On the other hand, is there anything else missing to merge this PR? It looks like it has all the approvals.

marius-preda avatar Jun 07 '24 09:06 marius-preda

Hi @abtink, the name of the commit has changed to "[mle] allow appending pending timestamp TLV with zero seconds" I guess it was by mistake and you just did a rebase of the branch.

Thanks @marius-preda for noticing the commit message change. I am not sure how it happened. I just rebased it recently. It is interesting that it was changed to [mle] allow appending pending timestamp TLV with zero seconds (#10327) (which icnlude the (#10327) number which is auto-added by GitHub when a PR is merged. Seems like somehow git may have messed it up?

abtink avatar Jun 07 '24 18:06 abtink

Hi @abtink, the name of the commit has changed to "[mle] allow appending pending timestamp TLV with zero seconds" I guess it was by mistake and you just did a rebase of the branch.

Thanks @marius-preda for noticing the commit message change. I am not sure how it happened. I just rebased it recently. It is interesting that it was changed to [mle] allow appending pending timestamp TLV with zero seconds (#10327) (which icnlude the (#10327) number which is auto-added by GitHub when a PR is merged. Seems like somehow git may have messed it up?

@abtink , indeed quite strange. Now it looks ok. Should we merge this PR then?

marius-preda avatar Jun 10 '24 18:06 marius-preda