aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2022-08-30 10:02:49 +0200
committerFlorian Weimer <fweimer@redhat.com>2022-08-30 10:02:49 +0200
commit394085a34d25a51513019a4dc411acd3527fbd33 (patch)
treefafedbaebad9ec3d6049ca00f57cfa6dbc094983 /include
parentc79327bf00a4be6d60259227acc78ef80ead3622 (diff)
downloadglibc-394085a34d25a51513019a4dc411acd3527fbd33.zip
glibc-394085a34d25a51513019a4dc411acd3527fbd33.tar.gz
glibc-394085a34d25a51513019a4dc411acd3527fbd33.tar.bz2
resolv: Add the __ns_samebinaryname function
During packet parsing, only the binary name is available. If the name equality check is performed before conversion to text, we can sometimes skip the last step. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Diffstat (limited to 'include')
-rw-r--r--include/arpa/nameser.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/arpa/nameser.h b/include/arpa/nameser.h
index 53f1dbc..bb1dede 100644
--- a/include/arpa/nameser.h
+++ b/include/arpa/nameser.h
@@ -55,6 +55,12 @@ int __ns_name_ntop (const unsigned char *, char *, size_t) __THROW;
int __ns_name_unpack (const unsigned char *, const unsigned char *,
const unsigned char *, unsigned char *, size_t) __THROW;
+/* Like ns_samename, but for uncompressed binary names. Return true
+ if the two arguments compare are equal as case-insensitive domain
+ names. */
+_Bool __ns_samebinaryname (const unsigned char *, const unsigned char *)
+ attribute_hidden;
+
#define ns_msg_getflag(handle, flag) \
(((handle)._flags & _ns_flagdata[flag].mask) >> _ns_flagdata[flag].shift)