DNS#

Functions#

int32_t
rsi_dns_req(uint8_t ip_version, uint8_t *url_name, uint8_t *primary_server_address, uint8_t *secondary_server_address, rsi_rsp_dns_query_t *dns_query_resp, uint16_t length)

Query the IP address of a given domain name. This is a blocking API.

int32_t
rsi_dns_update(uint8_t ip_version, uint8_t *zone_name, uint8_t *host_name, uint8_t *server_address, uint16_t ttl, void(*dns_update_rsp_handler)(uint16_t status))

Update the host name for a given host and zone name. This is non-blocking API.

Function Documentation#

rsi_dns_req#

int32_t rsi_dns_req (uint8_t ip_version, uint8_t * url_name, uint8_t * primary_server_address, uint8_t * secondary_server_address, rsi_rsp_dns_query_t * dns_query_resp, uint16_t length)

Query the IP address of a given domain name. This is a blocking API.

Parameters
TypeDirectionArgument NameDescription
uint8_t[in]ip_version

- IP version 4: IPv4 6: IPv6

uint8_t *[in]url_name

- Pointer to the domain name to resolve IP address

uint8_t *[in]primary_server_address

- IP address of the DNS server. This parameter is optional if module get DNS server address using DHCP.

uint8_t *[in]secondary_server_address

- IP address of the secondary DNS server. In case of no secondary DNS server, IP is NULL.

rsi_rsp_dns_query_t *[in]dns_query_resp

- Pointer to hold DNS query results. This is an out parameter.

uint16_t[in]length

- Length of the resultant buffer.

Returns

  • 0 - Success Negative Value - Failure

Note

  • Refer to Error Codes section for the description of the above error codes Error Codes.


rsi_dns_update#

int32_t rsi_dns_update (uint8_t ip_version, uint8_t * zone_name, uint8_t * host_name, uint8_t * server_address, uint16_t ttl, void(*)(uint16_t status) dns_update_rsp_handler)

Update the host name for a given host and zone name. This is non-blocking API.

Parameters
TypeDirectionArgument NameDescription
uint8_t[in]ip_version

- IP version 4: IPv4 6: IPv6

uint8_t *[in]zone_name

- Pointer to a zone name and to update host name

uint8_t *[in]host_name

- HOST name of the domain

uint8_t *[in]server_address

- IP address of the DNS server. This parameter is optional if module get DNS server address using DHCP.

uint16_t[in]ttl

- Time to live value of the host name.

void(*)(uint16_t status)[in]dns_update_rsp_handler

- Callback function called by driver on reception of DNS update response.

Returns

  • 0 - Success Negative Value - Failure

Note

  • Refer to Error Codes section for the description of the above error codes Error Codes.