14#ifndef UA_DISCOVERY_MANAGER_H_
15#define UA_DISCOVERY_MANAGER_H_
23#ifdef UA_ENABLE_DISCOVERY
45#ifdef UA_ENABLE_DISCOVERY_MULTICAST
51typedef struct serverOnNetwork_list_entry {
52 LIST_ENTRY(serverOnNetwork_list_entry) pointers;
53 UA_ServerOnNetwork serverOnNetwork;
59} serverOnNetwork_list_entry;
61#define SERVER_ON_NETWORK_HASH_SIZE 1000
62typedef struct serverOnNetwork_hash_entry {
63 serverOnNetwork_list_entry* entry;
64 struct serverOnNetwork_hash_entry* next;
65} serverOnNetwork_hash_entry;
76# ifdef UA_ENABLE_DISCOVERY_MULTICAST
84 LIST_HEAD(, serverOnNetwork_list_entry) serverOnNetwork;
90 struct serverOnNetwork_hash_entry* serverOnNetworkHash[SERVER_ON_NETWORK_HASH_SIZE];
92 UA_Server_serverOnNetworkCallback serverOnNetworkCallback;
93 void* serverOnNetworkCallbackData;
95#if UA_MULTITHREADING >= 100
109#ifdef UA_ENABLE_DISCOVERY_MULTICAST
114 const UA_MdnsDiscoveryConfiguration *mdnsConfig,
118void mdns_record_received(
const struct resource *r,
void *data);
120void mdns_create_txt(
UA_Server *server,
const char *fullServiceDomain,
121 const char *path,
const UA_String *capabilites,
122 const size_t capabilitiesSize,
123 void (*conflict)(
char *host,
int type,
void *arg));
125void mdns_set_address_record(
UA_Server *server,
126 const char *fullServiceDomain,
127 const char *localDomain);
130mdns_find_record(
mdns_daemon_t *mdnsDaemon,
unsigned short type,
131 const char *host,
const char *rdname);
136void startMulticastDiscoveryServer(
UA_Server *server);
138void stopMulticastDiscoveryServer(
UA_Server *server);
147} UA_DiscoveryProtocol;
151UA_Discovery_multicastQuery(
UA_Server* server);
157 const UA_String *path,
const UA_DiscoveryProtocol protocol,
159 const size_t capabilitiesSize,
164UA_DiscoveryManager_addEntryToServersOnNetwork(
UA_Server *server,
const char *fqdnMdnsRecord,
const char *serverName,
165 size_t serverNameLen,
struct serverOnNetwork_list_entry **addedEntry);
175UA_DiscoveryManager_removeEntryFromServersOnNetwork(
UA_Server *server,
const char *fqdnMdnsRecord,
const char *serverName,
176 size_t serverNameLen);
#define _UA_BEGIN_DECLS
#undef UA_DEBUG_DUMP_PKGS
struct mdns_record mdns_record_t
Record entry.
struct mdns_daemon mdns_daemon_t
Main daemon data.
#define LIST_HEAD(name, type)
void(* UA_Server_registerServerCallback)(const UA_RegisteredServer *registeredServer, void *data)
Callback for RegisterServer.
UA_Double default_interval
char * discovery_server_url
struct UA_Client * client
UA_Server_registerServerCallback registerServerCallback
LIST_HEAD(, periodicServerRegisterCallback_entry) periodicServerRegisterCallbacks
LIST_HEAD(, registeredServer_list_entry) registeredServers
size_t registeredServersSize
void * registerServerCallbackData
struct PeriodicServerRegisterCallback * callback
LIST_ENTRY(periodicServerRegisterCallback_entry) pointers
This Source Code Form is subject to the terms of the Mozilla Public License, v.
UA_RegisteredServer registeredServer
LIST_ENTRY(registeredServer_list_entry) pointers
_UA_BEGIN_DECLS typedef bool UA_Boolean
This Source Code Form is subject to the terms of the Mozilla Public License, v.
void UA_DiscoveryManager_init(UA_DiscoveryManager *dm, UA_Server *server)
_UA_BEGIN_DECLS struct registeredServer_list_entry registeredServer_list_entry
This Source Code Form is subject to the terms of the Mozilla Public License, v.
struct periodicServerRegisterCallback_entry periodicServerRegisterCallback_entry
void UA_DiscoveryManager_clear(UA_DiscoveryManager *dm, UA_Server *server)
void UA_Discovery_cleanupTimedOut(UA_Server *server, UA_DateTime nowMonotonic)
Checks if a registration timed out and removes that registration.