|
Open Model Railroad Network (OpenMRN)
|
#include "os/MDNS.hxx"Go to the source code of this file.
Macros | |
| #define | MDNS_DEBUG 0 |
| Turn on/off debug print statements. | |
Functions | |
| void | mdns_publish (const char *name, const char *service, uint16_t port) |
| Publish an mDNS name. | |
| void | mdns_unpublish (const char *name, const char *service) |
| Unpublish an mDNS name. | |
| int | mdns_lookup (const char *service, struct addrinfo *hints, struct addrinfo **addr) |
| Lookup an mDNS name. | |
| void | mdns_scan (const char *service) |
| Start continuous scan for mDNS service name. | |
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
A simple abstraction to publish/lookup mDNS sevices.
Definition in file MDNS.cxx.
Lookup an mDNS name.
| service | servicename to lookup |
| hints | hints about limiting the types of services that will respond |
| addrinfo | structure containing one or more service addressess that match the enquery, else nullptr if no matching service found |
| void mdns_publish | ( | const char * | name, |
| const char * | service, | ||
| uint16_t | port | ||
| ) |
| void mdns_scan | ( | const char * | service | ) |