patchlwIP - A Lightweight TCP/IP stack - Patches: patch #6277, getaddrinfo implementation

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #6277: getaddrinfo implementation

Submitted by:  Simon Goldschmidt <goldsimon>
Submitted on:  Fri 23 Nov 2007 06:29:26 PM UTC  
 
Category:  None Priority:  1 - Later
Status:  Done Privacy:  Public
Assigned to:  Simon Goldschmidt <goldsimon> Open/Closed:  Closed
Planned Release:  None

Sat 24 Nov 2007 04:19:51 PM UTC, comment #4: 

I just checked in netdb.c and moved all the DNS API functions there.

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Fri 23 Nov 2007 08:03:48 PM UTC, comment #3: 

That sounds like it might be better, yes.

Jonathan Larmour <jifl>
Project Member
Fri 23 Nov 2007 07:54:48 PM UTC, comment #2: 

And if we had netdb.h and netdb.c, with these functions + gethostbyname_r and gethostbyname ? But always conditionned by LWIP_DNS.

Frédéric Bernon <fbernon>
Project Member
Fri 23 Nov 2007 07:39:21 PM UTC, comment #1: 

I didn't realise it would be this small. I think this should just go in. Maintenance isn't an issue on something this size. Perhaps in a separate module, so users can choose to not build it in their makefiles, rather than adding another compile-time option.

Jonathan Larmour <jifl>
Project Member
Fri 23 Nov 2007 06:29:26 PM UTC, original submission:  

I'm posting an implementation of getaddrinfo() / freeaddrinfo() based on netconn_gethostbyname().

a) so that people who need it can easily add it
b) that my code doesn't get lost, maybe we need it some time

(getaddrinfo() is the thread-safe successor of the outdated function gethostbyname(), which is not thread-safe. lwIP has included a glibc-like gethostbyname_r() function, which is thread-safe but some applications might already use getaddrinfo(). Use this 'patch' to be able to compile them.)

This is not a real patch, just two files. Add the contents to sockets.c/sockets.h

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.

 

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by fbernon (Posted a comment)
  • -email is unavailable- added by jifl (Posted a comment)
  • -email is unavailable- added by goldsimon (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-11-24 goldsimon StatusWont Do => Done
        Open/ClosedOpen => Closed
    2007-11-23 goldsimon Attached File- => Added getaddrinfo_add_to_sockets.c, #14467
        Attached File- => Added getaddrinfo_add_to_sockets.h, #14468

    Back to the top


    Powered by Savane 3.5