ua_mdns_internal.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /* This Source Code Form is subject to the terms of the Mozilla Public
  2. * License, v. 2.0. If a copy of the MPL was not distributed with this
  3. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  4. #ifndef UA_MDNS_INTERNAL_H
  5. #define UA_MDNS_INTERNAL_H
  6. #ifdef UA_ENABLE_DISCOVERY_MULTICAST
  7. /**
  8. * TXT record:
  9. * [servername]-[hostname]._opcua-tcp._tcp.local. TXT path=/ caps=NA,DA,...
  10. *
  11. * A/AAAA record for all ip addresses:
  12. * [servername]-[hostname]._opcua-tcp._tcp.local. A [ip].
  13. * [hostname]. A [ip].
  14. */
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18. #include "mdnsd/libmdnsd/mdnsd.h"
  19. void mdns_record_received(const struct resource *r, void *data);
  20. void mdns_create_txt(UA_Server *server, const char *fullServiceDomain,
  21. const char *path, const UA_String *capabilites,
  22. const size_t *capabilitiesSize,
  23. void (*conflict)(char *host, int type, void *arg));
  24. void mdns_set_address_record(UA_Server *server, const char *fullServiceDomain,
  25. const char *localDomain);
  26. mdns_record_t *
  27. mdns_find_record(mdns_daemon_t *mdnsDaemon, unsigned short type,
  28. const char *host, const char *rdname);
  29. void
  30. UA_Discovery_update_MdnsForDiscoveryUrl(UA_Server *server, const UA_String *serverName,
  31. const UA_MdnsDiscoveryConfiguration *mdnsConfig,
  32. const UA_String *discoveryUrl,
  33. UA_Boolean isOnline, UA_Boolean updateTxt);
  34. #ifdef __cplusplus
  35. } // extern "C"
  36. #endif
  37. #endif // UA_ENABLE_DISCOVERY_MULTICAST
  38. #endif //UA_MDNS_INTERNAL_H