Separate mDNS related code from discovery module to enable easier integration
of different mDNS implementations. Add new API functions and make other functions
static to reflect their use in the mDNS module only.
The libmdnsd implementation uses an ip entry for the server and selects the
interface to be used for establishing the connection. This is not required for
avahi as the avahi daemon is normally configured externally. Make the server
configuration of the mDNS IP list and the interface dependent on the use of
libmdnsd.
Signed-off-by: Vasilij Strassheim <vasilij.strassheim@linutronix.de>
Currently an IP 42.42.42.42 is set and the comment suggests that
the network stack resets this to 0.0.0.0 in server_multicast.c.
Just set 0.0.0.0 directly.
Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com>
server_multicast.c: remove "NA" from server capabilities and
only keep "LDS" as server capability.
Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com>
* CI: Added support for arguments in the examples workflow
* Fixed memory leaks in examples. Add ApplicationUri
* Arguments and server/client for all examples. Small fixes
* outsource/blacklist some examples. Fix memory leak in example.
* Remove Shlex. Remove false UA_Client_delete
* Removed raw examples from ci. Fix leak in client.c and mqtt_publish
* Fix memory leak in mqtt subscriber
Until 1.2 it was possible to set Port address dynamically but in version 1.3
it is not possible. Setting it to 0 will resolve to 4840, which will conflict
with port assinged by default to LDS server in the example. Also the comment is
misleading in the example. Therefore the comment is deleted and a fixed port
4841 is assinged to register and multicast server examples.
Signed-off-by: Muddasir Shakil <muddasir.shakil@linutronix.de>
Signed-off-by: Muddasir Shakil <muddasir.shakil@linutronix.de>
This commit drops the 'ua_' prefix and changes the public includes
to the form `#include <open62541/server.h>` instead of the old
`#include <ua_server.h>`
Make use of EXIT_SUCCESS and EXIT_FAILURE from stdlib.h.
The previous approach of returning a value from UA_StatusCode
was often broken as an exit code can (portably) only be between 0 and 125.
Registering server complains that the port 4840 is already in use (as the LDS is
running there).
./discovery_server_register
[...]
[2019-02-04 22:45:20.070 (UTC+0100)] info/userland Node read the.answer
[2019-02-04 22:45:20.070 (UTC+0100)] info/userland read value 42
[2019-02-04 22:45:20.070 (UTC+0100)] warn/network Error binding a server socket: Address already in use
[2019-02-04 22:45:20.070 (UTC+0100)] warn/network Error binding a server socket: Address already in use
[2019-02-04 22:45:20.070 (UTC+0100)] info/network TCP network layer listening on opc.tcp://prokyon:4840/
This commit adds asynchronous services to open62541 on client side
* Asynchronous service (highlevel read/write) are available through the API that is defined in
ua_client_highlevel_async.h
* Besides the services, the connection procedure is asynchronous as well.
* A client Application that uses the asynchronous API
adds requests by calling an asynchronous service (e.g., UA_Client_sendAsyncReadRequest(), UA_Client_sendAsyncBrowseRequest() )
checks for response with UA_Client_run_iterate() repeatedly
and processes the responses with user-defined callbacks
Since client encryption landed into master, this was an open todo for
a long time. The multicast server example was updated to use the encryption
client.
Fixes#938
The LocaleIds was formatted with an underscore as separator between
the language and region. According to the OPC UA specification the
language and the region shall be separated by a hyphen.
Also removed LocaleId in those cases where a specific language is not
addressed, i.e. when presenting a type name.