summaryrefslogtreecommitdiffstats
path: root/rtemsbsd/include/rtems/mdns.h
diff options
context:
space:
mode:
Diffstat (limited to 'rtemsbsd/include/rtems/mdns.h')
-rw-r--r--rtemsbsd/include/rtems/mdns.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/rtemsbsd/include/rtems/mdns.h b/rtemsbsd/include/rtems/mdns.h
index ecf9242b..4abfbfe5 100644
--- a/rtemsbsd/include/rtems/mdns.h
+++ b/rtemsbsd/include/rtems/mdns.h
@@ -40,6 +40,9 @@
extern "C" {
#endif /* __cplusplus */
+/* Private variable, do not touch. Use rtems_mdns_sethostname() instead. */
+extern void (*rtems_mdns_sethostname_handler)(const char *hostname);
+
/**
* @brief Initializes an mDNS resolver instance.
*
@@ -67,6 +70,20 @@ rtems_status_code rtems_mdns_initialize(rtems_task_priority daemon_priority,
*/
mDNS *rtems_mdns_get_instance(void);
+/**
+ * @brief Sets the multi-cast hostname of the mDNS resolver instance.
+ *
+ * In case the mDNS resolver instance is not initialized, then this function
+ * has no effect.
+ *
+ * @param[in] hostname The new multi-cast hostname.
+ */
+static inline void
+rtems_mdns_sethostname(const char *hostname)
+{
+ (*rtems_mdns_sethostname_handler)(hostname);
+}
+
#ifdef __cplusplus
}
#endif /* __cplusplus */