MDNSD#

Functions#

int32_t
rsi_mdnsd_init(uint8_t ip_version, uint16_t ttl, uint8_t *host_name)

Initialize the MDNSD service in device. It creates MDNS daemon. This is a blocking API.

int32_t
rsi_mdnsd_register_service(uint16_t port, uint16_t ttl, uint8_t more, uint8_t *service_ptr_name, uint8_t *service_name, uint8_t *service_text)

Add a MDNSD service. This is a blocking API.

int32_t

Delete the MDNSD service. This is a blocking API.

Function Documentation#

rsi_mdnsd_init#

int32_t rsi_mdnsd_init (uint8_t ip_version, uint16_t ttl, uint8_t * host_name)

Initialize the MDNSD service in device. It creates MDNS daemon. This is a blocking API.

Parameters
[in]ip_version

- Select the IP version. 4 – to select IPv4, 6 – to select IPv6

[in]ttl

- Time to live in seconds for which service should be active

[in]host_name

- Host name that is used as host name in Type A record.

Returns

  • 0 - Success

  • Negative value - Failure

Note


Definition at line 34 of file network/protocols/rsi_mdnsd.c

rsi_mdnsd_register_service#

int32_t rsi_mdnsd_register_service (uint16_t port, uint16_t ttl, uint8_t more, uint8_t * service_ptr_name, uint8_t * service_name, uint8_t * service_text)

Add a MDNSD service. This is a blocking API.

Parameters
[in]port

- Port number on which service should be added.

[in]ttl

- Time to live. This is time in seconds for which service should be active

[in]more

- This byte should be set to '1' when there are more services to add. 0 - This is last service, starts MDNS service. 1 - Still more services will be added.

[in]service_ptr_name

- Name to be added in Type-PTR record

[in]service_name

- Name to be added in Type-SRV record (service name)

[in]service_text

- Text field to be added in Type-TXT record

Returns

  • 0 - Success

  • Negative value - Failure

Note

  • Precondition - rsi_config_ipaddress() API needs to be called before this API.

  • Currently, only one service registration is supported


Definition at line 140 of file network/protocols/rsi_mdnsd.c

rsi_mdnsd_deinit#

int32_t rsi_mdnsd_deinit (void )

Delete the MDNSD service. This is a blocking API.

Parameters
[in]

Returns

  • 0 - Success

  • Negative value - Failure

Note


Definition at line 254 of file network/protocols/rsi_mdnsd.c