[Top][All Lists]

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

[lwip-devel] [patch #6786] task #7507: Hook to support static hosts file

From: Robert Sprowson
Subject: [lwip-devel] [patch #6786] task #7507: Hook to support static hosts file in DNS lookup
Date: Tue, 21 Apr 2009 21:46:26 +0000
User-agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)

Follow-up Comment #7, patch #6786 (project lwip):

I'd have a couple of comments on what you've suggested, naturally my
suggested patch fulfilled my personal requirements and might not be the best

The function call out/hook allowed me to tackle the specific problem (which
is possibly quite common for embedded systems) where I don't have much RAM,
the flash that the code is running from is either large sectored or can't be
erased/written in place, but I want to allow for quite a few 'hosts' file

I store the 'hosts' file in a serially accessed EEPROM (ie. it's not mapped
to a region the processor can get at by just casting flash to a pointer), the
values rarely change but could be up to 2k in size - I'd rather have that 2k
of RAM for buffers.

Anyway, on the proposed API

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

I can see a problem there when there are aliases in the hosts file, in my
(FreeBSD) hosts file I have loopback and localhost and loghost all as aliases
for so the removehostaddr wouldn't know which one to remove. The
removehostname is probably OK as one address maps to only one name doesn't

Not sure how best to proceed, but not being able to retain the list off chip
without burning up free RAM is a killer.


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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