diff options
author | Florian Weimer <fweimer@redhat.com> | 2022-08-30 10:02:49 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2022-09-20 12:29:27 +0200 |
commit | d7c22ec359ac10432fc5df769f6350f0a2365c5f (patch) | |
tree | 0df86b57efb775e5cf3eb122cfebf83f284031ff /include | |
parent | 83b09a8e86c1d59eb4a988375f25e2d65b4fde28 (diff) | |
download | glibc-d7c22ec359ac10432fc5df769f6350f0a2365c5f.tar.gz glibc-d7c22ec359ac10432fc5df769f6350f0a2365c5f.tar.xz glibc-d7c22ec359ac10432fc5df769f6350f0a2365c5f.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) |