glibc/include/arpa
Florian Weimer e7c03f4765 resolv: Add DNS packet parsing helpers geared towards wire format
The public parser functions around the ns_rr record type produce
textual domain names, but usually, this is not what we need while
parsing DNS packets within glibc.  This commit adds two new helper
functions, __ns_rr_cursor_init and __ns_rr_cursor_next, for writing
packet parsers, and struct ns_rr_cursor, struct ns_rr_wire as
supporting types.

In theory, it is possible to avoid copying the owner name
into the rname field in __ns_rr_cursor_next, but this would need
more functions that work on compressed names.

Eventually, __res_context_send could be enhanced to preserve the
result of the packet parsing that is necessary for matching the
incoming UDP packets, so that this works does not have to be done
twice.

Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
(cherry picked from commit 857c890d9b)
2022-09-21 19:36:12 +02:00
..
ftp.h Update. 1997-06-21 02:59:26 +00:00
inet.h inet: Add hidden prototype for __inet_network 2021-07-07 18:33:52 +02:00
nameser_compat.h CVE-2015-5180: resolv: Fix crash with internal QTYPE [BZ #18784] 2016-12-31 20:27:44 +01:00
nameser.h resolv: Add DNS packet parsing helpers geared towards wire format 2022-09-21 19:36:12 +02:00
telnet.h Update. 1997-06-21 02:59:26 +00:00
tftp.h Update. 1997-06-21 02:59:26 +00:00