<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>How can I do domain to ip address in nrf9160</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/74097/how-can-i-do-domain-to-ip-address-in-nrf9160</link><description>int i; int socketfd; unsigned int timeout; struct sockaddr_in server; struct hostent* he; struct in_addr** addr_list; 
 socketfd = socket(AF_INET , SOCK_STREAM , 0); 
 //domain name to ip he = gethostbyname(ip); addr_list = (struct in_addr**)he-&amp;gt;h_addr_list;</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 21 Apr 2021 10:21:04 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/74097/how-can-i-do-domain-to-ip-address-in-nrf9160" /><item><title>RE: How can I do domain to ip address in nrf9160</title><link>https://devzone.nordicsemi.com/thread/306054?ContentTypeID=1</link><pubDate>Wed, 21 Apr 2021 10:21:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dce1b24b-286e-4793-a994-0c62759b567a</guid><dc:creator>Hakon</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;you can use &lt;a href="https://github.com/nrfconnect/sdk-nrfxlib/blob/master/nrf_modem/include/nrf_socket.h#L1665"&gt;getaddrinfo()&lt;/a&gt; to do host name to ip address conversion. That&amp;#39;s the customary way as far as I know.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>