lwip-devel
[Top][All Lists]
Advanced

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

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


From: Frédéric Bernon
Subject: [lwip-devel] [task #7017] Implement DNS client
Date: Tue, 20 Nov 2007 08:57:57 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.9) Gecko/20071025 Firefox/2.0.0.9

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

>Pretty much, yes! Although I wouldn't give DNS_USES_STATIC_BUF three values
(0/1/2). I think the option to use the stack isn't really necessary... 

Since cases 0 & 1 are the same, and if Jim prefer use the stack, I don't see
any problem to propose a solution for every point of view.

>About the dns defines: why are some of those moved from dns.c to dns.h, are
they used anywhere outside dns.c??? 

DNS_MAX_SERVERS is in dns.h because if you want to know what it the upper
limit to call dns_getserver or dns_setserver, you have to see this define.

DNS_MAX_TTL is not well place, but I wanted to move options (in opt.h, dns.h
or dns.c) at the end of the task.

DNS_TMR_INTERVAL is here to be see by tcpip_thread (or nosys case in
test.c).

DNS_MSG_SIZE was here to be checked in init.c, but now, it could be moved in
dns.c.

DNS_RRTYPE_ & DNS_RRCLASS_ are here because I want to be able to query a MX
or another type. I have test it with a local patch (add 2 parameters to
dns_gethostbyname, 2 fields in entry, and a change in dns_recv to resend a
query when we got MX name to resolve it in IP address). But it should stay an
option (and for post 1.3.0 I think).

So, to my point of view, I would place :

in opt.h:
- DNS_TABLE_SIZE (ram usage should be visible)
- DNS_MAX_NAME_LENGTH (ram usage should be visible)
- DNS_USES_STATIC_BUF (ram usage should be visible)
- DNS_DOES_NAME_CHECK (in the same spirit than DHCP_DOES_ARP_CHECK)

in dns.h:
- DNS_MAX_SERVERS (2 is an usual value, not really need to change it)
- DNS_TMR_INTERVAL (should be visible)
- DNS_RRTYPE_xxx (will avoid to move them again for future change)
- DNS_RRCLASS_xxx (will avoid to move them again for future change)

in dns.c:
- DNS_SERVER_ADDRESS (I think this default DNS server should work for most of
users)
- DNS_SERVER_PORT (should not be change, but...)
- DNS_MSG_SIZE (only use locally now)
- DNS_MAX_RETRIES (only use locally, but could be move to opt.h)
- DNS_FLAG1_xxx (only use locally)
- DNS_STATE_xxx (only use locally)


    _______________________________________________________

Reply to this item at:

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

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





reply via email to

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