aboutsummaryrefslogtreecommitdiffstats
path: root/src/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common.h')
-rw-r--r--src/common.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/common.h b/src/common.h
index 6d5294a..8c3c9d6 100644
--- a/src/common.h
+++ b/src/common.h
@@ -52,11 +52,12 @@ void freeTrustStore (char **paths, size_t size);
* @brief Creates a UA_Server, optionally configured with security policies.
*
* When @p certPath is non-NULL the server is initialized with encryption
- * (certificate, private key, trustlist) and also adds SecurityPolicy#None
- * restricted to discovery services (FindServers, GetEndpoints) so that
- * unencrypted clients can still discover the server. When @p certPath is
- * NULL the server runs with SecurityPolicy#None only (keyPath and trustPaths
- * are ignored). The applicationUri is set in both cases.
+ * (certificate, private key, trustlist). When @p discoveryOnly is true
+ * the server additionally offers SecurityPolicy#None restricted to
+ * discovery services (FindServers, GetEndpoints) so that unencrypted
+ * clients can still discover the server. When @p certPath is NULL the
+ * server runs with SecurityPolicy#None only (keyPath, trustPaths and
+ * discoveryOnly are ignored). The applicationUri is set in both cases.
*
* @param port Server port number.
* @param applicationUri OPC UA application URI.
@@ -64,13 +65,15 @@ void freeTrustStore (char **paths, size_t size);
* @param keyPath Path to private key (.der), or NULL when certPath is NULL.
* @param trustPaths Array of trustlist file paths (may be NULL).
* @param trustSize Number of entries in trustPaths.
+ * @param discoveryOnly When true and certPath is non-NULL, add a None
+ * endpoint restricted to discovery services.
* @param retval Output parameter set to the status code on failure.
* @return A configured UA_Server, or NULL on error.
*/
UA_Server *createServer (UA_UInt16 port, const char *applicationUri,
const char *certPath, const char *keyPath,
char **trustPaths, size_t trustSize,
- UA_StatusCode *retval);
+ UA_Boolean discoveryOnly, UA_StatusCode *retval);
/**
* @brief Parses a log-level name into the corresponding UA_LogLevel value.