- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I want to find IP address of given website, using Wiced DNS API or any other way.
I have CYW943907AEVAL1F Evaluation Kit User Guide.
Could any one please help me in this ?
Solved! Go to Solution.
- Labels:
-
ispn:38946:1:0
-
l1:314:1:0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please refer the httpbin_org snip for example of resolving IP address of a given host.
#define SERVER_HOST "www.httpbin.org"
wiced_ip_address_t ip_address;
wiced_hostname_lookup( SERVER_HOST, &ip_address, DNS_TIMEOUT_MS, WICED_STA_INTERFACE );
WPRINT_APP_INFO( ( "%s is at %u.%u.%u.%u\n", SERVER_HOST,
(uint8_t)(GET_IPV4_ADDRESS(ip_address) >> 24),
(uint8_t)(GET_IPV4_ADDRESS(ip_address) >> 16),
(uint8_t)(GET_IPV4_ADDRESS(ip_address) >> 8),
(uint8_t)(GET_IPV4_ADDRESS(ip_address) >> 0) ) );
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please refer the httpbin_org snip for example of resolving IP address of a given host.
#define SERVER_HOST "www.httpbin.org"
wiced_ip_address_t ip_address;
wiced_hostname_lookup( SERVER_HOST, &ip_address, DNS_TIMEOUT_MS, WICED_STA_INTERFACE );
WPRINT_APP_INFO( ( "%s is at %u.%u.%u.%u\n", SERVER_HOST,
(uint8_t)(GET_IPV4_ADDRESS(ip_address) >> 24),
(uint8_t)(GET_IPV4_ADDRESS(ip_address) >> 16),
(uint8_t)(GET_IPV4_ADDRESS(ip_address) >> 8),
(uint8_t)(GET_IPV4_ADDRESS(ip_address) >> 0) ) );