lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AW: [lwip-users] DNS for socket API


From: Mathias Zenger
Subject: AW: [lwip-users] DNS for socket API
Date: Tue, 11 Aug 2009 12:27:36 +0200

Hi Simon,

Thanks for the hint. I included the netdb.h file in my application and can
now resolve the functions gethostbyname() and gethostbyname_r().
Unfortunately DNS still doesn't work since I get an ugly compile error for
netdb.c and netdb.h - However, let me first describe what I have tried so
far...

I defined LWIP_DNS in lwipopts.h and set it to 1
(As far as I can see LWIP_COMPAT_SOCKETS is defined and set to 1, too)

Then I had to increase MEMP_NUM_SYS_TIMEOUT to 7 (previuos definition was
6). Obviousely I used to many protocols and therefore got an error in init.c

/* There must be sufficient timeouts, taking into account requirements of
the subsystems. */
#if ((NO_SYS==0) && (MEMP_NUM_SYS_TIMEOUT < (LWIP_TCP + IP_REASSEMBLY +
LWIP_ARP + (2*LWIP_DHCP) + LWIP_AUTOIP + LWIP_IGMP + LWIP_DNS +
PPP_SUPPORT)))
  #error "MEMP_NUM_SYS_TIMEOUT is too low to accomodate all required
timeouts"
#endif

This would probably not be necessary since I only want to use UDP, DHCP,
IGMP and DNS with the socket API in my application. I guess I could set
LWIP_TCP to 0(?)

In netdb.c I get some warnings for implicit declarations of strlen(),
memcpy() and memset(). This probably could indicate a missing string.h
include.
The error in netdb.c says 'conflicting types for lwip_gethostbyname_r'. In
netdb.h I get the error messages 'previous declaration of
lwip_gethostbyname_r was here' and 'expected declaration specifiers or '...'
before size_t'

Would be grateful for your help. Thank you.
Best regards,
Mathias










-----Urspr√ľngliche Nachricht-----
Von: address@hidden
[mailto:address@hidden Auftrag
von address@hidden
Gesendet: Sonntag, 9. August 2009 11:40
An: Mailing list for lwIP users
Betreff: Re: [lwip-users] DNS for socket API


Did you try the file netdb.h/.c (LWIP_COMPAT_SOCKETS must be set to 1)?

Simon


Mathias Zenger wrote:
> Hi,
>
> I am a bit confused! Is DNS supported for the sockets API or not? (Version
> 1.3.0 stable). First of all I couldn't find the LWIP_DNS definition in
> lwipopts.h and secondly I couldn't find the functions gethostbyname() and
> gethostbyname_r().
>
> What about the description in lwIP Wiki? Completely wrong?
> Does somebody have an example using DNS with the sockets API?
>
> Thanks. Regards,
> Mathias
>
>
>
>
> _______________________________________________
> lwip-users mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/lwip-users
>
>



_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users






reply via email to

[Prev in Thread] Current Thread [Next in Thread]