-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[dnssd-server] implement DNS-SD discovery proxy functionality in core #10050
base: main
Are you sure you want to change the base?
Conversation
Size Report of OpenThread
|
c09d867
to
8bf2e5e
Compare
include/openthread/mdns.h
Outdated
* Refer to `otPlatDnssdAddressResolver` for documentation of member fields and `otMdnsStartIp6Resolver()` or | ||
* `otMdnsStartIp4Resolver()` for how they are used. |
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.
otMdnsStartIp6Resolver --> otMdnsStartIp6AddressResolver
otMdnsStartIp4Resolver --> otMdnsStartIp4AddressResolver
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.
Fixed in new push. Thanks.
include/openthread/platform/dnssd.h
Outdated
typedef struct otPlatDnssdBrowseResult otPlatDnssdBrowseResult; | ||
typedef struct otPlatDnssdSrvResult otPlatDnssdSrvResult; | ||
typedef struct otPlatDnssdTxtResult otPlatDnssdTxtResult; | ||
typedef struct otPlatDnssdAddressResult otPlatDnssdAddressResult; |
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.
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.
In the new push, I've re-arranged the type definitions and removed these.
These were intended as forward declarations so we can define the types in a more intuitive sequence. The challenge is that the Browser/Resolver
types reference their corresponding Callback
types, which in turn reference the Result
type. We now define Result
first, followed by Callback
, and finally the Browser/Resolver
structures.
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.
Thanks for rearranging, everything comes through now 👍
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.
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.