MDNSD#

Functions#

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

Initialize the MDNSD service in WiSeConnect 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 service/start service discovery.This is a blocking API.

int32_t
rsi_mdnsd_register_service(uint16_t port, uint16_t ttl, uint8_t *type, uint8_t *sub_type, uint8_t *service_name, uint8_t *service_text)

Add a service/start service discovery.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 WiSeConnect device.It creates MDNS daemon. This is a blocking API.

Parameters
TypeDirectionArgument NameDescription
uint8_t[in]ip_version

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

uint16_t[in]ttl

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

uint8_t *[in]host_name

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

Returns

  • 0 - Success
    Negative value - Failure


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 service/start service discovery.This is a blocking API.

Parameters
TypeDirectionArgument NameDescription
uint16_t[in]port

- Port number on which service should be added.

uint16_t[in]ttl

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

uint8_t[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.

uint8_t *[in]service_ptr_name

- Name to be added in Type-PTR record

uint8_t *[in]service_name

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

uint8_t *[in]service_text

- Text field to be added in Type-TXT record

Returns

  • 0 - Success
    Negative value - Failure

Note

  • Currently, only one service registration is supported


rsi_mdnsd_register_service#

int32_t rsi_mdnsd_register_service (uint16_t port, uint16_t ttl, uint8_t * type, uint8_t * sub_type, uint8_t * service_name, uint8_t * service_text, service_text)

Add a service/start service discovery.This is a blocking API.

Parameters
TypeDirectionArgument NameDescription
uint16_t[in]port

- Port number on which service should be added.

uint16_t[in]ttl

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

uint8_t *[in]type

- 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.

uint8_t *[in]sub_type

- Name to be added in Type field

uint8_t *[in]service_name

- Name to be added in SubType field

uint8_t *[in]service_text

- 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

  • Currently, only one service registration is supported


rsi_mdnsd_deinit#

int32_t rsi_mdnsd_deinit (void )

Delete the MDNSD service. This is a blocking API.

Parameters
TypeDirectionArgument NameDescription
void[in]


Returns

  • 0 - Success
    Negative value - Failure