|
From: | address@hidden |
Subject: | Re: [lwip-users] DNS look-up of name that is already RFC 1035 encoded |
Date: | Mon, 12 Nov 2018 20:16:27 +0100 |
User-agent: | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
On 12.11.2018 01:04, Craig McQueen wrote:
DHCP option 120 provides SIP server address(es), which may be an IP address or a DNS name. If it's a DNS name, then it is already encoded in the encoding used for DNS look-ups (RFC 1035). See RFC 3361 section 3.1. What is the best way to look up such a name via lwIP?
The only lookup lwIP supports is the normal dotted string notation.
Shall I convert it from the RFC 1035 encoding to the normal dotted string notation, and not fret about the perceived inefficiency that lwIP will just convert it back to RFC 1035 encoding? (it's converted in dns_send().) Alternatively, core/dns.c could be modified to provide an API function that takes a hostname in the RFC 1035 encoding.
dns.c implements a cache. Taking one name as RFC1035 is not enough: future comparisons must match it, too. So either we're buffering in RFC1035 or in dotted strings. I'd say given the length of such names (and unless there's a different point in keeping names in RFC1035 format), it's probably not worth changing anything from the current state...
Simon
[Prev in Thread] | Current Thread | [Next in Thread] |