cosmopolitan/libc/dns
Gautham 248c6d54bb
Added getnameinfo with only name lookup (#172)
Added necessary constants (DNS_TYPE_PTR, NI_NUMERICHOST etc.).
Implementation of getnameinfo is similar to getaddrinfo, with internal
functions:

* ResolveDnsReverse: performs rDNS query and parses the PTR record
* ResolveHostsReverse: reads /etc/hosts to map hostname to
  address

Earlier, the HOSTS.txt would only need to be sorted at loading time,
because the only kind of lookup was name -> address. Now since address
-> name lookups are also possible, so the HostsTxt struct, the sorting
method (and the related tests) was changed to reflect this.
2021-06-09 19:35:44 -07:00
..
comparednsnames.c Make minor improvements 2021-05-15 21:53:26 -07:00
consts.h Added getnameinfo with only name lookup (#172) 2021-06-09 19:35:44 -07:00
dns.h Added getnameinfo with only name lookup (#172) 2021-06-09 19:35:44 -07:00
dns.mk Fix link order in cosmopolitan.a 2021-01-16 12:05:41 -08:00
dns.png Initial import 2020-06-15 07:18:57 -07:00
dnsheader.c Make minor improvements 2021-05-15 21:53:26 -07:00
dnsheader.h Make minor improvements 2021-05-15 21:53:26 -07:00
dnsquestion.h Make minor improvements 2021-05-15 21:53:26 -07:00
freeaddrinfo.c Make minor improvements 2021-05-15 21:53:26 -07:00
freehoststxt.c Make minor improvements 2021-05-15 21:53:26 -07:00
freeresolvconf.c Make minor improvements 2021-05-15 21:53:26 -07:00
gai_strerror.c Rename eai2str to gai_strerror (#131) 2021-03-20 20:48:40 -07:00
getaddrinfo.c Make minor improvements 2021-05-15 21:53:26 -07:00
gethoststxt.c Added getnameinfo with only name lookup (#172) 2021-06-09 19:35:44 -07:00
getnameinfo.c Added getnameinfo with only name lookup (#172) 2021-06-09 19:35:44 -07:00
getntnameservers.c Make minor improvements 2021-05-15 21:53:26 -07:00
getresolvconf.c Make minor improvements 2021-05-15 21:53:26 -07:00
hoststxt.h Added getnameinfo with only name lookup (#172) 2021-06-09 19:35:44 -07:00
newaddrinfo.c Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
parsehoststxt.c Make minor improvements 2021-05-15 21:53:26 -07:00
parseresolvconf.c Make minor improvements 2021-05-15 21:53:26 -07:00
pascalifydnsname.c Make minor improvements 2021-05-15 21:53:26 -07:00
resolvconf.h Make minor improvements 2021-05-15 21:53:26 -07:00
resolvedns.c Make minor improvements 2021-05-15 21:53:26 -07:00
resolvednsreverse.c Added getnameinfo with only name lookup (#172) 2021-06-09 19:35:44 -07:00
resolvehostsreverse.c Added getnameinfo with only name lookup (#172) 2021-06-09 19:35:44 -07:00
resolvehoststxt.c Added getnameinfo with only name lookup (#172) 2021-06-09 19:35:44 -07:00
rfc0226.txt Initial import 2020-06-15 07:18:57 -07:00
rfc0247.txt Initial import 2020-06-15 07:18:57 -07:00
rfc1035.txt Initial import 2020-06-15 07:18:57 -07:00
serializednsquestion.c Make minor improvements 2021-05-15 21:53:26 -07:00
sorthoststxt.c Added getnameinfo with only name lookup (#172) 2021-06-09 19:35:44 -07:00