lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [task #7507] Add static host table to dns_gethostbyname


From: Simon Goldschmidt
Subject: [lwip-devel] [task #7507] Add static host table to dns_gethostbyname
Date: Tue, 21 Apr 2009 18:40:15 +0000
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; de; rv:1.9.0.8) Gecko/2009032608 Firefox/3.0.8

Update of task #7507 (project lwip):

                  Status:                    None => Done                   
        Percent Complete:                      0% => 100%                   
             Assigned to:                    jifl => goldsimon              
             Open/Closed:                    Open => Closed                 

    _______________________________________________________

Follow-up Comment #1:

Just felt like working on this:

This is now implemented in 2 stages:

a) Configuration option DNS_LOCAL_HOSTLIST turns on a statically allocated
linked list of host-to-address. It is initialized by a define
DNS_LOCAL_HOSTLIST_INIT like
#define DNS_LOCAL_HOSTLIST_INIT {{"host1", 0x123}, {"host2", 0x234}}

b) Configuration option DNS_LOCAL_HOSTLIST_IS_DYNAMIC makes the whole thing
dynamic: mem_malloc is used to allocate the linked list items, the items in
DNS_LOCAL_HOSTLIST_INIT are initially copied into that list, 3 functions can
manipulate the list:

int dns_local_removehostname(const char *hostname);
int  dns_local_removehostaddr(const struct ip_addr *addr);
err_t dns_local_addhost(const char *hostname, const struct ip_addr *addr);

Jifl, I hope you don't mind me taking this over, I just felt the dns part was
really missing this...

I regard this done now, please feel free to reopen it if you think different.

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/task/?7507>

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.nongnu.org/





reply via email to

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