ua_mdns_internal.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. *
  5. * Copyright 2017 (c) Stefan Profanter, fortiss GmbH
  6. */
  7. #ifndef UA_MDNS_INTERNAL_H
  8. #define UA_MDNS_INTERNAL_H
  9. #ifdef UA_ENABLE_DISCOVERY_MULTICAST
  10. /**
  11. * TXT record:
  12. * [servername]-[hostname]._opcua-tcp._tcp.local. TXT path=/ caps=NA,DA,...
  13. *
  14. * A/AAAA record for all ip addresses:
  15. * [servername]-[hostname]._opcua-tcp._tcp.local. A [ip].
  16. * [hostname]. A [ip].
  17. */
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21. #include "mdnsd/libmdnsd/mdnsd.h"
  22. void mdns_record_received(const struct resource *r, void *data);
  23. void mdns_create_txt(UA_Server *server, const char *fullServiceDomain,
  24. const char *path, const UA_String *capabilites,
  25. const size_t *capabilitiesSize,
  26. void (*conflict)(char *host, int type, void *arg));
  27. void mdns_set_address_record(UA_Server *server, const char *fullServiceDomain,
  28. const char *localDomain);
  29. mdns_record_t *
  30. mdns_find_record(mdns_daemon_t *mdnsDaemon, unsigned short type,
  31. const char *host, const char *rdname);
  32. void
  33. UA_Discovery_update_MdnsForDiscoveryUrl(UA_Server *server, const UA_String *serverName,
  34. const UA_MdnsDiscoveryConfiguration *mdnsConfig,
  35. const UA_String *discoveryUrl,
  36. UA_Boolean isOnline, UA_Boolean updateTxt);
  37. #ifdef __cplusplus
  38. } // extern "C"
  39. #endif
  40. #endif // UA_ENABLE_DISCOVERY_MULTICAST
  41. #endif //UA_MDNS_INTERNAL_H