APIs#
This section provides a reference to the Multicast Domain Name System (mDNS) API including functions, data types, and constants.
Modules#
Typedefs#
mDNS event handler
Functions#
Initialize mDNS instance.
De-initialize mDNS instance.
Add network interface to mDNS instance.
Remove network interface to mDNS instance.
Register a service in mDNS instance.
Unregister a service from mDNS instance.
Update service message of a service in mDNS instance.
Discover services using mDNS instance.
Enumeration Documentation#
sl_mdns_event_t#
sl_mdns_event_t
mDNS events
Enumerator | |
---|---|
SL_MDNS_SERVICE_DISCOVERED_EVENT | Event for mDNS service discovery. (Currently not supported.) |
29
of file components/service/mdns/inc/sl_mdns.h
sl_mdns_protocol_t#
sl_mdns_protocol_t
mDNS protocol
Enumerator | |
---|---|
SL_MDNS_PROTO_PHY | Run mDNS using ethernet frames. (Not supported in offload mode.) |
SL_MDNS_PROTO_UDP | Run mDNS using UDP. |
34
of file components/service/mdns/inc/sl_mdns.h
Typedef Documentation#
sl_mdns_t#
typedef struct sl_mdns_s sl_mdns_t
mDNS instance handle
93
of file components/service/mdns/inc/sl_mdns.h
sl_mdns_event_handler_t#
sl_mdns_event_handler_t )(sl_mdns_t *mdns, sl_mdns_event_t event, void *data)
mDNS event handler
[in] | mdns | mDNS instance handle of type sl_mdns_t. |
[in] | event | mDNS event of type sl_mdns_event_t. |
[in] | data | Data pointer containing data structure of corresponding to corresponding event of type sl_mdns_event_t. |
102
of file components/service/mdns/inc/sl_mdns.h
Function Documentation#
sl_mdns_init#
sl_status_t sl_mdns_init (sl_mdns_t * mdns, const sl_mdns_configuration_t * config, sl_mdns_event_handler_t event_handler)
Initialize mDNS instance.
[in] | mdns | mDNS instance handle of type sl_mdns_t. This cannot be modified by the application after this API call. |
[in] | config | Valid pointer to mDNS configuration structure of type sl_mdns_configuration_t. This value cannot be null. |
[in] | event_handler | Event handler of type sl_mdns_event_handler_t for receiving asynchronous events. |
Returns
sl_status_t. See https://docs.silabs.com/gecko-platform/latest/platform-common/status for details.
Note
This API needs to be called before calling any other mDNS API
sl_mdns_event_handler_t currently not supported. User should pass NULL for event_handler.
126
of file components/service/mdns/inc/sl_mdns.h
sl_mdns_deinit#
sl_status_t sl_mdns_deinit (sl_mdns_t * mdns)
De-initialize mDNS instance.
[in] | mdns | mDNS instance handle of type sl_mdns_t. |
Returns
sl_status_t. See https://docs.silabs.com/gecko-platform/latest/platform-common/status for details.
135
of file components/service/mdns/inc/sl_mdns.h
sl_mdns_add_interface#
sl_status_t sl_mdns_add_interface (sl_mdns_t * mdns, sl_net_interface_t interface)
Add network interface to mDNS instance.
[in] | mdns | mDNS instance handle of type sl_mdns_t. |
[in] | interface | Network interface of type sl_net_interface_t that needs to be added to mDNS instance. |
Returns
sl_status_t. See https://docs.silabs.com/gecko-platform/latest/platform-common/status for details.
145
of file components/service/mdns/inc/sl_mdns.h
sl_mdns_remove_interface#
sl_status_t sl_mdns_remove_interface (sl_mdns_t * mdns, sl_net_interface_t interface)
Remove network interface to mDNS instance.
[in] | mdns | mDNS instance handle of type sl_mdns_t. |
[in] | interface | Network interface of type sl_net_interface_t that needs to be removed from mDNS instance. |
(Currently not supported.) Returns
sl_status_t. See https://docs.silabs.com/gecko-platform/latest/platform-common/status for details.
155
of file components/service/mdns/inc/sl_mdns.h
sl_mdns_register_service#
sl_status_t sl_mdns_register_service (sl_mdns_t * mdns, sl_net_interface_t interface, sl_mdns_service_t * service)
Register a service in mDNS instance.
[in] | mdns | mDNS instance handle of type sl_mdns_t. |
[in] | interface | Network interface of type sl_net_interface_t to which service needed to be added to mDNS instance. |
[in] | service | Valid pointer to mDNS service configuration structure of type sl_mdns_service_t . This value cannot be null. |
Returns
sl_status_t. See https://docs.silabs.com/gecko-platform/latest/platform-common/status for details.
166
of file components/service/mdns/inc/sl_mdns.h
sl_mdns_unregister_service#
sl_status_t sl_mdns_unregister_service (sl_mdns_t * mdns, sl_mdns_service_query_t * service_query)
Unregister a service from mDNS instance.
[in] | mdns | mDNS instance handle of type sl_mdns_t |
[in] | service_query | Valid pointer to mDNS service query structure of type sl_mdns_service_query_t . This value cannot be null. |
(Currently not supported.) Returns
sl_status_t. See https://docs.silabs.com/gecko-platform/latest/platform-common/status for details.
176
of file components/service/mdns/inc/sl_mdns.h
sl_mdns_update_service_message#
sl_status_t sl_mdns_update_service_message (sl_mdns_t * mdns, sl_mdns_service_query_t * service_query, const char * message, uint32_t message_length)
Update service message of a service in mDNS instance.
[in] | mdns | mDNS instance handle of type sl_mdns_t. |
[in] | service_query | Valid pointer to mDNS service query structure of type sl_mdns_service_query_t. This value cannot be null. |
[in] | message | Valid pointer to a buffer containing service message string . This value cannot be null. |
[in] | message_length | Length of the message buffer. |
(Currently not supported.) Returns
sl_status_t. See https://docs.silabs.com/gecko-platform/latest/platform-common/status for details.
188
of file components/service/mdns/inc/sl_mdns.h
sl_mdns_discover_service#
sl_status_t sl_mdns_discover_service (sl_mdns_t * mdns, sl_mdns_service_query_t * service_query)
Discover services using mDNS instance.
[in] | mdns | mDNS instance handle of type sl_mdns_t |
[in] | service_query | Valid pointer to mDNS service query structure of type sl_mdns_service_query_t . This value cannot be null. |
(Currently not supported.) Returns
sl_status_t. See https://docs.silabs.com/gecko-platform/latest/platform-common/status for details.
201
of file components/service/mdns/inc/sl_mdns.h