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
[in]ip_version

- IP version 4: IPv4 6: IPv6

[in]url_name

- Pointer to the domain name to resolve IP address

[in]primary_server_address

- IP address of the DNS server. This parameter is optional if module gets the DNS server address using DHCP. If DNS server address is obtained using DHCP, in that case this param should be NULL.

[in]secondary_server_address

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

[in]dns_query_resp

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

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

  • DNS mode is determined by the value of primary_server_address. If NULL, then DNS mode is set to DHCP (1), else it is set to Static IP Address (0).


Definition at line 38 of file network/protocols/rsi_dns.c

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(*dns_update_rsp_handler)(uint16_t status))

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

Parameters
[in]ip_version

- IP version 4: IPv4 6: IPv6

[in]zone_name

- Pointer to a zone name and to update host name

[in]host_name

- HOST name of the domain

[in]server_address

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

[in]ttl

- Time to live value of the host name.

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


Definition at line 230 of file network/protocols/rsi_dns.c