1 /* Forwarders for deprecated libresolv functions which are implemented in libc.
2 Copyright (C) 2021-2023 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
19 /* Some functions are used by the stub resolver implementation
20 internally and thus have to be located in libc. They have been
21 historially exported for application use as well. However, the
22 stub resolver dependency on those functions is not intrinsic to
23 what the stub resolver does, and it is possible that a future
24 version of the stub resolver will not need them anymore. The
25 public symbols for these functions remain in libresolv, and are not
26 moved to libc, to avoid adding new symbol versions for legacy
29 #include <arpa/nameser.h>
33 ns_makecanon (const char *src
, char *dst
, size_t dstsize
)
35 return __libc_ns_makecanon (src
, dst
, dstsize
);
39 ns_samename (const char *a
, const char *b
)
41 return __libc_ns_samename (a
, b
);
45 res_nameinquery (const char *name
, int type
, int class,
46 const unsigned char *buf
, const unsigned char *eom
)
48 return __libc_res_nameinquery (name
, type
, class, buf
, eom
);
52 res_queriesmatch (const unsigned char *buf1
, const unsigned char *eom1
,
53 const unsigned char *buf2
, const unsigned char *eom2
)
55 return __libc_res_queriesmatch (buf1
, eom1
, buf2
, eom2
);