diff options
author | Florian Weimer <fweimer@redhat.com> | 2022-08-30 10:02:49 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2022-09-13 12:56:24 +0200 |
commit | 20ec40a51d3a8e9487f40dc9352d158def23ea8c (patch) | |
tree | 9b69d2d825982e4040cb5b5320bf82033f11f90c /include | |
parent | 3c9b4004e2dccc9ca2ace078a0106f9d682fd1a0 (diff) | |
download | glibc-20ec40a51d3a8e9487f40dc9352d158def23ea8c.tar glibc-20ec40a51d3a8e9487f40dc9352d158def23ea8c.tar.gz glibc-20ec40a51d3a8e9487f40dc9352d158def23ea8c.tar.bz2 glibc-20ec40a51d3a8e9487f40dc9352d158def23ea8c.zip |
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>
(cherry picked from commit 394085a34d25a51513019a4dc411acd3527fbd33)
Diffstat (limited to 'include')
-rw-r--r-- | include/arpa/nameser.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/arpa/nameser.h b/include/arpa/nameser.h index 53f1dbc7c3..bb1dede187 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) |