lwip-devel
[Top][All Lists]
Advanced

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

RE: [lwip-devel] [task #7017] Implement DNS client


From: Pettinato, Jim
Subject: RE: [lwip-devel] [task #7017] Implement DNS client
Date: Wed, 20 Jun 2007 07:45:32 -0400

I used resolv_ only because that was uIP's naming convention for the module. We 
can use whatever everyone thinks is the most clear.

The DNS cache is only cleared manually in _init() I believe. I agree, the timer 
function should clear old entries as per the RFC.

No arguments that a secondary server entry would be beneficial.

Dns table was initialized in the same manner (to DONE) as it was in uIP - I 
left it alone since I wasn't sure why.

I agree checking return values is a good idea - as I said when I posted it, 
this is still a work in progress and I wanted to develop it a bit more. Others 
seemed to need it now though so I made it available.

MAX_NAME_LENGTH was 32 in uIP; our device can only handle host names up to 29 
chars anyway so I didn't worry about this - but it's a define. We should 
conditionally define it so it can be overridden in LWIPOPTS.H (like the number 
of cache entries is). If you want the default to match the RFC that's fine but 
that's going to be a large chunk of RAM.

I have not checked compressed answer expansion - I copied that portion of the 
code from uIP and have not tested the functionality explicitly.

I tried to use indent and comment style matching the lwIP standards with the 
idea in mind that this would be included eventually... I'm sure there's tweaks 
required since it wasn't the primary goal however. Typos though? Me? Never! Lol



-----Original Message-----
From: address@hidden [mailto:address@hidden On Behalf Of Frédéric Bernon
Sent: Wednesday, June 20, 2007 4:56 AM
To: Kieran Mansley; Simon Goldschmidt; Frédéric Bernon; address@hidden
Subject: [lwip-devel] [task #7017] Implement DNS client



Follow-up Comment #7, task #7017 (project lwip):

You're right about resolv, but "dns" seems more clear than "resolv".

Some remarks about the resolv.c code:

- MAX_NAME_LENGTH is 32. But a FQDN can be really longer. From memory, each 
"label" of the FQDN can have 63 bytes, the number of labels of a FQDN can be 
127, and the FQDN can be max 254. I will check the chapter in RFC to get exact 
values, but it's sure it's more than 2.

- I don't see in the code where the dns_table cache is cleaned from old 
entries. So, if a host already resolved change its IP address, we can't reach 
it... Perhaps I miss simething.

- Only one DNS server ("primary") is defined. As I said in comment#2, a 
secondary would be good.

- It would be good to check return values for pbuf_alloc, udp_new()..

- dns_table in resolv_init should be initialized with STATE_UNUSED (and not 
STATE_DONE).

- If your send in a short time (shorter than the "not found" timeout) more than 
LWIP_RESOLV_ENTRIES, the older client of resolv is "lost" but not its callback 
"found" will never be called (like in STATE_ERROR case).

- I'm not sure than compressed answers is working (I have to go deeply). Jim, 
do you have check that?

- And of course, some typo and coding style to do...


 



    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Message posté via/par Savannah
  http://savannah.nongnu.org/



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




reply via email to

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