Skip to content
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] implement otPlatDnssd APIs #2038

Closed
wants to merge 2 commits into from

Conversation

abtink
Copy link
Member

@abtink abtink commented Sep 25, 2023

This commit adds DnssPlatform module which implements OpenThread platform APIs otPlatDnssd for registering and unregistering host, service, and key items. This commit also adds a new config OTBR_DNSSD_PLAT which enables the new module and ensure its related OT core module are enabled (such as advertising-proxy).


This commit adds new methods in `Mdns::Publisher` to publish or
unpublish a key record for a given (host or service instance) name.
New methods are implemented for both MDNSResponder and Avahi
sub-classes.

In the MDNSResponder implementation, if a key registration is for a
service instance name matching a service registration,
`DNSServiceAddRecord()` is used to associate the new record with the
service. Otherwise, `DNSServiceRegisterRecord()` is used to register
the KEY record on its own. The implementation handles cases when
related service and key registrations are updated or unregistered.

This commit also simplifies and updates the `test/mdns/main.cpp`
tests, adding a common `Test()` function that takes a function pointer
to run the test and handles all common boilerplate code, as well as
adding a common callback to check the registration result. New test
cases are also added to check key registration, registering keys on
their own, and registering keys and services in different orders.
This commit adds `DnssPlatform` module which implements OpenThread
platform APIs `otPlatDnssd` for registering and unregistering
host, service, and key items. This commit also adds a new config
`OTBR_DNSSD_PLAT` which enables the new module and ensure its related
OT core module are enabled (such as advertising-proxy).
@abtink
Copy link
Member Author

abtink commented Sep 27, 2023

Closing this in favor #2042.

@abtink abtink closed this Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant