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
_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users