Upload Kmake

This commit is contained in:
Gorochu
2026-05-26 23:36:42 -07:00
parent ba051b2f74
commit 555ec72358
41615 changed files with 13344630 additions and 1 deletions

19
deps/cares/docs/CMakeLists.txt vendored Normal file
View File

@ -0,0 +1,19 @@
# Copyright (C) The c-ares project and its contributors
# SPDX-License-Identifier: MIT
# Headers and Man Pages installation target
IF (CARES_INSTALL)
# ManPages
FILE (GLOB DevelManPages "." "*.3")
INSTALL (FILES ${DevelManPages}
DESTINATION ${CMAKE_INSTALL_MANDIR}/man3
COMPONENT Devel
)
IF (CARES_BUILD_TOOLS)
FILE (GLOB ToolManPages "." "*.1")
INSTALL (FILES ${ToolManPages}
DESTINATION ${CMAKE_INSTALL_MANDIR}/man1
COMPONENT Tools
)
ENDIF ()
ENDIF ()

10
deps/cares/docs/Makefile.am vendored Normal file
View File

@ -0,0 +1,10 @@
# Copyright (C) The c-ares project and its contributors
# SPDX-License-Identifier: MIT
AUTOMAKE_OPTIONS = foreign subdir-objects no-dependencies
include Makefile.inc
man_MANS = $(MANPAGES)
EXTRA_DIST = $(MANPAGES) ahost.1 adig.1 Makefile.inc CMakeLists.txt

743
deps/cares/docs/Makefile.in vendored Normal file
View File

@ -0,0 +1,743 @@
# Makefile.in generated by automake 1.16.5 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2021 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
# Copyright (C) The c-ares project and its contributors
# SPDX-License-Identifier: MIT
VPATH = @srcdir@
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
*) echo "am__make_running_with_option: internal error: invalid" \
"target option '$${target_option-}' specified" >&2; \
exit 1;; \
esac; \
has_opt=no; \
sane_makeflags=$$MAKEFLAGS; \
if $(am__is_gnu_make); then \
sane_makeflags=$$MFLAGS; \
else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
bs=\\; \
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
fi; \
skip_next=no; \
strip_trailopt () \
{ \
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
}; \
for flg in $$sane_makeflags; do \
test $$skip_next = yes && { skip_next=no; continue; }; \
case $$flg in \
*=*|--*) continue;; \
-*I) strip_trailopt 'I'; skip_next=yes;; \
-*I?*) strip_trailopt 'I';; \
-*O) strip_trailopt 'O'; skip_next=yes;; \
-*O?*) strip_trailopt 'O';; \
-*l) strip_trailopt 'l'; skip_next=yes;; \
-*l?*) strip_trailopt 'l';; \
-[dEDm]) skip_next=yes;; \
-[JT]) skip_next=yes;; \
esac; \
case $$flg in \
*$$target_option*) has_opt=yes; break;; \
esac; \
done; \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = docs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/ares_check_user_namespace.m4 \
$(top_srcdir)/m4/ares_check_uts_namespace.m4 \
$(top_srcdir)/m4/ax_ac_append_to_file.m4 \
$(top_srcdir)/m4/ax_ac_print_to_file.m4 \
$(top_srcdir)/m4/ax_add_am_macro_static.m4 \
$(top_srcdir)/m4/ax_am_macros_static.m4 \
$(top_srcdir)/m4/ax_append_compile_flags.m4 \
$(top_srcdir)/m4/ax_append_flag.m4 \
$(top_srcdir)/m4/ax_append_link_flags.m4 \
$(top_srcdir)/m4/ax_check_compile_flag.m4 \
$(top_srcdir)/m4/ax_check_gnu_make.m4 \
$(top_srcdir)/m4/ax_check_link_flag.m4 \
$(top_srcdir)/m4/ax_code_coverage.m4 \
$(top_srcdir)/m4/ax_compiler_vendor.m4 \
$(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \
$(top_srcdir)/m4/ax_cxx_compile_stdcxx_14.m4 \
$(top_srcdir)/m4/ax_file_escapes.m4 \
$(top_srcdir)/m4/ax_pthread.m4 \
$(top_srcdir)/m4/ax_require_defined.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/src/lib/ares_config.h \
$(top_builddir)/include/ares_build.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
depcomp =
am__maybe_remake_depfiles =
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
man3dir = $(mandir)/man3
am__installdirs = "$(DESTDIR)$(man3dir)"
NROFF = nroff
MANS = $(man_MANS)
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.inc
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_CFLAGS = @AM_CFLAGS@
AM_CPPFLAGS = @AM_CPPFLAGS@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BUILD_SUBDIRS = @BUILD_SUBDIRS@
CARES_PRIVATE_LIBS = @CARES_PRIVATE_LIBS@
CARES_RANDOM_FILE = @CARES_RANDOM_FILE@
CARES_SYMBOL_HIDING_CFLAG = @CARES_SYMBOL_HIDING_CFLAG@
CARES_VERSION_INFO = @CARES_VERSION_INFO@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@
CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@
CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@
CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@
CODE_COVERAGE_LIBS = @CODE_COVERAGE_LIBS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CSCOPE = @CSCOPE@
CTAGS = @CTAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
FILECMD = @FILECMD@
GCOV = @GCOV@
GENHTML = @GENHTML@
GMOCK112_CFLAGS = @GMOCK112_CFLAGS@
GMOCK112_LIBS = @GMOCK112_LIBS@
GMOCK_CFLAGS = @GMOCK_CFLAGS@
GMOCK_LIBS = @GMOCK_LIBS@
GREP = @GREP@
HAVE_CXX14 = @HAVE_CXX14@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LCOV = @LCOV@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKGCONFIG_CFLAGS = @PKGCONFIG_CFLAGS@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_CXX = @PTHREAD_CXX@
PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
ax_pthread_config = @ax_pthread_config@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
ifGNUmake = @ifGNUmake@
ifnGNUmake = @ifnGNUmake@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = foreign subdir-objects no-dependencies
# Copyright (C) The c-ares project and its contributors
# SPDX-License-Identifier: MIT
MANPAGES = ares_cancel.3 \
ares_create_query.3 \
ares_destroy.3 \
ares_destroy_options.3 \
ares_dns_class_fromstr.3 \
ares_dns_class_t.3 \
ares_dns_class_tostr.3 \
ares_dns_datatype_t.3 \
ares_dns_flags_t.3 \
ares_dns_mapping.3 \
ares_dns_opcode_tostr.3 \
ares_dns_opt_datatype_t.3 \
ares_dns_opt_get_datatype.3 \
ares_dns_opt_get_name.3 \
ares_dns_opcode_t.3 \
ares_dns_parse.3 \
ares_dns_rcode_t.3 \
ares_dns_rcode_tostr.3 \
ares_dns_record.3 \
ares_dns_record_create.3 \
ares_dns_record_duplicate.3 \
ares_dns_record_get_flags.3 \
ares_dns_record_get_id.3 \
ares_dns_record_get_opcode.3 \
ares_dns_record_get_rcode.3 \
ares_dns_record_destroy.3 \
ares_dns_record_query_add.3 \
ares_dns_record_query_set_name.3 \
ares_dns_record_query_set_type.3 \
ares_dns_record_query_cnt.3 \
ares_dns_record_query_get.3 \
ares_dns_record_rr_add.3 \
ares_dns_record_rr_cnt.3 \
ares_dns_record_rr_del.3 \
ares_dns_record_rr_get.3 \
ares_dns_record_rr_get_const.3 \
ares_dns_record_set_id.3 \
ares_dns_rec_type_fromstr.3 \
ares_dns_rec_type_tostr.3 \
ares_dns_rec_type_t.3 \
ares_dns_rr.3 \
ares_dns_rr_add_abin.3 \
ares_dns_rr_del_abin.3 \
ares_dns_rr_del_opt_byid.3 \
ares_dns_rr_get_abin.3 \
ares_dns_rr_get_abin_cnt.3 \
ares_dns_rr_get_addr.3 \
ares_dns_rr_get_addr6.3 \
ares_dns_rr_get_bin.3 \
ares_dns_rr_get_class.3 \
ares_dns_rr_get_keys.3 \
ares_dns_rr_get_name.3 \
ares_dns_rr_get_opt.3 \
ares_dns_rr_get_opt_byid.3 \
ares_dns_rr_get_opt_cnt.3 \
ares_dns_rr_get_str.3 \
ares_dns_rr_get_type.3 \
ares_dns_rr_get_ttl.3 \
ares_dns_rr_get_u16.3 \
ares_dns_rr_get_u32.3 \
ares_dns_rr_get_u8.3 \
ares_dns_rr_key_datatype.3 \
ares_dns_rr_key_t.3 \
ares_dns_rr_key_to_rec_type.3 \
ares_dns_rr_key_tostr.3 \
ares_dns_rr_set_addr.3 \
ares_dns_rr_set_addr6.3 \
ares_dns_rr_set_bin.3 \
ares_dns_rr_set_opt.3 \
ares_dns_rr_set_str.3 \
ares_dns_rr_set_u16.3 \
ares_dns_rr_set_u32.3 \
ares_dns_rr_set_u8.3 \
ares_dns_section_t.3 \
ares_dns_section_tostr.3 \
ares_dns_write.3 \
ares_dup.3 \
ares_expand_name.3 \
ares_expand_string.3 \
ares_fds.3 \
ares_free_data.3 \
ares_free_hostent.3 \
ares_free_string.3 \
ares_freeaddrinfo.3 \
ares_get_servers.3 \
ares_get_servers_csv.3 \
ares_get_servers_ports.3 \
ares_getaddrinfo.3 \
ares_gethostbyaddr.3 \
ares_gethostbyname.3 \
ares_gethostbyname_file.3 \
ares_getnameinfo.3 \
ares_getsock.3 \
ares_inet_ntop.3 \
ares_inet_pton.3 \
ares_init.3 \
ares_init_options.3 \
ares_library_cleanup.3 \
ares_library_init.3 \
ares_library_init_android.3 \
ares_library_initialized.3 \
ares_mkquery.3 \
ares_opt_param_t.3 \
ares_parse_a_reply.3 \
ares_parse_aaaa_reply.3 \
ares_parse_caa_reply.3 \
ares_parse_mx_reply.3 \
ares_parse_naptr_reply.3 \
ares_parse_ns_reply.3 \
ares_parse_ptr_reply.3 \
ares_parse_soa_reply.3 \
ares_parse_srv_reply.3 \
ares_parse_txt_reply.3 \
ares_parse_uri_reply.3 \
ares_process.3 \
ares_process_fd.3 \
ares_process_fds.3 \
ares_process_pending_write.3 \
ares_query.3 \
ares_query_dnsrec.3 \
ares_queue.3 \
ares_queue_active_queries.3 \
ares_queue_wait_empty.3 \
ares_reinit.3 \
ares_save_options.3 \
ares_search.3 \
ares_search_dnsrec.3 \
ares_send.3 \
ares_send_dnsrec.3 \
ares_set_local_dev.3 \
ares_set_local_ip4.3 \
ares_set_local_ip6.3 \
ares_set_pending_write_cb.3 \
ares_set_server_state_callback.3 \
ares_set_servers.3 \
ares_set_servers_csv.3 \
ares_set_servers_ports.3 \
ares_set_servers_ports_csv.3 \
ares_set_socket_callback.3 \
ares_set_socket_configure_callback.3 \
ares_set_socket_functions.3 \
ares_set_socket_functions_ex.3 \
ares_set_sortlist.3 \
ares_strerror.3 \
ares_svcb_param_t.3 \
ares_threadsafety.3 \
ares_timeout.3 \
ares_tlsa_match_t.3 \
ares_tlsa_selector_t.3 \
ares_tlsa_usage_t.3 \
ares_version.3
man_MANS = $(MANPAGES)
EXTRA_DIST = $(MANPAGES) ahost.1 adig.1 Makefile.inc CMakeLists.txt
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/Makefile.inc $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign docs/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign docs/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;
$(srcdir)/Makefile.inc $(am__empty):
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
install-man3: $(man_MANS)
@$(NORMAL_INSTALL)
@list1=''; \
list2='$(man_MANS)'; \
test -n "$(man3dir)" \
&& test -n "`echo $$list1$$list2`" \
|| exit 0; \
echo " $(MKDIR_P) '$(DESTDIR)$(man3dir)'"; \
$(MKDIR_P) "$(DESTDIR)$(man3dir)" || exit 1; \
{ for i in $$list1; do echo "$$i"; done; \
if test -n "$$list2"; then \
for i in $$list2; do echo "$$i"; done \
| sed -n '/\.3[a-z]*$$/p'; \
fi; \
} | while read p; do \
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; echo "$$p"; \
done | \
sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
sed 'N;N;s,\n, ,g' | { \
list=; while read file base inst; do \
if test "$$base" = "$$inst"; then list="$$list $$file"; else \
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst" || exit $$?; \
fi; \
done; \
for i in $$list; do echo "$$i"; done | $(am__base_list) | \
while read files; do \
test -z "$$files" || { \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man3dir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(man3dir)" || exit $$?; }; \
done; }
uninstall-man3:
@$(NORMAL_UNINSTALL)
@list=''; test -n "$(man3dir)" || exit 0; \
files=`{ for i in $$list; do echo "$$i"; done; \
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
sed -n '/\.3[a-z]*$$/p'; \
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
dir='$(DESTDIR)$(man3dir)'; $(am__uninstall_files_from_dir)
tags TAGS:
ctags CTAGS:
cscope cscopelist:
distdir: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) distdir-am
distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(MANS)
installdirs:
for dir in "$(DESTDIR)$(man3dir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am: install-man
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am:
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man: install-man3
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-man
uninstall-man: uninstall-man3
.MAKE: install-am install-strip
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
cscopelist-am ctags-am distclean distclean-generic \
distclean-libtool distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-man3 install-pdf install-pdf-am install-ps \
install-ps-am install-strip installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
ps ps-am tags-am uninstall uninstall-am uninstall-man \
uninstall-man3
.PRECIOUS: Makefile
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

153
deps/cares/docs/Makefile.inc vendored Normal file
View File

@ -0,0 +1,153 @@
# Copyright (C) The c-ares project and its contributors
# SPDX-License-Identifier: MIT
MANPAGES = ares_cancel.3 \
ares_create_query.3 \
ares_destroy.3 \
ares_destroy_options.3 \
ares_dns_class_fromstr.3 \
ares_dns_class_t.3 \
ares_dns_class_tostr.3 \
ares_dns_datatype_t.3 \
ares_dns_flags_t.3 \
ares_dns_mapping.3 \
ares_dns_opcode_tostr.3 \
ares_dns_opt_datatype_t.3 \
ares_dns_opt_get_datatype.3 \
ares_dns_opt_get_name.3 \
ares_dns_opcode_t.3 \
ares_dns_parse.3 \
ares_dns_rcode_t.3 \
ares_dns_rcode_tostr.3 \
ares_dns_record.3 \
ares_dns_record_create.3 \
ares_dns_record_duplicate.3 \
ares_dns_record_get_flags.3 \
ares_dns_record_get_id.3 \
ares_dns_record_get_opcode.3 \
ares_dns_record_get_rcode.3 \
ares_dns_record_destroy.3 \
ares_dns_record_query_add.3 \
ares_dns_record_query_set_name.3 \
ares_dns_record_query_set_type.3 \
ares_dns_record_query_cnt.3 \
ares_dns_record_query_get.3 \
ares_dns_record_rr_add.3 \
ares_dns_record_rr_cnt.3 \
ares_dns_record_rr_del.3 \
ares_dns_record_rr_get.3 \
ares_dns_record_rr_get_const.3 \
ares_dns_record_set_id.3 \
ares_dns_rec_type_fromstr.3 \
ares_dns_rec_type_tostr.3 \
ares_dns_rec_type_t.3 \
ares_dns_rr.3 \
ares_dns_rr_add_abin.3 \
ares_dns_rr_del_abin.3 \
ares_dns_rr_del_opt_byid.3 \
ares_dns_rr_get_abin.3 \
ares_dns_rr_get_abin_cnt.3 \
ares_dns_rr_get_addr.3 \
ares_dns_rr_get_addr6.3 \
ares_dns_rr_get_bin.3 \
ares_dns_rr_get_class.3 \
ares_dns_rr_get_keys.3 \
ares_dns_rr_get_name.3 \
ares_dns_rr_get_opt.3 \
ares_dns_rr_get_opt_byid.3 \
ares_dns_rr_get_opt_cnt.3 \
ares_dns_rr_get_str.3 \
ares_dns_rr_get_type.3 \
ares_dns_rr_get_ttl.3 \
ares_dns_rr_get_u16.3 \
ares_dns_rr_get_u32.3 \
ares_dns_rr_get_u8.3 \
ares_dns_rr_key_datatype.3 \
ares_dns_rr_key_t.3 \
ares_dns_rr_key_to_rec_type.3 \
ares_dns_rr_key_tostr.3 \
ares_dns_rr_set_addr.3 \
ares_dns_rr_set_addr6.3 \
ares_dns_rr_set_bin.3 \
ares_dns_rr_set_opt.3 \
ares_dns_rr_set_str.3 \
ares_dns_rr_set_u16.3 \
ares_dns_rr_set_u32.3 \
ares_dns_rr_set_u8.3 \
ares_dns_section_t.3 \
ares_dns_section_tostr.3 \
ares_dns_write.3 \
ares_dup.3 \
ares_expand_name.3 \
ares_expand_string.3 \
ares_fds.3 \
ares_free_data.3 \
ares_free_hostent.3 \
ares_free_string.3 \
ares_freeaddrinfo.3 \
ares_get_servers.3 \
ares_get_servers_csv.3 \
ares_get_servers_ports.3 \
ares_getaddrinfo.3 \
ares_gethostbyaddr.3 \
ares_gethostbyname.3 \
ares_gethostbyname_file.3 \
ares_getnameinfo.3 \
ares_getsock.3 \
ares_inet_ntop.3 \
ares_inet_pton.3 \
ares_init.3 \
ares_init_options.3 \
ares_library_cleanup.3 \
ares_library_init.3 \
ares_library_init_android.3 \
ares_library_initialized.3 \
ares_mkquery.3 \
ares_opt_param_t.3 \
ares_parse_a_reply.3 \
ares_parse_aaaa_reply.3 \
ares_parse_caa_reply.3 \
ares_parse_mx_reply.3 \
ares_parse_naptr_reply.3 \
ares_parse_ns_reply.3 \
ares_parse_ptr_reply.3 \
ares_parse_soa_reply.3 \
ares_parse_srv_reply.3 \
ares_parse_txt_reply.3 \
ares_parse_uri_reply.3 \
ares_process.3 \
ares_process_fd.3 \
ares_process_fds.3 \
ares_process_pending_write.3 \
ares_query.3 \
ares_query_dnsrec.3 \
ares_queue.3 \
ares_queue_active_queries.3 \
ares_queue_wait_empty.3 \
ares_reinit.3 \
ares_save_options.3 \
ares_search.3 \
ares_search_dnsrec.3 \
ares_send.3 \
ares_send_dnsrec.3 \
ares_set_local_dev.3 \
ares_set_local_ip4.3 \
ares_set_local_ip6.3 \
ares_set_pending_write_cb.3 \
ares_set_server_state_callback.3 \
ares_set_servers.3 \
ares_set_servers_csv.3 \
ares_set_servers_ports.3 \
ares_set_servers_ports_csv.3 \
ares_set_socket_callback.3 \
ares_set_socket_configure_callback.3 \
ares_set_socket_functions.3 \
ares_set_socket_functions_ex.3 \
ares_set_sortlist.3 \
ares_strerror.3 \
ares_svcb_param_t.3 \
ares_threadsafety.3 \
ares_timeout.3 \
ares_tlsa_match_t.3 \
ares_tlsa_selector_t.3 \
ares_tlsa_usage_t.3 \
ares_version.3

179
deps/cares/docs/adig.1 vendored Normal file
View File

@ -0,0 +1,179 @@
.\"
.\" Copyright (C) the Massachusetts Institute of Technology.
.\" Copyright (C) Daniel Stenberg
.\" SPDX-License-Identifier: MIT
.\"
.TH ADIG "1" "Sept 2024" "c-ares utilities"
.SH NAME
adig \- print information collected from Domain Name System (DNS) servers
.SH SYNOPSIS
\fBadig\fP [\fI@server\fR] [\fI-c class\fR] [\fI-p port#\fR] [\fI-q name\fR]
[\fI-t type\fR] [\fI-x addr\fR] [\fIname\fR] [\fItype\fR] [\fIclass\fR]
[\fIqueryopt\fR...]
.SH DESCRIPTION
.PP
Send queries to DNS servers about \fUname\fR and print received
information, where \fIname\fR is a valid DNS name (e.g. www.example.com,
1.2.3.10.in-addr.arpa).
.PP
This utility comes with the \fBc\-ares\fR asynchronous resolver library.
.PP
It is possible to specify default arguments for \fBadig\fR via \fB${XDG_CONFIG_HOME}/adigrc\fR.
.SH ARGS
.TP
\fB@server\fR
Server ip address. May specify multiple in comma delimited format. May be
specified in URI format.
.TP
\fBname\fR
Name of the resource record that is to be looked up
.TP
\fBtype\fR
What type of query is required. e.g. - A, AAAA, MX, TXT, etc. If not
specified, A will be used.
.TP
\fBclass\fR
Sets the query class, defaults to IN. May also be HS or CH.
.SH FLAGS
.TP
\fB\-c\fR class
Sets the query class, defaults to IN. May also be HS or CH.
.TP
\fB\-h\fR
Prints the help.
.TP
\fB\-p\fR port
Sends query to a port other than 53. Often recommended to set the port using
\fI@server\fR instead.
.TP
\fB\-q\fR name
Specifies the domain name to query. Useful to distinguish name from other
arguments
.TP
\fB\-r\fR
Skip adigrc processing
.TP
\fB\-s\fR
Server (alias for @server syntax), compatibility with old cmdline
.TP
\fB\-t\fR type
Indicates resource record type to query. Useful to distinguish type from other
arguments
.TP
\fB\-x\fR addr
Simplified reverse lookups. Sets the type to PTR and forms a valid in-arpa
query string
.SH QUERY OPTIONS
.TP
\fB+[no]aaonly\fR
Sets the aa flag in the query. Default is off.
.TP
\fB+[no]aaflag\fR
Alias for +[no]aaonly
.TP
\fB+[no]additional\fR
Toggles printing the additional section. On by default.
.TP
\fB+[no]adflag\fR
Sets the ad (authentic data) bit in the query. Default is off.
.TP
\fB+[no]aliases\fR
Whether or not to honor the HOSTALIASES file. Default is on.
.TP
\fB+[no]all\fR
Toggles all of +[no]cmd, +[no]stats, +[no]question, +[no]answer,
+[no]authority, +[no]additional, +[no]comments
.TP
\fB+[no]answer\fR
Toggles printing the answer. On by default.
.TP
\fB+[no]authority\fR
Toggles printing the authority. On by default.
.TP
\fB+bufsize=\fR#
UDP EDNS 0 packet size allowed. Defaults to 1232.
.TP
\fB+[no]cdflag\fR
Sets the CD (checking disabled) bit in the query. Default is off.
.TP
\fB+[no]class\fR
Display the class when printing the record. On by default.
.TP
\fB+[no]cmd\fR
Toggles printing the command requested. On by default.
.TP
\fB+[no]comments\fR
Toggles printing the comments. On by default
.TP
\fB+[no]defname\fR
Alias for +[no]search
.TP
\fB+domain=somename\fR
Sets the search list to a single domain.
.TP
\fB+[no]dns0x20\fR
Whether or not to use DNS 0x20 case randomization when sending queries.
Default is off.
.TP
\fB+[no]edns\fR[=#]
Enable or disable EDNS. Only allows a value of 0 if specified. Default is to
enable EDNS.
.TP
\fB+[no]ignore\fR
Ignore truncation on UDP, by default retried on TCP.
.TP
\fB+[no]keepopen\fR
Whether or not the server connection should be persistent. Default is off.
.TP
\fB+ndots\fR=#
Sets the number of dots that must appear before being considered absolute.
Defaults to 1.
.TP
\fB+[no]primary\fR
Whether or not to only use a single server if more than one server is available.
Defaults to using all servers.
.TP
\fB+[no]qr\fR
Toggles printing the request query. Off by default.
.TP
\fB+[no]question\fR
Toggles printing the question. On by default.
.TP
\fB+[no]recurse\fR
Toggles the RD (Recursion Desired) bit. On by default.
.TP
\fB+retry\fR=#
Same as +tries but does not include the initial attempt.
.TP
\fB+[no]search\fR
To use or not use the search list. Search list is not used by default.
.TP
\fB+[no]stats\fR
Toggles printing the statistics. On by default.
.TP
\fB+[no]tcp\fR
Whether to use TCP when querying name servers. Default is UDP.
.TP
\fB+tries\fR=#
Number of query tries. Defaults to 3.
.TP
\fB+[no]ttlid\fR
Display the TTL when printing the record. On by default.
.TP
\fB+[no]vc\fR
Alias for +[no]tcp
.SH FILES
${XDG_CONFIG_HOME}/adigrc
.SH "REPORTING BUGS"
Report bugs to the c-ares github issues tracker
.br
\fBhttps://github.com/c-ares/c-ares/issues\fR
.SH "SEE ALSO"
.PP
ahost(1).

50
deps/cares/docs/ahost.1 vendored Normal file
View File

@ -0,0 +1,50 @@
.\"
.\" Copyright (C) the Massachusetts Institute of Technology.
.\" Copyright (C) Daniel Stenberg
.\" SPDX-License-Identifier: MIT
.\"
.TH AHOST "1" "April 2011" "c-ares utilities"
.SH NAME
ahost \- print the A or AAAA record associated with a hostname or IP address
.SH SYNOPSIS
.B ahost
[\fIOPTION\fR]... \fIHOST\fR...
.SH DESCRIPTION
.PP
.\" Add any additional description here
.PP
Look up the DNS A or AAAA record associated with HOST (a hostname or an
IP address).
.PP
This utility comes with the \fBc\-ares\fR asynchronous resolver library.
.SH OPTIONS
.TP
\fB\-d\fR
Print some extra debugging output.
.TP
\fB\-h\fR, \fB\-?\fR
Display this help and exit.
.TP
\fB\-t\fR type
If type is "a", print the A record.
If type is "aaaa", print the AAAA record.
If type is "u", look for both AAAA and A records (default).
.TP
\fB\-s\fR server
Set the server list to use for DNS lookups.
.TP
\fB\-D\fR \fIdomain\fP
Specify the \fIdomain\fP to search instead of using the default values from
.br
/etc/resolv.conf. This option only has an effect on platforms that use
.br
/etc/resolv.conf
for DNS configuration; it has no effect on other platforms (such as Win32
or Android).
.SH "REPORTING BUGS"
Report bugs to the c-ares mailing list:
.br
\fBhttps://lists.haxx.se/listinfo/c-ares\fR
.SH "SEE ALSO"
.PP
adig(1)

33
deps/cares/docs/ares_cancel.3 vendored Normal file
View File

@ -0,0 +1,33 @@
.\"
.\" Copyright 1998 by the Massachusetts Institute of Technology.
.\" SPDX-License-Identifier: MIT
.\"
.TH ARES_CANCEL 3 "31 March 2004"
.SH NAME
ares_cancel \- Cancel a resolve
.SH SYNOPSIS
.nf
#include <ares.h>
void ares_cancel(ares_channel_t *\fIchannel\fP)
.fi
.SH DESCRIPTION
The \fBares_cancel(3)\fP function cancels all lookups/requests made on the the
name service channel identified by \fIchannel\fP. \fBares_cancel(3)\fP
invokes the callbacks for each pending query on the channel, passing a status
of
.BR ARES_ECANCELLED .
These calls give the callbacks a chance to clean up any state which might have
been stored in their arguments. If such a callback invocation adds a new
request to the channel, that request will \fInot\fP be cancelled by the
current invocation of \fBares_cancel(3)\fP.
.SH SEE ALSO
.BR ares_init (3)
.BR ares_destroy (3)
.SH NOTES
This function was added in c-ares 1.2.0
c-ares 1.6.0 and earlier pass a status of
.BR ARES_ETIMEOUT
instead of
.BR ARES_ECANCELLED .

75
deps/cares/docs/ares_create_query.3 vendored Normal file
View File

@ -0,0 +1,75 @@
.\"
.\" Copyright 1998 by the Massachusetts Institute of Technology.
.\" SPDX-License-Identifier: MIT
.\"
.TH ARES_CREATE_QUERY 3 "17 Aug 2012"
.SH NAME
ares_create_query \- Compose a single-question DNS query buffer
.SH SYNOPSIS
.nf
#include <ares.h>
int ares_create_query(const char *\fIname\fP,
int \fIdnsclass\fP,
int \fItype\fP,
unsigned short \fIid\fP,
int \fIrd\fP,
unsigned char **\fIbuf\fP,
int *\fIbuflen\fP,
int \fImax_udp_size\fP)
.fi
.SH DESCRIPTION
This function is deprecated as of c-ares 1.22, please use
\fIares_dns_record_create(3)\fP instead.
The \fIares_create_query(3)\fP function composes a DNS query with a single
question. The parameter \fIname\fP gives the query name as a NUL-terminated C
string of period-separated labels optionally ending with a period; periods and
backslashes within a label must be escaped with a backlash.
The parameters \fIdnsclass\fP and \fItype\fP give the class and type of the
query using the values defined in \fB<arpa/nameser.h>\fP.
The parameter \fIid\fP gives a 16-bit identifier for the query.
The parameter \fIrd\fP should be nonzero if recursion is desired, zero if not.
The query will be placed in an allocated buffer, a pointer to which will be
stored in the variable pointed to by \fIbuf\fP, and the length of which will
be stored in the variable pointed to by \fIbuflen\fP.
It is the caller's responsibility to free this buffer using
\fIares_free_string(3)\fP when it is no longer needed. The parameter
\fImax_udp_size\fP should be nonzero to activate EDNS. Usage of
\fIares_create_query(3)\fP\ with \fImax_udp_size\fP set to zero is equivalent
to using \fIares_mkquery(3)\fP.
.SH RETURN VALUES
.B ares_create_query
can return any of the following values:
.TP 15
.B ARES_SUCCESS
Construction of the DNS query succeeded.
.TP 15
.B ARES_ENOTFOUND
The query name
.I name
refers to a
.I .onion
domain name. See RFC 7686.
.TP 15
.B ARES_EBADNAME
The query name
.I name
could not be encoded as a domain name, either because it contained a
zero-length label or because it contained a label of more than 63
characters.
.TP 15
.B ARES_ENOMEM
Memory was exhausted.
.SH AVAILABILITY
Added in c-ares 1.10.0
.SH SEE ALSO
.BR ares_dns_record (3),
.BR ares_expand_name (3),
.BR ares_free_string (3),
.BR ares_mkquery (3)

29
deps/cares/docs/ares_destroy.3 vendored Normal file
View File

@ -0,0 +1,29 @@
.\"
.\" Copyright 1998 by the Massachusetts Institute of Technology.
.\" SPDX-License-Identifier: MIT
.\"
.TH ARES_DESTROY 3 "7 December 2004"
.SH NAME
ares_destroy \- Destroy a resolver channel
.SH SYNOPSIS
.nf
#include <ares.h>
void ares_destroy(ares_channel_t *\fIchannel\fP)
.fi
.SH DESCRIPTION
The \fBares_destroy(3)\fP function destroys the name service channel
identified by \fIchannel\fP, freeing all memory and closing all sockets used
by the channel.
\fBares_destroy(3)\fP invokes the callbacks for each pending query on the
channel, passing a status of \fIARES_EDESTRUCTION\fP. These calls give the
callbacks a chance to clean up any state which might have been stored in their
arguments. A callback must not add new requests to a channel being destroyed.
There is no ability to make this function thread-safe. No additional calls
using this channel may be made once this function is called.
.SH SEE ALSO
.BR ares_init (3),
.BR ares_cancel (3),
.BR ares_threadsafety (3)

20
deps/cares/docs/ares_destroy_options.3 vendored Normal file
View File

@ -0,0 +1,20 @@
.\"
.\" Copyright 1998 by the Massachusetts Institute of Technology.
.\" SPDX-License-Identifier: MIT
.\"
.TH ARES_DESTROY_OPTIONS 3 "1 June 2007"
.SH NAME
ares_destroy_options \- Destroy options initialized with ares_save_options
.SH SYNOPSIS
.nf
#include <ares.h>
void ares_destroy_options(struct ares_options *\fIoptions\fP)
.fi
.SH DESCRIPTION
The \fBares_destroy_options(3)\fP function destroys the options struct
identified by \Ioptions\fP, freeing all memory allocated by
\fBares_save_options(3)\fP.
.SH SEE ALSO
.BR ares_save_options (3),
.BR ares_init_options (3)

View File

@ -0,0 +1,4 @@
.\"
.\" Copyright (C) Daniel Stenberg
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_mapping.3

3
deps/cares/docs/ares_dns_class_t.3 vendored Normal file
View File

@ -0,0 +1,3 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_record.3

View File

@ -0,0 +1,4 @@
.\"
.\" Copyright (C) Daniel Stenberg
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_mapping.3

4
deps/cares/docs/ares_dns_datatype_t.3 vendored Normal file
View File

@ -0,0 +1,4 @@
.\"
.\" Copyright (C) Daniel Stenberg
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_mapping.3

3
deps/cares/docs/ares_dns_flags_t.3 vendored Normal file
View File

@ -0,0 +1,3 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_record.3

307
deps/cares/docs/ares_dns_mapping.3 vendored Normal file
View File

@ -0,0 +1,307 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.\"
.TH ARES_DNS_MAPPINGS 3 "12 November 2023"
.SH NAME
ares_dns_class_fromstr, ares_dns_class_tostr, ares_dns_datatype_t, ares_dns_opcode_tostr,
ares_dns_opt_datatype_t, ares_dns_opt_get_datatype, ares_dns_opt_get_name,
ares_dns_rcode_tostr, ares_dns_rec_type_fromstr, ares_dns_rr_get_keys,
ares_dns_rr_key_datatype, ares_dns_rr_key_to_rec_type, ares_dns_rr_key_tostr,
ares_dns_section_tostr, ares_opt_param_t, ares_svcb_param_t \-
Helper functions for converting dns record identifiers to and from their
respective types, as well identifying datatypes for various records.
.SH SYNOPSIS
.nf
#include <ares.h>
const char *ares_dns_rec_type_tostr(ares_dns_rec_type_t type);
const char *ares_dns_class_tostr(ares_dns_class_t qclass);
const char *ares_dns_opcode_tostr(ares_dns_opcode_t opcode);
const char *ares_dns_rr_key_tostr(ares_dns_rr_key_t key);
const char *ares_dns_section_tostr(ares_dns_section_t section);
const char *ares_dns_rcode_tostr(ares_dns_rcode_t rcode);
ares_bool_t ares_dns_class_fromstr(ares_dns_class_t *qclass, const char *str);
ares_bool_t ares_dns_rec_type_fromstr(ares_dns_rec_type_t *qtype,
const char *str);
const ares_dns_rr_key_t *ares_dns_rr_get_keys(ares_dns_rec_type_t type,
size_t *cnt);
ares_dns_datatype_t ares_dns_rr_key_datatype(ares_dns_rr_key_t key);
ares_dns_rec_type_t ares_dns_rr_key_to_rec_type(ares_dns_rr_key_t key);
ares_dns_opt_datatype_t ares_dns_opt_get_datatype(ares_dns_rr_key_t key,
unsigned short opt);
const char *ares_dns_opt_get_name(ares_dns_rr_key_t key, unsigned short opt);
.fi
.SH ENUMERATIONS
.B ares_dns_datatype_t -
Data types associated with \fIares_dns_rr_key_t\fP:
.RS 4
.B ARES_DATATYPE_INADDR
- IPv4 address as \fIstruct in_addr *\fP. Use \fIares_dns_rr_set_addr(3)\fP to
set and \fIares_dns_rr_get_addr(3)\fP to get.
.br
.B ARES_DATATYPE_INADDR6
- IPv6 address as \fIstruct ares_in6_addr *\fP. Use \fIares_dns_rr_set_addr6(3)\fP to
set and \fIares_dns_rr_get_addr6(3)\fP to get.
.br
.B ARES_DATATYPE_U8
- 8bit unsigned integer. Use \fIares_dns_rr_set_u8(3)\fP to
set and \fIares_dns_rr_get_u8(3)\fP to get.
.br
.B ARES_DATATYPE_U16
- 16bit unsigned integer. Use \fIares_dns_rr_set_u16(3)\fP to
set and \fIares_dns_rr_get_u16(3)\fP to get.
.br
.B ARES_DATATYPE_U32
- 32bit unsigned integer. Use \fIares_dns_rr_set_u32(3)\fP to
set and \fIares_dns_rr_get_u32(3)\fP to get.
.br
.B ARES_DATATYPE_NAME
- Null-terminated string of a domain name (series of labels). Use \fIares_dns_rr_set_str(3)\fP to
set and \fIares_dns_rr_get_str(3)\fP to get.
.br
.B ARES_DATATYPE_STR
- Null-terminated string. Use \fIares_dns_rr_set_str(3)\fP to
set and \fIares_dns_rr_get_str(3)\fP to get.
.br
.B ARES_DATATYPE_BIN
- Binary Data. Use \fIares_dns_rr_set_bin(3)\fP to
set and \fIares_dns_rr_get_bin(3)\fP to get.
.br
.B ARES_DATATYPE_BINP
- Officially defined as binary data, but likely printable. Guaranteed to have
a NULL terminator for convenience (not included in length). Use \fIares_dns_rr_set_bin(3)\fP to
set and \fIares_dns_rr_get_bin(3)\fP to get.
.br
.B ARES_DATATYPE_OPT
- Array of options. 16bit identifier, Binary data. Use \fIares_dns_rr_set_opt(3)\fP to
set and \fIares_dns_rr_get_opt(3)\fP to get.
.br
.B ARES_DATATYPE_ABINP
- Array of binary data, but likely printable. Guaranteed to have a NULL terminator
for convenience (not included in length). Use \fIares_dns_rr_add_abin(3)\fP to
set and \fIares_dns_rr_get_abin(3)\fP to get. Can also use
\fIares_dns_rr_set_bin(3)\fP and \fIares_dns_rr_get_bin(3)\fP if only concatenated
strings are desired.
.br
.RE
.B ares_dns_opt_datatype_t -
Data types associated with \fIARES_DATATYPE_OPT\fP parameters if known as returned
by \fIares_dns_opt_get_datatype(3)\fP:
.RS 4
.B ARES_OPT_DATATYPE_NONE
- No value allowed for this parameter
.br
.B ARES_OPT_DATATYPE_STR_LIST
- List of strings, each prefixed with a single octet representing the length as
defined by RFC 1035. Can use \fIares_expand_string(3)\fP until buffer is consumed.
.br
.B ARES_OPT_DATATYPE_U8_LIST
- List of 8bit unsigned integers, concatenated
.br
.B ARES_OPT_DATATYPE_U16
- 16bit unsigned integer in network byte order
.br
.B ARES_OPT_DATATYPE_U16_LIST
- list of 16bit unsigned integers in network byte order, concatenated.
.br
.B ARES_OPT_DATATYPE_U32
- 32bit unsigned integer in network byte order
.br
.B ARES_OPT_DATATYPE_U32_LIST
- list of 16bit unsigned integers in network byte order, concatenated.
.br
.B ARES_OPT_DATATYPE_INADDR4_LIST
- List of ipv4 addresses in network byte order, concatenated
.br
.B ARES_OPT_DATATYPE_INADDR6_LIST
- List of ipv6 addresses in network byte order, concatenated
.br
.B ARES_OPT_DATATYPE_BIN
- Binary Data
.br
.B ARES_OPT_DATATYPE_NAME
- DNS Domain Name binary format as defined in RFC1035, can use \fIares_expand_name(3)\fP
.br
.RE
.B ares_svcb_param_t -
SVCB (and HTTPS) RR known parameters as returned by \fIares_dns_opt_get_datatype(3)\fP
with \fIARES_RR_SVCB_PARAMS\fP or \fIARES_RR_HTTPS_PARAMS\fP:
.RS 4
.B ARES_SVCB_PARAM_MANDATORY
- Mandatory keys in this RR (RFC 9460 Section 8). Datatype: \fIARES_OPT_DATATYPE_U16_LIST\fP
.br
.B ARES_SVCB_PARAM_ALPN
- Additional supported protocols (RFC 9460 Section 7.1). Datatype: \fIARES_OPT_DATATYPE_STR_LIST\fP
.br
.B ARES_SVCB_PARAM_NO_DEFAULT_ALPN
- No support for default protocol (RFC 9460 Section 7.1). Datatype: \fIARES_OPT_DATATYPE_NONE\fP
.br
.B ARES_SVCB_PARAM_PORT
- Port for alternative endpoint (RFC 9460 Section 7.2). Datatype: \fIARES_OPT_DATATYPE_U16\fP
.br
.B ARES_SVCB_PARAM_IPV4HINT
- IPv4 address hints (RFC 9460 Section 7.3). Datatype: \fIARES_OPT_DATATYPE_INADDR4_LIST\fP
.br
.B ARES_SVCB_PARAM_ECH
- RESERVED (held for Encrypted ClientHello)
.br
.B ARES_SVCB_PARAM_IPV6HINT
- IPv6 address hints (RFC 9460 Section 7.3). Datatype: \fIARES_OPT_DATATYPE_INADDR6_LIST\fP
.br
.RE
.B ares_opt_param_t -
OPT RR known parameters as returned by \fIares_dns_opt_get_datatype(3)\fP
with \fIARES_RR_OPT_OPTIONS\fB:
.RS 4
.B ARES_OPT_PARAM_LLQ
- RFC 8764. Apple's DNS Long-Lived Queries Protocol. Datatype: \fIARES_OPT_DATATYPE_BIN\fP
.br
.B ARES_OPT_PARAM_UL
- http://files.dns-sd.org/draft-sekar-dns-ul.txt: Update Lease. Datatype: \fIARES_OPT_DATATYPE_U32\fP
.br
.B ARES_OPT_PARAM_NSID
- RFC 5001. Name Server Identification. Datatype: \fIARES_OPT_DATATYPE_BIN\fP
.br
.B ARES_OPT_PARAM_DAU
- RFC 6975. DNSSEC Algorithm Understood. Datatype: \fIARES_OPT_DATATYPE_U8_LIST\fP
.br
.B ARES_OPT_PARAM_DHU
- RFC 6975. DS Hash Understood. Datatype: \fIARES_OPT_DATATYPE_U8_LIST\fP
.br
.B ARES_OPT_PARAM_N3U
- RFC 6975. NSEC3 Hash Understood. Datatype: \fIARES_OPT_DATATYPE_U8_LIST\fP
.br
.B ARES_OPT_PARAM_EDNS_CLIENT_SUBNET
- RFC 7871. Client Subnet. Datatype: \fIARES_OPT_DATATYPE_BIN\fP
.br
.B ARES_OPT_PARAM_EDNS_EXPIRE
- RFC 7314. Expire Timer. Datatype: \fIARES_OPT_DATATYPE_U32\fP
.br
.B ARES_OPT_PARAM_COOKIE
- RFC 7873. Client and Server Cookies. Datatype: \fIARES_OPT_DATATYPE_BIN\fP
.br
.B ARES_OPT_PARAM_EDNS_TCP_KEEPALIVE
- RFC 7828. TCP Keepalive timeout. Datatype: \fIARES_OPT_DATATYPE_U16\fP
.br
.B ARES_OPT_PARAM_PADDING
- RFC 7830. Padding. Datatype: \fIARES_OPT_DATATYPE_BIN\fP
.br
.B ARES_OPT_PARAM_CHAIN
- RFC 7901. Chain query requests. Datatype: \fIARES_OPT_DATATYPE_NAME\fP
.br
.B ARES_OPT_PARAM_EDNS_KEY_TAG
- RFC 8145. Signaling Trust Anchor Knowledge in DNSSEC. Datatype: \fIARES_OPT_DATATYPE_U16_LIST\fP
.br
.B ARES_OPT_PARAM_EXTENDED_DNS_ERROR
- RFC 8914. Extended ERROR code and message. Datatype: \fIARES_OPT_DATATYPE_BIN\fP
.br
.RE
.SH DESCRIPTION
The \fIares_dns_rec_type_tostr(3)\fP function outputs a human readable DNS record
type from its numeric form passed in
.IR type .
The \fIares_dns_class_tostr(3)\fP function outputs a human readable DNS class
from its numeric form passed in
.IR qclass .
The \fIares_dns_opcode_tostr(3)\fP function outputs a human readable DNS opcode
from its numeric form in
.IR opcode .
The \fIares_dns_rr_key_tostr(3)\fP function outputs a human readable DNS Resource
Record parameter name from its numeric form in
.IR key .
The \fIares_dns_section_tostr(3)\fP function outputs a human readable DNS
message section from its numeric form in
.IR section .
The \fIares_dns_rcode_tostr(3)\fP function outputs a human readable DNS
response code from its numeric form in
.IR rcode .
The \fIares_dns_class_fromstr(3)\fP function outputs the DNS class in numeric
from from its string representation in
.IR str .
The result is stored into the variable pointed to by
.IR qclass .
The \fIares_dns_rec_type_fromstr(3)\fP function outputs the DNS record type in
numeric from from its string representation in
.IR str .
The result is stored into the variable pointed to by
.IR qtype .
The \fIares_dns_rr_get_keys(3)\fP function retrieves a list of parameters that
may be set or retrieved for the provided
.IR type .
The count of returned keys is stored into the variable pointed to by
.IR cnt .
The \fIares_dns_rr_key_datatype(3)\fP function retrieves the associated datatype
for an RR parameter specified by
.IR key .
The \fIares_dns_rr_key_to_rec_type(3)\fP function dereferences the provided RR
parameter specified by
.IR key
to the DNS Record Type it belongs.
The \fIares_dns_opt_get_datatype(3)\fP function is used in association with
\fIares_dns_rr_set_opt(3)\fP and \fIares_dns_rr_get_opt(3)\fP to retrieve the
datatype of an option record contained within an RR as specified in
.IR key
if it is known. The raw option record identifier is provided by
.IR opt .
The \fIares_dns_opt_get_name(3)\fP function is used in association with
\fIares_dns_rr_set_opt(3)\fP and \fIares_dns_rr_get_opt(3)\fP to retrieve human
readable parameter name of an option record contained within an RR as specified
in
.IR key
if it is known. The raw option record identifier is provided by
.IR opt .
.SH RETURN VALUES
\fIares_dns_rec_type_tostr(3)\fP, \fIares_dns_class_tostr(3)\fP,
\fIares_dns_opcode_tostr(3)\fP, \fIares_dns_rr_key_tostr(3)\fP,
\fIares_dns_section_tostr(3)\fP, \fIares_dns_rcode_tostr(3)\fP, and
\fIares_dns_opt_get_name(3)\fP all return a human printable ASCII string, or
NULL on error.
\fIares_dns_class_fromstr(3)\fP and \fIares_dns_rec_type_fromstr(3)\fP return
.B ARES_TRUE
on successful conversion, otherwise
.B ARES_FALSE.
\fIares_dns_rr_get_keys(3)\fP returns an array of keys or NULL on failure.
\fIares_dns_rr_key_datatype(3)\fP, \fIares_dns_rr_key_to_rec_type(3)\fP, and
\fIares_dns_opt_get_datatype(3)\fP return their respective integer values, or
0 on failure.
.SH AVAILABILITY
These functions were first introduced in c-ares version 1.22.0.
.SH SEE ALSO
.BR ares_dns_record (3),
.BR ares_dns_rr (3),
.BR ares_init (3)

3
deps/cares/docs/ares_dns_opcode_t.3 vendored Normal file
View File

@ -0,0 +1,3 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_record.3

View File

@ -0,0 +1,4 @@
.\"
.\" Copyright (C) Daniel Stenberg
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_mapping.3

View File

@ -0,0 +1,4 @@
.\"
.\" Copyright (C) Daniel Stenberg
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_mapping.3

View File

@ -0,0 +1,4 @@
.\"
.\" Copyright (C) Daniel Stenberg
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_mapping.3

View File

@ -0,0 +1,4 @@
.\"
.\" Copyright (C) Daniel Stenberg
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_mapping.3

3
deps/cares/docs/ares_dns_parse.3 vendored Normal file
View File

@ -0,0 +1,3 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_record.3

3
deps/cares/docs/ares_dns_rcode_t.3 vendored Normal file
View File

@ -0,0 +1,3 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_record.3

View File

@ -0,0 +1,4 @@
.\"
.\" Copyright (C) Daniel Stenberg
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_mapping.3

View File

@ -0,0 +1,4 @@
.\"
.\" Copyright (C) Daniel Stenberg
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_mapping.3

3
deps/cares/docs/ares_dns_rec_type_t.3 vendored Normal file
View File

@ -0,0 +1,3 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_record.3

View File

@ -0,0 +1,4 @@
.\"
.\" Copyright (C) Daniel Stenberg
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_mapping.3

455
deps/cares/docs/ares_dns_record.3 vendored Normal file
View File

@ -0,0 +1,455 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.\"
.TH ARES_DNS_RECORD 3 "12 November 2023"
.SH NAME
ares_dns_class_t, ares_dns_flags_t, ares_dns_opcode_t, ares_dns_parse,
ares_dns_rcode_t, ares_dns_record_create, ares_dns_record_destroy,
ares_dns_record_get_flags, ares_dns_record_get_id, ares_dns_record_get_opcode,
ares_dns_record_get_rcode, ares_dns_record_query_add, ares_dns_record_query_cnt,
ares_dns_record_query_get, ares_dns_rec_type_t, ares_dns_write \-
DNS Record parsing, writing, creating and destroying functions.
.SH SYNOPSIS
.nf
#include <ares.h>
void ares_dns_record_destroy(ares_dns_record_t *dnsrec);
ares_status_t ares_dns_parse(const unsigned char *buf,
size_t buf_len, unsigned int flags,
ares_dns_record_t **dnsrec);
ares_status_t ares_dns_write(const ares_dns_record_t *dnsrec,
unsigned char **buf, size_t *buf_len);
ares_status_t ares_dns_record_create(ares_dns_record_t **dnsrec,
unsigned short id,
unsigned short flags,
ares_dns_opcode_t opcode,
ares_dns_rcode_t rcode);
ares_dns_record_t *ares_dns_record_duplicate(const ares_dns_record_t *dnsrec);
unsigned short ares_dns_record_get_id(const ares_dns_record_t *dnsrec);
ares_bool_t ares_dns_record_set_id(ares_dns_record_t *dnsrec,
unsigned short id);
unsigned short ares_dns_record_get_flags(const ares_dns_record_t *dnsrec);
ares_dns_opcode_t ares_dns_record_get_opcode(const ares_dns_record_t *dnsrec);
ares_dns_rcode_t ares_dns_record_get_rcode(const ares_dns_record_t *dnsrec);
ares_status_t ares_dns_record_query_add(ares_dns_record_t *dnsrec,
const char *name,
ares_dns_rec_type_t qtype,
ares_dns_class_t qclass);
ares_status_t ares_dns_record_query_set_name(ares_dns_record_t *dnsrec,
size_t idx,
const char *name);
ares_status_t ares_dns_record_query_set_type(ares_dns_record_t *dnsrec,
size_t idx,
ares_dns_rec_type_t qtype);
size_t ares_dns_record_query_cnt(const ares_dns_record_t *dnsrec);
ares_status_t ares_dns_record_query_get(const ares_dns_record_t *dnsrec,
size_t idx, const char **name,
ares_dns_rec_type_t *qtype,
ares_dns_class_t *qclass);
.fi
.SH ENUMERATIONS
.B ares_dns_rec_type_t -
DNS Record types handled by c-ares. Some record types may only be valid
on requests, and some may only be valid on responses:
.RS 4
.B ARES_REC_TYPE_A
- Host address
.br
.B ARES_REC_TYPE_NS
- Authoritative server
.br
.B ARES_REC_TYPE_CNAME
- Canonical name
.br
.B ARES_REC_TYPE_SOA
- Start of authority zone
.br
.B ARES_REC_TYPE_PTR
- Domain name pointer
.br
.B ARES_REC_TYPE_HINFO
- Host information
.br
.B ARES_REC_TYPE_MX
- Mail routing information
.br
.B ARES_REC_TYPE_TXT
- Text strings
.br
.B ARES_REC_TYPE_SIG
- RFC 2535. RFC 2931. SIG Record
.br
.B ARES_REC_TYPE_AAAA
- RFC 3596. Ip6 Address
.br
.B ARES_REC_TYPE_SRV
- RFC 2782. Server Selection
.br
.B ARES_REC_TYPE_NAPTR
- RFC 3403. Naming Authority Pointer
.br
.B ARES_REC_TYPE_OPT
- RFC 6891. EDNS0 option (meta-RR). Pseudo Record.
.br
.B ARES_REC_TYPE_TLSA
- RFC 6698. DNS-Based Authentication of Named Entities (DANE) Transport Layer Security (TLS) Protocol: TLSA
.br
.B ARES_REC_TYPE_SVCB
- RFC 9460. General Purpose Service Binding
.br
.B ARES_REC_TYPE_HTTPS -
- RFC 9460. Service Binding type for use with HTTPS
.br
.B ARES_REC_TYPE_ANY
- Wildcard match. Not response RR
.br
.B ARES_REC_TYPE_URI
- RFC 7553. Uniform Resource Identifier
.br
.B ARES_REC_TYPE_CAA
- RFC 6844. Certification Authority Authorization
.br
.B ARES_REC_TYPE_RAW_RR
- Used as an indicator that the RR record is not parsed, but provided in wire
format
.br
.RE
.B ares_dns_class_t -
DNS Classes for requests and responses:
.RS 4
.B ARES_CLASS_IN
- Internet
.br
.B ARES_CLASS_CHAOS
- CHAOS
.br
.B ARES_CLASS_HESOID
- Hesoid [Dyer 87]
.br
.B ARES_CLASS_NONE
- RFC 2136
.br
.B ARES_CLASS_ANY
- Any class (requests only)
.br
.RE
.B ares_dns_opcode_t -
DNS Header Opcodes:
.RS 4
.B ARES_OPCODE_QUERY
- Standard query
.br
.B ARES_OPCODE_IQUERY
- Inverse query. Obsolete
.br
.B ARES_OPCODE_STATUS
- Name server status query
.br
.B ARES_OPCODE_NOTIFY
- Zone change notification (RFC 1996)
.br
.B ARES_OPCODE_UPDATE
- Zone update message (RFC 2136)
.br
.RE
.B ares_dns_flags_t -
DNS Header Flags:
.RS 4
.B ARES_FLAG_QR
- QR. If set, is a response
.br
.B ARES_FLAG_AA
- Authoritative Answer. If set, is authoritative
.br
.B ARES_FLAG_TC
- Truncation. If set, is truncated response
.br
.B ARES_FLAG_RD
- Recursion Desired. If set, recursion is desired
.br
.B ARES_FLAG_RA
- Recursion Available. If set, server supports recursion
.br
.B ARES_FLAG_AD
- RFC 2065. Authentic Data bit indicates in a response that the data included
has been verified by the server providing it
.br
.B ARES_FLAG_CD
- RFC 2065. Checking Disabled bit indicates in a query that non-verified data
is acceptable to the resolver sending the query
.br
.RE
.B ares_dns_rcode_t -
DNS Response codes from server:
.RS 4
.B ARES_RCODE_NOERROR
- Success
.br
.B ARES_RCODE_FORMERR
- Format error. The name server was unable to interpret the query
.br
.B ARES_RCODE_SERVFAIL
- Server Failure. The name server was unable to process this query due to a
problem with the nameserver
.br
.B ARES_RCODE_NXDOMAIN
- Name Error. Meaningful only for responses from an authoritative name server,
this code signifies that the domain name referenced in the query does not exist.
.br
.B ARES_RCODE_NOTIMP
- Not implemented. The name server does not support the requested kind of query
.br
.B ARES_RCODE_REFUSED
- Refused. The name server refuses to perform the specified operation for policy
reasons.
.br
.B ARES_RCODE_YXDOMAIN
- RFC 2136. Some name that ought not to exist, does exist
.br
.B ARES_RCODE_YXRRSET
- RFC 2136. Some RRset that ought to not exist, does exist
.br
.B ARES_RCODE_NXRRSET
- RFC 2136. Some RRset that ought to exist, does not exist
.br
.B ARES_RCODE_NOTAUTH
- RFC 2136. The server is not authoritative for the zone named in the Zone section.
.br
.B ARES_RCODE_NOTZONE
- RFC 2136. A name used in the Prerequisite or Update Section is not within the
zone denoted by the Zone Section.
.br
.B ARES_RCODE_DSOTYPEI
- RFC 8409. DSO-TYPE Not implemented
.br
.B ARES_RCODE_BADSIG
- RFC 8945. TSIG Signature Failure
.br
.B ARES_RCODE_BADKEY
- RFC 8945. Key not recognized
.br
.B ARES_RCODE_BADTIME
- RFC 8945. Signature out of time window
.br
.B ARES_RCODE_BADMODE
- RFC 2930. Bad TKEY Mode
.br
.B ARES_RCODE_BADNAME
- RFC 2930. Duplicate Key Name
.br
.B ARES_RCODE_BADALG
- RFC 2930. Algorithm not supported
.br
.B ARES_RCODE_BADTRUNC
- RFC 8945. Bad Truncation
.br
.B ARES_RCODE_BADCOOKIE
- RFC 7973. Bad/missing Server Cookie
.br
.RE
.B ares_dns_parse_flags_t -
Flags for altering \fIares_dns_parse(3)\fP behaviour:
.RS 4
.B ARES_DNS_PARSE_AN_BASE_RAW
- Parse Answer Section from RFC 1035 that allow name compression as RAW RR type
.br
.B ARES_DNS_PARSE_NS_BASE_RAW
- Parse Authority Section from RFC 1035 that allow name compression as RAW RR type
.br
.B ARES_DNS_PARSE_AR_BASE_RAW
- Parse Additional Section from RFC 1035 that allow name compression as RAW RR type
.br
.B ARES_DNS_PARSE_AN_EXT_RAW
- Parse Answer Section from later RFCs (no name compression) as RAW RR type
.br
.B ARES_DNS_PARSE_NS_EXT_RAW
- Parse Authority Section from later RFCs (no name compression) as RAW RR type
.br
.B ARES_DNS_PARSE_AR_EXT_RAW
- Parse Additional Section from later RFCs (no name compression) as RAW RR type
.br
.RE
.SH DESCRIPTION
The \fIares_dns_record_destroy(3)\fP function destroys the memory associated
with the dns record created by either \fIares_dns_record_create(3)\fP or
\fIares_dns_parse(3)\fP passed in via
.IR dnsrec .
The \fIares_dns_parse(3)\fP function parses the buffer provided in
.IR buf
with length provided in
.IR buf_len.
The
.IR flags
parameter can be one or more \fIares_dns_parse_flags_t\fP, or zero if no
flags are needed. The resulting dns record data structure is stored into the
variable pointed to by
.IR dnsrec
and must be destroyed using \fIares_dns_record_destroy(3)\fP.
The \fIares_dns_write(3)\fP function takes a populated DNS record structure in
.IR dnsrec
and writes a wire-format DNS message into the variable pointed to by
.IR buf
and writes the length of the buffer into the variable pointed to by
.IR buf_len.
The buffer must be destroyed using \fIares_free_string(3)\fP.
The \fIares_dns_record_create(3)\fP function creates an empty DNS record structure
in the variable pointed to by
.IR dnsrec.
The
.IR id
parameter is the DNS message id, however if passing to \fIares_send(3)\fP this
identifier will be overwritten, so should typically be 0. The
.IR flags
parameter is one or more \fIares_dns_flags_t\fP. The opcode is passed in the
.IR opcode
parameter and should typically be \fIARES_OPCODE_QUERY\fP. The response code
is meant mostly for responses and is passed in the
.IR rcode
parameter and is typically \fPARES_RCODE_NOERROR\fP.
The \fIares_dns_record_duplicate(3)\fP function duplicates an existing DNS
record structure. This may be useful if needing to save a result as retrieved
from \fIares_send_dnsrec(3)\fP or \fIares_search_dnsrec(3)\fP. The structure
to be duplicated is passed in the
.IR dnsrec
parameter, and the duplicated copy is returned, or NULL on error such as
out of memory.
The \fIares_dns_record_get_id(3)\fP function is used to retrieve the DNS
message id from the DNS record provided in the
.IR dnsrec
parameter.
The \fIares_dns_record_set_id(3)\fP function is used to set the DNS
message id in the
.IR id
parameter from the DNS record provided in the
.IR dnsrec
parameter. This id will be overwritten when passing the record to c-ares,
so mostly exists for external purposes.
The \fIares_dns_record_get_flags(3)\fP function is used to retrieve the DNS
message flags from the DNS record provided in the
.IR dnsrec
parameter.
The \fIares_dns_record_get_opcode(3)\fP function is used to retrieve the DNS
message flags from the DNS record provided in the
.IR dnsrec
parameter.
The \fIares_dns_record_get_rcode(3)\fP function is used to retrieve the DNS
message response code from the DNS record provided in the
.IR dnsrec
parameter.
The \fIares_dns_record_query_add(3)\fP function is used to add a question to
the DNS record provided in the
.IR dnsrec
parameter. The domain name specified for the question is provided in the
.IR name
parameter, along with the question type in the
.IR qtype
parameter and the question class (typically \fIARES_CLASS_IN\fP) in the
.IR qclass
parameter.
The \fIares_dns_record_query_set_name(3)\fP function is used to modify the
question name in the DNS record provided in the
.IR dnsrec
parameter. The index of the query, which must be less than
\fIares_dns_record_query_cnt(3)\fP, is provided in the
.IR idx
parameter. The new domain name is provided in the
.IR name
parameter. Care should be taken as this will cause invalidation of any
\fIname\fP pointer retrieved from \fIares_dns_Record_query_get(3)\fP. This
function is useful if sending multiple similar queries without re-creating
the entire DNS query.
The \fIares_dns_record_query_set_type(3)\fP function is used to modify the
question type in the DNS record provided in the
.IR dnsrec
parameter. The index of the query, which must be less than
\fIares_dns_record_query_cnt(3)\fP, is provided in the
.IR idx
parameter. The new query type is provided in the
.IR qtype
parameter.
The \fIares_dns_record_query_cnt(3)\fP function is used to retrieve the number
of DNS questions in the DNS record provided in the
.IR dnsrec
parameter.
The \fIares_dns_record_query_get(3)\fP function is used to retrieve the details
of a single DNS question in the provided
.IR dnsrec
parameter. The index provided in the
.IR idx
parameter must be less than the value returned from \fIares_dns_record_query_cnt(3)\fP.
The DNS question name will be returned in the variable pointed to by the
.IR name
parameter, this may be provided as NULL if the name is not needed. This pointer
will be invalided by any call to \fIares_dns_record_query_set_name(3)\fP.
The DNS question type will be returned in the variable pointed to by the
.IR qtype
parameter, this may be provided as NULL if the type is not needed.
The DNS question class will be returned in the variable pointed to by the
.IR qclass
parameter, this may be provided as NULL if the class is not needed.
.SH RETURN VALUES
\fIares_dns_parse(3)\fP, \fIares_dns_write(3)\fP, \fIares_dns_record_create(3)\fP,
\fIares_dns_record_query_add(3)\fP, and \fIares_dns_record_query_get(3)\fP all
return an \fIares_status_t\fP error code.
.B ARES_SUCCESS
is returned on success,
.B ARES_ENOMEM
is returned on out of memory,
.B ARES_EFORMERR
is returned on misuse.
\fIares_dns_record_get_id(3)\fP, \fIares_dns_record_set_id(3)\fP,
\fIares_dns_record_get_flags(3)\fP, \fIares_dns_record_get_opcode(3)\fP,
\fIares_dns_record_get_rcode(3)\fP, and \fIares_dns_record_query_cnt(3)\fP
all returned their prescribed datatype values and in general can't fail except
for misuse cases, in which a 0 may be returned, however 0 can also be a valid
return value for most of these functions.
.SH AVAILABILITY
These functions were first introduced in c-ares version 1.22.0.
.SH SEE ALSO
.BR ares_dns_mapping (3),
.BR ares_dns_rr (3),
.BR ares_free_string (3)

View File

@ -0,0 +1,3 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_record.3

View File

@ -0,0 +1,3 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_record.3

View File

@ -0,0 +1,3 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_record.3

View File

@ -0,0 +1,3 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_record.3

View File

@ -0,0 +1,3 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_record.3

View File

@ -0,0 +1,3 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_record.3

View File

@ -0,0 +1,3 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_record.3

View File

@ -0,0 +1,3 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_record.3

View File

@ -0,0 +1,3 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_record.3

View File

@ -0,0 +1,3 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_record.3

View File

@ -0,0 +1,3 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_record.3

View File

@ -0,0 +1,3 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_record.3

View File

@ -0,0 +1,3 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_rr.3

View File

@ -0,0 +1,3 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_rr.3

View File

@ -0,0 +1,3 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_rr.3

View File

@ -0,0 +1,3 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_rr.3

View File

@ -0,0 +1,3 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_rr.3

View File

@ -0,0 +1,3 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_record.3

744
deps/cares/docs/ares_dns_rr.3 vendored Normal file
View File

@ -0,0 +1,744 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.\"
.TH ARES_DNS_RR 3 "12 November 2023"
.SH NAME
ares_dns_record_rr_add, ares_dns_record_rr_cnt, ares_dns_record_rr_del,
ares_dns_record_rr_get, ares_dns_record_rr_get_const, ares_dns_rr_get_addr,
ares_dns_rr_get_addr6, ares_dns_rr_get_bin, ares_dns_rr_get_abin_cnt,
ares_dns_rr_get_abin, ares_dns_rr_get_class,
ares_dns_rr_get_name, ares_dns_rr_get_opt, ares_dns_rr_get_opt_byid,
ares_dns_rr_get_opt_cnt, ares_dns_rr_get_str, ares_dns_rr_get_ttl,
ares_dns_rr_get_type, ares_dns_rr_get_u16, ares_dns_rr_get_u32,
ares_dns_rr_get_u8, ares_dns_rr_key_t, ares_dns_rr_set_addr,
ares_dns_rr_set_addr6, ares_dns_rr_set_bin, ares_dns_rr_add_abin,
ares_dns_rr_del_abin, ares_dns_rr_set_opt,
ares_dns_rr_set_str, ares_dns_rr_set_u16, ares_dns_rr_set_u32,
ares_dns_rr_set_u8, ares_dns_section_t, ares_tlsa_match_t,
ares_tlsa_selector_t, ares_tlsa_usage_t \-
DNS Resource Record creating, reading, and writing functions.
.SH SYNOPSIS
.nf
#include <ares.h>
size_t ares_dns_record_rr_cnt(const ares_dns_record_t *dnsrec,
ares_dns_section_t sect);
ares_status_t ares_dns_record_rr_add(ares_dns_rr_t **rr_out,
ares_dns_record_t *dnsrec,
ares_dns_section_t sect,
const char *name,
ares_dns_rec_type_t type,
ares_dns_class_t rclass,
unsigned int ttl);
ares_dns_rr_t *ares_dns_record_rr_get(ares_dns_record_t *dnsrec,
ares_dns_section_t sect,
size_t idx);
const ares_dns_rr_t *ares_dns_record_rr_get_const(const ares_dns_record_t *dnsrec,
ares_dns_section_t sect,
size_t idx);
ares_status_t ares_dns_record_rr_del(ares_dns_record_t *dnsrec,
ares_dns_section_t sect,
size_t idx);
const char *ares_dns_rr_get_name(const ares_dns_rr_t *rr);
ares_dns_rec_type_t ares_dns_rr_get_type(const ares_dns_rr_t *rr);
ares_dns_class_t ares_dns_rr_get_class(const ares_dns_rr_t *rr);
unsigned int ares_dns_rr_get_ttl(const ares_dns_rr_t *rr);
ares_status_t ares_dns_rr_set_addr(ares_dns_rr_t *dns_rr,
ares_dns_rr_key_t key,
const struct in_addr *addr);
ares_status_t ares_dns_rr_set_addr6(ares_dns_rr_t *dns_rr,
ares_dns_rr_key_t key,
const struct ares_in6_addr *addr);
ares_status_t ares_dns_rr_set_str(ares_dns_rr_t *dns_rr,
ares_dns_rr_key_t key,
const char *val);
ares_status_t ares_dns_rr_set_u8(ares_dns_rr_t *dns_rr,
ares_dns_rr_key_t key,
unsigned char val);
ares_status_t ares_dns_rr_set_u16(ares_dns_rr_t *dns_rr,
ares_dns_rr_key_t key,
unsigned short val);
ares_status_t ares_dns_rr_set_u32(ares_dns_rr_t *dns_rr,
ares_dns_rr_key_t key,
unsigned int val);
ares_status_t ares_dns_rr_set_bin(ares_dns_rr_t *dns_rr,
ares_dns_rr_key_t key,
const unsigned char *val,
size_t len);
ares_status_t ares_dns_rr_add_abin(ares_dns_rr_t *dns_rr,
ares_dns_rr_key_t key,
const unsigned char *val,
size_t len);
ares_status_t ares_dns_rr_del_abin(ares_dns_rr_t *dns_rr,
ares_dns_rr_key_t key,
size_t idx);
ares_status_t ares_dns_rr_set_opt(ares_dns_rr_t *dns_rr,
ares_dns_rr_key_t key,
unsigned short opt,
const unsigned char *val,
size_t val_len);
ares_status_t ares_dns_rr_del_opt_byid(ares_dns_rr_t *dns_rr,
ares_dns_rr_key_t key,
unsigned short opt);
const struct in_addr *ares_dns_rr_get_addr(const ares_dns_rr_t *dns_rr,
ares_dns_rr_key_t key);
const struct ares_in6_addr *ares_dns_rr_get_addr6(const ares_dns_rr_t *dns_rr,
ares_dns_rr_key_t key);
const char *ares_dns_rr_get_str(const ares_dns_rr_t *dns_rr,
ares_dns_rr_key_t key);
unsigned char ares_dns_rr_get_u8(const ares_dns_rr_t *dns_rr,
ares_dns_rr_key_t key);
unsigned short ares_dns_rr_get_u16(const ares_dns_rr_t *dns_rr,
ares_dns_rr_key_t key);
unsigned int ares_dns_rr_get_u32(const ares_dns_rr_t *dns_rr,
ares_dns_rr_key_t key);
const unsigned char *ares_dns_rr_get_bin(const ares_dns_rr_t *dns_rr,
ares_dns_rr_key_t key,
size_t *len);
size_t ares_dns_rr_get_abin_cnt(const ares_dns_rr_t *dns_rr,
ares_dns_rr_key_t key);
const unsigned char *ares_dns_rr_get_abin(const ares_dns_rr_t *dns_rr,
ares_dns_rr_key_t key, size_t idx,
size_t *len);
size_t ares_dns_rr_get_opt_cnt(const ares_dns_rr_t *dns_rr,
ares_dns_rr_key_t key);
unsigned short ares_dns_rr_get_opt(const ares_dns_rr_t *dns_rr,
ares_dns_rr_key_t key,
size_t idx,
const unsigned char **val,
size_t *val_len);
ares_bool_t ares_dns_rr_get_opt_byid(const ares_dns_rr_t *dns_rr,
ares_dns_rr_key_t key,
unsigned short opt,
const unsigned char **val,
size_t *val_len);
.fi
.SH ENUMERATIONS
.B ares_dns_section_t -
DNS RR section types:
.RS 4
.B ARES_SECTION_ANSWER
- Answer section
.br
.B ARES_SECTION_AUTHORITY
- Authority section
.br
.B ARES_SECTION_ADDITIONAL
- Additional Information section
.br
.RE
.B ares_dns_rr_key_t -
Keys used for handling RR record parameters:
.RS 4
.B ARES_RR_A_ADDR
- A Record. Address. Datatype: \fIARES_DATATYPE_INADDR\fP
.br
.B ARES_RR_NS_NSDNAME
- NS Record. Name. Datatype: \fIARES_DATATYPE_NAME\fP
.br
.B ARES_RR_CNAME_CNAME
- CNAME Record. CName. Datatype: \fIARES_DATATYPE_NAME\fP
.br
.B ARES_RR_SOA_MNAME
- SOA Record. MNAME, Primary Source of Data. Datatype: \fIARES_DATATYPE_NAME\fP
.br
.B ARES_RR_SOA_RNAME
- SOA Record. RNAME, Mailbox of person responsible. Datatype: \fIARES_DATATYPE_NAME\fP
.br
.B ARES_RR_SOA_SERIAL
- SOA Record. Serial, version. Datatype: \fIARES_DATATYPE_U32\fP
.br
.B ARES_RR_SOA_REFRESH
- SOA Record. Refresh, zone refersh interval. Datatype: \fIARES_DATATYPE_U32\fP
.br
.B ARES_RR_SOA_RETRY
- SOA Record. Retry, failed refresh retry interval. Datatype: \fIARES_DATATYPE_U32\fP
.br
.B ARES_RR_SOA_EXPIRE
- SOA Record. Expire, upper limit on authority. Datatype: \fIARES_DATATYPE_U32\fP
.br
.B ARES_RR_SOA_MINIMUM
- SOA Record. Minimum, RR TTL. Datatype: \fIARES_DATATYPE_U32\fP
.br
.B ARES_RR_PTR_DNAME
- PTR Record. DNAME, pointer domain. Datatype: \fIARES_DATATYPE_NAME\fP
.br
.B ARES_RR_HINFO_CPU
- HINFO Record. CPU. Datatype: \fIARES_DATATYPE_STR\fP
.br
.B ARES_RR_HINFO_OS
- HINFO Record. OS. Datatype: \fIARES_DATATYPE_STR\fP
.br
.B ARES_RR_MX_PREFERENCE
- MX Record. Preference. Datatype: \fIARES_DATATYPE_U16\fP
.br
.B ARES_RR_MX_EXCHANGE
- MX Record. Exchange, domain. Datatype: \fIARES_DATATYPE_NAME\fP
.br
.B ARES_RR_TXT_DATA
- TXT Record. Data. Datatype: \fIARES_DATATYPE_ABINP\fP
.br
.B ARES_RR_SIG_TYPE_COVERED
- SIG Record. Type Covered. Datatype: \fIARES_DATATYPE_U16\fP
.br
.B ARES_RR_SIG_ALGORITHM
- SIG Record. Algorithm. Datatype: \fIARES_DATATYPE_U8\fP
.br
.B ARES_RR_SIG_LABELS
- SIG Record. Labels. Datatype: \fIARES_DATATYPE_U8\fP
.br
.B ARES_RR_SIG_ORIGINAL_TTL
- SIG Record. Original TTL. Datatype: \fIARES_DATATYPE_U32\fP
.br
.B ARES_RR_SIG_EXPIRATION
- SIG Record. Signature Expiration. Datatype: \fIARES_DATATYPE_U32\fP
.br
.B ARES_RR_SIG_INCEPTION
- SIG Record. Signature Inception. Datatype: \fIARES_DATATYPE_U32\fP
.br
.B ARES_RR_SIG_KEY_TAG
- SIG Record. Key Tag. Datatype: \fIARES_DATATYPE_U16\fP
.br
.B ARES_RR_SIG_SIGNERS_NAME
- SIG Record. Signer's Name. Datatype: \fIARES_DATATYPE_NAME\fP
.br
.B ARES_RR_SIG_SIGNATURE
- SIG Record. Signature. Datatype: \fIARES_DATATYPE_BIN\fP
.br
.B ARES_RR_AAAA_ADDR
- AAAA Record. Address. Datatype: \fIARES_DATATYPE_INADDR6\fP
.br
.B ARES_RR_SRV_PRIORITY
- SRV Record. Priority. Datatype: \fIARES_DATATYPE_U16\fP
.br
.B ARES_RR_SRV_WEIGHT
- SRV Record. Weight. Datatype: \fIARES_DATATYPE_U16\fP
.br
.B ARES_RR_SRV_PORT
- SRV Record. Port. Datatype: \fIARES_DATATYPE_U16\fP
.br
.B ARES_RR_SRV_TARGET
- SRV Record. Target domain. Datatype: \fIARES_DATATYPE_NAME\fP
.br
.B ARES_RR_NAPTR_ORDER
- NAPTR Record. Order. Datatype: \fIARES_DATATYPE_U16\fP
.br
.B ARES_RR_NAPTR_PREFERENCE
- NAPTR Record. Preference. Datatype: \fIARES_DATATYPE_U16\fP
.br
.B ARES_RR_NAPTR_FLAGS
- NAPTR Record. Flags. Datatype: \fIARES_DATATYPE_STR\fP
.br
.B ARES_RR_NAPTR_SERVICES
- NAPTR Record. Services. Datatype: \fIARES_DATATYPE_STR\fP
.br
.B ARES_RR_NAPTR_REGEXP
- NAPTR Record. Regexp. Datatype: \fIARES_DATATYPE_STR\fP
.br
.B ARES_RR_NAPTR_REPLACEMENT
- NAPTR Record. Replacement. Datatype: \fIARES_DATATYPE_NAME\fP
.br
.B ARES_RR_OPT_UDP_SIZE
- OPT Record. UDP Size. Datatype: \fIARES_DATATYPE_U16\fP
.br
.B ARES_RR_OPT_VERSION
- OPT Record. Version. Datatype: \fIARES_DATATYPE_U8\fP
.br
.B ARES_RR_OPT_FLAGS
- OPT Record. Flags. Datatype: \fIARES_DATATYPE_U16\fP
.br
.B ARES_RR_OPT_OPTIONS
- OPT Record. Options. See \fIares_opt_param_t\fP. Datatype: \fIARES_DATATYPE_OPT\fP
.br
.B ARES_RR_TLSA_CERT_USAGE
- TLSA Record. Certificate Usage. See \fIares_tlsa_usage_t\fP. Datatype: \fIARES_DATATYPE_U8\fP
.br
.B ARES_RR_TLSA_SELECTOR
- TLSA Record. Selector. See \fIares_tlsa_selector_t\fP. Datatype: \fIARES_DATATYPE_U8\fP
.br
.B ARES_RR_TLSA_MATCH
- TLSA Record. Matching Type. See \fIares_tlsa_match_t\fP. Datatype: \fIARES_DATATYPE_U8\fP
.br
.B ARES_RR_TLSA_DATA
- TLSA Record. Certificate Association Data. Datatype: \fIARES_DATATYPE_BIN\fP
.br
.B ARES_RR_SVCB_PRIORITY
- SVCB Record. SvcPriority. Datatype: \fIARES_DATATYPE_U16\fP
.br
.B ARES_RR_SVCB_TARGET
- SVCB Record. TargetName. Datatype: \fIARES_DATATYPE_NAME\fP
.br
.B ARES_RR_SVCB_PARAMS
- SVCB Record. SvcParams. See \fIares_svcb_param_t\fP. Datatype: \fIARES_DATATYPE_OPT\fP
.br
.B ARES_RR_HTTPS_PRIORITY
- HTTPS Record. SvcPriority. Datatype: \fIARES_DATATYPE_U16\fP
.br
.B ARES_RR_HTTPS_TARGET
- HTTPS Record. TargetName. Datatype: \fIARES_DATATYPE_NAME\fP
.br
.B ARES_RR_HTTPS_PARAMS
- HTTPS Record. SvcParams. See \fIares_svcb_param_t\fP. Datatype: \fIARES_DATATYPE_OPT\fP
.br
.B ARES_RR_URI_PRIORITY
- URI Record. Priority. Datatype: \fIARES_DATATYPE_U16\fP
.br
.B ARES_RR_URI_WEIGHT
- URI Record. Weight. Datatype: \fIARES_DATATYPE_U16\fP
.br
.B ARES_RR_URI_TARGET
- URI Record. Target domain. Datatype: \fIARES_DATATYPE_NAME\fP
.br
.B ARES_RR_CAA_CRITICAL
- CAA Record. Critical flag. Datatype: \fIARES_DATATYPE_U8\fP
.br
.B ARES_RR_CAA_TAG
- CAA Record. Tag/Property. Datatype: \fIARES_DATATYPE_STR\fP
.br
.B ARES_RR_CAA_VALUE
- CAA Record. Value. Datatype: \fIARES_DATATYPE_BINP\fP
.br
.B ARES_RR_RAW_RR_TYPE
- RAW Record. RR Type. Datatype: \fIARES_DATATYPE_U16\fP
.br
.B ARES_RR_RAW_RR_DATA
- RAW Record. RR Data. Datatype: \fIARES_DATATYPE_BIN\fP
.br
.RE
.B ares_tlsa_usage_t -
TLSA Record \fIARES_RR_TLSA_CERT_USAGE\fP known values
.RS 4
.B ARES_TLSA_USAGE_CA
- Certificate Usage 0. CA Constraint
.br
.B ARES_TLSA_USAGE_SERVICE
- Certificate Usage 1. Service Certificate Constraint
.br
.B ARES_TLSA_USAGE_TRUSTANCHOR
- Certificate Usage 2. Trust Anchor Assertion
.br
.B ARES_TLSA_USAGE_DOMAIN
- Certificate Usage 3. Domain-issued certificate
.br
.RE
.B ares_tlsa_selector_t -
TLSA Record \fIARES_RR_TLSA_SELECTOR\fP known values:
.RS 4
.B ARES_TLSA_SELECTOR_FULL
- Full Certificate
.br
.B ARES_TLSA_SELECTOR_SUBJPUBKEYINFO
- DER-encoded SubjectPublicKeyInfo
.br
.RE
.B ares_tlsa_match_t -
TLSA Record \fIARES_RR_TLSA_MATCH\fP known values:
.RS 4
.B ARES_TLSA_MATCH_EXACT
- Exact match
.br
.B ARES_TLSA_MATCH_SHA256
- Sha256 match
.br
.B ARES_TLSA_MATCH_SHA512
- Sha512 match
.br
.RE
.SH DESCRIPTION
The \fIares_dns_record_rr_cnt(3)\fP function returns the number of resource
records in the DNS record provided by the
.IR dnsrec
parameter for the section provided in the
.IR sect
parameter.
The \fIares_dns_record_rr_add(3)\fP function adds a new resource record entry
the the DNS record provided by the
.IR dnsrec
parameter. The resulting resource record is stored into the variable pointed to by
.IR rr_out.
The DNS section the resource record belongs to is specified by the
.IR sect
parameter. The domain name associated with the resource record is specified by the
.IR name
parameter, which can not be NULL but may be an empty string, or ".". The resource
record type is specified in the
.IR type
parameter, along with the DNS record class in the
.IR rclass
parameter, and the Time To Live (TTL) in the
.IR ttl
parameter.
The \fIares_dns_record_rr_get(3)\fP and \fIares_dns_record_rr_get_const(3)\fP
functions are used to retrieve the resource record pointer from the DNS record
provided in the
.IR dnsrec
parameter, for the resource record section provided in the
.IR sect
parameter, for the specified index in the
.IR idx
parameter. The index must be less than \fIares_dns_record_rr_cnt(3)\fP. The
former returns a writable pointer to the resource record, while the latter
returns a read-only pointer to the resource record.
The \fIares_dns_record_rr_del(3)\fP is used to delete a resource record from
the DNS record specified in the
.IR dnsrec
parameter. Its primary use is to remove a \fIARES_REC_TYPE_OPT\fP record when
needing to retry a query without EDNS support. The DNS RR section is specified
via the
.IR sect
parameter, and the index to remove is specified in the
.IR idx
parameter. The index must be less than \fIares_dns_record_rr_cnt(3)\fP.
The \fIares_dns_rr_get_name(3)\fP function is used to retrieve the resource
record domain name from the Resource Record pointer provided in the
.IR rr
parameter.
The \fIares_dns_rr_get_type(3)\fP function is used to retrieve the resource
record type from the Resource Record pointer provided in the
.IR rr
parameter.
The \fIares_dns_rr_get_class(3)\fP function is used to retrieve the resource
record class from the Resource Record pointer provided in the
.IR rr
parameter.
The \fIares_dns_rr_get_ttl(3)\fP function is used to retrieve the resource
record class Time to Live (TTL) from the Resource Record pointer provided in the
.IR rr
parameter.
The \fIares_dns_rr_set_addr(3)\fP function is used to set an IPv4 address for the
associated resource record key/parameter when the datatype is \fIARES_DATATYPE_INADDR\fP.
The resource record to be modified is provided in the
.IR dns_rr
parameter, the key/parameter is provided in the
.IR key
parameter, and the value is provided in the
.IR addr
parameter.
The \fIares_dns_rr_set_addr6(3)\fP function is used to set an IPv6 address for the
associated resource record key/parameter when the datatype is \fIARES_DATATYPE_INADDR6\fP.
The resource record to be modified is provided in the
.IR dns_rr
parameter, the key/parameter is provided in the
.IR key
parameter, and the value is provided in the
.IR addr
parameter.
The \fIares_dns_rr_set_str(3)\fP function is used to set a string for the
associated resource record key/parameter when the datatype is \fIARES_DATATYPE_STR\fP
or \fIARES_DATATYPE_NAME\fP. Most strings are limited to 255 bytes,
however some records, such as a TXT record may allow longer as they are output
as multiple strings. The resource record to be modified is
provided in the
.IR dns_rr
parameter, the key/parameter is provided in the
.IR key
parameter, and the value is provided in the
.IR val
parameter.
The \fIares_dns_rr_set_u8(3)\fP function is used to set an 8bit unsigned value for the
associated resource record key/parameter when the datatype is \fIARES_DATATYPE_U8\fP.
The resource record to be modified is provided in the
.IR dns_rr
parameter, the key/parameter is provided in the
.IR key
parameter, and the value is provided in the
.IR val
parameter.
The \fIares_dns_rr_set_u16(3)\fP function is used to set an 16bit unsigned value for the
associated resource record key/parameter when the datatype is \fIARES_DATATYPE_U16\fP.
The resource record to be modified is provided in the
.IR dns_rr
parameter, the key/parameter is provided in the
.IR key
parameter, and the value is provided in the
.IR val
parameter.
The \fIares_dns_rr_set_u32(3)\fP function is used to set an 32bit unsigned value for the
associated resource record key/parameter when the datatype is \fIARES_DATATYPE_U32\fP.
The resource record to be modified is provided in the
.IR dns_rr
parameter, the key/parameter is provided in the
.IR key
parameter, and the value is provided in the
.IR val
parameter.
The \fIares_dns_rr_set_bin(3)\fP function is used to set a binary value for the
associated resource record key/parameter when the datatype is \fIARES_DATATYPE_BIN\fP
or \fIARES_DATATYPE_BINP\fP.
The resource record to be modified is provided in the
.IR dns_rr
parameter, the key/parameter is provided in the
.IR key
parameter, and the value is provided in the
.IR val
parameter. And the associated value length is provided in the
.IR len
parameter.
The \fIares_dns_rr_add_abin(3)\fP function is used to append a binary value in
the array for the associated resource record key/parameter when the datatype
is \fIARES_DATATYPE_ABINP\fP.
The resource record to be modified is provided in the
.IR dns_rr
parameter, the key/parameter is provided in the
.IR key
parameter, and the value is provided in the
.IR val
parameter. And the associated value length is provided in the
.IR len
parameter.
The \fIares_dns_rr_del_abin(3)\fP function is used to delete a binary value in
the array for the associated resource record key/parameter when the datatype
is \fIARES_DATATYPE_ABINP\fP.
The resource record to be modified is provided in the
.IR dns_rr
parameter, the key/parameter is provided in the
.IR key
parameter, and the index to remove is provided in the
.IR idx
parameter.
The \fIares_dns_rr_set_opt(3)\fP function is used to set option/parameter keys and
values for the resource record when the datatype is \fIARES_DATATYPE_OPT\fP. The
resource record to be modified is provided in the
.IR dns_rr
parameter. They key/parameter is provided in the
.IR key
parameter. The option/parameter value specific to the resource record is provided
in the
.IR opt
parameter, and this is left to the user to determine the appropriate value to
use. Some known values may be provided by \fIares_svcb_param_t\fP and \fIares_opt_param_t\fP
enumerations. The value for the option is always provided in binary form in
.IR val
with length provided in
.IR val_len.
The \fIares_dns_rr_del_opt_byid(3)\fP function is used to delete option/parameter
keys and values for the resource record when the datatype is
\fIARES_DATATYPE_OPT\fP. The resource record to be modified is provided in the
.IR dns_rr
parameter. They key/parameter is provided in the
.IR key
parameter. The option/parameter value specific to the resource record is provided
in the
.IR opt
parameter. This function returns \fIARES_SUCCESS\fP if the record is successfully
removed, or \fIARES_ENOTFOUND\fP if the record could not be found.
The \fIares_dns_rr_get_addr(3)\fP function is used to retrieve the IPv4 address
from the resource record when the datatype is \fIARES_DATATYPE_INADDR\fP. The
resource record is provided in the
.IR dns_rr
parameter and the key/parameter to retrieve is provided in the
.IR key
parameter.
The \fIares_dns_rr_get_addr6(3)\fP function is used to retrieve the IPv6 address
from the resource record when the datatype is \fIARES_DATATYPE_INADDR6\fP. The
resource record is provided in the
.IR dns_rr
parameter and the key/parameter to retrieve is provided in the
.IR key
parameter.
The \fIares_dns_rr_get_str(3)\fP function is used to retrieve a string
from the resource record when the datatype is \fIARES_DATATYPE_STR\fP or
\fIARES_DATATYPE_NAME\fP. The resource record is provided in the
.IR dns_rr
parameter and the key/parameter to retrieve is provided in the
.IR key
parameter.
The \fIares_dns_rr_get_u8(3)\fP function is used to retrieve an 8bit integer
from the resource record when the datatype is \fIARES_DATATYPE_U8\fP.
The resource record is provided in the
.IR dns_rr
parameter and the key/parameter to retrieve is provided in the
.IR key
parameter.
The \fIares_dns_rr_get_u16(3)\fP function is used to retrieve a 16bit integer
from the resource record when the datatype is \fIARES_DATATYPE_U16\fP.
The resource record is provided in the
.IR dns_rr
parameter and the key/parameter to retrieve is provided in the
.IR key
parameter.
The \fIares_dns_rr_get_u32(3)\fP function is used to retrieve a 32bit integer
from the resource record when the datatype is \fIARES_DATATYPE_U32\fP.
The resource record is provided in the
.IR dns_rr
parameter and the key/parameter to retrieve is provided in the
.IR key
parameter.
The \fIares_dns_rr_get_bin(3)\fP function is used to retrieve binary data
from the resource record when the datatype is \fIARES_DATATYPE_BIN\fP or
\fIARES_DATATYPE_BINP\fP.
The resource record is provided in the
.IR dns_rr
parameter and the key/parameter to retrieve is provided in the
.IR key
parameter, and length is stored into the variable pointed to by
.IR len.
The \fIares_dns_rr_get_abin_cnt(3)\fP function is used to retrieve the count
of the array of stored binary values from the resource record when the datatype
is \fIARES_DATATYPE_ABINP\fP.
The resource record is provided in the
.IR dns_rr
parameter and the key/parameter to retrieve is provided in the
.IR key
parameter.
The \fIares_dns_rr_get_abin(3)\fP function is used to retrieve binary data from
the resource record array when the datatype is \fIARES_DATATYPE_ABINP\fP.
The resource record is provided in the
.IR dns_rr
parameter and the key/parameter to retrieve is provided in the
.IR key
parameter, and the index to retrieve from the array is provided by the
.IR idx
parameter, and length is stored into the variable pointed to by
.IR len.
The \fIares_dns_rr_get_opt_cnt(3)\fP function is used to retrieve the count
of options/parameters associated with the resource record when the datatype
is \fIARES_DATATYPE_OPT\fP.
The resource record is provided in the
.IR dns_rr
parameter and the key/parameter to retrieve is provided in the
.IR key.
The \fIares_dns_rr_get_opt(3)\fP function is used to retrieve binary option data
from the resource record when the datatype is \fIARES_DATATYPE_OPT\fP for the
specified index.
The resource record is provided in the
.IR dns_rr
parameter and the key/parameter to retrieve is provided in the
.IR key
parameter, the index to retrieve the option data from is provided in the
.IR idx
parameter. The value is stored into the variable pointed to by
.IR val
and length is stored into the variable pointed to by
.IR val_len.
The \fIares_dns_rr_get_opt_byid(3)\fP function is used to retrieve binary option data
from the resource record when the datatype is \fIARES_DATATYPE_OPT\fP for the
specified option identifier, if it exists.
The resource record is provided in the
.IR dns_rr
parameter and the key/parameter to retrieve is provided in the
.IR key
parameter, the identifier to retrieve the option data from is provided in the
.IR opt
parameter. The value is stored into the variable pointed to by
.IR val
and length is stored into the variable pointed to by
.IR val_len.
.SH RETURN VALUES
\fIares_dns_record_rr_cnt(3)\fP and \fIares_dns_rr_get_opt_cnt(3)\fP return the
respective counts.
\fIares_dns_record_rr_add(3)\fP, \fIares_dns_record_rr_del(3)\fP,
\fIares_dns_rr_set_addr(3)\fP, \fIares_dns_rr_set_addr6(3)\fP,
\fIares_dns_rr_set_str(3)\fP, \fIares_dns_rr_set_u8(3)\fP,
\fIares_dns_rr_set_u16(3)\fP, \fIares_dns_rr_set_u32(3)\fP,
\fIares_dns_rr_set_bin(3)\fP, \fIares_dns_rr_add_abin(3)\fP,
\fIares_dns_rr_del_abin(3)\fP,
and \fIares_dns_rr_set_opt(3)\fP all return an \fIares_status_t\fP error code.
.B ARES_SUCCESS
is returned on success,
.B ARES_ENOMEM
is returned on out of memory,
.B ARES_EFORMERR
is returned on misuse.
\fIares_dns_rr_get_name(3)\fP, \fIares_dns_rr_get_type(3)\fP,
\fIares_dns_rr_get_class(3)\fP, \fIares_dns_rr_get_ttl(3)\fP,
\fIares_dns_rr_get_addr(3)\fP, \fIares_dns_rr_get_addr6(3)\fP,
\fIares_dns_rr_get_str(3)\fP, \fIares_dns_rr_get_u8(3)\fP,
\fIares_dns_rr_get_u16(3)\fP, \fIares_dns_rr_get_u32(3)\fP,
\fIares_dns_rr_get_bin(3)\fP, \fIares_dns_rr_get_abin_cnt(3)\fP,
\fIares_dns_rr_get_abin(3)\fP, \fIares_dns_rr_get_opt(3)\fP all return their
prescribed datatype values and in general can't fail except for misuse cases,
in which a 0 (or NULL) may be returned, however 0 can also be a valid return
value for most of these functions.
\fIares_dns_record_rr_get(3)\fP and \fIares_dns_record_rr_get_const(3)\fP will
return the requested resource record pointer or NULL on failure (misuse).
\fIares_dns_rr_get_opt_byid(3)\fP will return ARES_TRUE if the option was
found, otherwise ARES_FALSE if not found (or misuse).
.SH AVAILABILITY
These functions were first introduced in c-ares version 1.22.0.
.SH SEE ALSO
.BR ares_dns_mapping (3),
.BR ares_dns_record (3),
.BR ares_free_string (3)

View File

@ -0,0 +1,3 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_rr.3

View File

@ -0,0 +1,3 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_rr.3

View File

@ -0,0 +1,3 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_rr.3

View File

@ -0,0 +1,3 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_rr.3

View File

@ -0,0 +1,3 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_rr.3

View File

@ -0,0 +1,3 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_rr.3

View File

@ -0,0 +1,3 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_rr.3

3
deps/cares/docs/ares_dns_rr_get_bin.3 vendored Normal file
View File

@ -0,0 +1,3 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_rr.3

View File

@ -0,0 +1,3 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_rr.3

View File

@ -0,0 +1,3 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_mapping.3

View File

@ -0,0 +1,3 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_rr.3

3
deps/cares/docs/ares_dns_rr_get_opt.3 vendored Normal file
View File

@ -0,0 +1,3 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_rr.3

View File

@ -0,0 +1,3 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_rr.3

View File

@ -0,0 +1,3 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_rr.3

3
deps/cares/docs/ares_dns_rr_get_str.3 vendored Normal file
View File

@ -0,0 +1,3 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_rr.3

3
deps/cares/docs/ares_dns_rr_get_ttl.3 vendored Normal file
View File

@ -0,0 +1,3 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_rr.3

View File

@ -0,0 +1,3 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_rr.3

3
deps/cares/docs/ares_dns_rr_get_u16.3 vendored Normal file
View File

@ -0,0 +1,3 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_rr.3

3
deps/cares/docs/ares_dns_rr_get_u32.3 vendored Normal file
View File

@ -0,0 +1,3 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_rr.3

3
deps/cares/docs/ares_dns_rr_get_u8.3 vendored Normal file
View File

@ -0,0 +1,3 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_rr.3

View File

@ -0,0 +1,4 @@
.\"
.\" Copyright (C) Daniel Stenberg
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_mapping.3

3
deps/cares/docs/ares_dns_rr_key_t.3 vendored Normal file
View File

@ -0,0 +1,3 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_rr.3

View File

@ -0,0 +1,4 @@
.\"
.\" Copyright (C) Daniel Stenberg
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_mapping.3

View File

@ -0,0 +1,4 @@
.\"
.\" Copyright (C) Daniel Stenberg
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_mapping.3

View File

@ -0,0 +1,3 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_rr.3

View File

@ -0,0 +1,3 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_rr.3

3
deps/cares/docs/ares_dns_rr_set_bin.3 vendored Normal file
View File

@ -0,0 +1,3 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_rr.3

3
deps/cares/docs/ares_dns_rr_set_opt.3 vendored Normal file
View File

@ -0,0 +1,3 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_rr.3

3
deps/cares/docs/ares_dns_rr_set_str.3 vendored Normal file
View File

@ -0,0 +1,3 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_rr.3

3
deps/cares/docs/ares_dns_rr_set_u16.3 vendored Normal file
View File

@ -0,0 +1,3 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_rr.3

3
deps/cares/docs/ares_dns_rr_set_u32.3 vendored Normal file
View File

@ -0,0 +1,3 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_rr.3

3
deps/cares/docs/ares_dns_rr_set_u8.3 vendored Normal file
View File

@ -0,0 +1,3 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_rr.3

3
deps/cares/docs/ares_dns_section_t.3 vendored Normal file
View File

@ -0,0 +1,3 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_rr.3

View File

@ -0,0 +1,4 @@
.\"
.\" Copyright (C) Daniel Stenberg
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_mapping.3

3
deps/cares/docs/ares_dns_write.3 vendored Normal file
View File

@ -0,0 +1,3 @@
.\" Copyright (C) 2023 The c-ares project and its contributors.
.\" SPDX-License-Identifier: MIT
.so man3/ares_dns_record.3

25
deps/cares/docs/ares_dup.3 vendored Normal file
View File

@ -0,0 +1,25 @@
.\"
.\" Copyright (C) 2004-2009 by Daniel Stenberg
.\" SPDX-License-Identifier: MIT
.\"
.TH ARES_DUP 3 "26 May 2009"
.SH NAME
ares_dup \- Duplicate a resolver channel
.SH SYNOPSIS
.nf
#include <ares.h>
int ares_dup(ares_channel_t **\fIdest\fP, const ares_channel_t *\fIsource\fP)
.fi
.SH DESCRIPTION
The \fBares_dup(3)\fP function duplicates an existing communications channel
for name service lookups. If it returns successfully, \fBares_dup(3)\fP will
set the variable pointed to by \fIdest\fP to a handle used to identify the
name service channel. The caller should invoke \fIares_destroy(3)\fP on the
handle when the channel is no longer needed.
.SH SEE ALSO
.BR ares_destroy (3),
.BR ares_init (3),
.BR ares_library_init (3)
.SH AVAILABILITY
\fIares_dup(3)\fP was added in c-ares 1.6.0

51
deps/cares/docs/ares_expand_name.3 vendored Normal file
View File

@ -0,0 +1,51 @@
.\"
.\" Copyright 1998 by the Massachusetts Institute of Technology.
.\" SPDX-License-Identifier: MIT
.\"
.TH ARES_EXPAND_NAME 3 "20 Nov 2009"
.SH NAME
ares_expand_name \- Expand a DNS-encoded domain name
.SH SYNOPSIS
.nf
#include <ares.h>
int ares_expand_name(const unsigned char *\fIencoded\fP,
const unsigned char *\fIabuf\fP, int \fIalen\fP,
char **\fIs\fP, long *\fIenclen\fP)
.fi
.SH DESCRIPTION
The
.B ares_expand_name
function converts a DNS-encoded domain name to a dot-separated C
string. The argument
.I encoded
gives the beginning of the encoded domain name, and the arguments
.I abuf
and
.I alen
give the containing message buffer (necessary for the processing of
indirection pointers within the encoded domain name). The result is
placed in a NUL-terminated allocated buffer, a pointer to which is
stored in the variable pointed to by
.IR s .
The length of the encoded name is stored in the variable pointed to by
.I enclen
so that the caller can advance past the encoded domain name to read
further data in the message.
Use \fIares_free_string(3)\fP to free the allocated hostname.
.SH RETURN VALUES
.B ares_expand_name
can return any of the following values:
.TP 15
.B ARES_SUCCESS
Expansion of the encoded name succeeded.
.TP 15
.B ARES_EBADNAME
The encoded domain name was malformed and could not be expanded.
.TP 15
.B ARES_ENOMEM
Memory was exhausted.
.SH SEE ALSO
.BR ares_mkquery (3),
.BR ares_free_string (3)

48
deps/cares/docs/ares_expand_string.3 vendored Normal file
View File

@ -0,0 +1,48 @@
.\"
.\" Copyright 1998 by the Massachusetts Institute of Technology.
.\" SPDX-License-Identifier: MIT
.\"
.TH ARES_EXPAND_NAME 3 "20 Nov 2009"
.SH NAME
ares_expand_string \- Expand a length encoded string
.SH SYNOPSIS
.nf
#include <ares.h>
int ares_expand_string(const unsigned char *\fIencoded\fP,
const unsigned char *\fIabuf\fP, int \fIalen\fP,
unsigned char **\fIs\fP, long *\fIenclen\fP)
.fi
.SH DESCRIPTION
The
.B ares_expand_string
function converts a length encoded string to a NUL-terminated C
string. The argument
.I encoded
gives the beginning of the encoded string, and the arguments
.I abuf
and
.I alen
give the containing message buffer (necessary for the processing of
indirection pointers within the encoded domain name). The result is
placed in a NUL-terminated allocated buffer, a pointer to which is
stored in the variable pointed to by
.IR s .
The length of the encoded string is stored in the variable pointed to by
.I enclen
so that the caller can advance past the encoded string to read
further data in the message.
.SH RETURN VALUES
.B ares_expand_string
can return any of the following values:
.TP 15
.B ARES_SUCCESS
Expansion of the encoded string succeeded.
.TP 15
.B ARES_EBADSTR
The encoded string was malformed and could not be expanded.
.TP 15
.B ARES_ENOMEM
Memory was exhausted.
.SH SEE ALSO
.BR ares_free_string (3)

57
deps/cares/docs/ares_fds.3 vendored Normal file
View File

@ -0,0 +1,57 @@
.\"
.\" Copyright 1998 by the Massachusetts Institute of Technology.
.\" SPDX-License-Identifier: MIT
.\"
.TH ARES_FDS 3 "23 July 1998"
.SH NAME
ares_fds \- return file descriptors to select on (deprecated)
.SH SYNOPSIS
.nf
#include <ares.h>
int ares_fds(const ares_channel_t *\fIchannel\fP,
fd_set *\fIread_fds\fP,
fd_set *\fIwrite_fds\fP)
.fi
.SH DESCRIPTION
See the \fBNOTES\fP section on issues with this function and alternatives.
The \fBares_fds(3)\fP function retrieves the set of file descriptors which the
calling application should \fBselect(2)\fP on for reading and writing for the
processing of name service queries pending on the name service channel
identified by \fIchannel\fP. Should not be used with \fBARES_OPT_EVENT_THREAD\fP
is passed to \fIares_init_options(3)\fP.
File descriptors will be set in the file descriptor sets pointed to by
\fIread_fds\fP and \fIwrite_fds\fP as appropriate. File descriptors already
set in \fIread_fds\fP and \fIwrite_fds\fP will remain set; initialization of
the file descriptor sets (using \fBFD_ZERO\fP) is the responsibility of the
caller.
.SH RETURN VALUES
\fBares_fds(3)\fP returns a value that is one greater than the number of the
highest socket set in either \fIread_fds\fP or \fIwrite_fds\fP. If no queries
are active, \fBares_fds(3)\fP returns 0.
.SH NOTES
The \fBselect(2)\fP call which takes the \fIfd_set\fP parameter has significant
limitations which can impact modern systems. The limitations can vary from
system to system, but in general if the file descriptor value itself is greater
than 1024 (not the count but the actual value), this can lead to
\fBares_fds(3)\fP writing out of bounds which will cause a system crash. In
modern networking clients, it is not unusual to have file descriptor values
above 1024, especially when a library is pulled in as a dependency into a larger
project.
c-ares does not attempt to detect this condition to prevent crashes due to both
implementation-defined behavior in the OS as well as integrator-controllable
tunables which may impact the limits.
It is recommended to use \fBARES_OPT_EVENT_THREAD\fP passed to
\fIares_init_options(3)\fP, or socket state callbacks
(\fBARES_OPT_SOCK_STATE_CB\fP) registered via \fIares_init_options(3)\fP and use
more modern methods to check for socket readable/writable state such as
\fIpoll(2)\fP, \fIepoll(2)\fP, or \fIkqueue(2)\fP.
.SH SEE ALSO
.BR ares_init_options (3),
.BR ares_timeout (3),
.BR ares_process (3)

62
deps/cares/docs/ares_free_data.3 vendored Normal file
View File

@ -0,0 +1,62 @@
.\"
.\" Copyright 1998 by the Massachusetts Institute of Technology.
.\" Copyright (C) 2004-2010 by Daniel Stenberg
.\" SPDX-License-Identifier: MIT
.\"
.TH ARES_FREE_DATA 3 "5 March 2010"
.SH NAME
ares_free_data \- Free data allocated by several c-ares functions
.SH SYNOPSIS
.nf
#include <ares.h>
void ares_free_data(void *\fIdataptr\fP)
.fi
.SH DESCRIPTION
.PP
The \fBares_free_data(3)\fP function frees one or more data structures
allocated and returned by several c-ares functions. Specifically the data
returned by the following list of functions must be deallocated using this
function.
.TP 5
.B ares_get_servers(3)
When used to free the data returned by \fIares_get_servers(3)\fP this will
free the whole linked list of ares_addr_node structures returned by
\fIares_get_servers(3)\fP.
.TP
.B ares_parse_srv_reply(3)
When used to free the data returned by \fIares_parse_srv_reply(3)\fP this will
free the whole linked list of ares_srv_reply structures returned by
\fIares_parse_srv_reply(3)\fP, along with any additional storage associated
with those structures.
.TP
.B ares_parse_mx_reply(3)
When used to free the data returned by \fIares_parse_mx_reply(3)\fP this will
free the whole linked list of ares_mx_reply structures returned by
\fIares_parse_mx_reply(3)\fP, along with any additional storage associated
with those structures.
.TP
.B ares_parse_txt_reply(3)
When used to free the data returned by \fIares_parse_txt_reply(3)\fP this will
free the whole linked list of ares_txt_reply structures returned by
\fIares_parse_txt_reply(3)\fP, along with any additional storage associated
with those structures.
.TP
.B ares_parse_soa_reply(3)
When used to free the data returned by \fIares_parse_soa_reply(3)\fP this will
free the ares_soa_reply structure, along with any additional storage
associated with those structure.
.B ares_parse_uri_reply(3)
When used to free the data returned by \fIares_parse_uri_reply(3)\fP this will
free list of ares_uri_reply structures, along with any additional storage
associated with those structure.
.SH RETURN VALUE
The \fIares_free_data(3)\fP function does not return a value.
.SH AVAILABILITY
This function was first introduced in c-ares version 1.7.0.
.SH SEE ALSO
.BR ares_get_servers (3),
.BR ares_parse_srv_reply (3),
.BR ares_parse_mx_reply (3),
.BR ares_parse_txt_reply (3),
.BR ares_parse_soa_reply (3)

30
deps/cares/docs/ares_free_hostent.3 vendored Normal file
View File

@ -0,0 +1,30 @@
.\"
.\" Copyright 1998 by the Massachusetts Institute of Technology.
.\" SPDX-License-Identifier: MIT
.\"
.TH ARES_FREE_HOSTENT 3 "23 July 1998"
.SH NAME
ares_free_hostent \- Free host structure allocated by ares functions
.SH SYNOPSIS
.nf
#include <ares.h>
void ares_free_hostent(struct hostent *\fIhost\fP)
.fi
.SH DESCRIPTION
The
.I ares_free_hostent
function frees a
.B struct hostent
allocated by one of the functions \fIares_parse_a_reply(3)\fP,
\fIares_parse_aaaa_reply(3)\fP, or \fIares_parse_ptr_reply(3)\fP.
.SH NOTES
It is not necessary (and is not correct) to free the host structure passed to
the callback functions for \fIares_gethostbyname(3)\fP or
\fIares_gethostbyaddr(3)\fP. c-ares will automatically free such host
structures when the callback returns.
.SH SEE ALSO
.BR ares_parse_a_reply (3),
.BR ares_parse_aaaa_reply (3),
.BR ares_parse_ptr_reply (3),
.BR ares_parse_ns_reply (3)

19
deps/cares/docs/ares_free_string.3 vendored Normal file
View File

@ -0,0 +1,19 @@
.\"
.\" Copyright 2000 by the Massachusetts Institute of Technology.
.\" SPDX-License-Identifier: MIT
.\"
.TH ARES_FREE_STRING 3 "4 February 2004"
.SH NAME
ares_free_string \- Free strings allocated by ares functions
.SH SYNOPSIS
.nf
#include <ares.h>
void ares_free_string(void *\fIstr\fP)
.fi
.SH DESCRIPTION
The \fIares_free_string(3)\fP function frees a string allocated by an ares
function.
.SH SEE ALSO
.BR ares_mkquery (3)
.BR ares_expand_string (3)

22
deps/cares/docs/ares_freeaddrinfo.3 vendored Normal file
View File

@ -0,0 +1,22 @@
.\"
.\" Copyright 1998 by the Massachusetts Institute of Technology.
.\" SPDX-License-Identifier: MIT
.\"
.TH ARES_FREEADDRINFO 3 "31 October 2018"
.SH NAME
ares_freeaddrinfo \- Free addrinfo structure allocated by ares functions
.SH SYNOPSIS
.nf
#include <ares.h>
void ares_freeaddrinfo(struct ares_addrinfo *\fIai\fP)
.fi
.SH DESCRIPTION
The
.B ares_freeaddrinfo
function frees a
.B struct ares_addrinfo
returned in \fIresult\fP of
.B ares_addrinfo_callback
.SH SEE ALSO
.BR ares_getaddrinfo (3),

69
deps/cares/docs/ares_get_servers.3 vendored Normal file
View File

@ -0,0 +1,69 @@
.\"
.\" Copyright 1998 by the Massachusetts Institute of Technology.
.\" Copyright (C) 2008-2010 by Daniel Stenberg
.\" SPDX-License-Identifier: MIT
.\"
.TH ARES_GET_SERVERS 3 "5 March 2010"
.SH NAME
ares_get_servers, ares_get_servers_ports \- Retrieve name servers from an initialized ares_channel (deprecated)
.SH SYNOPSIS
.nf
#include <ares.h>
int ares_get_servers(const ares_channel_t *\fIchannel\fP,
struct ares_addr_node **\fIservers\fP)
int ares_get_servers_ports(const ares_channel_t *\fIchannel\fP,
struct ares_addr_port_node **\fIservers\fP)
.fi
.SH DESCRIPTION
The \fBares_get_servers(3)\fP function retrieves name servers configuration
from the
channel data identified by
.IR channel ,
as a linked list of ares_addr_node structs storing a pointer to the first
node at the address specified by
.IR servers .
The \fBares_get_servers_ports(3)\fP function also retrieves any per-server
port information that may have been previously configured, returning a linked
list of ares_addr_port structures.
Function caller may traverse the returned name server linked list, or may use
it directly as suitable input for the \fBares_set_servers(3)\fP /
\fBares_set_servers_ports(3)\fP functions, but
shall not shrink or extend the list on its own.
Each node of the name server linked list is stored in memory dynamically
allocated and managed by c-ares. It is the caller's responsibility to free
the resulting linked list, using \fBares_free_data(3)\fP , once the caller
does not need it any longer.
This function is capable of handling IPv4 and IPv6 name server
addresses simultaneously, rendering \fBares_save_options(3)\fP with
optmask \fBARES_OPT_SERVERS\fP functionally obsolete except for
IPv4-only name server usage.
.SH RETURN VALUES
This function may return any of the following values:
.TP 15
.B ARES_SUCCESS
The name servers configuration was successfully retrieved
.TP 15
.B ARES_ENOMEM
The memory was exhausted
.TP 15
.B ARES_ENODATA
The channel data identified by
.IR channel
was invalid.
.SH SEE ALSO
.BR ares_set_servers (3),
.BR ares_init_options (3),
.BR ares_save_options(3)
.SH AVAILABILITY
\fBares_get_servers(3)\fP was added in c-ares 1.7.1;
\fBares_get_servers_ports(3)\fP was added in c-ares 1.11.0.
.SH NOTES
As of c-ares 1.24, these functions are deprecated due to their lack of ability
to store the entire server configuration. Use \fBares_get_servers_csv(3)\fP.

View File

@ -0,0 +1,4 @@
.\"
.\" Copyright (C) Daniel Stenberg
.\" SPDX-License-Identifier: MIT
.so man3/ares_set_servers_csv.3

View File

@ -0,0 +1,4 @@
.\"
.\" Copyright (C) Daniel Stenberg
.\" SPDX-License-Identifier: MIT
.so man3/ares_get_servers.3

194
deps/cares/docs/ares_getaddrinfo.3 vendored Normal file
View File

@ -0,0 +1,194 @@
.\"
.\" Copyright 1998 by the Massachusetts Institute of Technology.
.\" SPDX-License-Identifier: MIT
.\"
.TH ARES_GETADDRINFO 3 "4 November 2018"
.SH NAME
ares_getaddrinfo \- Initiate a host query by name and service
.SH SYNOPSIS
.nf
#include <ares.h>
typedef void (*ares_addrinfo_callback)(void *\fIarg\fP, int \fIstatus\fP,
int \fItimeouts\fP,
struct ares_addrinfo *\fIresult\fP)
void ares_getaddrinfo(ares_channel_t *\fIchannel\fP, const char *\fIname\fP,
const char* \fIservice\fP,
const struct ares_addrinfo_hints *\fIhints\fP,
ares_addrinfo_callback \fIcallback\fP, void *\fIarg\fP)
.fi
.SH DESCRIPTION
The \fBares_getaddrinfo(3)\fP function initiates a host query by name on the
name service channel identified by
.IR channel .
The
.I name
and
.I service
parameters give the hostname and service as NULL-terminated C strings.
The
.I hints
parameter is an
.BR ares_addrinfo_hints
structure:
.PP
.RS
.EX
struct ares_addrinfo_hints {
int ai_flags;
int ai_family;
int ai_socktype;
int ai_protocol;
};
.EE
.RE
.TP
.I ai_family
Specifies desired address family. AF_UNSPEC means return both AF_INET and AF_INET6.
.TP
.I ai_socktype
Specifies desired socket type, for example SOCK_STREAM or SOCK_DGRAM.
Setting this to 0 means any type.
.TP
.I ai_protocol
Setting this to 0 means any protocol.
.TP
.I ai_flags
Specifies additional options, see below.
.PP
.TP 19
.B ARES_AI_NUMERICSERV
If this option is set
.I service
field will be treated as a numeric value.
.TP 19
.B ARES_AI_CANONNAME
The ares_addrinfo structure will return a canonical names list.
.TP 19
.B ARES_AI_NOSORT
Result addresses will not be sorted and no connections to resolved addresses will be attempted.
.TP 19
.B ARES_AI_ENVHOSTS
Read hosts file path from the environment variable
.I CARES_HOSTS .
.PP
When the query is complete or has failed, the ares library will invoke \fIcallback\fP.
Completion or failure of the query may happen immediately, or may happen
during a later call to \fIares_process(3)\fP, \fIares_destroy(3)\fP or
\fIares_cancel(3)\fP.
.PP
When the associated callback is called, it is called with a channel lock so care
must be taken to ensure any processing is minimal to prevent DNS channel stalls.
The callback may be triggered from a different thread than the one which
called \fIares_getaddrinfo(3)\fP.
For integrators running their own event loops and not using \fBARES_OPT_EVENT_THREAD\fP,
care needs to be taken to ensure any file descriptor lists are updated immediately
within the eventloop when notified.
.PP
The callback argument
.I arg
is copied from the \fBares_getaddrinfo(3)\fP argument
.IR arg .
The callback argument
.I status
indicates whether the query succeeded and, if not, how it failed. It
may have any of the following values:
.TP 19
.B ARES_SUCCESS
The host lookup completed successfully.
.TP 19
.B ARES_ENOTIMP
The ares library does not know how to find addresses of type
.IR family .
.TP 19
.B ARES_ENOTFOUND
The
.I name
was not found.
.TP 19
.B ARES_ENOMEM
Memory was exhausted.
.TP 19
.B ARES_ESERVICE
The textual service name provided could not be dereferenced into a port.
.TP 19
.B ARES_ECANCELLED
The query was cancelled.
.TP 19
.B ARES_EDESTRUCTION
The name service channel
.I channel
is being destroyed; the query will not be completed.
.PP
On successful completion of the query, the callback argument
.I result
points to a
.B struct ares_addrinfo
which contains two linked lists, one with resolved addresses and another with canonical names.
Also included is the official name of the host (analogous to gethostbyname() h_name).
.PP
.RS
.EX
struct ares_addrinfo {
struct ares_addrinfo_cname *cnames;
struct ares_addrinfo_node *nodes;
char *name;
};
.EE
.RE
.PP
.I ares_addrinfo_node
structure is similar to RFC3493 addrinfo, but without canonname and with extra ttl field.
.RS
.PP
.EX
struct ares_addrinfo_node {
int ai_ttl;
int ai_flags;
int ai_family;
int ai_socktype;
int ai_protocol;
ares_socklen_t ai_addrlen;
struct sockaddr *ai_addr;
struct ares_addrinfo_node *ai_next;
};
.EE
.RE
.PP
.I ares_addrinfo_cname
structure is a linked list of CNAME records where
.I ttl
is a time to live
.I alias
is a label of the resource record and
.I name
is a value (canonical name) of the resource record.
See RFC2181 10.1.1. CNAME terminology.
.RS
.PP
.EX
struct ares_addrinfo_cname {
int ttl;
char *alias;
char *name;
struct ares_addrinfo_cname *next;
};
.EE
.RE
.PP
The reserved memory has to be deleted by \fBares_freeaddrinfo(3)\fP.
The result is sorted according to RFC6724 except:
- Rule 3 (Avoid deprecated addresses)
- Rule 4 (Prefer home addresses)
- Rule 7 (Prefer native transport)
Please note that the function will attempt a connection
on each of the resolved addresses as per RFC6724.
.SH AVAILABILITY
This function was added in c-ares 1.16.0, released in March 2020.
.SH SEE ALSO
.BR ares_freeaddrinfo (3)

100
deps/cares/docs/ares_gethostbyaddr.3 vendored Normal file
View File

@ -0,0 +1,100 @@
.\"
.\" Copyright 1998 by the Massachusetts Institute of Technology.
.\" SPDX-License-Identifier: MIT
.\"
.TH ARES_GETHOSTBYADDR 3 "24 July 1998"
.SH NAME
ares_gethostbyaddr \- Initiate a host query by address
.SH SYNOPSIS
.nf
#include <ares.h>
typedef void (*ares_host_callback)(void *\fIarg\fP, int \fIstatus\fP,
int \fItimeouts\fP,
struct hostent *\fIhostent\fP)
void ares_gethostbyaddr(ares_channel_t *\fIchannel\fP, const void *\fIaddr\fP,
int \fIaddrlen\fP, int \fIfamily\fP,
ares_host_callback \fIcallback\fP, void *\fIarg\fP)
.fi
.SH DESCRIPTION
The
.B ares_gethostbyaddr
function initiates a host query by address on the name service channel
identified by
.IR channel .
The parameters
.I addr
and
.I addrlen
give the address as a series of bytes, and
.I family
gives the type of address. When the query is complete or has failed, the ares
library will invoke \fIcallback\fP. Completion or failure of the query may
happen immediately, or may happen during a later call to
\fIares_process(3)\fP, \fIares_destroy(3)\fP or \fIares_cancel(3)\fP.
.PP
The callback argument
.I arg
is copied from the
.B ares_gethostbyaddr
argument
.IR arg .
The callback argument
.I status
indicates whether the query succeeded and, if not, how it failed. It
may have any of the following values:
.TP 19
.B ARES_SUCCESS
The host lookup completed successfully.
.TP 19
.B ARES_ENOTIMP
The ares library does not know how to look up addresses of type
.IR family .
.TP 19
.B ARES_ENOTFOUND
The address
.I addr
was not found.
.TP 19
.B ARES_ENOMEM
Memory was exhausted.
.TP 19
.B ARES_ECANCELLED
The query was cancelled.
.TP 19
.B ARES_EDESTRUCTION
The name service channel
.I channel
is being destroyed; the query will not be completed.
.PP
The callback argument
.I timeouts
reports how many times a query timed out during the execution of the
given request.
.PP
On successful completion of the query, the callback argument
.I hostent
points to a
.B struct hostent
containing the name of the host returned by the query. The callback
need not and should not attempt to free the memory pointed to by
.IR hostent ;
the ares library will free it when the callback returns. If the query
did not complete successfully,
.I hostent
will be
.BR NULL .
.PP
When the associated callback is called, it is called with a channel lock so care
must be taken to ensure any processing is minimal to prevent DNS channel stalls.
The callback may be triggered from a different thread than the one which
called \fIares_gethostbyaddr(3)\fP.
For integrators running their own event loops and not using \fBARES_OPT_EVENT_THREAD\fP,
care needs to be taken to ensure any file descriptor lists are updated immediately
within the eventloop when notified.
.SH SEE ALSO
.BR ares_process (3),
.BR ares_gethostbyname (3)

108
deps/cares/docs/ares_gethostbyname.3 vendored Normal file
View File

@ -0,0 +1,108 @@
.\"
.\" Copyright 1998 by the Massachusetts Institute of Technology.
.\" SPDX-License-Identifier: MIT
.\"
.TH ARES_GETHOSTBYNAME 3 "25 July 1998"
.SH NAME
ares_gethostbyname \- Initiate a host query by name
.SH SYNOPSIS
.nf
#include <ares.h>
typedef void (*ares_host_callback)(void *\fIarg\fP, int \fIstatus\fP,
int \fItimeouts\fP,
struct hostent *\fIhostent\fP)
void ares_gethostbyname(ares_channel_t *\fIchannel\fP, const char *\fIname\fP,
int \fIfamily\fP, ares_host_callback \fIcallback\fP,
void *\fIarg\fP)
.fi
.SH DESCRIPTION
The
.B ares_gethostbyname
function initiates a host query by name on the name service channel
identified by
.IR channel .
The parameter
.I name
gives the hostname as a NUL-terminated C string, and
.I family
gives the desired type of address for the resulting host entry. When the
query is complete or has failed, the ares library will invoke \fIcallback\fP.
Completion or failure of the query may happen immediately, or may happen
during a later call to \fIares_process(3)\fP, \fIares_destroy(3)\fP or
\fIares_cancel(3)\fP.
.PP
The callback argument
.I arg
is copied from the
.B ares_gethostbyname
argument
.IR arg .
The callback argument
.I status
indicates whether the query succeeded and, if not, how it failed. It
may have any of the following values:
.TP 19
.B ARES_SUCCESS
The host lookup completed successfully.
.TP 19
.B ARES_ENOTIMP
The ares library does not know how to find addresses of type
.IR family .
.TP 19
.B ARES_EBADNAME
The hostname
.B name
is composed entirely of numbers and periods, but is not a valid
representation of an Internet address.
.TP 19
.B ARES_ENODATA
There was no data returned to extract a result from.
.TP 19
.B ARES_ENOTFOUND
The name
.I name
was not found.
.TP 19
.B ARES_ENOMEM
Memory was exhausted.
.TP 19
.B ARES_ECANCELLED
The query was cancelled.
.TP 19
.B ARES_EDESTRUCTION
The name service channel
.I channel
is being destroyed; the query will not be completed.
.PP
The callback argument
.I timeouts
reports how many times a query timed out during the execution of the
given request.
.PP
On successful completion of the query, the callback argument
.I hostent
points to a
.B struct hostent
containing the name of the host returned by the query. The callback
need not and should not attempt to free the memory pointed to by
.IR hostent ;
the ares library will free it when the callback returns. If the query
did not complete successfully,
.I hostent
will be
.BR NULL .
.PP
When the associated callback is called, it is called with a channel lock so care
must be taken to ensure any processing is minimal to prevent DNS channel stalls.
The callback may be triggered from a different thread than the one which
called \fIares_gethostbyname(3)\fP.
For integrators running their own event loops and not using \fBARES_OPT_EVENT_THREAD\fP,
care needs to be taken to ensure any file descriptor lists are updated immediately
within the eventloop when notified.
.SH SEE ALSO
.BR ares_process (3),
.BR ares_gethostbyaddr (3)

View File

@ -0,0 +1,68 @@
.\"
.\" Copyright 1998 by the Massachusetts Institute of Technology.
.\" SPDX-License-Identifier: MIT
.\"
.TH ARES_GETHOSTBYNAME 3 "25 July 1998"
.SH NAME
ares_gethostbyname_file \- Lookup a name in the system's hosts file
.SH SYNOPSIS
.nf
#include <ares.h>
int ares_gethostbyname_file(ares_channel_t *\fIchannel\fP, const char *\fIname\fP,
int \fIfamily\fP, struct hostent **host)
.fi
.SH DESCRIPTION
The
.B ares_gethostbyname_file
function performs a host lookup by name against the system's hosts file (or equivalent local hostname database).
The
.IR channel
parameter is required, but no asynchronous queries are performed. Instead, the
lookup is done via the same mechanism used to perform 'f' lookups
(see the
.I lookups
options field in \fIares_init_options(3)\fP).
The parameter
.I name
gives the hostname as a NUL-terminated C string, and
.I family
gives the desired type of address for the resulting host entry.
.PP
The return value indicates whether the query succeeded and, if not, how it
failed. It may have any of the following values:
.TP 19
.B ARES_SUCCESS
The host lookup completed successfully and
.I host
now points to the result (and must be freed with \fIares_free_hostent(3)\fP).
.TP 19
.B ARES_ENOTFOUND
The hostname
.I name
was not found.
.TP 19
.B ARES_EFILE
There was a file I/O error while performing the lookup.
.TP 19
.B ARES_ENOMEM
Memory was exhausted.
.PP
On successful completion of the query, the pointer pointed to by
.I host
points to a
.B struct hostent
containing the address of the host returned by the lookup. The user must
free the memory pointed to by
.IR host
when finished with it by calling \fIares_free_hostent(3)\fP. If the lookup did
not complete successfully,
.I host
will be
.BR NULL .
.SH AVAILABILITY
Added in c-ares 1.5.4
.SH SEE ALSO
.BR ares_gethostbyname (3),
.BR ares_free_hostent (3),
.BR ares_init_options (3)

147
deps/cares/docs/ares_getnameinfo.3 vendored Normal file
View File

@ -0,0 +1,147 @@
.\"
.\" Copyright 2005 by Dominick Meglio.
.\" SPDX-License-Identifier: MIT
.\"
.TH ARES_GETNAMEINFO 3 "1 May 2009"
.SH NAME
ares_getnameinfo \- Address-to-nodename translation in protocol-independent manner
.SH SYNOPSIS
.nf
#include <ares.h>
typedef void (*ares_nameinfo_callback)(void *\fIarg\fP, int \fIstatus\fP,
int \fItimeouts\fP, char *\fInode\fP,
char *\fIservice\fP)
void ares_getnameinfo(ares_channel_t *\fIchannel\fP, const struct sockaddr *\fIsa\fP,
ares_socklen_t \fIsalen\fP, int \fIflags\fP,
ares_nameinfo_callback \fIcallback\fP, void *\fIarg\fP)
.fi
.SH DESCRIPTION
The
.B ares_getnameinfo
function is defined for protocol-independent address translation. The function
is a combination of \fIares_gethostbyaddr(3)\fP and \fIgetservbyport(3)\fP. The function will
translate the address either by executing a host query on the name service channel
identified by
.IR channel
or it will attempt to resolve it locally if possible.
The parameters
.I sa
and
.I len
give the address as a sockaddr structure, and
.I flags
gives the options that the function will use. Valid flags are listed below:
.TP 19
.B ARES_NI_NOFQDN
Only the nodename portion of the FQDN is returned for local hosts.
.TP 19
.B ARES_NI_NUMERICHOST
The numeric form of the hostname is returned rather than the name.
.TP 19
.B ARES_NI_NAMEREQD
An error is returned if the hostname cannot be found in the DNS.
.TP 19
.B ARES_NI_NUMERICSERV
The numeric form of the service is returned rather than the name.
.TP 19
.B ARES_NI_TCP
The service name is to be looked up for the TCP protocol.
.TP 19
.B ARES_NI_UDP
The service name is to be looked up for the UDP protocol.
.TP 19
.B ARES_NI_SCTP
The service name is to be looked up for the SCTP protocol.
.TP 19
.B ARES_NI_DCCP
The service name is to be looked up for the DCCP protocol.
.TP 19
.B ARES_NI_NUMERICSCOPE
The numeric form of the scope ID is returned rather than the name.
.TP 19
.B ARES_NI_LOOKUPHOST
A hostname lookup is being requested.
.TP 19
.B ARES_NI_LOOKUPSERVICE
A service name lookup is being requested.
.PP
When the query
is complete or has
failed, the ares library will invoke \fIcallback\fP. Completion or failure of
the query may happen immediately, or may happen during a later call to
\fIares_process(3)\fP, \fIares_destroy(3)\fP or \fIares_cancel(3)\fP.
.PP
When the associated callback is called, it is called with a channel lock so care
must be taken to ensure any processing is minimal to prevent DNS channel stalls.
The callback may be triggered from a different thread than the one which
called \fIares_getnameinfo(3)\fP.
For integrators running their own event loops and not using \fBARES_OPT_EVENT_THREAD\fP,
care needs to be taken to ensure any file descriptor lists are updated immediately
within the eventloop when notified.
.PP
The callback argument
.I arg
is copied from the
.B ares_getnameinfo
argument
.IR arg .
The callback argument
.I status
indicates whether the query succeeded and, if not, how it failed. It
may have any of the following values:
.TP 19
.B ARES_SUCCESS
The host lookup completed successfully.
.TP 19
.B ARES_ENOTIMP
The ares library does not know how to look up addresses of type
.IR family .
.TP 19
.B ARES_ENOTFOUND
The address
.I addr
was not found.
.TP 19
.B ARES_ENOMEM
Memory was exhausted.
.TP 19
.B ARES_ECANCELLED
The query was cancelled.
.TP 19
.B ARES_EDESTRUCTION
The name service channel
.I channel
is being destroyed; the query will not be completed.
.TP 19
.B ARES_EBADFLAGS
The
.I flags
parameter contains an illegal value.
.PP
The callback argument
.I timeouts
reports how many times a query timed out during the execution of the
given request.
.PP
On successful completion of the query, the callback argument
.I node
contains a string representing the hostname (assuming
.B ARES_NI_LOOKUPHOST
was specified). Additionally,
.I service
contains a string representing the service name (assuming
.B ARES_NI_LOOKUPSERVICE
was specified).
If the query did not complete successfully, or one of the values
was not requested,
.I node
or
.I service
will be
.BR NULL .
.SH SEE ALSO
.BR ares_process (3),

53
deps/cares/docs/ares_getsock.3 vendored Normal file
View File

@ -0,0 +1,53 @@
.\"
.\" Copyright 1998 by Daniel Stenberg
.\" SPDX-License-Identifier: MIT
.\"
.TH ARES_GETSOCK 3 "11 March 2010"
.SH NAME
ares_getsock \- get socket descriptors to wait on (deprecated)
.SH SYNOPSIS
.nf
#include <ares.h>
int ares_getsock(const ares_channel_t *\fIchannel\fP, ares_socket_t *\fIsocks\fP,
int \fInumsocks\fP);
.fi
.SH DESCRIPTION
The
.B ares_getsock
function retrieves the set of socket descriptors which the calling
application should wait on for reading and/or writing for the
processing of name service queries pending on the name service channel
identified by
.IR channel .
Socket descriptors will be set in the socket descriptor array pointed to by
\fIsocks\fP.
\fInumsocks\fP is the size of the given array in number of ints.
This function can only return information up to 16 sockets. If more are
in use, they are simply not reported back.
.SH RETURN VALUES
\fBares_getsock\fP returns a bitmask for what actions to wait for on the
different sockets. The ares.h header file provides these convenience macros to
extract the information appropriately:
.nf
#define ARES_GETSOCK_MAXNUM 16 /* ares_getsock() can return info about
this many sockets */
#define ARES_GETSOCK_READABLE(bits,num) (bits & (1<< (num)))
#define ARES_GETSOCK_WRITABLE(bits,num) (bits & (1 << ((num) + \
ARES_GETSOCK_MAXNUM)))
.fi
.SH NOTES
This function was added in c-ares 1.3.1 and deprecated in c-ares 1.20.0 due to
the implementation of \fBARES_OPT_MAX_UDP_QUERIES\fP which makes it likely to
exceed 16 open file descriptors.
It is recommended to use \fBARES_OPT_EVENT_THREAD\fP passed to
\fIares_init_options(3)\fP or to use socket state callbacks
(\fBARES_OPT_SOCK_STATE_CB\fP) registered via \fBares_init_options(3)\fP.
.SH SEE ALSO
.BR ares_init_options (3),
.BR ares_timeout (3),
.BR ares_fds (3),
.BR ares_process (3)

34
deps/cares/docs/ares_inet_ntop.3 vendored Normal file
View File

@ -0,0 +1,34 @@
.\"
.\" Copyright (C) 2013 by Daniel Stenberg
.\" SPDX-License-Identifier: MIT
.\"
.TH ARES_INET_NTOP 3 "17 Feb 2013"
.SH NAME
ares_inet_ntop \- convert a network format address to presentation format
.SH SYNOPSIS
.nf
#include <ares.h>
const char *ares_inet_ntop(int \fIaf\fP, const void *\fIsrc\fP, char *\fIdst\fP,
ares_socklen_t \fIsize\fP);
.fi
.SH DESCRIPTION
This is a portable version with the identical functionality of the commonly
available \fIinet_ntop\fP.
The ares_inet_ntop() function converts a numeric address into a text string
suitable for presentation. The \fBaf\fP argument shall specify the family of
the address. This can be AF_INET or AF_INET6. The \fBsrc\fP argument points
to a buffer holding an IPv4 address if the af argument is AF_INET, or an IPv6
address if the af argument is AF_INET6; the address must be in network byte
order. The \fBdst\fP argument points to a buffer where the function stores the
resulting text string; it shall not be NULL. The \fBsize\fP argument specifies
the size of this buffer, which shall be large enough to hold the text string
(INET_ADDRSTRLEN (16) characters for IPv4, INET6_ADDRSTRLEN (46) characters
for IPv6).
.SH SEE ALSO
.BR ares_init (3),
.BR ares_inet_pton (3)
.SH AVAILABILITY
made properly publicly available in c-ares for real in version 1.10.0

Some files were not shown because too many files have changed in this diff Show More