| 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. |
| 4 | |
| 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. |
| 9 | |
| 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. |
| 14 | |
| 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/>. */ |
| 18 | |
| 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 |
| 27 | functions. */ |
| 28 | |
| 29 | #include <arpa/nameser.h> |
| 30 | #include <resolv.h> |
| 31 | |
| 32 | int |
| 33 | ns_makecanon (const char *src, char *dst, size_t dstsize) |
| 34 | { |
| 35 | return __libc_ns_makecanon (src, dst, dstsize); |
| 36 | } |
| 37 | |
| 38 | int |
| 39 | ns_samename (const char *a, const char *b) |
| 40 | { |
| 41 | return __libc_ns_samename (a, b); |
| 42 | } |
| 43 | |
| 44 | int |
| 45 | res_nameinquery (const char *name, int type, int class, |
| 46 | const unsigned char *buf, const unsigned char *eom) |
| 47 | { |
| 48 | return __libc_res_nameinquery (name, type, class, buf, eom); |
| 49 | } |
| 50 | |
| 51 | int |
| 52 | res_queriesmatch (const unsigned char *buf1, const unsigned char *eom1, |
| 53 | const unsigned char *buf2, const unsigned char *eom2) |
| 54 | { |
| 55 | return __libc_res_queriesmatch (buf1, eom1, buf2, eom2); |
| 56 | } |
| 57 | |