forked from openthread/ot-br-posix
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[mdns] add
PublishKey()
& UnpublishKey()
methods
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.
- Loading branch information
Showing
8 changed files
with
818 additions
and
292 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.