ua_mdns_internal.h 1.7 KB

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