# Can't resolve url with gethostbyname WP7601 R6.1

**URL:** <https://forum.legato.io/t/cant-resolve-url-with-gethostbyname-wp7601-r6-1/2975>\
**Category:** Legato Application Framework\
**Created:** [January 19, 2018, 6:24pm UTC](https://forum.legato.io/t/cant-resolve-url-with-gethostbyname-wp7601-r6-1/2975 "2018-01-19T18:24:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![EvetsMostel](https://avatars.discourse-cdn.com/v4/letter/e/3ab097/32.png) [@EvetsMostel](https://forum.legato.io/u/EvetsMostel)\
**Post date:** [January 19, 2018, 6:24pm UTC](https://forum.legato.io/t/cant-resolve-url-with-gethostbyname-wp7601-r6-1/2975/1 "2018-01-19T18:24:07Z")

</div>

I have a data connection via le\_data\_request. Just for good measure, I keep trying the gethostbyname call every second over a 10 second period. I can’t get it to resolve the name. While the connection is made, I can type in the console window and it resolves fine. Has anyone seen this?

Evets

---

<div class="post-metadata">

**Author:** ![muralinagraj](https://avatars.discourse-cdn.com/v4/letter/m/45deac/32.png) [@muralinagraj](https://forum.legato.io/u/muralinagraj)\
**Post date:** [January 24, 2018, 9:17am UTC](https://forum.legato.io/t/cant-resolve-url-with-gethostbyname-wp7601-r6-1/2975/2 "2018-01-24T09:17:20Z")

</div>

Hi,  
Can you provide the full function call name with which you are trying to resolve the url? When i checked in the legato AF i didn’t find any legato api(function name) by the name **gethostbyname**.

Regards,  
Muralidhara N.

---

<div class="post-metadata">

**Author:** ![EvetsMostel](https://avatars.discourse-cdn.com/v4/letter/e/3ab097/32.png) [@EvetsMostel](https://forum.legato.io/u/EvetsMostel)\
**Post date:** [January 24, 2018, 3:54pm UTC](https://forum.legato.io/t/cant-resolve-url-with-gethostbyname-wp7601-r6-1/2975/3 "2018-01-24T15:54:42Z")

</div>

Thanks for responding.  
gethostbyname(char \*) is a standard C function call, not Legato specific. Like socket, etc. But the issue is that I was using le\_data\_request which is supposed to establish a connection if one isn’t already started and setup routing and DNS servers. Something isn’t quite connected right if that call fails.

Evets

---

<div class="post-metadata">

**Author:** ![gregnietsky](https://avatars.discourse-cdn.com/v4/letter/g/7feea3/32.png) [@gregnietsky](https://forum.legato.io/u/gregnietsky)\
**Post date:** [March 31, 2018, 2:20pm UTC](https://forum.legato.io/t/cant-resolve-url-with-gethostbyname-wp7601-r6-1/2975/4 "2018-03-31T14:20:01Z")

</div>

If its a SRV CNAME or similar record you will not be able to resolve it this way a i use the c-ares lib as used in curl and while not in the sysroot is available on the device image.

---

<div class="post-metadata">

**Author:** ![muralinagraj](https://avatars.discourse-cdn.com/v4/letter/m/45deac/32.png) [@muralinagraj](https://forum.legato.io/u/muralinagraj)\
**Post date:** [September 10, 2018, 7:07am UTC](https://forum.legato.io/t/cant-resolve-url-with-gethostbyname-wp7601-r6-1/2975/5 "2018-09-10T07:07:44Z")

</div>

@EvetsMostel,  
Do you still see the issue or is it resolved?

Regards,  
Muralidhara N.
