├── build_entry.sh ├── build_kleefl.sh ├── c-ares ├── .gitignore ├── .travis.yml ├── AUTHORS ├── CHANGES ├── CHANGES.0 ├── CONTRIBUTING.md ├── GIT-INFO ├── LICENSE.md ├── Makefile.Watcom ├── Makefile.am ├── Makefile.dj ├── Makefile.inc ├── Makefile.m32 ├── Makefile.msvc ├── Makefile.netware ├── NEWS ├── README.cares ├── README.md ├── README.msvc ├── RELEASE-NOTES ├── SECURITY.md ├── TODO ├── acinclude.m4 ├── acountry.1 ├── acountry.c ├── adig.1 ├── adig.c ├── ahost.1 ├── ahost.c ├── appveyor.yml ├── ares.h ├── ares__close_sockets.c ├── ares__get_hostent.c ├── ares__read_line.c ├── ares__timeval.c ├── ares_build.h.dist ├── ares_build.h.in ├── ares_cancel.3 ├── ares_cancel.c ├── ares_create_query.3 ├── ares_create_query.c ├── ares_data.c ├── ares_data.h ├── ares_destroy.3 ├── ares_destroy.c ├── ares_destroy_options.3 ├── ares_dns.h ├── ares_dup.3 ├── ares_expand_name.3 ├── ares_expand_name.c ├── ares_expand_string.3 ├── ares_expand_string.c ├── ares_fds.3 ├── ares_fds.c ├── ares_free_data.3 ├── ares_free_hostent.3 ├── ares_free_hostent.c ├── ares_free_string.3 ├── ares_free_string.c ├── ares_get_servers.3 ├── ares_get_servers_ports.3 ├── ares_getenv.c ├── ares_getenv.h ├── ares_gethostbyaddr.3 ├── ares_gethostbyaddr.c ├── ares_gethostbyname.3 ├── ares_gethostbyname.c ├── ares_gethostbyname_file.3 ├── ares_getnameinfo.3 ├── ares_getnameinfo.c ├── ares_getopt.c ├── ares_getopt.h ├── ares_getsock.3 ├── ares_getsock.c ├── ares_inet_net_pton.h ├── ares_inet_ntop.3 ├── ares_inet_pton.3 ├── ares_init.3 ├── ares_init.c ├── ares_init_options.3 ├── ares_iphlpapi.h ├── ares_ipv6.h ├── ares_library_cleanup.3 ├── ares_library_init.3 ├── ares_library_init.c ├── ares_library_init.h ├── ares_library_initialized.3 ├── ares_llist.c ├── ares_llist.h ├── ares_mkquery.3 ├── ares_mkquery.c ├── ares_nowarn.c ├── ares_nowarn.h ├── ares_options.c ├── ares_parse_a_reply.3 ├── ares_parse_a_reply.c ├── ares_parse_aaaa_reply.3 ├── ares_parse_aaaa_reply.c ├── ares_parse_mx_reply.3 ├── ares_parse_mx_reply.c ├── ares_parse_naptr_reply.3 ├── ares_parse_naptr_reply.c ├── ares_parse_ns_reply.3 ├── ares_parse_ns_reply.c ├── ares_parse_ptr_reply.3 ├── ares_parse_ptr_reply.c ├── ares_parse_soa_reply.3 ├── ares_parse_soa_reply.c ├── ares_parse_srv_reply.3 ├── ares_parse_srv_reply.c ├── ares_parse_txt_reply.3 ├── ares_parse_txt_reply.c ├── ares_platform.c ├── ares_platform.h ├── ares_private.h ├── ares_process.3 ├── ares_process.c ├── ares_query.3 ├── ares_query.c ├── ares_rules.h ├── ares_save_options.3 ├── ares_search.3 ├── ares_search.c ├── ares_send.3 ├── ares_send.c ├── ares_set_local_dev.3 ├── ares_set_local_ip4.3 ├── ares_set_local_ip6.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_sortlist.3 ├── ares_setup.h ├── ares_strcasecmp.c ├── ares_strcasecmp.h ├── ares_strdup.c ├── ares_strdup.h ├── ares_strerror.3 ├── ares_strerror.c ├── ares_timeout.3 ├── ares_timeout.c ├── ares_version.3 ├── ares_version.c ├── ares_version.h ├── ares_writev.c ├── ares_writev.h ├── bitncmp.c ├── bitncmp.h ├── buildconf ├── buildconf.bat ├── cares.rc ├── config-dos.h ├── config-win32.h ├── configure.ac ├── get_ver.awk ├── git2changes.pl ├── inet_net_pton.c ├── inet_ntop.c ├── klee_fuzzer.c ├── klee_fuzzer_replay.c ├── libcares.pc.in ├── m4 │ ├── .gitignore │ ├── ax_check_user_namespace.m4 │ ├── ax_check_uts_namespace.m4 │ ├── ax_code_coverage.m4 │ ├── ax_cxx_compile_stdcxx_11.m4 │ ├── ax_pthread.m4 │ ├── cares-compilers.m4 │ ├── cares-confopts.m4 │ ├── cares-functions.m4 │ ├── cares-override.m4 │ ├── cares-reentrant.m4 │ ├── xc-am-iface.m4 │ ├── xc-cc-check.m4 │ ├── xc-lt-iface.m4 │ ├── xc-translit.m4 │ ├── xc-val-flgs.m4 │ ├── zz40-xc-ovr.m4 │ ├── zz50-xc-ovr.m4 │ └── zz60-xc-ovr.m4 ├── maketgz ├── msvc_ver.inc ├── nameser.h ├── setup_once.h ├── test │ ├── .gitignore │ ├── Makefile.am │ ├── Makefile.inc │ ├── Makefile.m32 │ ├── Makefile.msvc │ ├── README.md │ ├── ares-fuzz.c │ ├── ares-test-fuzz.c │ ├── ares-test-init.cc │ ├── ares-test-internal.cc │ ├── ares-test-live.cc │ ├── ares-test-main.cc │ ├── ares-test-misc.cc │ ├── ares-test-mock.cc │ ├── ares-test-ns.cc │ ├── ares-test-parse-a.cc │ ├── ares-test-parse-aaaa.cc │ ├── ares-test-parse-mx.cc │ ├── ares-test-parse-naptr.cc │ ├── ares-test-parse-ns.cc │ ├── ares-test-parse-ptr.cc │ ├── ares-test-parse-soa.cc │ ├── ares-test-parse-srv.cc │ ├── ares-test-parse-txt.cc │ ├── ares-test-parse.cc │ ├── ares-test.cc │ ├── ares-test.h │ ├── buildconf │ ├── configure.ac │ ├── dns-dump.cc │ ├── dns-proto-test.cc │ ├── dns-proto.cc │ ├── dns-proto.h │ ├── fuzzcheck.sh │ ├── fuzzinput │ │ ├── 004a216d3cff18b0c5c6b68b807f1529 │ │ ├── 00539467ca159b36aea95e61f9729115 │ │ ├── 00e846db8f43f2f507cd1666ed5a753e │ │ ├── 0177b7566f08c013699eaea9a77abeb3 │ │ ├── 020a4fa317715bfdb236ed13751e6b65 │ │ ├── 0310f2e81bea31f4fe3f330872a877dd │ │ ├── 0449be67df1730b2d0887d412a9b7cc4 │ │ ├── 0449dd14f7aa94bf0d716bfe09b287a8 │ │ ├── 04c93cdf7208979aa4df80a3a0d5a2d8 │ │ ├── 0567e7171e08e75f3f91c4ca74c17adc │ │ ├── 05ba948578a397e9cbc6a7b3e78622fa │ │ ├── 060afe5ed25f3e2e86167e545f27edca │ │ ├── 06d47d3681493f1b1d41236f460d896f │ │ ├── 0724a810b0e131c2fddb6de9003b9064 │ │ ├── 0b5279148826f5b962bcf1896bdb4ede │ │ ├── 114048c0f6b10bdc67ce9166405d195e │ │ ├── 11b8464a0ef8735d202955c34c36b0c7 │ │ ├── 11cb626f1668c7b41954ce7d768fe528 │ │ ├── 14b133bf18125b75a1976fa63a1df6b7 │ │ ├── 153c6b3afa8faa03c8bc28f936a6d4cf │ │ ├── 182cad2a342ed7317b7c21a5d17020d1 │ │ ├── 1c61a61bb7057b52c5b15188345a5238 │ │ ├── 1dbe2cf62ed2e4fa1c3cb473f08710b5 │ │ ├── 21199be504fcfece5c7096ee0dbba507 │ │ ├── 21891480074b5635dbbe7137bdcabccd │ │ ├── 233aea42e15aa73e131eefabf16088c9 │ │ ├── 24660d4e7ac7aa21d600ea7a3d198bbb │ │ ├── 25589deb55c08429345f289d1c9b0254 │ │ ├── 2573bd823e4da11f727a17f8e1f35c26 │ │ ├── 276f12da56866273e76059ad0e7be97e │ │ ├── 29198a2e380cb19babec9e02116d213e │ │ ├── 2c94ba9434b1a1b9396fc5364f101363 │ │ ├── 2d578c357dc2f5e02dc55cddb30641d1 │ │ ├── 2dff6cc5a223e67fde9e5e79af456992 │ │ ├── 2f103b1f9477f2d8934bd84328d51c75 │ │ ├── 31cd3a8413de13d9624adbb1613784bf │ │ ├── 36415bdf1d180098fe6234b4186e69f3 │ │ ├── 3a04a80f0242e8dff0cd732e7c4767da │ │ ├── 44d0f973b7b0fb3e4a07770c943dcd5a │ │ ├── 50bc00daa0ddcd6cfb2b5d9f62c81f47 │ │ ├── 51ed2d1fb77b3078b54e94e85606b7df │ │ ├── 5c5e0e899cf2e7d053a9e45fb76f6e5a │ │ ├── 70152ed033f139443fbfb1b858bb3b1b │ │ ├── 7030ca2b24e5a7f9dd8f62096a48eb33 │ │ ├── 71eec1a0ef2d25bb9e2ef17f23be7e9e │ │ ├── 7a6b0177210ea4ef40b254daf99393c5 │ │ ├── 7f1567733711ffb61839621af0cbfa33 │ │ ├── 850c6d57c5bb7be8205fc2438d14d7e5 │ │ ├── a5c8cd2784a5792b9e91c2d7895b3b34 │ │ ├── a9135cdc7151d023300ff194bad90af9 │ │ ├── af2597e8ac7dec1e8b4a47518312912a │ │ ├── answer_a │ │ ├── answer_aaaa │ │ ├── b3f53ef826b831bb09dd25c7f5960249 │ │ ├── cda0f8751f5c4993974c2b549d29bcc8 │ │ ├── ce6c26c0e469339873d0e7f616ab0945 │ │ ├── e4dd7e7c2dd4ed7c2e17a6af5d04f9c9 │ │ ├── ed50ed8ee36230a5a69746ad830437e5 │ │ ├── f1b900d50806021953321c3b604ee497 │ │ ├── f89f6c8176b564a7dd646f14305573ce │ │ └── f9ad508d2dbd08d3aaaabc7d1174677d │ └── gmock-1.7.0 │ │ ├── CHANGES │ │ ├── CMakeLists.txt │ │ ├── CONTRIBUTORS │ │ ├── LICENSE │ │ ├── Makefile.am │ │ ├── README │ │ ├── configure.ac │ │ ├── fused-src │ │ ├── gmock-gtest-all.cc │ │ ├── gmock │ │ │ └── gmock.h │ │ ├── gmock_main.cc │ │ └── gtest │ │ │ └── gtest.h │ │ ├── gtest │ │ ├── CHANGES │ │ ├── CMakeLists.txt │ │ ├── CONTRIBUTORS │ │ ├── LICENSE │ │ ├── Makefile.am │ │ ├── README │ │ ├── cmake │ │ │ └── internal_utils.cmake │ │ ├── codegear │ │ │ ├── gtest.cbproj │ │ │ ├── gtest.groupproj │ │ │ ├── gtest_all.cc │ │ │ ├── gtest_link.cc │ │ │ ├── gtest_main.cbproj │ │ │ └── gtest_unittest.cbproj │ │ ├── configure.ac │ │ ├── fused-src │ │ │ └── gtest │ │ │ │ ├── gtest-all.cc │ │ │ │ ├── gtest.h │ │ │ │ └── gtest_main.cc │ │ ├── include │ │ │ └── gtest │ │ │ │ ├── gtest-death-test.h │ │ │ │ ├── gtest-message.h │ │ │ │ ├── gtest-param-test.h │ │ │ │ ├── gtest-param-test.h.pump │ │ │ │ ├── gtest-printers.h │ │ │ │ ├── gtest-spi.h │ │ │ │ ├── gtest-test-part.h │ │ │ │ ├── gtest-typed-test.h │ │ │ │ ├── gtest.h │ │ │ │ ├── gtest_pred_impl.h │ │ │ │ ├── gtest_prod.h │ │ │ │ └── internal │ │ │ │ ├── gtest-death-test-internal.h │ │ │ │ ├── gtest-filepath.h │ │ │ │ ├── gtest-internal.h │ │ │ │ ├── gtest-linked_ptr.h │ │ │ │ ├── gtest-param-util-generated.h │ │ │ │ ├── gtest-param-util-generated.h.pump │ │ │ │ ├── gtest-param-util.h │ │ │ │ ├── gtest-port.h │ │ │ │ ├── gtest-string.h │ │ │ │ ├── gtest-tuple.h │ │ │ │ ├── gtest-tuple.h.pump │ │ │ │ ├── gtest-type-util.h │ │ │ │ └── gtest-type-util.h.pump │ │ ├── m4 │ │ │ ├── acx_pthread.m4 │ │ │ └── gtest.m4 │ │ ├── msvc │ │ │ ├── gtest-md.sln │ │ │ ├── gtest-md.vcproj │ │ │ ├── gtest.sln │ │ │ ├── gtest.vcproj │ │ │ ├── gtest_main-md.vcproj │ │ │ ├── gtest_main.vcproj │ │ │ ├── gtest_prod_test-md.vcproj │ │ │ ├── gtest_prod_test.vcproj │ │ │ ├── gtest_unittest-md.vcproj │ │ │ └── gtest_unittest.vcproj │ │ ├── samples │ │ │ ├── prime_tables.h │ │ │ ├── sample1.cc │ │ │ ├── sample1.h │ │ │ ├── sample10_unittest.cc │ │ │ ├── sample1_unittest.cc │ │ │ ├── sample2.cc │ │ │ ├── sample2.h │ │ │ ├── sample2_unittest.cc │ │ │ ├── sample3-inl.h │ │ │ ├── sample3_unittest.cc │ │ │ ├── sample4.cc │ │ │ ├── sample4.h │ │ │ ├── sample4_unittest.cc │ │ │ ├── sample5_unittest.cc │ │ │ ├── sample6_unittest.cc │ │ │ ├── sample7_unittest.cc │ │ │ ├── sample8_unittest.cc │ │ │ └── sample9_unittest.cc │ │ ├── scripts │ │ │ ├── fuse_gtest_files.py │ │ │ ├── gen_gtest_pred_impl.py │ │ │ ├── gtest-config.in │ │ │ └── pump.py │ │ ├── src │ │ │ ├── gtest-all.cc │ │ │ ├── gtest-death-test.cc │ │ │ ├── gtest-filepath.cc │ │ │ ├── gtest-internal-inl.h │ │ │ ├── gtest-port.cc │ │ │ ├── gtest-printers.cc │ │ │ ├── gtest-test-part.cc │ │ │ ├── gtest-typed-test.cc │ │ │ ├── gtest.cc │ │ │ └── gtest_main.cc │ │ ├── test │ │ │ ├── gtest-death-test_ex_test.cc │ │ │ ├── gtest-death-test_test.cc │ │ │ ├── gtest-filepath_test.cc │ │ │ ├── gtest-linked_ptr_test.cc │ │ │ ├── gtest-listener_test.cc │ │ │ ├── gtest-message_test.cc │ │ │ ├── gtest-options_test.cc │ │ │ ├── gtest-param-test2_test.cc │ │ │ ├── gtest-param-test_test.cc │ │ │ ├── gtest-param-test_test.h │ │ │ ├── gtest-port_test.cc │ │ │ ├── gtest-printers_test.cc │ │ │ ├── gtest-test-part_test.cc │ │ │ ├── gtest-tuple_test.cc │ │ │ ├── gtest-typed-test2_test.cc │ │ │ ├── gtest-typed-test_test.cc │ │ │ ├── gtest-typed-test_test.h │ │ │ ├── gtest-unittest-api_test.cc │ │ │ ├── gtest_all_test.cc │ │ │ ├── gtest_break_on_failure_unittest.py │ │ │ ├── gtest_break_on_failure_unittest_.cc │ │ │ ├── gtest_catch_exceptions_test.py │ │ │ ├── gtest_catch_exceptions_test_.cc │ │ │ ├── gtest_color_test.py │ │ │ ├── gtest_color_test_.cc │ │ │ ├── gtest_env_var_test.py │ │ │ ├── gtest_env_var_test_.cc │ │ │ ├── gtest_environment_test.cc │ │ │ ├── gtest_filter_unittest.py │ │ │ ├── gtest_filter_unittest_.cc │ │ │ ├── gtest_help_test.py │ │ │ ├── gtest_help_test_.cc │ │ │ ├── gtest_list_tests_unittest.py │ │ │ ├── gtest_list_tests_unittest_.cc │ │ │ ├── gtest_main_unittest.cc │ │ │ ├── gtest_no_test_unittest.cc │ │ │ ├── gtest_output_test.py │ │ │ ├── gtest_output_test_.cc │ │ │ ├── gtest_output_test_golden_lin.txt │ │ │ ├── gtest_pred_impl_unittest.cc │ │ │ ├── gtest_premature_exit_test.cc │ │ │ ├── gtest_prod_test.cc │ │ │ ├── gtest_repeat_test.cc │ │ │ ├── gtest_shuffle_test.py │ │ │ ├── gtest_shuffle_test_.cc │ │ │ ├── gtest_sole_header_test.cc │ │ │ ├── gtest_stress_test.cc │ │ │ ├── gtest_test_utils.py │ │ │ ├── gtest_throw_on_failure_ex_test.cc │ │ │ ├── gtest_throw_on_failure_test.py │ │ │ ├── gtest_throw_on_failure_test_.cc │ │ │ ├── gtest_uninitialized_test.py │ │ │ ├── gtest_uninitialized_test_.cc │ │ │ ├── gtest_unittest.cc │ │ │ ├── gtest_xml_outfile1_test_.cc │ │ │ ├── gtest_xml_outfile2_test_.cc │ │ │ ├── gtest_xml_outfiles_test.py │ │ │ ├── gtest_xml_output_unittest.py │ │ │ ├── gtest_xml_output_unittest_.cc │ │ │ ├── gtest_xml_test_utils.py │ │ │ ├── production.cc │ │ │ └── production.h │ │ └── xcode │ │ │ ├── Config │ │ │ ├── DebugProject.xcconfig │ │ │ ├── FrameworkTarget.xcconfig │ │ │ ├── General.xcconfig │ │ │ ├── ReleaseProject.xcconfig │ │ │ ├── StaticLibraryTarget.xcconfig │ │ │ └── TestTarget.xcconfig │ │ │ ├── Resources │ │ │ └── Info.plist │ │ │ ├── Samples │ │ │ └── FrameworkSample │ │ │ │ ├── Info.plist │ │ │ │ ├── WidgetFramework.xcodeproj │ │ │ │ └── project.pbxproj │ │ │ │ ├── runtests.sh │ │ │ │ ├── widget.cc │ │ │ │ ├── widget.h │ │ │ │ └── widget_test.cc │ │ │ ├── Scripts │ │ │ ├── runtests.sh │ │ │ └── versiongenerate.py │ │ │ └── gtest.xcodeproj │ │ │ └── project.pbxproj │ │ ├── include │ │ └── gmock │ │ │ ├── gmock-actions.h │ │ │ ├── gmock-cardinalities.h │ │ │ ├── gmock-generated-actions.h │ │ │ ├── gmock-generated-actions.h.pump │ │ │ ├── gmock-generated-function-mockers.h │ │ │ ├── gmock-generated-function-mockers.h.pump │ │ │ ├── gmock-generated-matchers.h │ │ │ ├── gmock-generated-matchers.h.pump │ │ │ ├── gmock-generated-nice-strict.h │ │ │ ├── gmock-generated-nice-strict.h.pump │ │ │ ├── gmock-matchers.h │ │ │ ├── gmock-more-actions.h │ │ │ ├── gmock-more-matchers.h │ │ │ ├── gmock-spec-builders.h │ │ │ ├── gmock.h │ │ │ └── internal │ │ │ ├── gmock-generated-internal-utils.h │ │ │ ├── gmock-generated-internal-utils.h.pump │ │ │ ├── gmock-internal-utils.h │ │ │ └── gmock-port.h │ │ ├── msvc │ │ ├── 2005 │ │ │ ├── gmock.sln │ │ │ ├── gmock.vcproj │ │ │ ├── gmock_config.vsprops │ │ │ ├── gmock_main.vcproj │ │ │ └── gmock_test.vcproj │ │ └── 2010 │ │ │ ├── gmock.sln │ │ │ ├── gmock.vcxproj │ │ │ ├── gmock_config.props │ │ │ ├── gmock_main.vcxproj │ │ │ └── gmock_test.vcxproj │ │ ├── scripts │ │ ├── fuse_gmock_files.py │ │ ├── generator │ │ │ ├── LICENSE │ │ │ ├── README │ │ │ ├── README.cppclean │ │ │ ├── cpp │ │ │ │ ├── __init__.py │ │ │ │ ├── ast.py │ │ │ │ ├── gmock_class.py │ │ │ │ ├── keywords.py │ │ │ │ ├── tokenize.py │ │ │ │ └── utils.py │ │ │ └── gmock_gen.py │ │ └── gmock-config.in │ │ ├── src │ │ ├── gmock-all.cc │ │ ├── gmock-cardinalities.cc │ │ ├── gmock-internal-utils.cc │ │ ├── gmock-matchers.cc │ │ ├── gmock-spec-builders.cc │ │ ├── gmock.cc │ │ └── gmock_main.cc │ │ └── test │ │ ├── gmock-actions_test.cc │ │ ├── gmock-cardinalities_test.cc │ │ ├── gmock-generated-actions_test.cc │ │ ├── gmock-generated-function-mockers_test.cc │ │ ├── gmock-generated-internal-utils_test.cc │ │ ├── gmock-generated-matchers_test.cc │ │ ├── gmock-internal-utils_test.cc │ │ ├── gmock-matchers_test.cc │ │ ├── gmock-more-actions_test.cc │ │ ├── gmock-nice-strict_test.cc │ │ ├── gmock-port_test.cc │ │ ├── gmock-spec-builders_test.cc │ │ ├── gmock_all_test.cc │ │ ├── gmock_ex_test.cc │ │ ├── gmock_leak_test.py │ │ ├── gmock_leak_test_.cc │ │ ├── gmock_link2_test.cc │ │ ├── gmock_link_test.cc │ │ ├── gmock_link_test.h │ │ ├── gmock_output_test.py │ │ ├── gmock_output_test_.cc │ │ ├── gmock_output_test_golden.txt │ │ ├── gmock_stress_test.cc │ │ ├── gmock_test.cc │ │ └── gmock_test_utils.py ├── vc │ ├── cares │ │ ├── vc6cares.dsp │ │ └── vc6cares.dsw │ └── vc6aws.dsw └── windows_port.c ├── klee-build ├── klee-build.cpp ├── klee-clang.cpp ├── klee-clang.h ├── readme.md ├── run_fuzz.sh ├── save_test_code ├── Makefile.am ├── Makefile.in ├── aclocal.m4 ├── autom4te.cache │ ├── output.0 │ ├── output.1 │ ├── requests │ ├── traces.0 │ └── traces.1 ├── autoscan.log ├── compile ├── config.h.in ├── configure ├── configure.ac ├── depcomp ├── install-sh ├── missing ├── readme.txt ├── test_code.c ├── test_code.h ├── test_code_main.c ├── test_data.txt └── test_fuzzing_entry.c └── test_code ├── Makefile.am ├── Makefile.in ├── aclocal.m4 ├── autom4te.cache ├── output.0 ├── output.1 ├── requests ├── traces.0 └── traces.1 ├── autoscan.log ├── compile ├── config.h.in ├── configure ├── configure.ac ├── depcomp ├── install-sh ├── missing ├── readme.txt ├── test_code.c ├── test_code.h ├── test_code_main.c ├── test_data.txt └── test_fuzzing_entry.c /build_entry.sh: -------------------------------------------------------------------------------- 1 | 2 | #!/bin/sh 3 | 4 | build_file_path=$1 5 | 6 | if [ -z "$build_file_path" ]; then 7 | echo Using : ./build_entry.sh %KleeFuzzingEntry_file_path% 8 | 9 | exit 1 10 | fi 11 | 12 | 13 | output_path=${build_file_path%.c*} 14 | output_path=`echo "$output_path.bc"` 15 | 16 | CC=clang 17 | CXX=clang++ 18 | 19 | echo Output Compiler Command : 20 | echo $CC -O2 -g $build_file_path -o $output_path 21 | echo `$CC -O2 -g $build_file_path -o $output_path` 22 | 23 | -------------------------------------------------------------------------------- /build_kleefl.sh: -------------------------------------------------------------------------------- 1 | 2 | 3 | CC=clang 4 | CXX=clang++ 5 | 6 | 7 | echo `$CXX -O2 -g klee-clang.cpp -o klee-clang` 8 | echo `$CXX -O2 -g klee-build.cpp -o klee-build` 9 | 10 | rm -rf *.dSYM 11 | 12 | cp ./klee-clang /usr/local/bin/ 13 | cp ./klee-clang ./klee-clang++ 14 | cp ./klee-clang++ /usr/local/bin/ 15 | cp ./klee-build /usr/local/bin/ 16 | cp ./run_fuzz.sh /usr/local/bin/ 17 | -------------------------------------------------------------------------------- /c-ares/.gitignore: -------------------------------------------------------------------------------- 1 | .deps 2 | .libs 3 | *.lib 4 | *.pdb 5 | *.dll 6 | *.exe 7 | *.obj 8 | .*.swp 9 | Debug 10 | Release 11 | *.exp 12 | Makefile 13 | Makefile.in 14 | aclocal.m4 15 | autom4te.cache 16 | config.guess 17 | config.log 18 | config.status 19 | config.sub 20 | configure 21 | depcomp 22 | libtool 23 | ltmain.sh 24 | compile 25 | libcares.pc 26 | missing 27 | test-driver 28 | c-ares-*.tar.gz 29 | INSTALL 30 | install-sh 31 | *.o 32 | *.lo 33 | *.la 34 | *.gcno 35 | *.gcda 36 | *.gcov 37 | c-ares---coverage.info 38 | c-ares---coverage 39 | mkinstalldirs 40 | tags 41 | TAGS 42 | *~ 43 | aclocal.m4.bak 44 | acountry 45 | adig 46 | ahost 47 | ares_build.h 48 | ares_config.h 49 | ares_config.h.in 50 | stamp-h1 51 | stamp-h2 52 | ares_*pdf 53 | CHANGES.dist 54 | c-ares-*.tar.gz.asc 55 | ares_parse_mx_reply.pdf 56 | /[0-9]*.patch 57 | -------------------------------------------------------------------------------- /c-ares/AUTHORS: -------------------------------------------------------------------------------- 1 | c-ares is based on ares, and these are the people that have worked on it since 2 | the fork was made: 3 | 4 | Albert Chin 5 | Alex Loukissas 6 | Alexander Klauer 7 | Alexander Lazic 8 | Alexey Simak 9 | Andreas Rieke 10 | Andrew Andkjar 11 | Andrew Ayer 12 | Andrew C. Morrow 13 | Ashish Sharma 14 | Ben Greear 15 | Ben Noordhuis 16 | BogDan Vatra 17 | Brad House 18 | Brad Spencer 19 | Bram Matthys 20 | Chris Araman 21 | Dan Fandrich 22 | Daniel Johnson 23 | Daniel Stenberg 24 | David Drysdale 25 | David Stuart 26 | Denis Bilenko 27 | Dima Tisnek 28 | Dirk Manske 29 | Dominick Meglio 30 | Doug Goldstein 31 | Doug Kwan 32 | Duncan Wilcox 33 | Eino Tuominen 34 | Erik Kline 35 | Fedor Indutny 36 | Frederic Germain 37 | Geert Uytterhoeven 38 | George Neill 39 | Gisle Vanem 40 | Gregor Jasny 41 | Guenter Knauf 42 | Guilherme Balena Versiani 43 | Gunter Knauf 44 | Henrik Stoerner 45 | Jakub Hrozek 46 | James Bursa 47 | Jérémy Lal 48 | Keith Shaw 49 | Lei Shi 50 | Marko Kreen 51 | Michael Wallner 52 | Mike Crowe 53 | Nick Alcock 54 | Nick Mathewson 55 | Nicolas "Pixel" Noble 56 | Ning Dong 57 | Oleg Pudeyev 58 | Patrick Valsecchi 59 | Patrik Thunstrom 60 | Paul Saab 61 | Peter Pentchev 62 | Phil Blundell 63 | Poul Thomas Lomholt 64 | Ravi Pratap 65 | Robin Cornelius 66 | Saúl Ibarra Corretgé 67 | Sebastian at basti79.de 68 | Shmulik Regev 69 | Stefan Bühler 70 | Steinar H. Gunderson 71 | Svante Karlsson 72 | Tofu Linden 73 | Tom Hughes 74 | Tor Arntsen 75 | Viktor Szakats 76 | Vlad Dinulescu 77 | William Ahern 78 | Yang Tse 79 | hpopescu at ixiacom.com 80 | liren at vivisimo.com 81 | nordsturm 82 | saghul 83 | -------------------------------------------------------------------------------- /c-ares/CHANGES: -------------------------------------------------------------------------------- 1 | This file no longer holds the changelog. Now you can generate it yourself 2 | like this: 3 | 4 | $ git log --pretty=fuller --no-color --date=short --decorate=full -1000 | 5 | ./git2changes.pl 6 | 7 | The older, manually edited, changelog is found in git named CHANGES.0 8 | -------------------------------------------------------------------------------- /c-ares/CHANGES.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/CHANGES.0 -------------------------------------------------------------------------------- /c-ares/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | Contributing to c-ares 2 | ====================== 3 | 4 | To contribute patches to c-ares, please generate a GitHub pull request 5 | and follow these guidelines: 6 | 7 | - Check that the Travis builds are green for your pull request. 8 | - Please update the test suite to add a test case for any new functionality. 9 | - Build the library with `./configure --enable-debug --enable-maintainer-mode` and 10 | ensure there are no new warnings. 11 | 12 | To improve the chances of the c-ares maintainers responding to your request: 13 | 14 | - Also send an email to the mailing list at `c-ares@cool.haxx.se` describing your change. 15 | - To follow any associated discussion, please subscribe to the [mailing list](http://cool.haxx.se/mailman/listinfo/c-ares). 16 | -------------------------------------------------------------------------------- /c-ares/GIT-INFO: -------------------------------------------------------------------------------- 1 | 2 | GIT-INFO 3 | 4 | This file is only present in git - never in release archives. It is used as a 5 | sentinel file in buildconf.bat in order to differentiate a git checkout from 6 | release and daily snapshot archives. 7 | 8 | On *nix-like systems, run the ./buildconf script first to generate a fresh 9 | configure script. 10 | -------------------------------------------------------------------------------- /c-ares/LICENSE.md: -------------------------------------------------------------------------------- 1 | # c-ares license 2 | 3 | Copyright (c) 2007 - 2016, Daniel Stenberg with many contributors, see AUTHORS 4 | file. 5 | 6 | Copyright 1998 by the Massachusetts Institute of Technology. 7 | 8 | Permission to use, copy, modify, and distribute this software and its 9 | documentation for any purpose and without fee is hereby granted, provided that 10 | the above copyright notice appear in all copies and that both that copyright 11 | notice and this permission notice appear in supporting documentation, and that 12 | the name of M.I.T. not be used in advertising or publicity pertaining to 13 | distribution of the software without specific, written prior permission. 14 | M.I.T. makes no representations about the suitability of this software for any 15 | purpose. It is provided "as is" without express or implied warranty. 16 | -------------------------------------------------------------------------------- /c-ares/Makefile.dj: -------------------------------------------------------------------------------- 1 | # 2 | # c-ares Makefile for djgpp/gcc/Watt-32. 3 | # By Gisle Vanem 2004. 4 | # 5 | 6 | 7 | TOPDIR = .. 8 | 9 | DEPEND_PREREQ = ares_config.h 10 | 11 | include ../packages/DOS/common.dj 12 | include Makefile.inc 13 | 14 | CFLAGS += -DWATT32 -Dselect=select_s 15 | 16 | LDFLAGS = -s 17 | 18 | ifeq ($(USE_CURLDEBUG),1) 19 | EX_LIBS = ../lib/libcurl.a 20 | OBJ_HACK = $(OBJECTS) 21 | else 22 | OBJ_HACK = libcares.a 23 | endif 24 | 25 | ifeq ($(USE_SSL),1) 26 | EX_LIBS += $(OPENSSL_ROOT)/lib/libssl.a $(OPENSSL_ROOT)/lib/libcrypt.a 27 | endif 28 | 29 | ifeq ($(USE_ZLIB),1) 30 | EX_LIBS += $(ZLIB_ROOT)/libz.a 31 | endif 32 | 33 | ifeq ($(USE_IDNA),1) 34 | EX_LIBS += $(LIBIDN_ROOT)/lib/dj_obj/libidn.a -liconv 35 | endif 36 | 37 | EX_LIBS += $(WATT32_ROOT)/lib/libwatt.a 38 | 39 | OBJECTS = $(addprefix $(OBJ_DIR)/, $(CSOURCES:.c=.o)) 40 | 41 | all: $(OBJ_DIR) ares_config.h libcares.a ahost.exe adig.exe acountry.exe 42 | @echo Welcome to c-ares. 43 | 44 | libcares.a: $(OBJECTS) 45 | ar rs $@ $? 46 | 47 | ares_config.h: config-dos.h 48 | $(COPY) $^ $@ 49 | 50 | ahost.exe: ahost.c $(OBJ_DIR)/ares_getopt.o $(OBJ_HACK) 51 | $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^ $(EX_LIBS) 52 | 53 | adig.exe: adig.c $(OBJ_DIR)/ares_getopt.o $(OBJ_HACK) 54 | $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^ $(EX_LIBS) 55 | 56 | acountry.exe: acountry.c $(OBJ_DIR)/ares_getopt.o $(OBJ_HACK) 57 | $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^ $(EX_LIBS) 58 | 59 | # clean generated files 60 | # 61 | genclean: 62 | - $(DELETE) ares_config.h 63 | 64 | # clean object files and subdir 65 | # 66 | objclean: genclean 67 | - $(DELETE) $(OBJ_DIR)$(DS)*.o 68 | - $(RMDIR) $(OBJ_DIR) 69 | 70 | # clean without removing built library and programs 71 | # 72 | clean: objclean 73 | - $(DELETE) depend.dj 74 | 75 | # clean everything 76 | # 77 | realclean vclean: clean 78 | - $(DELETE) libcares.a 79 | - $(DELETE) acountry.exe 80 | - $(DELETE) adig.exe 81 | - $(DELETE) ahost.exe 82 | - $(DELETE) libcares.a 83 | 84 | -include depend.dj 85 | 86 | -------------------------------------------------------------------------------- /c-ares/Makefile.m32: -------------------------------------------------------------------------------- 1 | ############################################################# 2 | # 3 | ## Makefile for building libcares.a with MingW32 (GCC-3.2) 4 | ## Use: make -f Makefile.m32 [demos] 5 | ## 6 | ## Quick hack by Guenter; comments to: /dev/nul 7 | # 8 | ######################################################## 9 | ## Nothing more to do below this line! 10 | 11 | LIB = libcares.a 12 | 13 | AR = $(CROSSPREFIX)ar 14 | CC = $(CROSSPREFIX)gcc 15 | LD = $(CROSSPREFIX)gcc 16 | RANLIB = $(CROSSPREFIX)ranlib 17 | #RM = rm -f 18 | CP = cp -afv 19 | 20 | CFLAGS = $(CARES_CFLAG_EXTRAS) -O2 -Wall -I. 21 | CFLAGS += -DCARES_STATICLIB 22 | LDFLAGS = $(CARES_LDFLAG_EXTRAS) -s 23 | LIBS = -lwsock32 24 | 25 | # Makefile.inc provides the CSOURCES and HHEADERS defines 26 | include Makefile.inc 27 | 28 | OBJLIB := $(patsubst %.c,%.o,$(strip $(CSOURCES))) 29 | 30 | 31 | $(LIB): $(OBJLIB) 32 | $(AR) cru $@ $^ 33 | $(RANLIB) $@ 34 | 35 | all: $(LIB) demos 36 | 37 | demos: adig.exe ahost.exe acountry.exe 38 | 39 | tags: 40 | etags *.[ch] 41 | 42 | %.exe: %.o ares_getopt.o $(LIB) 43 | $(LD) $(LDFLAGS) -o $@ $^ $(LIBS) 44 | 45 | $(OBJLIB): ares.h ares_dns.h ares_private.h ares_build.h ares_rules.h 46 | 47 | .c.o: 48 | $(CC) $(CFLAGS) -c $< 49 | 50 | ares_build.h: 51 | $(CP) ares_build.h.dist ares_build.h 52 | 53 | check: 54 | 55 | install: 56 | ${top_srcdir}/mkinstalldirs ${DESTDIR}${libdir} 57 | ${top_srcdir}/mkinstalldirs ${DESTDIR}${includedir} 58 | ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man3 59 | ${INSTALL} -m 644 $(LIB) ${DESTDIR}${libdir} 60 | ${RANLIB} ${DESTDIR}${libdir}/$(LIB) 61 | chmod u-w ${DESTDIR}${libdir}/$(LIB) 62 | ${INSTALL} -m 444 ${srcdir}/ares.h ${DESTDIR}${includedir} 63 | ${INSTALL} -m 444 ${srcdir}/ares_build.h ${DESTDIR}${includedir} 64 | ${INSTALL} -m 444 ${srcdir}/ares_rules.h ${DESTDIR}${includedir} 65 | (for man in $(MANPAGES); do \ 66 | ${INSTALL} -m 444 ${srcdir}/$${man} ${DESTDIR}${mandir}/man3; \ 67 | done) 68 | 69 | clean: 70 | $(RM) ares_getopt.o $(OBJLIB) $(LIB) adig.exe ahost.exe acountry.exe 71 | 72 | distclean: clean 73 | $(RM) config.cache config.log config.status Makefile 74 | ifeq "$(wildcard ares_build.h.dist)" "ares_build.h.dist" 75 | $(RM) ares_build.h 76 | endif 77 | -------------------------------------------------------------------------------- /c-ares/NEWS: -------------------------------------------------------------------------------- 1 | Major changes since: 2 | * see the CHANGES file 3 | 4 | Major changes in release 1.1.1: 5 | * ares should now compile as C++ code (no longer uses reserved word 6 | "class"). 7 | * Added SRV support to adig test program. 8 | * Fixed a few error handling bugs in query processing. 9 | 10 | Major changes in release 1.1.0: 11 | * Added ares_free_string() function so that memory can be freed in the 12 | same layer as it is allocated, a desirable feature in some 13 | environments. 14 | * A few of the ares_dns.h macros are fixed to use the proper bitwise 15 | operator. 16 | * Fixed a couple of fenceposts fixed in ares_expand_name()'s 17 | bounds-checking. 18 | * In process_timeouts(), extract query->next before calling 19 | next_server() and possibly freeing the query structure. 20 | * Casted arguments to ctype macros casted to unsigned char, since not 21 | all char values are valid inputs to those macros according to ANSI. 22 | -------------------------------------------------------------------------------- /c-ares/README.cares: -------------------------------------------------------------------------------- 1 | c-ares 2 | ====== 3 | 4 | This package is based on ares 1.1.1 (written by Greg Hudson). Daniel Stenberg 5 | decided to fork and release a separate project since the original ares author 6 | didn't want the improvements that were vital for our use of it. 7 | 8 | This package is dubbed 'c-ares' since Daniel wanted this for use within the 9 | curl project (hence the letter C) and it makes a nice pun. c-ares is not API 10 | compatible with ares: a new name makes that more obvious to the public. 11 | 12 | The original libares was distributed at 13 | ftp://athena-dist.mit.edu:pub/ATHENA/ares (which seems to not be alive 14 | anymore). A local copy of the original ares package is kept here: 15 | https://c-ares.haxx.se/download/ares-1.1.1.tar.gz 16 | -------------------------------------------------------------------------------- /c-ares/RELEASE-NOTES: -------------------------------------------------------------------------------- 1 | c-ares version 1.11.1 2 | 3 | Changes: 4 | 5 | o api: add ARES_OPT_NOROTATE optmask value 6 | 7 | Bug fixes: 8 | 9 | o configure: acknowledge --disable-tests [1] 10 | o man pages: fix typos detected by Lintian 11 | o test: add missing #includes for dns-proto.cc 12 | o test: avoid in6addr_* constants 13 | o test: Build with MinGW on AppVeyor 14 | o Makefile.m32: add support for extra flags 15 | o Makefile.m32: add support for CROSSPREFIX 16 | o configure: check if tests can get built before enabled 17 | o ares_library_cleanup: reset ares_realloc too 18 | o ahost.c: add cast to fix C++ compile 19 | o test: Only pass unused args to GoogleTest 20 | o build: commonize MSVC version detection 21 | o msvc_ver.inc: support Visual Studio 2015 Update 1, 2, 3 22 | o test: for AF_UNSPEC, return CNAME only for AAAA, but valid A record 23 | o ares_getnameinfo: explicitly clear struct servent before use 24 | o test: Update fuzzing function prototype 25 | o init: fix nsort initialization 26 | o test: add fuzzing check script to tests 27 | o web: http => https 28 | o read_tcp_data: remove superfluous NULL check 29 | o LICENSE.md: add a stand-alone license file 30 | o SECURITY.md: suggested "security process" for the project 31 | o ares_init_options: only propagate init failures from options [2] 32 | o headers: remove checks for and defines of variable sizes 33 | o test: fix gMock to work with gcc >= 6.x [3] 34 | 35 | Thanks go to these friendly people for their efforts and contributions: 36 | 37 | Alexander Drachevskiy, Brad House, Chris Araman, Daniel Stenberg, 38 | David Drysdale, Gregor Jasny, Svante Karlsson, Viktor Szakats 39 | 40 | References to bug reports and discussions on issues: 41 | 42 | [1] = https://github.com/c-ares/c-ares/issues/44 43 | [2] = https://github.com/c-ares/c-ares/issues/60 44 | [3] = https://github.com/google/googletest/issues/705#issuecomment-235067917 45 | -------------------------------------------------------------------------------- /c-ares/TODO: -------------------------------------------------------------------------------- 1 | TODO 2 | ==== 3 | 4 | ares_reinit() 5 | 6 | - To allow an app to force a re-read of /etc/resolv.conf etc, pretty much 7 | like the res_init() resolver function offers 8 | 9 | ares_gethostbyname 10 | 11 | - When built to support IPv6, it needs to also support PF_UNSPEC or similar, 12 | so that an application can ask for any protocol and then c-ares would return 13 | all known resolves and not just explicitly IPv4 _or_ IPv6 resolves. 14 | 15 | ares_process 16 | 17 | - Upon next ABI breakage ares_process() should be changed to return 'int' 18 | and return ARES_ENOTINITIALIZED if ares_library_init() has not been called. 19 | 20 | ares_process_fd 21 | 22 | - Upon next ABI breakage ares_process_fd() should be changed to return 23 | 'int' and return ARES_ENOTINITIALIZED if library has not been initialized. 24 | -------------------------------------------------------------------------------- /c-ares/acountry.1: -------------------------------------------------------------------------------- 1 | .TH ACOUNTRY "1" "April 2011" "c-ares utilities" 2 | .SH NAME 3 | acountry \- print the country where an IPv4 address or host is located 4 | .SH SYNOPSIS 5 | .B acountry 6 | [\fIOPTION\fR]... \fIHOST\fR... 7 | .SH DESCRIPTION 8 | .PP 9 | .\" Add any additional description here 10 | .PP 11 | Print the country where HOST (an IPv4 address or hostname) is located, 12 | using the countries.nerd.dk DNS domain to identify the country. 13 | .PP 14 | This utility comes with the \fBc\-ares\fR asynchronous resolver library. 15 | .SH OPTIONS 16 | .TP 17 | \fB\-d\fR 18 | Print some extra debugging output. 19 | .TP 20 | \fB\-h\fR, \fB\-\-help\fR 21 | Display this help and exit. 22 | .TP 23 | \fB\-v\fR 24 | Be more verbose. Print extra information. 25 | .SH "REPORTING BUGS" 26 | Report bugs to the c-ares mailing list: 27 | \fBhttp://cool.haxx.se/mailman/listinfo/c-ares\fR 28 | .SH "SEE ALSO" 29 | .PP 30 | adig(1), ahost(1). 31 | .PP 32 | The DNSBL countries.nerd.dk 33 | .br 34 | \fBhttp://countries.nerd.dk/\fR 35 | .SH COPYRIGHT 36 | This utility is based on code/ideas contained in sofware written by Greg Hudson (ares) 37 | carrying the following notice: 38 | .br 39 | Copyright 1998 by the Massachusetts Institute of Technology. 40 | .br 41 | Permission to use, copy, modify, and distribute this software and its 42 | documentation for any purpose and without fee is hereby granted, 43 | provided that the above copyright notice appear in all copies and that 44 | both that copyright notice and this permission notice appear in 45 | supporting documentation, and that the name of M.I.T. not be used in 46 | advertising or publicity pertaining to distribution of the software 47 | without specific, written prior permission. M.I.T. makes no 48 | representations about the suitability of this software for any 49 | purpose. It is provided "as is" without express or implied warranty. 50 | .br 51 | No further copyright claims are being made by the author(s) of this utility. 52 | .SH AUTHOR 53 | Gisle Vanem 54 | -------------------------------------------------------------------------------- /c-ares/acountry.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/acountry.c -------------------------------------------------------------------------------- /c-ares/ahost.1: -------------------------------------------------------------------------------- 1 | .TH AHOST "1" "April 2011" "c-ares utilities" 2 | .SH NAME 3 | ahost \- print the A or AAAA record associated with a hostname or IP address 4 | .SH SYNOPSIS 5 | .B ahost 6 | [\fIOPTION\fR]... \fIHOST\fR... 7 | .SH DESCRIPTION 8 | .PP 9 | .\" Add any additional description here 10 | .PP 11 | Look up the DNS A or AAAA record associated with HOST (a hostname or an 12 | IP address). 13 | .PP 14 | This utility comes with the \fBc\-ares\fR asynchronous resolver library. 15 | .SH OPTIONS 16 | .TP 17 | \fB\-d\fR 18 | Print some extra debugging output. 19 | .TP 20 | \fB\-h\fR, \fB\-\-help\fR 21 | Display this help and exit. 22 | .TP 23 | \fB\-t\fR type 24 | If type is "a", print the A record (default). 25 | If type is "aaaa", print the AAAA record. 26 | If type is "u", look for either AAAA or A record (in that order). 27 | .TP 28 | \fB\-s\fR \fIdomain\fP 29 | Specify the \fIdomain\fP to search instead of using the default values from 30 | .br 31 | /etc/resolv.conf. This option only has an effect on platforms that use 32 | .br 33 | /etc/resolv.conf 34 | for DNS configuration; it has no effect on other platforms (such as Win32 35 | or Android). 36 | .SH "REPORTING BUGS" 37 | Report bugs to the c-ares mailing list: 38 | \fBhttp://cool.haxx.se/mailman/listinfo/c-ares\fR 39 | .SH "SEE ALSO" 40 | .PP 41 | acountry(1), adig(1). 42 | .SH COPYRIGHT 43 | This utility is based on code/ideas contained in sofware written by Greg Hudson (ares) 44 | carrying the following notice: 45 | .br 46 | Copyright 1998 by the Massachusetts Institute of Technology. 47 | .br 48 | Permission to use, copy, modify, and distribute this software and its 49 | documentation for any purpose and without fee is hereby granted, 50 | provided that the above copyright notice appear in all copies and that 51 | both that copyright notice and this permission notice appear in 52 | supporting documentation, and that the name of M.I.T. not be used in 53 | advertising or publicity pertaining to distribution of the software 54 | without specific, written prior permission. M.I.T. makes no 55 | representations about the suitability of this software for any 56 | purpose. It is provided "as is" without express or implied warranty. 57 | .br 58 | No further copyright claims are being made by the author(s) of this utility. 59 | -------------------------------------------------------------------------------- /c-ares/appveyor.yml: -------------------------------------------------------------------------------- 1 | platform: 2 | - x64 3 | - x86 4 | - mingw 5 | build_script: 6 | - if "%platform%" == "x86" call "%VS120COMNTOOLS%\..\..\VC\vcvarsall.bat" 7 | - if "%platform%" == "x64" "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64 8 | - if "%platform%" == "x64" call "%VS120COMNTOOLS%\..\..\VC\vcvarsall.bat" x86_amd64 9 | - if "%platform%" == "mingw" set PATH=%PATH%;C:\MinGW\bin;C:\MinGW\MSYS\1.0\local\bin;C:\MinGW\MSYS\1.0\bin 10 | - copy ares_build.h.dist ares_build.h 11 | - if "%platform%" == "mingw" ( make -f Makefile.m32 demos ) else ( nmake /f Makefile.msvc ) 12 | - cd test 13 | - if "%platform%" == "mingw" ( make -f Makefile.m32 ) else ( nmake /f Makefile.msvc vtest ) 14 | -------------------------------------------------------------------------------- /c-ares/ares__close_sockets.c: -------------------------------------------------------------------------------- 1 | 2 | /* Copyright 1998 by the Massachusetts Institute of Technology. 3 | * 4 | * Permission to use, copy, modify, and distribute this 5 | * software and its documentation for any purpose and without 6 | * fee is hereby granted, provided that the above copyright 7 | * notice appear in all copies and that both that copyright 8 | * notice and this permission notice appear in supporting 9 | * documentation, and that the name of M.I.T. not be used in 10 | * advertising or publicity pertaining to distribution of the 11 | * software without specific, written prior permission. 12 | * M.I.T. makes no representations about the suitability of 13 | * this software for any purpose. It is provided "as is" 14 | * without express or implied warranty. 15 | */ 16 | 17 | #include "ares_setup.h" 18 | 19 | #include "ares.h" 20 | #include "ares_private.h" 21 | 22 | void ares__close_sockets(ares_channel channel, struct server_state *server) 23 | { 24 | struct send_request *sendreq; 25 | 26 | /* Free all pending output buffers. */ 27 | while (server->qhead) 28 | { 29 | /* Advance server->qhead; pull out query as we go. */ 30 | sendreq = server->qhead; 31 | server->qhead = sendreq->next; 32 | if (sendreq->data_storage != NULL) 33 | ares_free(sendreq->data_storage); 34 | ares_free(sendreq); 35 | } 36 | server->qtail = NULL; 37 | 38 | /* Reset any existing input buffer. */ 39 | if (server->tcp_buffer) 40 | ares_free(server->tcp_buffer); 41 | server->tcp_buffer = NULL; 42 | server->tcp_lenbuf_pos = 0; 43 | 44 | /* Reset brokenness */ 45 | server->is_broken = 0; 46 | 47 | /* Close the TCP and UDP sockets. */ 48 | if (server->tcp_socket != ARES_SOCKET_BAD) 49 | { 50 | SOCK_STATE_CALLBACK(channel, server->tcp_socket, 0, 0); 51 | sclose(server->tcp_socket); 52 | server->tcp_socket = ARES_SOCKET_BAD; 53 | server->tcp_connection_generation = ++channel->tcp_connection_generation; 54 | } 55 | if (server->udp_socket != ARES_SOCKET_BAD) 56 | { 57 | SOCK_STATE_CALLBACK(channel, server->udp_socket, 0, 0); 58 | sclose(server->udp_socket); 59 | server->udp_socket = ARES_SOCKET_BAD; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /c-ares/ares_cancel.3: -------------------------------------------------------------------------------- 1 | .\" 2 | .\" Copyright 1998 by the Massachusetts Institute of Technology. 3 | .\" 4 | .\" Permission to use, copy, modify, and distribute this 5 | .\" software and its documentation for any purpose and without 6 | .\" fee is hereby granted, provided that the above copyright 7 | .\" notice appear in all copies and that both that copyright 8 | .\" notice and this permission notice appear in supporting 9 | .\" documentation, and that the name of M.I.T. not be used in 10 | .\" advertising or publicity pertaining to distribution of the 11 | .\" software without specific, written prior permission. 12 | .\" M.I.T. makes no representations about the suitability of 13 | .\" this software for any purpose. It is provided "as is" 14 | .\" without express or implied warranty. 15 | .\" 16 | .TH ARES_CANCEL 3 "31 March 2004" 17 | .SH NAME 18 | ares_cancel \- Cancel a resolve 19 | .SH SYNOPSIS 20 | .nf 21 | .B #include 22 | .PP 23 | .B void ares_cancel(ares_channel \fIchannel\fP) 24 | .fi 25 | .SH DESCRIPTION 26 | The \fBares_cancel(3)\fP function cancels all lookups/requests made on the the 27 | name service channel identified by \fIchannel\fP. \fBares_cancel(3)\fP 28 | invokes the callbacks for each pending query on the channel, passing a status 29 | of 30 | .BR ARES_ECANCELLED . 31 | These calls give the callbacks a chance to clean up any state which might have 32 | been stored in their arguments. If such a callback invocation adds a new 33 | request to the channel, that request will \fInot\fP be cancelled by the 34 | current invocation of \fBares_cancel(3)\fP. 35 | .SH SEE ALSO 36 | .BR ares_init (3) 37 | .BR ares_destroy (3) 38 | .SH NOTES 39 | This function was added in c-ares 1.2.0 40 | 41 | c-ares 1.6.0 and earlier pass a status of 42 | .BR ARES_ETIMEOUT 43 | instead of 44 | .BR ARES_ECANCELLED . 45 | .SH AUTHOR 46 | Dirk Manske 47 | -------------------------------------------------------------------------------- /c-ares/ares_destroy.3: -------------------------------------------------------------------------------- 1 | .\" 2 | .\" Copyright 1998 by the Massachusetts Institute of Technology. 3 | .\" 4 | .\" Permission to use, copy, modify, and distribute this 5 | .\" software and its documentation for any purpose and without 6 | .\" fee is hereby granted, provided that the above copyright 7 | .\" notice appear in all copies and that both that copyright 8 | .\" notice and this permission notice appear in supporting 9 | .\" documentation, and that the name of M.I.T. not be used in 10 | .\" advertising or publicity pertaining to distribution of the 11 | .\" software without specific, written prior permission. 12 | .\" M.I.T. makes no representations about the suitability of 13 | .\" this software for any purpose. It is provided "as is" 14 | .\" without express or implied warranty. 15 | .\" 16 | .TH ARES_DESTROY 3 "7 December 2004" 17 | .SH NAME 18 | ares_destroy \- Destroy a resolver channel 19 | .SH SYNOPSIS 20 | .nf 21 | .B #include 22 | .PP 23 | .B void ares_destroy(ares_channel \fIchannel\fP) 24 | .fi 25 | .SH DESCRIPTION 26 | The \fBares_destroy(3)\fP function destroys the name service channel 27 | identified by \fIchannel\fP, freeing all memory and closing all sockets used 28 | by the channel. 29 | 30 | \fBares_destroy(3)\fP invokes the callbacks for each pending query on the 31 | channel, passing a status of \IARES_EDESTRUCTION\fP. These calls give the 32 | callbacks a chance to clean up any state which might have been stored in their 33 | arguments. A callback must not add new requests to a channel being destroyed. 34 | .SH SEE ALSO 35 | .BR ares_init (3), 36 | .BR ares_cancel (3) 37 | .SH AUTHOR 38 | Greg Hudson, MIT Information Systems 39 | .br 40 | Copyright 1998 by the Massachusetts Institute of Technology. 41 | -------------------------------------------------------------------------------- /c-ares/ares_destroy_options.3: -------------------------------------------------------------------------------- 1 | .\" 2 | .\" Copyright 1998 by the Massachusetts Institute of Technology. 3 | .\" 4 | .\" Permission to use, copy, modify, and distribute this 5 | .\" software and its documentation for any purpose and without 6 | .\" fee is hereby granted, provided that the above copyright 7 | .\" notice appear in all copies and that both that copyright 8 | .\" notice and this permission notice appear in supporting 9 | .\" documentation, and that the name of M.I.T. not be used in 10 | .\" advertising or publicity pertaining to distribution of the 11 | .\" software without specific, written prior permission. 12 | .\" M.I.T. makes no representations about the suitability of 13 | .\" this software for any purpose. It is provided "as is" 14 | .\" without express or implied warranty. 15 | .\" 16 | .TH ARES_DESTROY_OPTIONS 3 "1 June 2007" 17 | .SH NAME 18 | ares_destroy_options \- Destroy options initialized with ares_save_options 19 | .SH SYNOPSIS 20 | .nf 21 | .B #include 22 | .PP 23 | .B void ares_destroy_options(struct ares_options *\fIoptions\fP) 24 | .fi 25 | .SH DESCRIPTION 26 | The \fBares_destroy_options(3)\fP function destroys the options struct 27 | identified by \Ioptions\fP, freeing all memory allocated by 28 | \fBares_save_options(3)\fP. 29 | .SH SEE ALSO 30 | .BR ares_save_options (3), 31 | .BR ares_init_options (3) 32 | .SH AUTHOR 33 | Brad House 34 | .br 35 | Copyright 1998 by the Massachusetts Institute of Technology. 36 | -------------------------------------------------------------------------------- /c-ares/ares_dup.3: -------------------------------------------------------------------------------- 1 | .\" 2 | .\" Copyright (C) 2004-2009 by Daniel Stenberg 3 | .\" 4 | .\" Permission to use, copy, modify, and distribute this 5 | .\" software and its documentation for any purpose and without 6 | .\" fee is hereby granted, provided that the above copyright 7 | .\" notice appear in all copies and that both that copyright 8 | .\" notice and this permission notice appear in supporting 9 | .\" documentation, and that the name of M.I.T. not be used in 10 | .\" advertising or publicity pertaining to distribution of the 11 | .\" software without specific, written prior permission. 12 | .\" M.I.T. makes no representations about the suitability of 13 | .\" this software for any purpose. It is provided "as is" 14 | .\" without express or implied warranty. 15 | .\" 16 | .TH ARES_DUP 3 "26 May 2009" 17 | .SH NAME 18 | ares_dup \- Duplicate a resolver channel 19 | .SH SYNOPSIS 20 | .nf 21 | .B #include 22 | .PP 23 | .B int ares_dup(ares_channel *\fIdest\fP, ares_channel \fIsource\fP) 24 | .fi 25 | .SH DESCRIPTION 26 | The \fBares_dup(3)\fP function duplicates an existing communications channel 27 | for name service lookups. If it returns successfully, \fBares_dup(3)\fP will 28 | set the variable pointed to by \fIdest\fP to a handle used to identify the 29 | name service channel. The caller should invoke \fIares_destroy(3)\fP on the 30 | handle when the channel is no longer needed. 31 | .SH SEE ALSO 32 | .BR ares_destroy(3), 33 | .BR ares_init(3), 34 | .BR ares_library_init(3) 35 | .SH AVAILABILITY 36 | \fIares_dup(3)\fP was added in c-ares 1.6.0 37 | .SH AUTHOR 38 | Daniel Stenberg 39 | 40 | -------------------------------------------------------------------------------- /c-ares/ares_expand_string.3: -------------------------------------------------------------------------------- 1 | .\" 2 | .\" Copyright 1998 by the Massachusetts Institute of Technology. 3 | .\" 4 | .\" Permission to use, copy, modify, and distribute this 5 | .\" software and its documentation for any purpose and without 6 | .\" fee is hereby granted, provided that the above copyright 7 | .\" notice appear in all copies and that both that copyright 8 | .\" notice and this permission notice appear in supporting 9 | .\" documentation, and that the name of M.I.T. not be used in 10 | .\" advertising or publicity pertaining to distribution of the 11 | .\" software without specific, written prior permission. 12 | .\" M.I.T. makes no representations about the suitability of 13 | .\" this software for any purpose. It is provided "as is" 14 | .\" without express or implied warranty. 15 | .\" 16 | .TH ARES_EXPAND_NAME 3 "20 Nov 2009" 17 | .SH NAME 18 | ares_expand_string \- Expand a length encoded string 19 | .SH SYNOPSIS 20 | .nf 21 | .B #include 22 | .PP 23 | .B int ares_expand_string(const unsigned char *\fIencoded\fP, 24 | .B const unsigned char *\fIabuf\fP, int \fIalen\fP, unsigned char **\fIs\fP, 25 | .B long *\fIenclen\fP) 26 | .fi 27 | .SH DESCRIPTION 28 | The 29 | .B ares_expand_string 30 | function converts a length encoded string to a NUL-terminated C 31 | string. The argument 32 | .I encoded 33 | gives the beginning of the encoded string, and the arguments 34 | .I abuf 35 | and 36 | .I alen 37 | give the containing message buffer (necessary for the processing of 38 | indirection pointers within the encoded domain name). The result is 39 | placed in a NUL-terminated allocated buffer, a pointer to which is 40 | stored in the variable pointed to by 41 | .IR s . 42 | The length of the encoded string is stored in the variable pointed to by 43 | .I enclen 44 | so that the caller can advance past the encoded string to read 45 | further data in the message. 46 | .SH RETURN VALUES 47 | .B ares_expand_string 48 | can return any of the following values: 49 | .TP 15 50 | .B ARES_SUCCESS 51 | Expansion of the encoded string succeeded. 52 | .TP 15 53 | .B ARES_EBADSTR 54 | The encoded string was malformed and could not be expanded. 55 | .TP 15 56 | .B ARES_ENOMEM 57 | Memory was exhausted. 58 | .SH SEE ALSO 59 | .BR ares_free_string (3) 60 | .SH AUTHOR 61 | Dominick Meglio 62 | -------------------------------------------------------------------------------- /c-ares/ares_expand_string.c: -------------------------------------------------------------------------------- 1 | 2 | /* Copyright 1998 by the Massachusetts Institute of Technology. 3 | * 4 | * Permission to use, copy, modify, and distribute this 5 | * software and its documentation for any purpose and without 6 | * fee is hereby granted, provided that the above copyright 7 | * notice appear in all copies and that both that copyright 8 | * notice and this permission notice appear in supporting 9 | * documentation, and that the name of M.I.T. not be used in 10 | * advertising or publicity pertaining to distribution of the 11 | * software without specific, written prior permission. 12 | * M.I.T. makes no representations about the suitability of 13 | * this software for any purpose. It is provided "as is" 14 | * without express or implied warranty. 15 | */ 16 | 17 | #include "ares_setup.h" 18 | 19 | #ifdef HAVE_NETINET_IN_H 20 | # include 21 | #endif 22 | #ifdef HAVE_ARPA_NAMESER_H 23 | # include 24 | #else 25 | # include "nameser.h" 26 | #endif 27 | 28 | #include "ares.h" 29 | #include "ares_private.h" /* for the memdebug */ 30 | 31 | /* Simply decodes a length-encoded character string. The first byte of the 32 | * input is the length of the string to be returned and the bytes thereafter 33 | * are the characters of the string. The returned result will be NULL 34 | * terminated. 35 | */ 36 | int ares_expand_string(const unsigned char *encoded, 37 | const unsigned char *abuf, 38 | int alen, 39 | unsigned char **s, 40 | long *enclen) 41 | { 42 | unsigned char *q; 43 | union { 44 | ssize_t sig; 45 | size_t uns; 46 | } elen; 47 | 48 | if (encoded == abuf+alen) 49 | return ARES_EBADSTR; 50 | 51 | elen.uns = *encoded; 52 | if (encoded+elen.sig+1 > abuf+alen) 53 | return ARES_EBADSTR; 54 | 55 | encoded++; 56 | 57 | *s = ares_malloc(elen.uns+1); 58 | if (*s == NULL) 59 | return ARES_ENOMEM; 60 | q = *s; 61 | strncpy((char *)q, (char *)encoded, elen.uns); 62 | q[elen.uns] = '\0'; 63 | 64 | *s = q; 65 | 66 | *enclen = (long)(elen.sig+1); 67 | 68 | return ARES_SUCCESS; 69 | } 70 | 71 | -------------------------------------------------------------------------------- /c-ares/ares_fds.3: -------------------------------------------------------------------------------- 1 | .\" 2 | .\" Copyright 1998 by the Massachusetts Institute of Technology. 3 | .\" 4 | .\" Permission to use, copy, modify, and distribute this 5 | .\" software and its documentation for any purpose and without 6 | .\" fee is hereby granted, provided that the above copyright 7 | .\" notice appear in all copies and that both that copyright 8 | .\" notice and this permission notice appear in supporting 9 | .\" documentation, and that the name of M.I.T. not be used in 10 | .\" advertising or publicity pertaining to distribution of the 11 | .\" software without specific, written prior permission. 12 | .\" M.I.T. makes no representations about the suitability of 13 | .\" this software for any purpose. It is provided "as is" 14 | .\" without express or implied warranty. 15 | .\" 16 | .TH ARES_FDS 3 "23 July 1998" 17 | .SH NAME 18 | ares_fds \- Get file descriptors to select on for name service 19 | .SH SYNOPSIS 20 | .nf 21 | .B #include 22 | .PP 23 | .B int ares_fds(ares_channel \fIchannel\fP, fd_set *\fIread_fds\fP, 24 | .B fd_set *\fIwrite_fds\fP) 25 | .fi 26 | .SH DESCRIPTION 27 | The 28 | .B ares_fds 29 | function retrieves the set of file descriptors which the calling 30 | application should select on for reading and writing for the 31 | processing of name service queries pending on the name service channel 32 | identified by 33 | .IR channel . 34 | File descriptors will be set in the file descriptor sets pointed to by 35 | .I read_fds 36 | and 37 | .I write_fds 38 | as appropriate. File descriptors already set in 39 | .I read_fds 40 | and 41 | .I write_fds 42 | will remain set; initialization of the file descriptor sets 43 | (using 44 | .BR FD_ZERO ) 45 | is the responsibility of the caller. 46 | .SH RETURN VALUES 47 | .B ares_fds 48 | returns one greater than the number of the highest socket set in either 49 | .I read_fds 50 | or 51 | .IR write_fds . 52 | If no queries are active, 53 | .B ares_fds 54 | will return 0. 55 | .SH SEE ALSO 56 | .BR ares_timeout (3), 57 | .BR ares_process (3) 58 | .SH AUTHOR 59 | Greg Hudson, MIT Information Systems 60 | .br 61 | Copyright 1998 by the Massachusetts Institute of Technology. 62 | -------------------------------------------------------------------------------- /c-ares/ares_fds.c: -------------------------------------------------------------------------------- 1 | 2 | /* Copyright 1998 by the Massachusetts Institute of Technology. 3 | * 4 | * Permission to use, copy, modify, and distribute this 5 | * software and its documentation for any purpose and without 6 | * fee is hereby granted, provided that the above copyright 7 | * notice appear in all copies and that both that copyright 8 | * notice and this permission notice appear in supporting 9 | * documentation, and that the name of M.I.T. not be used in 10 | * advertising or publicity pertaining to distribution of the 11 | * software without specific, written prior permission. 12 | * M.I.T. makes no representations about the suitability of 13 | * this software for any purpose. It is provided "as is" 14 | * without express or implied warranty. 15 | */ 16 | 17 | #include "ares_setup.h" 18 | 19 | #include "ares.h" 20 | #include "ares_nowarn.h" 21 | #include "ares_private.h" 22 | 23 | int ares_fds(ares_channel channel, fd_set *read_fds, fd_set *write_fds) 24 | { 25 | struct server_state *server; 26 | ares_socket_t nfds; 27 | int i; 28 | 29 | /* Are there any active queries? */ 30 | int active_queries = !ares__is_list_empty(&(channel->all_queries)); 31 | 32 | nfds = 0; 33 | for (i = 0; i < channel->nservers; i++) 34 | { 35 | server = &channel->servers[i]; 36 | /* We only need to register interest in UDP sockets if we have 37 | * outstanding queries. 38 | */ 39 | if (active_queries && server->udp_socket != ARES_SOCKET_BAD) 40 | { 41 | FD_SET(server->udp_socket, read_fds); 42 | if (server->udp_socket >= nfds) 43 | nfds = server->udp_socket + 1; 44 | } 45 | /* We always register for TCP events, because we want to know 46 | * when the other side closes the connection, so we don't waste 47 | * time trying to use a broken connection. 48 | */ 49 | if (server->tcp_socket != ARES_SOCKET_BAD) 50 | { 51 | FD_SET(server->tcp_socket, read_fds); 52 | if (server->qhead) 53 | FD_SET(server->tcp_socket, write_fds); 54 | if (server->tcp_socket >= nfds) 55 | nfds = server->tcp_socket + 1; 56 | } 57 | } 58 | return (int)nfds; 59 | } 60 | -------------------------------------------------------------------------------- /c-ares/ares_free_hostent.3: -------------------------------------------------------------------------------- 1 | .\" 2 | .\" Copyright 1998 by the Massachusetts Institute of Technology. 3 | .\" 4 | .\" Permission to use, copy, modify, and distribute this 5 | .\" software and its documentation for any purpose and without 6 | .\" fee is hereby granted, provided that the above copyright 7 | .\" notice appear in all copies and that both that copyright 8 | .\" notice and this permission notice appear in supporting 9 | .\" documentation, and that the name of M.I.T. not be used in 10 | .\" advertising or publicity pertaining to distribution of the 11 | .\" software without specific, written prior permission. 12 | .\" M.I.T. makes no representations about the suitability of 13 | .\" this software for any purpose. It is provided "as is" 14 | .\" without express or implied warranty. 15 | .\" 16 | .TH ARES_FREE_HOSTENT 3 "23 July 1998" 17 | .SH NAME 18 | ares_free_hostent \- Free host structure allocated by ares functions 19 | .SH SYNOPSIS 20 | .nf 21 | .B #include 22 | .PP 23 | .B void ares_free_hostent(struct hostent *\fIhost\fP) 24 | .fi 25 | .SH DESCRIPTION 26 | The 27 | .I ares_free_hostent 28 | function frees a 29 | .B struct hostent 30 | allocated by one of the functions \fIares_parse_a_reply(3)\fP, 31 | \fIares_parse_aaaa_reply(3)\fP, or \fIares_parse_ptr_reply(3)\fP. 32 | .SH NOTES 33 | It is not necessary (and is not correct) to free the host structure passed to 34 | the callback functions for \fIares_gethostbyname(3)\fP or 35 | \fIares_gethostbyaddr(3)\fP. c-ares will automatically free such host 36 | structures when the callback returns. 37 | .SH SEE ALSO 38 | .BR ares_parse_a_reply (3), 39 | .BR ares_parse_aaaa_reply (3), 40 | .BR ares_parse_ptr_reply (3), 41 | .BR ares_parse_ns_reply (3) 42 | .SH AUTHOR 43 | Greg Hudson, MIT Information Systems 44 | .br 45 | Copyright 1998 by the Massachusetts Institute of Technology. 46 | -------------------------------------------------------------------------------- /c-ares/ares_free_hostent.c: -------------------------------------------------------------------------------- 1 | 2 | /* Copyright 1998 by the Massachusetts Institute of Technology. 3 | * 4 | * Permission to use, copy, modify, and distribute this 5 | * software and its documentation for any purpose and without 6 | * fee is hereby granted, provided that the above copyright 7 | * notice appear in all copies and that both that copyright 8 | * notice and this permission notice appear in supporting 9 | * documentation, and that the name of M.I.T. not be used in 10 | * advertising or publicity pertaining to distribution of the 11 | * software without specific, written prior permission. 12 | * M.I.T. makes no representations about the suitability of 13 | * this software for any purpose. It is provided "as is" 14 | * without express or implied warranty. 15 | */ 16 | 17 | #include "ares_setup.h" 18 | 19 | #ifdef HAVE_NETDB_H 20 | #include 21 | #endif 22 | 23 | #include "ares.h" 24 | #include "ares_private.h" /* for memdebug */ 25 | 26 | void ares_free_hostent(struct hostent *host) 27 | { 28 | char **p; 29 | 30 | if (!host) 31 | return; 32 | 33 | ares_free((char *)(host->h_name)); 34 | for (p = host->h_aliases; *p; p++) 35 | ares_free(*p); 36 | ares_free(host->h_aliases); 37 | ares_free(host->h_addr_list[0]); /* no matter if there is one or many entries, 38 | there is only one malloc for all of them */ 39 | ares_free(host->h_addr_list); 40 | ares_free(host); 41 | } 42 | -------------------------------------------------------------------------------- /c-ares/ares_free_string.3: -------------------------------------------------------------------------------- 1 | .\" 2 | .\" Copyright 2000 by the Massachusetts Institute of Technology. 3 | .\" 4 | .\" Permission to use, copy, modify, and distribute this 5 | .\" software and its documentation for any purpose and without 6 | .\" fee is hereby granted, provided that the above copyright 7 | .\" notice appear in all copies and that both that copyright 8 | .\" notice and this permission notice appear in supporting 9 | .\" documentation, and that the name of M.I.T. not be used in 10 | .\" advertising or publicity pertaining to distribution of the 11 | .\" software without specific, written prior permission. 12 | .\" M.I.T. makes no representations about the suitability of 13 | .\" this software for any purpose. It is provided "as is" 14 | .\" without express or implied warranty. 15 | .\" 16 | .TH ARES_FREE_STRING 3 "4 February 2004" 17 | .SH NAME 18 | ares_free_string \- Free strings allocated by ares functions 19 | .SH SYNOPSIS 20 | .nf 21 | .B #include 22 | .PP 23 | .B void ares_free_string(void *\fIstr\fP) 24 | .fi 25 | .SH DESCRIPTION 26 | The \fIares_free_string(3)\fP function frees a string allocated by an ares 27 | function. 28 | .SH SEE ALSO 29 | .BR ares_mkquery (3) 30 | .BR ares_expand_string (3) 31 | .SH AUTHOR 32 | Greg Hudson, MIT Information Systems 33 | .br 34 | Copyright 2000 by the Massachusetts Institute of Technology. 35 | -------------------------------------------------------------------------------- /c-ares/ares_free_string.c: -------------------------------------------------------------------------------- 1 | 2 | /* Copyright 2000 by the Massachusetts Institute of Technology. 3 | * 4 | * Permission to use, copy, modify, and distribute this 5 | * software and its documentation for any purpose and without 6 | * fee is hereby granted, provided that the above copyright 7 | * notice appear in all copies and that both that copyright 8 | * notice and this permission notice appear in supporting 9 | * documentation, and that the name of M.I.T. not be used in 10 | * advertising or publicity pertaining to distribution of the 11 | * software without specific, written prior permission. 12 | * M.I.T. makes no representations about the suitability of 13 | * this software for any purpose. It is provided "as is" 14 | * without express or implied warranty. 15 | */ 16 | 17 | #include "ares_setup.h" 18 | 19 | #include "ares.h" 20 | #include "ares_private.h" 21 | 22 | void ares_free_string(void *str) 23 | { 24 | ares_free(str); 25 | } 26 | -------------------------------------------------------------------------------- /c-ares/ares_get_servers_ports.3: -------------------------------------------------------------------------------- 1 | .so man3/ares_get_servers.3 2 | -------------------------------------------------------------------------------- /c-ares/ares_getenv.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | /* Copyright 1998 by the Massachusetts Institute of Technology. 4 | * 5 | * Permission to use, copy, modify, and distribute this 6 | * software and its documentation for any purpose and without 7 | * fee is hereby granted, provided that the above copyright 8 | * notice appear in all copies and that both that copyright 9 | * notice and this permission notice appear in supporting 10 | * documentation, and that the name of M.I.T. not be used in 11 | * advertising or publicity pertaining to distribution of the 12 | * software without specific, written prior permission. 13 | * M.I.T. makes no representations about the suitability of 14 | * this software for any purpose. It is provided "as is" 15 | * without express or implied warranty. 16 | */ 17 | 18 | #include "ares_setup.h" 19 | #include "ares_getenv.h" 20 | 21 | #ifndef HAVE_GETENV 22 | 23 | char *ares_getenv(const char *name) 24 | { 25 | #ifdef _WIN32_WCE 26 | return NULL; 27 | #endif 28 | } 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /c-ares/ares_getenv.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CARES_GETENV_H 2 | #define HEADER_CARES_GETENV_H 3 | 4 | 5 | /* Copyright 1998 by the Massachusetts Institute of Technology. 6 | * 7 | * Permission to use, copy, modify, and distribute this 8 | * software and its documentation for any purpose and without 9 | * fee is hereby granted, provided that the above copyright 10 | * notice appear in all copies and that both that copyright 11 | * notice and this permission notice appear in supporting 12 | * documentation, and that the name of M.I.T. not be used in 13 | * advertising or publicity pertaining to distribution of the 14 | * software without specific, written prior permission. 15 | * M.I.T. makes no representations about the suitability of 16 | * this software for any purpose. It is provided "as is" 17 | * without express or implied warranty. 18 | */ 19 | 20 | #include "ares_setup.h" 21 | 22 | #ifndef HAVE_GETENV 23 | extern char *ares_getenv(const char *name); 24 | #endif 25 | 26 | #endif /* HEADER_CARES_GETENV_H */ 27 | -------------------------------------------------------------------------------- /c-ares/ares_getopt.h: -------------------------------------------------------------------------------- 1 | #ifndef ARES_GETOPT_H 2 | #define ARES_GETOPT_H 3 | 4 | /* 5 | * Copyright (c) 1987-2001 The Regents of the University of California. 6 | * All rights reserved. 7 | * 8 | * Redistribution and use in source and binary forms, with or without 9 | * modification, are permitted provided that the following conditions are met: 10 | * 11 | * A. Redistributions of source code must retain the above copyright notice, 12 | * this list of conditions and the following disclaimer. 13 | * B. Redistributions in binary form must reproduce the above copyright notice, 14 | * this list of conditions and the following disclaimer in the documentation 15 | * and/or other materials provided with the distribution. 16 | * C. Neither the names of the copyright holders nor the names of its 17 | * contributors may be used to endorse or promote products derived from this 18 | * software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS 21 | * IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 22 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE 24 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 25 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 26 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | * POSSIBILITY OF SUCH DAMAGE. 31 | */ 32 | 33 | 34 | int ares_getopt(int nargc, char * const nargv[], const char *ostr); 35 | 36 | #undef optarg 37 | #undef optind 38 | #undef opterr 39 | #undef optopt 40 | #undef optreset 41 | 42 | #define optarg ares_optarg 43 | #define optind ares_optind 44 | #define opterr ares_opterr 45 | #define optopt ares_optopt 46 | #define optreset ares_optreset 47 | 48 | extern char *optarg; 49 | extern int optind; 50 | extern int opterr; 51 | extern int optopt; 52 | 53 | #endif /* ARES_GETOPT_H */ 54 | -------------------------------------------------------------------------------- /c-ares/ares_inet_net_pton.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CARES_INET_NET_PTON_H 2 | #define HEADER_CARES_INET_NET_PTON_H 3 | 4 | /* Copyright (C) 2005-2013 by Daniel Stenberg et al 5 | * 6 | * Permission to use, copy, modify, and distribute this 7 | * software and its documentation for any purpose and without 8 | * fee is hereby granted, provided that the above copyright 9 | * notice appear in all copies and that both that copyright 10 | * notice and this permission notice appear in supporting 11 | * documentation, and that the name of M.I.T. not be used in 12 | * advertising or publicity pertaining to distribution of the 13 | * software without specific, written prior permission. 14 | * M.I.T. makes no representations about the suitability of 15 | * this software for any purpose. It is provided "as is" 16 | * without express or implied warranty. 17 | */ 18 | 19 | #ifdef HAVE_INET_NET_PTON 20 | #define ares_inet_net_pton(w,x,y,z) inet_net_pton(w,x,y,z) 21 | #else 22 | int ares_inet_net_pton(int af, const char *src, void *dst, size_t size); 23 | #endif 24 | 25 | #endif /* HEADER_CARES_INET_NET_PTON_H */ 26 | -------------------------------------------------------------------------------- /c-ares/ares_inet_ntop.3: -------------------------------------------------------------------------------- 1 | .\" 2 | .\" Copyright (C) 2013 by Daniel Stenberg 3 | .\" 4 | .\" Permission to use, copy, modify, and distribute this 5 | .\" software and its documentation for any purpose and without 6 | .\" fee is hereby granted, provided that the above copyright 7 | .\" notice appear in all copies and that both that copyright 8 | .\" notice and this permission notice appear in supporting 9 | .\" documentation, and that the name of M.I.T. not be used in 10 | .\" advertising or publicity pertaining to distribution of the 11 | .\" software without specific, written prior permission. 12 | .\" M.I.T. makes no representations about the suitability of 13 | .\" this software for any purpose. It is provided "as is" 14 | .\" without express or implied warranty. 15 | .\" 16 | .TH ARES_INET_NTOP 3 "17 Feb 2013" 17 | .SH NAME 18 | ares_inet_ntop \- convert a network format address to presentation format 19 | .SH SYNOPSIS 20 | .nf 21 | .B #include 22 | .PP 23 | .B const char * 24 | .B ares_inet_ntop(int af, const void *src, char *dst, ares_socklen_t size); 25 | .fi 26 | .SH DESCRIPTION 27 | This is a portable version with the identical functionality of the commonly 28 | available \fIinet_ntop\fP. 29 | 30 | The ares_inet_ntop() function converts a numeric address into a text string 31 | suitable for presentation. The \fBaf\fP argument shall specify the family of 32 | the address. This can be AF_INET or AF_INET6. The \fBsrc\fP argument points 33 | to a buffer holding an IPv4 address if the af argument is AF_INET, or an IPv6 34 | address if the af argument is AF_INET6; the address must be in network byte 35 | order. The \fBdst\fP argument points to a buffer where the function stores the 36 | resulting text string; it shall not be NULL. The \fBsize\fP argument specifies 37 | the size of this buffer, which shall be large enough to hold the text string 38 | (INET_ADDRSTRLEN (16) characters for IPv4, INET6_ADDRSTRLEN (46) characters 39 | for IPv6). 40 | .SH SEE ALSO 41 | .BR ares_init(3), 42 | .BR ares_inet_pton(3) 43 | .SH AVAILABILITY 44 | made properly publicly available in c-ares for real in version 1.10.0 45 | .SH AUTHOR 46 | Daniel Stenberg 47 | 48 | -------------------------------------------------------------------------------- /c-ares/ares_inet_pton.3: -------------------------------------------------------------------------------- 1 | .\" 2 | .\" Copyright (C) 2013 by Daniel Stenberg 3 | .\" 4 | .\" Permission to use, copy, modify, and distribute this 5 | .\" software and its documentation for any purpose and without 6 | .\" fee is hereby granted, provided that the above copyright 7 | .\" notice appear in all copies and that both that copyright 8 | .\" notice and this permission notice appear in supporting 9 | .\" documentation, and that the name of M.I.T. not be used in 10 | .\" advertising or publicity pertaining to distribution of the 11 | .\" software without specific, written prior permission. 12 | .\" M.I.T. makes no representations about the suitability of 13 | .\" this software for any purpose. It is provided "as is" 14 | .\" without express or implied warranty. 15 | .\" 16 | .TH ARES_INET_PTON 3 "17 Feb 2013" 17 | .SH NAME 18 | ares_inet_pton \- convert an IPv4 or IPv6 address from text to binary form 19 | .SH SYNOPSIS 20 | .nf 21 | .B #include 22 | .PP 23 | .B const char *ares_inet_pton(int af, const char *src, void *dst); 24 | .fi 25 | .SH DESCRIPTION 26 | This is a portable version with the identical functionality of the commonly 27 | available \fIinet_pton\fP. 28 | 29 | The ares_inet_pton() function converts the address in its standard text 30 | presentation form into its numeric binary form. The \fBaf\fP argument shall 31 | specify the family of the address. The AF_INET and AF_INET6 address families 32 | shall be supported. The \fBsrc\fP argument points to the string being passed 33 | in. The \fBdst\fP argument points to a buffer into which the function stores 34 | the numeric address; this shall be large enough to hold the numeric address 35 | (32 bits for AF_INET, 128 bits for AF_INET6). 36 | .SH SEE ALSO 37 | .BR ares_init(3), 38 | .BR ares_inet_ntop(3) 39 | .SH AVAILABILITY 40 | made properly publicly available in c-ares for real in version 1.10.0 41 | .SH AUTHOR 42 | Daniel Stenberg 43 | 44 | -------------------------------------------------------------------------------- /c-ares/ares_ipv6.h: -------------------------------------------------------------------------------- 1 | 2 | /* Copyright (C) 2005 by Dominick Meglio 3 | * 4 | * Permission to use, copy, modify, and distribute this 5 | * software and its documentation for any purpose and without 6 | * fee is hereby granted, provided that the above copyright 7 | * notice appear in all copies and that both that copyright 8 | * notice and this permission notice appear in supporting 9 | * documentation, and that the name of M.I.T. not be used in 10 | * advertising or publicity pertaining to distribution of the 11 | * software without specific, written prior permission. 12 | * M.I.T. makes no representations about the suitability of 13 | * this software for any purpose. It is provided "as is" 14 | * without express or implied warranty. 15 | */ 16 | 17 | #ifndef ARES_IPV6_H 18 | #define ARES_IPV6_H 19 | 20 | #ifndef HAVE_PF_INET6 21 | #define PF_INET6 AF_INET6 22 | #endif 23 | 24 | #ifndef HAVE_STRUCT_SOCKADDR_IN6 25 | struct sockaddr_in6 26 | { 27 | unsigned short sin6_family; 28 | unsigned short sin6_port; 29 | unsigned long sin6_flowinfo; 30 | struct ares_in6_addr sin6_addr; 31 | unsigned int sin6_scope_id; 32 | }; 33 | #endif 34 | 35 | #ifndef HAVE_STRUCT_ADDRINFO 36 | struct addrinfo 37 | { 38 | int ai_flags; 39 | int ai_family; 40 | int ai_socktype; 41 | int ai_protocol; 42 | ares_socklen_t ai_addrlen; /* Follow rfc3493 struct addrinfo */ 43 | char *ai_canonname; 44 | struct sockaddr *ai_addr; 45 | struct addrinfo *ai_next; 46 | }; 47 | #endif 48 | 49 | #ifndef NS_IN6ADDRSZ 50 | #ifndef HAVE_STRUCT_IN6_ADDR 51 | /* We cannot have it set to zero, so we pick a fixed value here */ 52 | #define NS_IN6ADDRSZ 16 53 | #else 54 | #define NS_IN6ADDRSZ sizeof(struct in6_addr) 55 | #endif 56 | #endif 57 | 58 | #ifndef NS_INADDRSZ 59 | #define NS_INADDRSZ sizeof(struct in_addr) 60 | #endif 61 | 62 | #ifndef NS_INT16SZ 63 | #define NS_INT16SZ 2 64 | #endif 65 | 66 | #ifndef IF_NAMESIZE 67 | #ifdef IFNAMSIZ 68 | #define IF_NAMESIZE IFNAMSIZ 69 | #else 70 | #define IF_NAMESIZE 256 71 | #endif 72 | #endif 73 | 74 | /* Defined in inet_net_pton.c for no particular reason. */ 75 | extern const struct ares_in6_addr ares_in6addr_any; /* :: */ 76 | 77 | 78 | #endif /* ARES_IPV6_H */ 79 | -------------------------------------------------------------------------------- /c-ares/ares_library_init.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CARES_LIBRARY_INIT_H 2 | #define HEADER_CARES_LIBRARY_INIT_H 3 | 4 | 5 | /* Copyright 1998 by the Massachusetts Institute of Technology. 6 | * Copyright (C) 2004-2011 by Daniel Stenberg 7 | * 8 | * Permission to use, copy, modify, and distribute this 9 | * software and its documentation for any purpose and without 10 | * fee is hereby granted, provided that the above copyright 11 | * notice appear in all copies and that both that copyright 12 | * notice and this permission notice appear in supporting 13 | * documentation, and that the name of M.I.T. not be used in 14 | * advertising or publicity pertaining to distribution of the 15 | * software without specific, written prior permission. 16 | * M.I.T. makes no representations about the suitability of 17 | * this software for any purpose. It is provided "as is" 18 | * without express or implied warranty. 19 | */ 20 | 21 | #include "ares_setup.h" 22 | 23 | #ifdef USE_WINSOCK 24 | 25 | #include 26 | #include 27 | 28 | typedef DWORD (WINAPI *fpGetNetworkParams_t) (FIXED_INFO*, DWORD*); 29 | typedef BOOLEAN (APIENTRY *fpSystemFunction036_t) (void*, ULONG); 30 | typedef ULONG (WINAPI *fpGetAdaptersAddresses_t) ( ULONG, ULONG, void*, IP_ADAPTER_ADDRESSES*, ULONG* ); 31 | 32 | /* Forward-declaration of variables defined in ares_library_init.c */ 33 | /* that are global and unique instances for whole c-ares library. */ 34 | 35 | extern fpGetNetworkParams_t ares_fpGetNetworkParams; 36 | extern fpSystemFunction036_t ares_fpSystemFunction036; 37 | extern fpGetAdaptersAddresses_t ares_fpGetAdaptersAddresses; 38 | 39 | #endif /* USE_WINSOCK */ 40 | 41 | #endif /* HEADER_CARES_LIBRARY_INIT_H */ 42 | 43 | -------------------------------------------------------------------------------- /c-ares/ares_library_initialized.3: -------------------------------------------------------------------------------- 1 | .\" 2 | .\" Copyright (C) 2016 by Daniel Stenberg 3 | .\" 4 | .\" Permission to use, copy, modify, and distribute this 5 | .\" software and its documentation for any purpose and without 6 | .\" fee is hereby granted, provided that the above copyright 7 | .\" notice appear in all copies and that both that copyright 8 | .\" notice and this permission notice appear in supporting 9 | .\" documentation, and that the name of M.I.T. not be used in 10 | .\" advertising or publicity pertaining to distribution of the 11 | .\" software without specific, written prior permission. 12 | .\" M.I.T. makes no representations about the suitability of 13 | .\" this software for any purpose. It is provided "as is" 14 | .\" without express or implied warranty. 15 | .\" 16 | .TH ARES_LIBRARY_INITIALIZED 3 "29 Sep 2016" 17 | .SH NAME 18 | ares_library_initialized \- get the initialization state 19 | .SH SYNOPSIS 20 | .nf 21 | #include 22 | 23 | int ares_library_initialized(void) 24 | .fi 25 | .SH DESCRIPTION 26 | Returns information if c-ares needs to get initialized. 27 | .SH RETURN VALUE 28 | \fIARES_ENOTINITIALIZED\fP if not initialized and \fIARES_SUCCESS\fP if no 29 | initialization is needed. 30 | .SH AVAILABILITY 31 | This function was first introduced in c-ares version 1.11.0 32 | .SH SEE ALSO 33 | .BR ares_library_init(3), 34 | .BR ares_library_cleanup(3) 35 | -------------------------------------------------------------------------------- /c-ares/ares_llist.c: -------------------------------------------------------------------------------- 1 | 2 | /* Copyright 1998 by the Massachusetts Institute of Technology. 3 | * 4 | * Permission to use, copy, modify, and distribute this 5 | * software and its documentation for any purpose and without 6 | * fee is hereby granted, provided that the above copyright 7 | * notice appear in all copies and that both that copyright 8 | * notice and this permission notice appear in supporting 9 | * documentation, and that the name of M.I.T. not be used in 10 | * advertising or publicity pertaining to distribution of the 11 | * software without specific, written prior permission. 12 | * M.I.T. makes no representations about the suitability of 13 | * this software for any purpose. It is provided "as is" 14 | * without express or implied warranty. 15 | */ 16 | 17 | #include "ares_setup.h" 18 | 19 | #include "ares.h" 20 | #include "ares_private.h" 21 | 22 | /* Routines for managing doubly-linked circular linked lists with a 23 | * dummy head. 24 | */ 25 | 26 | /* Initialize a new head node */ 27 | void ares__init_list_head(struct list_node* head) { 28 | head->prev = head; 29 | head->next = head; 30 | head->data = NULL; 31 | } 32 | 33 | /* Initialize a list node */ 34 | void ares__init_list_node(struct list_node* node, void* d) { 35 | node->prev = NULL; 36 | node->next = NULL; 37 | node->data = d; 38 | } 39 | 40 | /* Returns true iff the given list is empty */ 41 | int ares__is_list_empty(struct list_node* head) { 42 | return ((head->next == head) && (head->prev == head)); 43 | } 44 | 45 | /* Inserts new_node before old_node */ 46 | void ares__insert_in_list(struct list_node* new_node, 47 | struct list_node* old_node) { 48 | new_node->next = old_node; 49 | new_node->prev = old_node->prev; 50 | old_node->prev->next = new_node; 51 | old_node->prev = new_node; 52 | } 53 | 54 | /* Removes the node from the list it's in, if any */ 55 | void ares__remove_from_list(struct list_node* node) { 56 | if (node->next != NULL) { 57 | node->prev->next = node->next; 58 | node->next->prev = node->prev; 59 | node->prev = NULL; 60 | node->next = NULL; 61 | } 62 | } 63 | 64 | -------------------------------------------------------------------------------- /c-ares/ares_llist.h: -------------------------------------------------------------------------------- 1 | #ifndef __ARES_LLIST_H 2 | #define __ARES_LLIST_H 3 | 4 | 5 | /* Copyright 1998 by the Massachusetts Institute of Technology. 6 | * 7 | * Permission to use, copy, modify, and distribute this 8 | * software and its documentation for any purpose and without 9 | * fee is hereby granted, provided that the above copyright 10 | * notice appear in all copies and that both that copyright 11 | * notice and this permission notice appear in supporting 12 | * documentation, and that the name of M.I.T. not be used in 13 | * advertising or publicity pertaining to distribution of the 14 | * software without specific, written prior permission. 15 | * M.I.T. makes no representations about the suitability of 16 | * this software for any purpose. It is provided "as is" 17 | * without express or implied warranty. 18 | */ 19 | 20 | 21 | /* Node definition for circular, doubly-linked list */ 22 | struct list_node { 23 | struct list_node *prev; 24 | struct list_node *next; 25 | void* data; 26 | }; 27 | 28 | void ares__init_list_head(struct list_node* head); 29 | 30 | void ares__init_list_node(struct list_node* node, void* d); 31 | 32 | int ares__is_list_empty(struct list_node* head); 33 | 34 | void ares__insert_in_list(struct list_node* new_node, 35 | struct list_node* old_node); 36 | 37 | void ares__remove_from_list(struct list_node* node); 38 | 39 | #endif /* __ARES_LLIST_H */ 40 | -------------------------------------------------------------------------------- /c-ares/ares_mkquery.c: -------------------------------------------------------------------------------- 1 | 2 | /* Copyright 1998 by the Massachusetts Institute of Technology. 3 | * 4 | * Permission to use, copy, modify, and distribute this 5 | * software and its documentation for any purpose and without 6 | * fee is hereby granted, provided that the above copyright 7 | * notice appear in all copies and that both that copyright 8 | * notice and this permission notice appear in supporting 9 | * documentation, and that the name of M.I.T. not be used in 10 | * advertising or publicity pertaining to distribution of the 11 | * software without specific, written prior permission. 12 | * M.I.T. makes no representations about the suitability of 13 | * this software for any purpose. It is provided "as is" 14 | * without express or implied warranty. 15 | */ 16 | 17 | #include "ares_setup.h" 18 | #include "ares.h" 19 | 20 | int ares_mkquery(const char *name, int dnsclass, int type, unsigned short id, 21 | int rd, unsigned char **buf, int *buflen) 22 | { 23 | return ares_create_query(name, dnsclass, type, id, rd, buf, buflen, 0); 24 | } 25 | -------------------------------------------------------------------------------- /c-ares/ares_nowarn.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CARES_NOWARN_H 2 | #define HEADER_CARES_NOWARN_H 3 | 4 | 5 | /* Copyright (C) 2010-2012 by Daniel Stenberg 6 | * 7 | * Permission to use, copy, modify, and distribute this 8 | * software and its documentation for any purpose and without 9 | * fee is hereby granted, provided that the above copyright 10 | * notice appear in all copies and that both that copyright 11 | * notice and this permission notice appear in supporting 12 | * documentation, and that the name of M.I.T. not be used in 13 | * advertising or publicity pertaining to distribution of the 14 | * software without specific, written prior permission. 15 | * M.I.T. makes no representations about the suitability of 16 | * this software for any purpose. It is provided "as is" 17 | * without express or implied warranty. 18 | */ 19 | 20 | long aresx_uztosl(size_t uznum); 21 | int aresx_uztosi(size_t uznum); 22 | short aresx_uztoss(size_t uznum); 23 | 24 | short aresx_sitoss(int sinum); 25 | 26 | int aresx_sltosi(long slnum); 27 | 28 | int aresx_sztosi(ssize_t sznum); 29 | 30 | unsigned int aresx_sztoui(ssize_t sznum); 31 | 32 | unsigned short aresx_sitous(int sinum); 33 | 34 | #if defined(__INTEL_COMPILER) && defined(__unix__) 35 | 36 | int aresx_FD_ISSET(int fd, fd_set *fdset); 37 | 38 | void aresx_FD_SET(int fd, fd_set *fdset); 39 | 40 | void aresx_FD_ZERO(fd_set *fdset); 41 | 42 | unsigned short aresx_htons(unsigned short usnum); 43 | 44 | unsigned short aresx_ntohs(unsigned short usnum); 45 | 46 | #ifndef BUILDING_ARES_NOWARN_C 47 | # undef FD_ISSET 48 | # define FD_ISSET(a,b) aresx_FD_ISSET((a),(b)) 49 | # undef FD_SET 50 | # define FD_SET(a,b) aresx_FD_SET((a),(b)) 51 | # undef FD_ZERO 52 | # define FD_ZERO(a) aresx_FD_ZERO((a)) 53 | # undef htons 54 | # define htons(a) aresx_htons((a)) 55 | # undef ntohs 56 | # define ntohs(a) aresx_ntohs((a)) 57 | #endif 58 | 59 | #endif /* __INTEL_COMPILER && __unix__ */ 60 | 61 | #endif /* HEADER_CARES_NOWARN_H */ 62 | -------------------------------------------------------------------------------- /c-ares/ares_parse_ns_reply.3: -------------------------------------------------------------------------------- 1 | .\" 2 | .\" Copyright 1998 by the Massachusetts Institute of Technology. 3 | .\" 4 | .\" Permission to use, copy, modify, and distribute this 5 | .\" software and its documentation for any purpose and without 6 | .\" fee is hereby granted, provided that the above copyright 7 | .\" notice appear in all copies and that both that copyright 8 | .\" notice and this permission notice appear in supporting 9 | .\" documentation, and that the name of M.I.T. not be used in 10 | .\" advertising or publicity pertaining to distribution of the 11 | .\" software without specific, written prior permission. 12 | .\" M.I.T. makes no representations about the suitability of 13 | .\" this software for any purpose. It is provided "as is" 14 | .\" without express or implied warranty. 15 | .\" 16 | .TH ARES_PARSE_NS_REPLY 3 "10 February 2007" 17 | .SH NAME 18 | ares_parse_ns_reply \- Parse a reply to a DNS query of type NS into a hostent 19 | .SH SYNOPSIS 20 | .nf 21 | .B #include 22 | .PP 23 | .B int ares_parse_ns_reply(const unsigned char *\fIabuf\fP, int \fIalen\fP, 24 | .B struct hostent **\fIhost\fP); 25 | .fi 26 | .SH DESCRIPTION 27 | The 28 | .B ares_parse_ns_reply 29 | function parses the response to a query of type NS into a 30 | .BR "struct hostent" . 31 | The parameters 32 | .I abuf 33 | and 34 | .I alen 35 | give the contents of the response. The result is stored in allocated 36 | memory and a pointer to it stored into the variable pointed to by 37 | .IR host . 38 | The nameservers are stored into the 39 | .BR aliases 40 | field of the 41 | .IR host 42 | structure. 43 | It is the caller's responsibility to free the resulting host structure 44 | using 45 | .BR ares_free_hostent (3) 46 | when it is no longer needed. 47 | .SH RETURN VALUES 48 | .B ares_parse_ns_reply 49 | can return any of the following values: 50 | .TP 15 51 | .B ARES_SUCCESS 52 | The response was successfully parsed. 53 | .TP 15 54 | .B ARES_EBADRESP 55 | The response was malformatted. 56 | .TP 15 57 | .B ARES_ENODATA 58 | The response did not contain an answer to the query. 59 | .TP 15 60 | .B ARES_ENOMEM 61 | Memory was exhausted. 62 | .SH SEE ALSO 63 | .BR ares_query (3), 64 | .BR ares_free_hostent (3) 65 | .SH AUTHOR 66 | Written by Vlad Dinulescu , on behalf of AVIRA Gmbh http://www.avira.com 67 | -------------------------------------------------------------------------------- /c-ares/ares_platform.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CARES_PLATFORM_H 2 | #define HEADER_CARES_PLATFORM_H 3 | 4 | 5 | /* Copyright 1998 by the Massachusetts Institute of Technology. 6 | * Copyright (C) 2004 - 2011 by Daniel Stenberg et al 7 | * 8 | * Permission to use, copy, modify, and distribute this 9 | * software and its documentation for any purpose and without 10 | * fee is hereby granted, provided that the above copyright 11 | * notice appear in all copies and that both that copyright 12 | * notice and this permission notice appear in supporting 13 | * documentation, and that the name of M.I.T. not be used in 14 | * advertising or publicity pertaining to distribution of the 15 | * software without specific, written prior permission. 16 | * M.I.T. makes no representations about the suitability of 17 | * this software for any purpose. It is provided "as is" 18 | * without express or implied warranty. 19 | */ 20 | 21 | #include "ares_setup.h" 22 | 23 | #if defined(WIN32) && !defined(MSDOS) 24 | 25 | typedef enum { 26 | WIN_UNKNOWN, 27 | WIN_3X, 28 | WIN_9X, 29 | WIN_NT, 30 | WIN_CE 31 | } win_platform; 32 | 33 | win_platform ares__getplatform(void); 34 | 35 | #endif 36 | 37 | #if defined(_WIN32_WCE) 38 | 39 | struct servent *getservbyport(int port, const char *proto); 40 | 41 | #endif 42 | 43 | #endif /* HEADER_CARES_PLATFORM_H */ 44 | -------------------------------------------------------------------------------- /c-ares/ares_set_local_dev.3: -------------------------------------------------------------------------------- 1 | .\" 2 | .\" Copyright 2010 by Ben Greear 3 | .\" 4 | .\" Permission to use, copy, modify, and distribute this 5 | .\" software and its documentation for any purpose and without 6 | .\" fee is hereby granted, provided that the above copyright 7 | .\" notice appear in all copies and that both that copyright 8 | .\" notice and this permission notice appear in supporting 9 | .\" documentation, and that the name of M.I.T. not be used in 10 | .\" advertising or publicity pertaining to distribution of the 11 | .\" software without specific, written prior permission. 12 | .\" M.I.T. makes no representations about the suitability of 13 | .\" this software for any purpose. It is provided "as is" 14 | .\" without express or implied warranty. 15 | .\" 16 | .TH ARES_SET_LOCAL_DEV 3 "30 June 2010" 17 | .SH NAME 18 | ares_set_local_dev \- Bind to a specific network device when creating sockets. 19 | .SH SYNOPSIS 20 | .nf 21 | .B #include 22 | .PP 23 | .B void ares_set_local_dev(ares_channel \fIchannel\fP, const char* \fIlocal_dev_name\fP) 24 | .fi 25 | .SH DESCRIPTION 26 | The \fBares_set_local_dev\fP function causes all future sockets 27 | to be bound to this device with SO_BINDTODEVICE. This forces communications 28 | to go over a certain interface, which can be useful on multi-homed machines. 29 | This option is only supported on Linux, and root privileges are required 30 | for the option to work. If SO_BINDTODEVICE is not supported or the 31 | setsocktop call fails (probably because of permissions), the error is 32 | silently ignored. 33 | .SH SEE ALSO 34 | .BR ares_set_local_ipv4 (3) 35 | .BR ares_set_local_ipv6 (3) 36 | .SH NOTES 37 | This function was added in c-ares 1.7.4 38 | .SH AUTHOR 39 | Ben Greear 40 | -------------------------------------------------------------------------------- /c-ares/ares_set_local_ip4.3: -------------------------------------------------------------------------------- 1 | .\" 2 | .\" Copyright 2010 by Ben Greear 3 | .\" 4 | .\" Permission to use, copy, modify, and distribute this 5 | .\" software and its documentation for any purpose and without 6 | .\" fee is hereby granted, provided that the above copyright 7 | .\" notice appear in all copies and that both that copyright 8 | .\" notice and this permission notice appear in supporting 9 | .\" documentation, and that the name of M.I.T. not be used in 10 | .\" advertising or publicity pertaining to distribution of the 11 | .\" software without specific, written prior permission. 12 | .\" M.I.T. makes no representations about the suitability of 13 | .\" this software for any purpose. It is provided "as is" 14 | .\" without express or implied warranty. 15 | .\" 16 | .TH ARES_SET_LOCAL_IP4 3 "30 June 2010" 17 | .SH NAME 18 | ares_set_local_ip4 \- Set local IPv4 address outgoing requests. 19 | .SH SYNOPSIS 20 | .nf 21 | .B #include 22 | .PP 23 | .B void ares_set_local_ip4(ares_channel \fIchannel\fP, unsigned int \fIlocal_ip\fP) 24 | .fi 25 | .SH DESCRIPTION 26 | The \fBares_set_local_ip4\fP function sets the IP address for outbound 27 | requests. This allows users to specify outbound interfaces when used 28 | on multi-homed systems. 29 | .SH SEE ALSO 30 | .BR ares_set_local_ip6 (3) 31 | .SH NOTES 32 | This function was added in c-ares 1.7.4 33 | .SH AUTHOR 34 | Ben Greear 35 | -------------------------------------------------------------------------------- /c-ares/ares_set_local_ip6.3: -------------------------------------------------------------------------------- 1 | .\" 2 | .\" Copyright 2010 by Ben Greear 3 | .\" 4 | .\" Permission to use, copy, modify, and distribute this 5 | .\" software and its documentation for any purpose and without 6 | .\" fee is hereby granted, provided that the above copyright 7 | .\" notice appear in all copies and that both that copyright 8 | .\" notice and this permission notice appear in supporting 9 | .\" documentation, and that the name of M.I.T. not be used in 10 | .\" advertising or publicity pertaining to distribution of the 11 | .\" software without specific, written prior permission. 12 | .\" M.I.T. makes no representations about the suitability of 13 | .\" this software for any purpose. It is provided "as is" 14 | .\" without express or implied warranty. 15 | .\" 16 | .TH ARES_SET_LOCAL_IP6 3 "30 June 2010" 17 | .SH NAME 18 | ares_set_local_ip6 \- Set local IPv6 address outgoing requests. 19 | .SH SYNOPSIS 20 | .nf 21 | .B #include 22 | .PP 23 | .B void ares_set_local_ip6(ares_channel \fIchannel\fP, const unsigned char* \fIlocal_ip6\fP) 24 | .fi 25 | .SH DESCRIPTION 26 | The \fBares_set_local_ip6\fP function sets the IPv6 address for outbound 27 | IPv6 requests. This allows users to specify outbound interfaces when used 28 | on multi-homed systems. The local_ip6 argument must be 16 bytes in length. 29 | .SH SEE ALSO 30 | .BR ares_set_local_ip4 (3) 31 | .SH NOTES 32 | This function was added in c-ares 1.7.4 33 | .SH AUTHOR 34 | Ben Greear 35 | -------------------------------------------------------------------------------- /c-ares/ares_set_servers_ports.3: -------------------------------------------------------------------------------- 1 | .so man3/ares_set_servers.3 2 | -------------------------------------------------------------------------------- /c-ares/ares_set_servers_ports_csv.3: -------------------------------------------------------------------------------- 1 | .so man3/ares_set_servers_csv.3 2 | -------------------------------------------------------------------------------- /c-ares/ares_set_socket_callback.3: -------------------------------------------------------------------------------- 1 | .\" 2 | .TH ARES_SET_SOCKET_CALLBACK 3 "20 Nov 2009" 3 | .SH NAME 4 | ares_set_socket_callback \- Set a socket creation callback 5 | .SH SYNOPSIS 6 | .nf 7 | .B #include 8 | .PP 9 | .B typedef int (*ares_sock_create_callback)(ares_socket_t \fIsocket_fd\fP, 10 | int \fItype\fP, 11 | void *\fIuserdata\fP) 12 | .PP 13 | .B void ares_set_socket_callback(ares_channel \fIchannel\fP, 14 | ares_sock_create_callback \fIcallback\fP, 15 | void *\fIuserdata\fP) 16 | .PP 17 | .B cc file.c -lcares 18 | .fi 19 | .SH DESCRIPTION 20 | .PP 21 | This function sets a \fIcallback\fP in the given ares channel handle. This 22 | callback function will be invoked after the socket has been created, and 23 | connected to the remote server. The callback must return ARES_SUCCESS if 24 | things are fine, or return -1 to signal an error. A returned error will 25 | abort the ares operation. 26 | .SH SEE ALSO 27 | .BR ares_init_options (3), ares_set_socket_configure_callback (3) 28 | .SH AVAILABILITY 29 | ares_set_socket_callback(3) was added in c-ares 1.6.0 30 | .SH AUTHOR 31 | Gregor Jasny 32 | 33 | -------------------------------------------------------------------------------- /c-ares/ares_set_socket_configure_callback.3: -------------------------------------------------------------------------------- 1 | .\" 2 | .TH ARES_SET_SOCKET_CONFIGURE_CALLBACK 3 "6 Feb 2016" 3 | .SH NAME 4 | ares_set_socket_configure_callback \- Set a socket configuration callback 5 | .SH SYNOPSIS 6 | .nf 7 | .B #include 8 | .PP 9 | .B typedef int (*ares_sock_config_callback)(ares_socket_t \fIsocket_fd\fP, 10 | int \fItype\fP, 11 | void *\fIuserdata\fP) 12 | .PP 13 | .B void ares_set_socket_configure_callback(ares_channel \fIchannel\fP, 14 | ares_sock_config_callback \fIcallback\fP, 15 | void *\fIuserdata\fP) 16 | .PP 17 | .B cc file.c -lcares 18 | .fi 19 | .SH DESCRIPTION 20 | .PP 21 | This function sets a \fIcallback\fP in the given ares channel handle. This 22 | callback function will be invoked after the socket has been created, but 23 | before it has been connected to the remote server, which is an ideal time 24 | to configure various socket options. The callback must return ARES_SUCCESS 25 | if things are fine, or return -1 to signal an error. A returned error will 26 | abort the ares operation. 27 | .SH SEE ALSO 28 | .BR ares_init_options (3), ares_set_socket_callback (3) 29 | .SH AVAILABILITY 30 | ares_set_socket_configure_callback(3) was added in c-ares 1.11.0 31 | .SH AUTHOR 32 | Andrew Ayer 33 | 34 | -------------------------------------------------------------------------------- /c-ares/ares_set_sortlist.3: -------------------------------------------------------------------------------- 1 | .\" 2 | .\" Permission to use, copy, modify, and distribute this 3 | .\" software and its documentation for any purpose and without 4 | .\" fee is hereby granted, provided that the above copyright 5 | .\" notice appear in all copies and that both that copyright 6 | .\" notice and this permission notice appear in supporting 7 | .\" documentation, and that the name of M.I.T. not be used in 8 | .\" advertising or publicity pertaining to distribution of the 9 | .\" software without specific, written prior permission. 10 | .\" M.I.T. makes no representations about the suitability of 11 | .\" this software for any purpose. It is provided "as is" 12 | .\" without express or implied warranty. 13 | .\" 14 | .TH ARES_SET_SORTLIST 3 "23 November 2015" 15 | .SH NAME 16 | ares_set_sortlist \- Initialize an ares_channel sortlist configuration 17 | .SH SYNOPSIS 18 | .nf 19 | .B #include 20 | .PP 21 | .B int ares_set_sortlist(ares_channel \fIchannel\fP, const char *\fIsortstr\fP) 22 | .fi 23 | .SH DESCRIPTION 24 | The \fBares_set_sortlist(3)\fP function initializes an address sortlist configuration 25 | for the channel data identified by 26 | .IR channel , 27 | so that addresses returned by \fBares_gethostbyname(3)\fP are sorted according to the 28 | sortlist. The provided 29 | .IR sortstr 30 | string that holds a space separated list of IP-address-netmask pairs. The 31 | netmask is optional but follows the address after a slash if present. For example, 32 | "130.155.160.0/255.255.240.0 130.155.0.0". 33 | 34 | This function replaces any potentially previously configured address sortlist 35 | with the ones given in the configuration string. 36 | 37 | .SH RETURN VALUES 38 | .B ares_set_sortlist(3) 39 | may return any of the following values: 40 | .TP 15 41 | .B ARES_SUCCESS 42 | The sortlist configuration was successfully initialized. 43 | .TP 15 44 | .B ARES_ENOMEM 45 | The process's available memory was exhausted. 46 | .TP 15 47 | .B ARES_ENODATA 48 | The channel data identified by 49 | .IR channel 50 | was invalid. 51 | .TP 15 52 | .B ARES_ENOTINITIALIZED 53 | c-ares library initialization not yet performed. 54 | .SH SEE ALSO 55 | .BR ares_init_options (3), 56 | .BR ares_dup(3) 57 | .SH AVAILABILITY 58 | ares_set_sortlist(3) was added in c-ares 1.11.0 59 | -------------------------------------------------------------------------------- /c-ares/ares_strcasecmp.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | /* Copyright 1998 by the Massachusetts Institute of Technology. 4 | * 5 | * Permission to use, copy, modify, and distribute this 6 | * software and its documentation for any purpose and without 7 | * fee is hereby granted, provided that the above copyright 8 | * notice appear in all copies and that both that copyright 9 | * notice and this permission notice appear in supporting 10 | * documentation, and that the name of M.I.T. not be used in 11 | * advertising or publicity pertaining to distribution of the 12 | * software without specific, written prior permission. 13 | * M.I.T. makes no representations about the suitability of 14 | * this software for any purpose. It is provided "as is" 15 | * without express or implied warranty. 16 | */ 17 | 18 | #include "ares_setup.h" 19 | #include "ares_strcasecmp.h" 20 | 21 | #ifndef HAVE_STRCASECMP 22 | int ares_strcasecmp(const char *a, const char *b) 23 | { 24 | #if defined(HAVE_STRCMPI) 25 | return strcmpi(a, b); 26 | #elif defined(HAVE_STRICMP) 27 | return stricmp(a, b); 28 | #else 29 | size_t i; 30 | 31 | for (i = 0; i < (size_t)-1; i++) { 32 | int c1 = ISUPPER(a[i]) ? tolower(a[i]) : a[i]; 33 | int c2 = ISUPPER(b[i]) ? tolower(b[i]) : b[i]; 34 | if (c1 != c2) 35 | return c1-c2; 36 | if (!c1) 37 | break; 38 | } 39 | return 0; 40 | #endif 41 | } 42 | #endif 43 | 44 | #ifndef HAVE_STRNCASECMP 45 | int ares_strncasecmp(const char *a, const char *b, size_t n) 46 | { 47 | #if defined(HAVE_STRNCMPI) 48 | return strncmpi(a, b, n); 49 | #elif defined(HAVE_STRNICMP) 50 | return strnicmp(a, b, n); 51 | #else 52 | size_t i; 53 | 54 | for (i = 0; i < n; i++) { 55 | int c1 = ISUPPER(a[i]) ? tolower(a[i]) : a[i]; 56 | int c2 = ISUPPER(b[i]) ? tolower(b[i]) : b[i]; 57 | if (c1 != c2) 58 | return c1-c2; 59 | if (!c1) 60 | break; 61 | } 62 | return 0; 63 | #endif 64 | } 65 | #endif 66 | 67 | -------------------------------------------------------------------------------- /c-ares/ares_strcasecmp.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CARES_STRCASECMP_H 2 | #define HEADER_CARES_STRCASECMP_H 3 | 4 | 5 | /* Copyright 1998 by the Massachusetts Institute of Technology. 6 | * 7 | * Permission to use, copy, modify, and distribute this 8 | * software and its documentation for any purpose and without 9 | * fee is hereby granted, provided that the above copyright 10 | * notice appear in all copies and that both that copyright 11 | * notice and this permission notice appear in supporting 12 | * documentation, and that the name of M.I.T. not be used in 13 | * advertising or publicity pertaining to distribution of the 14 | * software without specific, written prior permission. 15 | * M.I.T. makes no representations about the suitability of 16 | * this software for any purpose. It is provided "as is" 17 | * without express or implied warranty. 18 | */ 19 | 20 | #include "ares_setup.h" 21 | 22 | #ifndef HAVE_STRCASECMP 23 | extern int ares_strcasecmp(const char *a, const char *b); 24 | #endif 25 | 26 | #ifndef HAVE_STRNCASECMP 27 | extern int ares_strncasecmp(const char *a, const char *b, size_t n); 28 | #endif 29 | 30 | #endif /* HEADER_CARES_STRCASECMP_H */ 31 | -------------------------------------------------------------------------------- /c-ares/ares_strdup.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | /* Copyright 1998 by the Massachusetts Institute of Technology. 4 | * 5 | * Permission to use, copy, modify, and distribute this 6 | * software and its documentation for any purpose and without 7 | * fee is hereby granted, provided that the above copyright 8 | * notice appear in all copies and that both that copyright 9 | * notice and this permission notice appear in supporting 10 | * documentation, and that the name of M.I.T. not be used in 11 | * advertising or publicity pertaining to distribution of the 12 | * software without specific, written prior permission. 13 | * M.I.T. makes no representations about the suitability of 14 | * this software for any purpose. It is provided "as is" 15 | * without express or implied warranty. 16 | */ 17 | 18 | #include "ares_setup.h" 19 | #include "ares_strdup.h" 20 | #include "ares.h" 21 | #include "ares_private.h" 22 | 23 | char *ares_strdup(const char *s1) 24 | { 25 | #ifdef HAVE_STRDUP 26 | if (ares_malloc == malloc) 27 | return strdup(s1); 28 | else 29 | #endif 30 | { 31 | size_t sz; 32 | char * s2; 33 | 34 | if(s1) { 35 | sz = strlen(s1); 36 | if(sz < (size_t)-1) { 37 | sz++; 38 | if(sz < ((size_t)-1) / sizeof(char)) { 39 | s2 = ares_malloc(sz * sizeof(char)); 40 | if(s2) { 41 | memcpy(s2, s1, sz * sizeof(char)); 42 | return s2; 43 | } 44 | } 45 | } 46 | } 47 | return (char *)NULL; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /c-ares/ares_strdup.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CARES_STRDUP_H 2 | #define HEADER_CARES_STRDUP_H 3 | 4 | 5 | /* Copyright 1998 by the Massachusetts Institute of Technology. 6 | * 7 | * Permission to use, copy, modify, and distribute this 8 | * software and its documentation for any purpose and without 9 | * fee is hereby granted, provided that the above copyright 10 | * notice appear in all copies and that both that copyright 11 | * notice and this permission notice appear in supporting 12 | * documentation, and that the name of M.I.T. not be used in 13 | * advertising or publicity pertaining to distribution of the 14 | * software without specific, written prior permission. 15 | * M.I.T. makes no representations about the suitability of 16 | * this software for any purpose. It is provided "as is" 17 | * without express or implied warranty. 18 | */ 19 | 20 | #include "ares_setup.h" 21 | 22 | extern char *ares_strdup(const char *s1); 23 | 24 | #endif /* HEADER_CARES_STRDUP_H */ 25 | -------------------------------------------------------------------------------- /c-ares/ares_strerror.3: -------------------------------------------------------------------------------- 1 | .\" 2 | .\" Copyright 1998 by the Massachusetts Institute of Technology. 3 | .\" 4 | .\" Permission to use, copy, modify, and distribute this 5 | .\" software and its documentation for any purpose and without 6 | .\" fee is hereby granted, provided that the above copyright 7 | .\" notice appear in all copies and that both that copyright 8 | .\" notice and this permission notice appear in supporting 9 | .\" documentation, and that the name of M.I.T. not be used in 10 | .\" advertising or publicity pertaining to distribution of the 11 | .\" software without specific, written prior permission. 12 | .\" M.I.T. makes no representations about the suitability of 13 | .\" this software for any purpose. It is provided "as is" 14 | .\" without express or implied warranty. 15 | .\" 16 | .TH ARES_STRERROR 3 "25 July 1998" 17 | .SH NAME 18 | ares_strerror \- Get the description of an ares library error code 19 | .SH SYNOPSIS 20 | .nf 21 | .B #include 22 | .PP 23 | .B const char *ares_strerror(int \fIcode\fP) 24 | .fi 25 | .SH DESCRIPTION 26 | The 27 | .B ares_strerror 28 | function gets the description of the ares library error code 29 | .IR code , 30 | returning the result as a NUL-terminated C string. 31 | .SH NOTES 32 | This function is not compatible with ares, it takes a different set of 33 | arguments. 34 | .SH AUTHOR 35 | Greg Hudson, MIT Information Systems 36 | .br 37 | Copyright 1998 by the Massachusetts Institute of Technology. 38 | -------------------------------------------------------------------------------- /c-ares/ares_strerror.c: -------------------------------------------------------------------------------- 1 | 2 | /* Copyright 1998 by the Massachusetts Institute of Technology. 3 | * 4 | * Permission to use, copy, modify, and distribute this 5 | * software and its documentation for any purpose and without 6 | * fee is hereby granted, provided that the above copyright 7 | * notice appear in all copies and that both that copyright 8 | * notice and this permission notice appear in supporting 9 | * documentation, and that the name of M.I.T. not be used in 10 | * advertising or publicity pertaining to distribution of the 11 | * software without specific, written prior permission. 12 | * M.I.T. makes no representations about the suitability of 13 | * this software for any purpose. It is provided "as is" 14 | * without express or implied warranty. 15 | */ 16 | 17 | #include "ares_setup.h" 18 | #include 19 | #include "ares.h" 20 | 21 | const char *ares_strerror(int code) 22 | { 23 | /* Return a string literal from a table. */ 24 | const char *errtext[] = { 25 | "Successful completion", 26 | "DNS server returned answer with no data", 27 | "DNS server claims query was misformatted", 28 | "DNS server returned general failure", 29 | "Domain name not found", 30 | "DNS server does not implement requested operation", 31 | "DNS server refused query", 32 | "Misformatted DNS query", 33 | "Misformatted domain name", 34 | "Unsupported address family", 35 | "Misformatted DNS reply", 36 | "Could not contact DNS servers", 37 | "Timeout while contacting DNS servers", 38 | "End of file", 39 | "Error reading file", 40 | "Out of memory", 41 | "Channel is being destroyed", 42 | "Misformatted string", 43 | "Illegal flags specified", 44 | "Given hostname is not numeric", 45 | "Illegal hints flags specified", 46 | "c-ares library initialization not yet performed", 47 | "Error loading iphlpapi.dll", 48 | "Could not find GetNetworkParams function", 49 | "DNS query cancelled" 50 | }; 51 | 52 | if(code >= 0 && code < (int)(sizeof(errtext) / sizeof(*errtext))) 53 | return errtext[code]; 54 | else 55 | return "unknown"; 56 | } 57 | -------------------------------------------------------------------------------- /c-ares/ares_timeout.3: -------------------------------------------------------------------------------- 1 | .\" 2 | .\" Copyright 1998 by the Massachusetts Institute of Technology. 3 | .\" 4 | .\" Permission to use, copy, modify, and distribute this 5 | .\" software and its documentation for any purpose and without 6 | .\" fee is hereby granted, provided that the above copyright 7 | .\" notice appear in all copies and that both that copyright 8 | .\" notice and this permission notice appear in supporting 9 | .\" documentation, and that the name of M.I.T. not be used in 10 | .\" advertising or publicity pertaining to distribution of the 11 | .\" software without specific, written prior permission. 12 | .\" M.I.T. makes no representations about the suitability of 13 | .\" this software for any purpose. It is provided "as is" 14 | .\" without express or implied warranty. 15 | .\" 16 | .TH ARES_TIMEOUT 3 "25 July 1998" 17 | .SH NAME 18 | ares_timeout \- return maximum time to wait 19 | .SH SYNOPSIS 20 | .nf 21 | .B #include 22 | .PP 23 | .B struct timeval *ares_timeout(ares_channel \fIchannel\fP, 24 | .B struct timeval *\fImaxtv\fP, struct timeval *\fItv\fP) 25 | .fi 26 | .SH DESCRIPTION 27 | The 28 | .B ares_timeout 29 | function determines the maximum time for which the caller should wait before 30 | invoking \fIares_process(3)\fP to process timeouts. The parameter 31 | .I maxtv 32 | specifies a existing maximum timeout, or 33 | .B NULL 34 | if the caller does not wish to apply a maximum timeout. The parameter 35 | .I tv 36 | must point to a writable buffer of type 37 | .BR "struct timeval" . 38 | It is valid for 39 | .I maxtv 40 | and 41 | .I tv 42 | to have the same value. 43 | .PP 44 | If no queries have timeouts pending sooner than the given maximum 45 | timeout, 46 | .B ares_timeout 47 | returns the value of 48 | .IR maxtv; 49 | otherwise 50 | .B ares_timeout 51 | stores the appropriate timeout value into the buffer pointed to by 52 | .I tv 53 | and returns the value of 54 | .IR tv . 55 | .SH SEE ALSO 56 | .BR ares_fds (3), 57 | .BR ares_process (3) 58 | .SH AUTHOR 59 | Greg Hudson, MIT Information Systems 60 | .br 61 | Copyright 1998 by the Massachusetts Institute of Technology. 62 | -------------------------------------------------------------------------------- /c-ares/ares_version.3: -------------------------------------------------------------------------------- 1 | .\" 2 | .\" Copyright 2004 by Daniel Stenberg 3 | .\" 4 | .\" Permission to use, copy, modify, and distribute this 5 | .\" software and its documentation for any purpose and without 6 | .\" fee is hereby granted, provided that the above copyright 7 | .\" notice appear in all copies and that both that copyright 8 | .\" notice and this permission notice appear in supporting 9 | .\" documentation, and that the name of M.I.T. not be used in 10 | .\" advertising or publicity pertaining to distribution of the 11 | .\" software without specific, written prior permission. 12 | .\" M.I.T. makes no representations about the suitability of 13 | .\" this software for any purpose. It is provided "as is" 14 | .\" without express or implied warranty. 15 | .\" 16 | .TH ARES_VERSION 3 "29 January 2004" 17 | .SH NAME 18 | ares_version \- Get the version number of the library 19 | .SH SYNOPSIS 20 | .nf 21 | .B #include 22 | .PP 23 | .B const char *ares_version(int *\fIversion\fP) 24 | .fi 25 | .SH DESCRIPTION 26 | The 27 | .B ares_version 28 | function gets the library version as a string and optionally as an integer 29 | stored in the 30 | .IR version , 31 | argument. If you pass a NULL, no integer is attempted to be returned. 32 | 33 | The integer is built up as 24bit number, with 8 separate bits used for major 34 | number, minor number and patch number. This makes a version string such as 35 | 1.2.3 will be returned as the hexadecimal number 0x010203 (decimal 66051). 36 | .SH NOTES 37 | This function is not compatible with ares. 38 | .SH AUTHOR 39 | Daniel Stenberg 40 | 41 | -------------------------------------------------------------------------------- /c-ares/ares_version.c: -------------------------------------------------------------------------------- 1 | 2 | #include "ares_setup.h" 3 | #include "ares.h" 4 | 5 | const char *ares_version(int *version) 6 | { 7 | if(version) 8 | *version = ARES_VERSION; 9 | 10 | return ARES_VERSION_STR; 11 | } 12 | -------------------------------------------------------------------------------- /c-ares/ares_version.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef ARES__VERSION_H 3 | #define ARES__VERSION_H 4 | 5 | /* This is the global package copyright */ 6 | #define ARES_COPYRIGHT "2004 - 2016 Daniel Stenberg, ." 7 | 8 | #define ARES_VERSION_MAJOR 1 9 | #define ARES_VERSION_MINOR 11 10 | #define ARES_VERSION_PATCH 1 11 | #define ARES_VERSION ((ARES_VERSION_MAJOR<<16)|\ 12 | (ARES_VERSION_MINOR<<8)|\ 13 | (ARES_VERSION_PATCH)) 14 | #define ARES_VERSION_STR "1.11.1-DEV" 15 | 16 | #if (ARES_VERSION >= 0x010700) 17 | # define CARES_HAVE_ARES_LIBRARY_INIT 1 18 | # define CARES_HAVE_ARES_LIBRARY_CLEANUP 1 19 | #else 20 | # undef CARES_HAVE_ARES_LIBRARY_INIT 21 | # undef CARES_HAVE_ARES_LIBRARY_CLEANUP 22 | #endif 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /c-ares/ares_writev.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | /* Copyright 1998 by the Massachusetts Institute of Technology. 4 | * 5 | * Permission to use, copy, modify, and distribute this 6 | * software and its documentation for any purpose and without 7 | * fee is hereby granted, provided that the above copyright 8 | * notice appear in all copies and that both that copyright 9 | * notice and this permission notice appear in supporting 10 | * documentation, and that the name of M.I.T. not be used in 11 | * advertising or publicity pertaining to distribution of the 12 | * software without specific, written prior permission. 13 | * M.I.T. makes no representations about the suitability of 14 | * this software for any purpose. It is provided "as is" 15 | * without express or implied warranty. 16 | */ 17 | 18 | #include "ares_setup.h" 19 | 20 | #ifdef HAVE_LIMITS_H 21 | # include 22 | #endif 23 | 24 | #include "ares.h" 25 | #include "ares_private.h" 26 | 27 | #ifndef HAVE_WRITEV 28 | ssize_t ares_writev(ares_socket_t s, const struct iovec *iov, int iovcnt) 29 | { 30 | char *buffer, *bp; 31 | int i; 32 | size_t bytes = 0; 33 | ssize_t result; 34 | 35 | /* Validate iovcnt */ 36 | if (iovcnt <= 0) 37 | { 38 | SET_ERRNO(EINVAL); 39 | return (-1); 40 | } 41 | 42 | /* Validate and find the sum of the iov_len values in the iov array */ 43 | for (i = 0; i < iovcnt; i++) 44 | { 45 | if (iov[i].iov_len > INT_MAX - bytes) 46 | { 47 | SET_ERRNO(EINVAL); 48 | return (-1); 49 | } 50 | bytes += iov[i].iov_len; 51 | } 52 | 53 | if (bytes == 0) 54 | return (0); 55 | 56 | /* Allocate a temporary buffer to hold the data */ 57 | buffer = ares_malloc(bytes); 58 | if (!buffer) 59 | { 60 | SET_ERRNO(ENOMEM); 61 | return (-1); 62 | } 63 | 64 | /* Copy the data into buffer */ 65 | for (bp = buffer, i = 0; i < iovcnt; ++i) 66 | { 67 | memcpy (bp, iov[i].iov_base, iov[i].iov_len); 68 | bp += iov[i].iov_len; 69 | } 70 | 71 | /* Send buffer contents */ 72 | result = swrite(s, buffer, bytes); 73 | 74 | ares_free(buffer); 75 | 76 | return (result); 77 | } 78 | #endif 79 | 80 | -------------------------------------------------------------------------------- /c-ares/ares_writev.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_CARES_WRITEV_H 2 | #define HEADER_CARES_WRITEV_H 3 | 4 | 5 | /* Copyright 1998 by the Massachusetts Institute of Technology. 6 | * 7 | * Permission to use, copy, modify, and distribute this 8 | * software and its documentation for any purpose and without 9 | * fee is hereby granted, provided that the above copyright 10 | * notice appear in all copies and that both that copyright 11 | * notice and this permission notice appear in supporting 12 | * documentation, and that the name of M.I.T. not be used in 13 | * advertising or publicity pertaining to distribution of the 14 | * software without specific, written prior permission. 15 | * M.I.T. makes no representations about the suitability of 16 | * this software for any purpose. It is provided "as is" 17 | * without express or implied warranty. 18 | */ 19 | 20 | #include "ares_setup.h" 21 | #include "ares.h" 22 | 23 | #ifndef HAVE_WRITEV 24 | 25 | /* Structure for scatter/gather I/O. */ 26 | struct iovec 27 | { 28 | void *iov_base; /* Pointer to data. */ 29 | size_t iov_len; /* Length of data. */ 30 | }; 31 | 32 | extern ssize_t ares_writev(ares_socket_t s, const struct iovec *iov, int iovcnt); 33 | 34 | #endif 35 | 36 | #endif /* HEADER_CARES_WRITEV_H */ 37 | -------------------------------------------------------------------------------- /c-ares/bitncmp.c: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") 4 | * Copyright (c) 1996,1999 by Internet Software Consortium. 5 | * 6 | * Permission to use, copy, modify, and distribute this software for any 7 | * purpose with or without fee is hereby granted, provided that the above 8 | * copyright notice and this permission notice appear in all copies. 9 | * 10 | * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES 11 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR 13 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 15 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT 16 | * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17 | */ 18 | 19 | #ifndef HAVE_BITNCMP 20 | 21 | #include "ares_setup.h" 22 | #include "bitncmp.h" 23 | 24 | /* 25 | * int 26 | * bitncmp(l, r, n) 27 | * compare bit masks l and r, for n bits. 28 | * return: 29 | * <0, >0, or 0 in the libc tradition. 30 | * note: 31 | * network byte order assumed. this means 192.5.5.240/28 has 32 | * 0x11110000 in its fourth octet. 33 | * author: 34 | * Paul Vixie (ISC), June 1996 35 | */ 36 | int ares__bitncmp(const void *l, const void *r, int n) 37 | { 38 | unsigned int lb, rb; 39 | int x, b; 40 | 41 | b = n / 8; 42 | x = memcmp(l, r, b); 43 | if (x || (n % 8) == 0) 44 | return (x); 45 | 46 | lb = ((const unsigned char *)l)[b]; 47 | rb = ((const unsigned char *)r)[b]; 48 | for (b = n % 8; b > 0; b--) { 49 | if ((lb & 0x80) != (rb & 0x80)) { 50 | if (lb & 0x80) 51 | return (1); 52 | return (-1); 53 | } 54 | lb <<= 1; 55 | rb <<= 1; 56 | } 57 | return (0); 58 | } 59 | #endif 60 | -------------------------------------------------------------------------------- /c-ares/bitncmp.h: -------------------------------------------------------------------------------- 1 | #ifndef __ARES_BITNCMP_H 2 | #define __ARES_BITNCMP_H 3 | 4 | 5 | /* Copyright (C) 2005, 2013 by Dominick Meglio 6 | * 7 | * Permission to use, copy, modify, and distribute this 8 | * software and its documentation for any purpose and without 9 | * fee is hereby granted, provided that the above copyright 10 | * notice appear in all copies and that both that copyright 11 | * notice and this permission notice appear in supporting 12 | * documentation, and that the name of M.I.T. not be used in 13 | * advertising or publicity pertaining to distribution of the 14 | * software without specific, written prior permission. 15 | * M.I.T. makes no representations about the suitability of 16 | * this software for any purpose. It is provided "as is" 17 | * without express or implied warranty. 18 | */ 19 | 20 | #ifndef HAVE_BITNCMP 21 | int ares__bitncmp(const void *l, const void *r, int n); 22 | #else 23 | #define ares__bitncmp(x,y,z) bitncmp(x,y,z) 24 | #endif 25 | 26 | #endif /* __ARES_BITNCMP_H */ 27 | -------------------------------------------------------------------------------- /c-ares/buildconf.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | REM 3 | REM 4 | REM This batch file must be used to set up a git tree to build on 5 | REM systems where there is no autotools support (i.e. Microsoft). 6 | REM 7 | REM This file is not included nor needed for c-ares' release 8 | REM archives, neither for c-ares' daily snapshot archives. 9 | 10 | if exist GIT-INFO goto start_doing 11 | ECHO ERROR: This file shall only be used with a c-ares git checkout. 12 | goto end_all 13 | :start_doing 14 | 15 | if not exist ares_build.h.dist goto end_ares_build_h 16 | copy /Y ares_build.h.dist ares_build.h 17 | :end_ares_build_h 18 | 19 | :end_all 20 | 21 | -------------------------------------------------------------------------------- /c-ares/cares.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/cares.rc -------------------------------------------------------------------------------- /c-ares/get_ver.awk: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * Project: c-ares 3 | # * 4 | # *************************************************************************** 5 | # awk script which fetches c-ares version number and string from input 6 | # file and writes them to STDOUT. Here you can get an awk version for Win32: 7 | # http://www.gknw.net/development/prgtools/awk-20100523.zip 8 | # 9 | BEGIN { 10 | while ((getline < ARGV[1]) > 0) { 11 | sub("\r", "") # make MSYS gawk work with CRLF header input. 12 | if (match ($0, /^#define ARES_COPYRIGHT "[^"]+"$/)) 13 | copyright_string = substr($0, 25, length($0)-25) 14 | else if (match ($0, /^#define ARES_VERSION_STR "[^"]+"$/)) 15 | version_string = substr($3, 2, length($3)-2) 16 | else if (match ($0, /^#define ARES_VERSION_MAJOR [0-9]+$/)) 17 | version_major = $3 18 | else if (match ($0, /^#define ARES_VERSION_MINOR [0-9]+$/)) 19 | version_minor = $3 20 | else if (match ($0, /^#define ARES_VERSION_PATCH [0-9]+$/)) 21 | version_patch = $3 22 | } 23 | print "LIBCARES_VERSION = " version_major "," version_minor "," version_patch 24 | print "LIBCARES_VERSION_STR = " version_string 25 | print "LIBCARES_COPYRIGHT_STR = " copyright_string 26 | } 27 | 28 | -------------------------------------------------------------------------------- /c-ares/git2changes.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | # git log --pretty=fuller --no-color --date=short --decorate=full 4 | 5 | my @mname = ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 6 | 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ); 7 | 8 | sub nicedate { 9 | my ($date)=$_; 10 | 11 | if($date =~ /(\d\d\d\d)-(\d\d)-(\d\d)/) { 12 | return sprintf("%d %s %4d", $3, $mname[$2-1], $1); 13 | } 14 | return $date; 15 | } 16 | 17 | print 18 | ' Changelog for the c-ares project. Generated with git2changes.pl 19 | '; 20 | 21 | my $line; 22 | my $tag; 23 | while() { 24 | my $l = $_; 25 | 26 | if($l =~/^commit ([[:xdigit:]]*) ?(.*)/) { 27 | $co = $1; 28 | my $ref = $2; 29 | if ($ref =~ /refs\/tags\/c[-]*ares-([0-9._]*)/) { 30 | $tag = $1; 31 | $tag =~ s/_/./g; 32 | } else { 33 | $tag = ''; 34 | } 35 | } 36 | elsif($l =~ /^Author: *(.*) + 3 | #include 4 | 5 | 6 | int KleeFuzzingEntry(int argc,char** argv) { 7 | unsigned char *output_buffer; 8 | int output_buflen; 9 | unsigned char input_buffer[64] = {0}; 10 | 11 | klee_make_symbolic(&input_buffer, sizeof(input_buffer), "input_buffer"); 12 | 13 | ares_create_query(input_buffer, ns_c_in, ns_t_a, 0x1234, 0, &output_buffer, &output_buflen, 0); 14 | 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /c-ares/klee_fuzzer_replay.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | 5 | 6 | int main(int argc,char** argv) { 7 | unsigned char *output_buffer; 8 | int output_buflen; 9 | unsigned char* input_buffer = "\x5c\x2e\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"; 10 | 11 | ares_create_query(input_buffer, ns_c_in, ns_t_a, 0x1234, 0, &output_buffer, &output_buflen, 0); 12 | 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /c-ares/libcares.pc.in: -------------------------------------------------------------------------------- 1 | #*************************************************************************** 2 | # Project ___ __ _ _ __ ___ ___ 3 | # / __|____ / _` | '__/ _ \/ __| 4 | # | (_|_____| (_| | | | __/\__ \ 5 | # \___| \__,_|_| \___||___/ 6 | # 7 | prefix=@prefix@ 8 | exec_prefix=@exec_prefix@ 9 | libdir=@libdir@ 10 | includedir=@includedir@ 11 | 12 | Name: c-ares 13 | URL: http://daniel.haxx.se/projects/c-ares/ 14 | Description: asynchronous DNS lookup library 15 | Version: @VERSION@ 16 | Requires: 17 | Requires.private: 18 | Cflags: -I${includedir} @CPPFLAG_CARES_STATICLIB@ 19 | Libs: -L${libdir} -lcares 20 | Libs.private: @CARES_PRIVATE_LIBS@ 21 | -------------------------------------------------------------------------------- /c-ares/m4/.gitignore: -------------------------------------------------------------------------------- 1 | libtool.m4 2 | libtool.m4.tmp 3 | ltoptions.m4 4 | ltsugar.m4 5 | ltversion.m4 6 | lt~obsolete.m4 7 | -------------------------------------------------------------------------------- /c-ares/m4/ax_check_user_namespace.m4: -------------------------------------------------------------------------------- 1 | # -*- Autoconf -*- 2 | 3 | # SYNOPSIS 4 | # 5 | # AX_CHECK_USER_NAMESPACE 6 | # 7 | # DESCRIPTION 8 | # 9 | # This macro checks whether the local system supports Linux user namespaces. 10 | # If so, it calls AC_DEFINE(HAVE_USER_NAMESPACE). 11 | 12 | AC_DEFUN([AX_CHECK_USER_NAMESPACE],[dnl 13 | AC_CACHE_CHECK([whether user namespaces are supported], 14 | ax_cv_user_namespace,[ 15 | AC_LANG_PUSH([C]) 16 | AC_RUN_IFELSE([AC_LANG_SOURCE([[ 17 | #define _GNU_SOURCE 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | 26 | int userfn(void *d) { 27 | usleep(100000); /* synchronize by sleep */ 28 | return (getuid() != 0); 29 | } 30 | char userst[1024*1024]; 31 | int main() { 32 | char buffer[1024]; 33 | int rc, status, fd; 34 | pid_t child = clone(userfn, userst + 1024*1024, CLONE_NEWUSER|SIGCHLD, 0); 35 | if (child < 0) return 1; 36 | 37 | sprintf(buffer, "/proc/%d/uid_map", child); 38 | fd = open(buffer, O_CREAT|O_WRONLY|O_TRUNC, 0755); 39 | sprintf(buffer, "0 %d 1\n", getuid()); 40 | write(fd, buffer, strlen(buffer)); 41 | close(fd); 42 | 43 | rc = waitpid(child, &status, 0); 44 | if (rc <= 0) return 1; 45 | if (!WIFEXITED(status)) return 1; 46 | return WEXITSTATUS(status); 47 | } 48 | ]])],[ax_cv_user_namespace=yes],[ax_cv_user_namespace=no],[ax_cv_user_namespace=no]) 49 | AC_LANG_POP([C]) 50 | ]) 51 | if test "$ax_cv_user_namespace" = yes; then 52 | AC_DEFINE([HAVE_USER_NAMESPACE],[1],[Whether user namespaces are available]) 53 | fi 54 | ]) # AX_CHECK_USER_NAMESPACE 55 | -------------------------------------------------------------------------------- /c-ares/test/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | libgtest.a 3 | libgmock.a 4 | arestest 5 | aresfuzz 6 | arestest.log 7 | arestest.trs 8 | fuzzcheck.sh.log 9 | fuzzcheck.sh.trs 10 | test-suite.log 11 | fuzzoutput 12 | config.h.in 13 | config.h 14 | dnsdump -------------------------------------------------------------------------------- /c-ares/test/Makefile.am: -------------------------------------------------------------------------------- 1 | # Where to find the c-ares source code; needed because the tests use library-internal headers 2 | ARES_SRC_DIR = .. 3 | # Where to find the built c-ares static library 4 | ARES_BLD_DIR = .. 5 | AUTOMAKE_OPTIONS = foreign 6 | ACLOCAL_AMFLAGS = -I ../m4 7 | GMOCK_DIR = gmock-1.7.0 8 | GTEST_DIR = $(GMOCK_DIR)/gtest 9 | # Note use of -isystem to force use of local gMock/gTest even if there's an installed version. 10 | CPPFLAGS += -I$(ARES_SRC_DIR) -isystem $(GTEST_DIR)/include -isystem $(GMOCK_DIR)/include 11 | CXXFLAGS += -Wall $(PTHREAD_CFLAGS) 12 | 13 | # Makefile.inc provides the TESTSOURCES, TESTHEADERS and FUZZSOURCES defines 14 | include Makefile.inc 15 | 16 | TESTS = arestest fuzzcheck.sh 17 | 18 | noinst_PROGRAMS = arestest aresfuzz dnsdump 19 | arestest_SOURCES = $(TESTSOURCES) $(TESTHEADERS) 20 | arestest_LDADD = libgmock.la libgtest.la $(ARES_BLD_DIR)/libcares.la $(PTHREAD_LIBS) 21 | 22 | # Not interested in coverage of test code, but linking the test binary needs the coverage option 23 | @CODE_COVERAGE_RULES@ 24 | arestest_LDFLAGS = $(CODE_COVERAGE_LDFLAGS) 25 | 26 | noinst_LTLIBRARIES = libgmock.la libgtest.la 27 | 28 | libgmock_la_SOURCES = $(GMOCK_DIR)/src/gmock-all.cc 29 | libgmock_la_CPPFLAGS = -isystem $(GTEST_DIR)/include -I$(GTEST_DIR) -isystem $(GMOCK_DIR)/include -I$(GMOCK_DIR) 30 | libgtest_la_SOURCES = $(GTEST_DIR)/src/gtest-all.cc 31 | libgtest_la_CPPFLAGS = -isystem $(GTEST_DIR)/include -I$(GTEST_DIR) -isystem $(GMOCK_DIR)/include -I$(GMOCK_DIR) 32 | 33 | aresfuzz_SOURCES = $(FUZZSOURCES) 34 | aresfuzz_LDADD = $(ARES_BLD_DIR)/libcares.la 35 | 36 | dnsdump_SOURCES = $(DUMPSOURCES) 37 | dnsdump_LDADD = $(ARES_BLD_DIR)/libcares.la 38 | 39 | test: check 40 | -------------------------------------------------------------------------------- /c-ares/test/Makefile.inc: -------------------------------------------------------------------------------- 1 | TESTSOURCES = ares-test-main.cc \ 2 | ares-test-init.cc \ 3 | ares-test.cc \ 4 | ares-test-ns.cc \ 5 | ares-test-parse.cc \ 6 | ares-test-parse-a.cc \ 7 | ares-test-parse-aaaa.cc \ 8 | ares-test-parse-mx.cc \ 9 | ares-test-parse-naptr.cc \ 10 | ares-test-parse-ns.cc \ 11 | ares-test-parse-ptr.cc \ 12 | ares-test-parse-soa.cc \ 13 | ares-test-parse-srv.cc \ 14 | ares-test-parse-txt.cc \ 15 | ares-test-misc.cc \ 16 | ares-test-live.cc \ 17 | ares-test-mock.cc \ 18 | ares-test-internal.cc \ 19 | dns-proto.cc \ 20 | dns-proto-test.cc 21 | 22 | TESTHEADERS = ares-test.h \ 23 | dns-proto.h 24 | 25 | FUZZSOURCES = ares-test-fuzz.c \ 26 | ares-fuzz.c 27 | 28 | DUMPSOURCES = dns-proto.cc \ 29 | dns-dump.cc 30 | -------------------------------------------------------------------------------- /c-ares/test/Makefile.m32: -------------------------------------------------------------------------------- 1 | ############################################################# 2 | # 3 | ## Makefile for building arestest.exe with MingW32 (GCC-3.2) 4 | ## Use: make -f Makefile.m32 5 | # 6 | ######################################################## 7 | CXX = g++ 8 | LD = g++ 9 | 10 | # Where to find the c-ares source code; needed because the tests use library-internal headers 11 | ARES_SRC_DIR = .. 12 | # Where to find the built c-ares static library 13 | ARES_BLD_DIR = .. 14 | ARESLIB = $(ARES_BLD_DIR)/libcares.a 15 | GMOCK_DIR = gmock-1.7.0 16 | GTEST_DIR = $(GMOCK_DIR)/gtest 17 | CPPFLAGS = -I$(ARES_SRC_DIR) -I$(GTEST_DIR)/include -I$(GMOCK_DIR)/include -DCARES_STATICLIB 18 | CXXFLAGS = -Wall $(PTHREAD_CFLAGS) -std=gnu++11 19 | LDFLAGS = 20 | LDLIBS = -lwsock32 21 | 22 | # Makefile.inc provides the TESTSOURCES and TESTHEADERS defines 23 | include Makefile.inc 24 | 25 | OBJS := $(patsubst %.cc,%.o,$(strip $(TESTSOURCES))) 26 | 27 | all: arestest.exe 28 | 29 | arestest.exe: $(OBJS) gmock-all.o gtest-all.o 30 | $(LD) $(LDFLAGS) -o $@ $^ -L$(ARES_BLD_DIR) -lcares $(LDLIBS) 31 | 32 | $(OBJS): $(TESTHEADERS) 33 | 34 | .cc.o: 35 | $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $< 36 | gmock-all.o: $(GMOCK_DIR)/src/gmock-all.cc 37 | $(CXX) -I$(GTEST_DIR) -I$(GMOCK_DIR) $(CPPFLAGS) $(CXXFLAGS) -c $< 38 | gtest-all.o: $(GTEST_DIR)/src/gtest-all.cc 39 | $(CXX) -I$(GTEST_DIR) -I$(GMOCK_DIR) $(CPPFLAGS) $(CXXFLAGS) -c $< 40 | 41 | test: arestest.exe 42 | ./arestest.exe 43 | vtest: arestest.exe 44 | ./arestest.exe -v 45 | 46 | clean: 47 | $(RM) $(OBJS) gmock-all.o gtest-all.o arestest.exe 48 | 49 | -------------------------------------------------------------------------------- /c-ares/test/ares-fuzz.c: -------------------------------------------------------------------------------- 1 | /* 2 | * General driver to allow command-line fuzzer (i.e. afl) to 3 | * exercise the libFuzzer entrypoint. 4 | */ 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | #define kMaxAflInputSize (1 << 20) 14 | static unsigned char afl_buffer[kMaxAflInputSize]; 15 | 16 | #ifdef __AFL_LOOP 17 | /* If we are built with afl-clang-fast, use persistent mode */ 18 | #define KEEP_FUZZING(count) __AFL_LOOP(1000) 19 | #else 20 | /* If we are built with afl-clang, execute each input once */ 21 | #define KEEP_FUZZING(count) ((count) < 1) 22 | #endif 23 | 24 | /* In ares-test-fuzz.c: */ 25 | int LLVMFuzzerTestOneInput(const unsigned char *data, unsigned long size); 26 | 27 | static void ProcessFile(int fd) { 28 | ssize_t count = read(fd, afl_buffer, kMaxAflInputSize); 29 | /* 30 | * Make a copy of the data so that it's not part of a larger 31 | * buffer (where buffer overflows would go unnoticed). 32 | */ 33 | unsigned char *copied_data = (unsigned char *)malloc(count); 34 | LLVMFuzzerTestOneInput(copied_data, count); 35 | free(copied_data); 36 | } 37 | 38 | int main(int argc, char *argv[]) { 39 | if (argc == 1) { 40 | int count = 0; 41 | while (KEEP_FUZZING(count)) { 42 | ProcessFile(fileno(stdin)); 43 | count++; 44 | } 45 | } else { 46 | int ii; 47 | for (ii = 1; ii < argc; ++ii) { 48 | int fd = open(argv[ii], O_RDONLY); 49 | if (fd < 0) { 50 | fprintf(stderr, "Failed to open '%s'\n", argv[ii]); 51 | continue; 52 | } 53 | ProcessFile(fd); 54 | close(fd); 55 | } 56 | } 57 | return 0; 58 | } 59 | -------------------------------------------------------------------------------- /c-ares/test/ares-test-fuzz.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "ares.h" 4 | 5 | // Entrypoint for Clang's libfuzzer 6 | int LLVMFuzzerTestOneInput(const unsigned char *data, 7 | unsigned long size) { 8 | // Feed the data into each of the ares_parse_*_reply functions. 9 | struct hostent *host = NULL; 10 | struct ares_addrttl info[5]; 11 | int count = 5; 12 | ares_parse_a_reply(data, size, &host, info, &count); 13 | if (host) ares_free_hostent(host); 14 | 15 | host = NULL; 16 | struct ares_addr6ttl info6[5]; 17 | count = 5; 18 | ares_parse_aaaa_reply(data, size, &host, info6, &count); 19 | if (host) ares_free_hostent(host); 20 | 21 | host = NULL; 22 | unsigned char addrv4[4] = {0x10, 0x20, 0x30, 0x40}; 23 | ares_parse_ptr_reply(data, size, addrv4, sizeof(addrv4), AF_INET, &host); 24 | if (host) ares_free_hostent(host); 25 | 26 | host = NULL; 27 | ares_parse_ns_reply(data, size, &host); 28 | if (host) ares_free_hostent(host); 29 | 30 | struct ares_srv_reply* srv = NULL; 31 | ares_parse_srv_reply(data, size, &srv); 32 | if (srv) ares_free_data(srv); 33 | 34 | struct ares_mx_reply* mx = NULL; 35 | ares_parse_mx_reply(data, size, &mx); 36 | if (mx) ares_free_data(mx); 37 | 38 | struct ares_txt_reply* txt = NULL; 39 | ares_parse_txt_reply(data, size, &txt); 40 | if (txt) ares_free_data(txt); 41 | 42 | struct ares_soa_reply* soa = NULL; 43 | ares_parse_soa_reply(data, size, &soa); 44 | if (soa) ares_free_data(soa); 45 | return 0; 46 | } 47 | -------------------------------------------------------------------------------- /c-ares/test/ares-test-main.cc: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include "ares-test.h" 5 | 6 | int main(int argc, char* argv[]) { 7 | std::vector gtest_argv = {argv[0]}; 8 | for (int ii = 1; ii < argc; ii++) { 9 | if (strcmp(argv[ii], "-v") == 0) { 10 | ares::test::verbose = true; 11 | } else if ((strcmp(argv[ii], "-p") == 0) && (ii + 1 < argc)) { 12 | ii++; 13 | ares::test::mock_port = atoi(argv[ii]); 14 | } else { 15 | gtest_argv.push_back(argv[ii]); 16 | } 17 | } 18 | int gtest_argc = gtest_argv.size(); 19 | gtest_argv.push_back(nullptr); 20 | ::testing::InitGoogleTest(>est_argc, gtest_argv.data()); 21 | 22 | #ifdef WIN32 23 | WORD wVersionRequested = MAKEWORD(2, 2); 24 | WSADATA wsaData; 25 | WSAStartup(wVersionRequested, &wsaData); 26 | #else 27 | signal(SIGPIPE, SIG_IGN); 28 | #endif 29 | 30 | int rc = RUN_ALL_TESTS(); 31 | 32 | #ifdef WIN32 33 | WSACleanup(); 34 | #endif 35 | 36 | return rc; 37 | } 38 | -------------------------------------------------------------------------------- /c-ares/test/buildconf: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | autoreconf -iv -------------------------------------------------------------------------------- /c-ares/test/configure.ac: -------------------------------------------------------------------------------- 1 | AC_PREREQ(2.57) 2 | AC_INIT([c-ares-test],[-],[-]) 3 | AC_CONFIG_SRCDIR([ares-test.cc]) 4 | AC_CONFIG_MACRO_DIR([../m4]) 5 | 6 | AM_INIT_AUTOMAKE([no-define]) 7 | m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) 8 | 9 | dnl Checks for programs. 10 | AC_PROG_CXX 11 | AX_CXX_COMPILE_STDCXX_11([noext],[mandatory]) 12 | LT_INIT 13 | AC_SUBST(LIBTOOL_DEPS) 14 | AX_PTHREAD 15 | AX_CODE_COVERAGE 16 | AX_CHECK_USER_NAMESPACE 17 | AX_CHECK_UTS_NAMESPACE 18 | 19 | AC_CHECK_HEADERS(netdb.h netinet/tcp.h) 20 | AC_CONFIG_HEADERS([config.h]) 21 | AC_CONFIG_FILES([Makefile]) 22 | AC_OUTPUT 23 | -------------------------------------------------------------------------------- /c-ares/test/dns-dump.cc: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include 6 | #include 7 | 8 | #include "dns-proto.h" 9 | 10 | namespace ares { 11 | 12 | static void ShowFile(const char* filename) { 13 | int fd = open(filename, O_RDONLY); 14 | if (fd < 0) { 15 | std::cerr << "Failed to open '" << filename << "'" << std::endl; 16 | return; 17 | } 18 | std::vector contents; 19 | while (true) { 20 | unsigned char buffer[1024]; 21 | int len = read(fd, buffer, sizeof(buffer)); 22 | if (len <= 0) break; 23 | contents.insert(contents.end(), buffer, buffer + len); 24 | } 25 | std::cout << PacketToString(contents) << std::endl; 26 | } 27 | 28 | } // namespace ares 29 | 30 | int main(int argc, char* argv[]) { 31 | for (int ii = 1; ii < argc; ++ii) { 32 | ares::ShowFile(argv[ii]); 33 | } 34 | } 35 | 36 | -------------------------------------------------------------------------------- /c-ares/test/fuzzcheck.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Check that all of the base fuzzing corpus parse without errors 3 | ./aresfuzz fuzzinput/* 4 | -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/004a216d3cff18b0c5c6b68b807f1529: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/004a216d3cff18b0c5c6b68b807f1529 -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/00539467ca159b36aea95e61f9729115: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/00539467ca159b36aea95e61f9729115 -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/00e846db8f43f2f507cd1666ed5a753e: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/00e846db8f43f2f507cd1666ed5a753e -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/0177b7566f08c013699eaea9a77abeb3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/0177b7566f08c013699eaea9a77abeb3 -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/020a4fa317715bfdb236ed13751e6b65: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/020a4fa317715bfdb236ed13751e6b65 -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/0310f2e81bea31f4fe3f330872a877dd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/0310f2e81bea31f4fe3f330872a877dd -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/0449be67df1730b2d0887d412a9b7cc4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/0449be67df1730b2d0887d412a9b7cc4 -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/0449dd14f7aa94bf0d716bfe09b287a8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/0449dd14f7aa94bf0d716bfe09b287a8 -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/04c93cdf7208979aa4df80a3a0d5a2d8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/04c93cdf7208979aa4df80a3a0d5a2d8 -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/0567e7171e08e75f3f91c4ca74c17adc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/0567e7171e08e75f3f91c4ca74c17adc -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/05ba948578a397e9cbc6a7b3e78622fa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/05ba948578a397e9cbc6a7b3e78622fa -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/060afe5ed25f3e2e86167e545f27edca: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/060afe5ed25f3e2e86167e545f27edca -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/06d47d3681493f1b1d41236f460d896f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/06d47d3681493f1b1d41236f460d896f -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/0724a810b0e131c2fddb6de9003b9064: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/0724a810b0e131c2fddb6de9003b9064 -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/0b5279148826f5b962bcf1896bdb4ede: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/0b5279148826f5b962bcf1896bdb4ede -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/114048c0f6b10bdc67ce9166405d195e: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/114048c0f6b10bdc67ce9166405d195e -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/11b8464a0ef8735d202955c34c36b0c7: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/11b8464a0ef8735d202955c34c36b0c7 -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/11cb626f1668c7b41954ce7d768fe528: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/11cb626f1668c7b41954ce7d768fe528 -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/14b133bf18125b75a1976fa63a1df6b7: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/14b133bf18125b75a1976fa63a1df6b7 -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/153c6b3afa8faa03c8bc28f936a6d4cf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/153c6b3afa8faa03c8bc28f936a6d4cf -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/182cad2a342ed7317b7c21a5d17020d1: -------------------------------------------------------------------------------- 1 | (܄wwwfirstcomwwwfirstcom -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/1c61a61bb7057b52c5b15188345a5238: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/1c61a61bb7057b52c5b15188345a5238 -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/1dbe2cf62ed2e4fa1c3cb473f08710b5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/1dbe2cf62ed2e4fa1c3cb473f08710b5 -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/21199be504fcfece5c7096ee0dbba507: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/21199be504fcfece5c7096ee0dbba507 -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/21891480074b5635dbbe7137bdcabccd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/21891480074b5635dbbe7137bdcabccd -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/233aea42e15aa73e131eefabf16088c9: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/233aea42e15aa73e131eefabf16088c9 -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/24660d4e7ac7aa21d600ea7a3d198bbb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/24660d4e7ac7aa21d600ea7a3d198bbb -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/25589deb55c08429345f289d1c9b0254: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/25589deb55c08429345f289d1c9b0254 -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/2573bd823e4da11f727a17f8e1f35c26: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/2573bd823e4da11f727a17f8e1f35c26 -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/276f12da56866273e76059ad0e7be97e: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/276f12da56866273e76059ad0e7be97e -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/29198a2e380cb19babec9e02116d213e: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/29198a2e380cb19babec9e02116d213e -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/2c94ba9434b1a1b9396fc5364f101363: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/2c94ba9434b1a1b9396fc5364f101363 -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/2d578c357dc2f5e02dc55cddb30641d1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/2d578c357dc2f5e02dc55cddb30641d1 -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/2dff6cc5a223e67fde9e5e79af456992: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/2dff6cc5a223e67fde9e5e79af456992 -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/2f103b1f9477f2d8934bd84328d51c75: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/2f103b1f9477f2d8934bd84328d51c75 -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/31cd3a8413de13d9624adbb1613784bf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/31cd3a8413de13d9624adbb1613784bf -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/36415bdf1d180098fe6234b4186e69f3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/36415bdf1d180098fe6234b4186e69f3 -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/3a04a80f0242e8dff0cd732e7c4767da: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/3a04a80f0242e8dff0cd732e7c4767da -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/44d0f973b7b0fb3e4a07770c943dcd5a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/44d0f973b7b0fb3e4a07770c943dcd5a -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/50bc00daa0ddcd6cfb2b5d9f62c81f47: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/50bc00daa0ddcd6cfb2b5d9f62c81f47 -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/51ed2d1fb77b3078b54e94e85606b7df: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/51ed2d1fb77b3078b54e94e85606b7df -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/5c5e0e899cf2e7d053a9e45fb76f6e5a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/5c5e0e899cf2e7d053a9e45fb76f6e5a -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/70152ed033f139443fbfb1b858bb3b1b: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/70152ed033f139443fbfb1b858bb3b1b -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/7030ca2b24e5a7f9dd8f62096a48eb33: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/7030ca2b24e5a7f9dd8f62096a48eb33 -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/71eec1a0ef2d25bb9e2ef17f23be7e9e: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/71eec1a0ef2d25bb9e2ef17f23be7e9e -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/7a6b0177210ea4ef40b254daf99393c5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/7a6b0177210ea4ef40b254daf99393c5 -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/7f1567733711ffb61839621af0cbfa33: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/7f1567733711ffb61839621af0cbfa33 -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/850c6d57c5bb7be8205fc2438d14d7e5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/850c6d57c5bb7be8205fc2438d14d7e5 -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/a5c8cd2784a5792b9e91c2d7895b3b34: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/a5c8cd2784a5792b9e91c2d7895b3b34 -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/a9135cdc7151d023300ff194bad90af9: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/a9135cdc7151d023300ff194bad90af9 -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/af2597e8ac7dec1e8b4a47518312912a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/af2597e8ac7dec1e8b4a47518312912a -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/answer_a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/answer_a -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/answer_aaaa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/answer_aaaa -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/b3f53ef826b831bb09dd25c7f5960249: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/b3f53ef826b831bb09dd25c7f5960249 -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/cda0f8751f5c4993974c2b549d29bcc8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/cda0f8751f5c4993974c2b549d29bcc8 -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/ce6c26c0e469339873d0e7f616ab0945: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/ce6c26c0e469339873d0e7f616ab0945 -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/e4dd7e7c2dd4ed7c2e17a6af5d04f9c9: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/e4dd7e7c2dd4ed7c2e17a6af5d04f9c9 -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/ed50ed8ee36230a5a69746ad830437e5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/ed50ed8ee36230a5a69746ad830437e5 -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/f1b900d50806021953321c3b604ee497: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/f1b900d50806021953321c3b604ee497 -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/f89f6c8176b564a7dd646f14305573ce: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/f89f6c8176b564a7dd646f14305573ce -------------------------------------------------------------------------------- /c-ares/test/fuzzinput/f9ad508d2dbd08d3aaaabc7d1174677d: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/fuzzinput/f9ad508d2dbd08d3aaaabc7d1174677d -------------------------------------------------------------------------------- /c-ares/test/gmock-1.7.0/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This file contains a list of people who've made non-trivial 2 | # contribution to the Google C++ Mocking Framework project. People 3 | # who commit code to the project are encouraged to add their names 4 | # here. Please keep the list sorted by first names. 5 | 6 | Benoit Sigoure 7 | Bogdan Piloca 8 | Chandler Carruth 9 | Dave MacLachlan 10 | David Anderson 11 | Dean Sturtevant 12 | Gene Volovich 13 | Hal Burch 14 | Jeffrey Yasskin 15 | Jim Keller 16 | Joe Walnes 17 | Jon Wray 18 | Keir Mierle 19 | Keith Ray 20 | Kostya Serebryany 21 | Lev Makhlis 22 | Manuel Klimek 23 | Mario Tanev 24 | Mark Paskin 25 | Markus Heule 26 | Matthew Simmons 27 | Mike Bland 28 | Neal Norwitz 29 | Nermin Ozkiranartli 30 | Owen Carlsen 31 | Paneendra Ba 32 | Paul Menage 33 | Piotr Kaminski 34 | Russ Rufer 35 | Sverre Sundsdal 36 | Takeshi Yoshino 37 | Vadim Berman 38 | Vlad Losev 39 | Wolfgang Klier 40 | Zhanyong Wan 41 | -------------------------------------------------------------------------------- /c-ares/test/gmock-1.7.0/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2008, Google Inc. 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are 6 | met: 7 | 8 | * Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | * Redistributions in binary form must reproduce the above 11 | copyright notice, this list of conditions and the following disclaimer 12 | in the documentation and/or other materials provided with the 13 | distribution. 14 | * Neither the name of Google Inc. nor the names of its 15 | contributors may be used to endorse or promote products derived from 16 | this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /c-ares/test/gmock-1.7.0/gtest/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This file contains a list of people who've made non-trivial 2 | # contribution to the Google C++ Testing Framework project. People 3 | # who commit code to the project are encouraged to add their names 4 | # here. Please keep the list sorted by first names. 5 | 6 | Ajay Joshi 7 | Balázs Dán 8 | Bharat Mediratta 9 | Chandler Carruth 10 | Chris Prince 11 | Chris Taylor 12 | Dan Egnor 13 | Eric Roman 14 | Hady Zalek 15 | Jeffrey Yasskin 16 | Jói Sigurðsson 17 | Keir Mierle 18 | Keith Ray 19 | Kenton Varda 20 | Manuel Klimek 21 | Markus Heule 22 | Mika Raento 23 | Miklós Fazekas 24 | Pasi Valminen 25 | Patrick Hanna 26 | Patrick Riley 27 | Peter Kaminski 28 | Preston Jackson 29 | Rainer Klaffenboeck 30 | Russ Cox 31 | Russ Rufer 32 | Sean Mcafee 33 | Sigurður Ásgeirsson 34 | Tracy Bialik 35 | Vadim Berman 36 | Vlad Losev 37 | Zhanyong Wan 38 | -------------------------------------------------------------------------------- /c-ares/test/gmock-1.7.0/gtest/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2008, Google Inc. 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are 6 | met: 7 | 8 | * Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | * Redistributions in binary form must reproduce the above 11 | copyright notice, this list of conditions and the following disclaimer 12 | in the documentation and/or other materials provided with the 13 | distribution. 14 | * Neither the name of Google Inc. nor the names of its 15 | contributors may be used to endorse or promote products derived from 16 | this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /c-ares/test/gmock-1.7.0/gtest/codegear/gtest.groupproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | {c1d923e0-6cba-4332-9b6f-3420acbf5091} 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | Default.Personality 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /c-ares/test/gmock-1.7.0/gtest/codegear/gtest_all.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2009, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // Author: Josh Kelley (joshkel@gmail.com) 31 | // 32 | // Google C++ Testing Framework (Google Test) 33 | // 34 | // C++Builder's IDE cannot build a static library from files with hyphens 35 | // in their name. See http://qc.codegear.com/wc/qcmain.aspx?d=70977 . 36 | // This file serves as a workaround. 37 | 38 | #include "src/gtest-all.cc" 39 | -------------------------------------------------------------------------------- /c-ares/test/gmock-1.7.0/gtest/codegear/gtest_link.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2009, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // Author: Josh Kelley (joshkel@gmail.com) 31 | // 32 | // Google C++ Testing Framework (Google Test) 33 | // 34 | // Links gtest.lib and gtest_main.lib into the current project in C++Builder. 35 | // This means that these libraries can't be renamed, but it's the only way to 36 | // ensure that Debug versus Release test builds are linked against the 37 | // appropriate Debug or Release build of the libraries. 38 | 39 | #pragma link "gtest.lib" 40 | #pragma link "gtest_main.lib" 41 | -------------------------------------------------------------------------------- /c-ares/test/gmock-1.7.0/gtest/fused-src/gtest/gtest_main.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2006, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | #include 31 | 32 | #include "gtest/gtest.h" 33 | 34 | GTEST_API_ int main(int argc, char **argv) { 35 | printf("Running main() from gtest_main.cc\n"); 36 | testing::InitGoogleTest(&argc, argv); 37 | return RUN_ALL_TESTS(); 38 | } 39 | -------------------------------------------------------------------------------- /c-ares/test/gmock-1.7.0/gtest/samples/sample1.h: -------------------------------------------------------------------------------- 1 | // Copyright 2005, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // A sample program demonstrating using Google C++ testing framework. 31 | // 32 | // Author: wan@google.com (Zhanyong Wan) 33 | 34 | #ifndef GTEST_SAMPLES_SAMPLE1_H_ 35 | #define GTEST_SAMPLES_SAMPLE1_H_ 36 | 37 | // Returns n! (the factorial of n). For negative n, n! is defined to be 1. 38 | int Factorial(int n); 39 | 40 | // Returns true iff n is a prime number. 41 | bool IsPrime(int n); 42 | 43 | #endif // GTEST_SAMPLES_SAMPLE1_H_ 44 | -------------------------------------------------------------------------------- /c-ares/test/gmock-1.7.0/gtest/samples/sample4.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2005, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // A sample program demonstrating using Google C++ testing framework. 31 | // 32 | // Author: wan@google.com (Zhanyong Wan) 33 | 34 | #include 35 | 36 | #include "sample4.h" 37 | 38 | // Returns the current counter value, and increments it. 39 | int Counter::Increment() { 40 | return counter_++; 41 | } 42 | 43 | // Prints the current counter value to STDOUT. 44 | void Counter::Print() const { 45 | printf("%d", counter_); 46 | } 47 | -------------------------------------------------------------------------------- /c-ares/test/gmock-1.7.0/gtest/samples/sample4.h: -------------------------------------------------------------------------------- 1 | // Copyright 2005, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // A sample program demonstrating using Google C++ testing framework. 31 | // 32 | // Author: wan@google.com (Zhanyong Wan) 33 | 34 | #ifndef GTEST_SAMPLES_SAMPLE4_H_ 35 | #define GTEST_SAMPLES_SAMPLE4_H_ 36 | 37 | // A simple monotonic counter. 38 | class Counter { 39 | private: 40 | int counter_; 41 | 42 | public: 43 | // Creates a counter that starts at 0. 44 | Counter() : counter_(0) {} 45 | 46 | // Returns the current counter value, and increments it. 47 | int Increment(); 48 | 49 | // Prints the current counter value to STDOUT. 50 | void Print() const; 51 | }; 52 | 53 | #endif // GTEST_SAMPLES_SAMPLE4_H_ 54 | -------------------------------------------------------------------------------- /c-ares/test/gmock-1.7.0/gtest/samples/sample4_unittest.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2005, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // Author: wan@google.com (Zhanyong Wan) 31 | 32 | #include "gtest/gtest.h" 33 | #include "sample4.h" 34 | 35 | // Tests the Increment() method. 36 | TEST(Counter, Increment) { 37 | Counter c; 38 | 39 | // EXPECT_EQ() evaluates its arguments exactly once, so they 40 | // can have side effects. 41 | 42 | EXPECT_EQ(0, c.Increment()); 43 | EXPECT_EQ(1, c.Increment()); 44 | EXPECT_EQ(2, c.Increment()); 45 | } 46 | -------------------------------------------------------------------------------- /c-ares/test/gmock-1.7.0/gtest/src/gtest_main.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2006, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | #include 31 | 32 | #include "gtest/gtest.h" 33 | 34 | GTEST_API_ int main(int argc, char **argv) { 35 | printf("Running main() from gtest_main.cc\n"); 36 | testing::InitGoogleTest(&argc, argv); 37 | return RUN_ALL_TESTS(); 38 | } 39 | -------------------------------------------------------------------------------- /c-ares/test/gmock-1.7.0/gtest/test/gtest-typed-test2_test.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2008 Google Inc. 2 | // All Rights Reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // Author: wan@google.com (Zhanyong Wan) 31 | 32 | #include 33 | 34 | #include "test/gtest-typed-test_test.h" 35 | #include "gtest/gtest.h" 36 | 37 | #if GTEST_HAS_TYPED_TEST_P 38 | 39 | // Tests that the same type-parameterized test case can be 40 | // instantiated in different translation units linked together. 41 | // (ContainerTest is also instantiated in gtest-typed-test_test.cc.) 42 | INSTANTIATE_TYPED_TEST_CASE_P(Vector, ContainerTest, 43 | testing::Types >); 44 | 45 | #endif // GTEST_HAS_TYPED_TEST_P 46 | -------------------------------------------------------------------------------- /c-ares/test/gmock-1.7.0/gtest/test/gtest_main_unittest.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2006, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // Author: wan@google.com (Zhanyong Wan) 31 | 32 | #include "gtest/gtest.h" 33 | 34 | // Tests that we don't have to define main() when we link to 35 | // gtest_main instead of gtest. 36 | 37 | namespace { 38 | 39 | TEST(GTestMainTest, ShouldSucceed) { 40 | } 41 | 42 | } // namespace 43 | 44 | // We are using the main() function defined in src/gtest_main.cc, so 45 | // we don't define it here. 46 | -------------------------------------------------------------------------------- /c-ares/test/gmock-1.7.0/gtest/test/gtest_uninitialized_test_.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2008, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // Author: wan@google.com (Zhanyong Wan) 31 | 32 | #include "gtest/gtest.h" 33 | 34 | TEST(DummyTest, Dummy) { 35 | // This test doesn't verify anything. We just need it to create a 36 | // realistic stage for testing the behavior of Google Test when 37 | // RUN_ALL_TESTS() is called without testing::InitGoogleTest() being 38 | // called first. 39 | } 40 | 41 | int main() { 42 | return RUN_ALL_TESTS(); 43 | } 44 | -------------------------------------------------------------------------------- /c-ares/test/gmock-1.7.0/gtest/test/gtest_xml_outfile1_test_.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2008, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // Author: keith.ray@gmail.com (Keith Ray) 31 | // 32 | // gtest_xml_outfile1_test_ writes some xml via TestProperty used by 33 | // gtest_xml_outfiles_test.py 34 | 35 | #include "gtest/gtest.h" 36 | 37 | class PropertyOne : public testing::Test { 38 | protected: 39 | virtual void SetUp() { 40 | RecordProperty("SetUpProp", 1); 41 | } 42 | virtual void TearDown() { 43 | RecordProperty("TearDownProp", 1); 44 | } 45 | }; 46 | 47 | TEST_F(PropertyOne, TestSomeProperties) { 48 | RecordProperty("TestSomeProperty", 1); 49 | } 50 | -------------------------------------------------------------------------------- /c-ares/test/gmock-1.7.0/gtest/test/gtest_xml_outfile2_test_.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2008, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // Author: keith.ray@gmail.com (Keith Ray) 31 | // 32 | // gtest_xml_outfile2_test_ writes some xml via TestProperty used by 33 | // gtest_xml_outfiles_test.py 34 | 35 | #include "gtest/gtest.h" 36 | 37 | class PropertyTwo : public testing::Test { 38 | protected: 39 | virtual void SetUp() { 40 | RecordProperty("SetUpProp", 2); 41 | } 42 | virtual void TearDown() { 43 | RecordProperty("TearDownProp", 2); 44 | } 45 | }; 46 | 47 | TEST_F(PropertyTwo, TestSomeProperties) { 48 | RecordProperty("TestSomeProperty", 2); 49 | } 50 | -------------------------------------------------------------------------------- /c-ares/test/gmock-1.7.0/gtest/test/production.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2006, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // Author: wan@google.com (Zhanyong Wan) 31 | // 32 | // This is part of the unit test for include/gtest/gtest_prod.h. 33 | 34 | #include "production.h" 35 | 36 | PrivateCode::PrivateCode() : x_(0) {} 37 | -------------------------------------------------------------------------------- /c-ares/test/gmock-1.7.0/gtest/xcode/Config/DebugProject.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // DebugProject.xcconfig 3 | // 4 | // These are Debug Configuration project settings for the gtest framework and 5 | // examples. It is set in the "Based On:" dropdown in the "Project" info 6 | // dialog. 7 | // This file is based on the Xcode Configuration files in: 8 | // http://code.google.com/p/google-toolbox-for-mac/ 9 | // 10 | 11 | #include "General.xcconfig" 12 | 13 | // No optimization 14 | GCC_OPTIMIZATION_LEVEL = 0 15 | 16 | // Deployment postprocessing is what triggers Xcode to strip, turn it off 17 | DEPLOYMENT_POSTPROCESSING = NO 18 | 19 | // Dead code stripping off 20 | DEAD_CODE_STRIPPING = NO 21 | 22 | // Debug symbols should be on obviously 23 | GCC_GENERATE_DEBUGGING_SYMBOLS = YES 24 | 25 | // Define the DEBUG macro in all debug builds 26 | OTHER_CFLAGS = $(OTHER_CFLAGS) -DDEBUG=1 27 | 28 | // These are turned off to avoid STL incompatibilities with client code 29 | // // Turns on special C++ STL checks to "encourage" good STL use 30 | // GCC_PREPROCESSOR_DEFINITIONS = $(GCC_PREPROCESSOR_DEFINITIONS) _GLIBCXX_DEBUG_PEDANTIC _GLIBCXX_DEBUG _GLIBCPP_CONCEPT_CHECKS 31 | -------------------------------------------------------------------------------- /c-ares/test/gmock-1.7.0/gtest/xcode/Config/FrameworkTarget.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // FrameworkTarget.xcconfig 3 | // 4 | // These are Framework target settings for the gtest framework and examples. It 5 | // is set in the "Based On:" dropdown in the "Target" info dialog. 6 | // This file is based on the Xcode Configuration files in: 7 | // http://code.google.com/p/google-toolbox-for-mac/ 8 | // 9 | 10 | // Dynamic libs need to be position independent 11 | GCC_DYNAMIC_NO_PIC = NO 12 | 13 | // Dynamic libs should not have their external symbols stripped. 14 | STRIP_STYLE = non-global 15 | 16 | // Let the user install by specifying the $DSTROOT with xcodebuild 17 | SKIP_INSTALL = NO 18 | -------------------------------------------------------------------------------- /c-ares/test/gmock-1.7.0/gtest/xcode/Config/General.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // General.xcconfig 3 | // 4 | // These are General configuration settings for the gtest framework and 5 | // examples. 6 | // This file is based on the Xcode Configuration files in: 7 | // http://code.google.com/p/google-toolbox-for-mac/ 8 | // 9 | 10 | // Build for PPC and Intel, 32- and 64-bit 11 | ARCHS = i386 x86_64 ppc ppc64 12 | 13 | // Zerolink prevents link warnings so turn it off 14 | ZERO_LINK = NO 15 | 16 | // Prebinding considered unhelpful in 10.3 and later 17 | PREBINDING = NO 18 | 19 | // Strictest warning policy 20 | WARNING_CFLAGS = -Wall -Werror -Wendif-labels -Wnewline-eof -Wno-sign-compare -Wshadow 21 | 22 | // Work around Xcode bugs by using external strip. See: 23 | // http://lists.apple.com/archives/Xcode-users/2006/Feb/msg00050.html 24 | SEPARATE_STRIP = YES 25 | 26 | // Force C99 dialect 27 | GCC_C_LANGUAGE_STANDARD = c99 28 | 29 | // not sure why apple defaults this on, but it's pretty risky 30 | ALWAYS_SEARCH_USER_PATHS = NO 31 | 32 | // Turn on position dependent code for most cases (overridden where appropriate) 33 | GCC_DYNAMIC_NO_PIC = YES 34 | 35 | // Default SDK and minimum OS version is 10.4 36 | SDKROOT = $(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk 37 | MACOSX_DEPLOYMENT_TARGET = 10.4 38 | GCC_VERSION = 4.0 39 | 40 | // VERSIONING BUILD SETTINGS (used in Info.plist) 41 | GTEST_VERSIONINFO_ABOUT = © 2008 Google Inc. 42 | -------------------------------------------------------------------------------- /c-ares/test/gmock-1.7.0/gtest/xcode/Config/ReleaseProject.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // ReleaseProject.xcconfig 3 | // 4 | // These are Release Configuration project settings for the gtest framework 5 | // and examples. It is set in the "Based On:" dropdown in the "Project" info 6 | // dialog. 7 | // This file is based on the Xcode Configuration files in: 8 | // http://code.google.com/p/google-toolbox-for-mac/ 9 | // 10 | 11 | #include "General.xcconfig" 12 | 13 | // subconfig/Release.xcconfig 14 | 15 | // Optimize for space and size (Apple recommendation) 16 | GCC_OPTIMIZATION_LEVEL = s 17 | 18 | // Deploment postprocessing is what triggers Xcode to strip 19 | DEPLOYMENT_POSTPROCESSING = YES 20 | 21 | // No symbols 22 | GCC_GENERATE_DEBUGGING_SYMBOLS = NO 23 | 24 | // Dead code strip does not affect ObjC code but can help for C 25 | DEAD_CODE_STRIPPING = YES 26 | 27 | // NDEBUG is used by things like assert.h, so define it for general compat. 28 | // ASSERT going away in release tends to create unused vars. 29 | OTHER_CFLAGS = $(OTHER_CFLAGS) -DNDEBUG=1 -Wno-unused-variable 30 | 31 | // When we strip we want to strip all symbols in release, but save externals. 32 | STRIP_STYLE = all 33 | -------------------------------------------------------------------------------- /c-ares/test/gmock-1.7.0/gtest/xcode/Config/StaticLibraryTarget.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // StaticLibraryTarget.xcconfig 3 | // 4 | // These are static library target settings for libgtest.a. It 5 | // is set in the "Based On:" dropdown in the "Target" info dialog. 6 | // This file is based on the Xcode Configuration files in: 7 | // http://code.google.com/p/google-toolbox-for-mac/ 8 | // 9 | 10 | // Static libs can be included in bundles so make them position independent 11 | GCC_DYNAMIC_NO_PIC = NO 12 | 13 | // Static libs should not have their internal globals or external symbols 14 | // stripped. 15 | STRIP_STYLE = debugging 16 | 17 | // Let the user install by specifying the $DSTROOT with xcodebuild 18 | SKIP_INSTALL = NO 19 | -------------------------------------------------------------------------------- /c-ares/test/gmock-1.7.0/gtest/xcode/Config/TestTarget.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // TestTarget.xcconfig 3 | // 4 | // These are Test target settings for the gtest framework and examples. It 5 | // is set in the "Based On:" dropdown in the "Target" info dialog. 6 | 7 | PRODUCT_NAME = $(TARGET_NAME) 8 | HEADER_SEARCH_PATHS = ../include 9 | -------------------------------------------------------------------------------- /c-ares/test/gmock-1.7.0/gtest/xcode/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | com.google.${PRODUCT_NAME} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | GTEST_VERSIONINFO_LONG 21 | CFBundleShortVersionString 22 | GTEST_VERSIONINFO_SHORT 23 | CFBundleGetInfoString 24 | ${PRODUCT_NAME} GTEST_VERSIONINFO_LONG, ${GTEST_VERSIONINFO_ABOUT} 25 | NSHumanReadableCopyright 26 | ${GTEST_VERSIONINFO_ABOUT} 27 | CSResourcesFileMapped 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /c-ares/test/gmock-1.7.0/gtest/xcode/Samples/FrameworkSample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | com.google.gtest.${PRODUCT_NAME:identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | FMWK 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | CSResourcesFileMapped 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /c-ares/test/gmock-1.7.0/msvc/2005/gmock.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 9.00 3 | # Visual Studio 2005 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gmock", "gmock.vcproj", "{34681F0D-CE45-415D-B5F2-5C662DFE3BD5}" 5 | EndProject 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gmock_test", "gmock_test.vcproj", "{F10D22F8-AC7B-4213-8720-608E7D878CD2}" 7 | EndProject 8 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gmock_main", "gmock_main.vcproj", "{E4EF614B-30DF-4954-8C53-580A0BF6B589}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Win32 = Debug|Win32 13 | Release|Win32 = Release|Win32 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {34681F0D-CE45-415D-B5F2-5C662DFE3BD5}.Debug|Win32.ActiveCfg = Debug|Win32 17 | {34681F0D-CE45-415D-B5F2-5C662DFE3BD5}.Debug|Win32.Build.0 = Debug|Win32 18 | {34681F0D-CE45-415D-B5F2-5C662DFE3BD5}.Release|Win32.ActiveCfg = Release|Win32 19 | {34681F0D-CE45-415D-B5F2-5C662DFE3BD5}.Release|Win32.Build.0 = Release|Win32 20 | {F10D22F8-AC7B-4213-8720-608E7D878CD2}.Debug|Win32.ActiveCfg = Debug|Win32 21 | {F10D22F8-AC7B-4213-8720-608E7D878CD2}.Debug|Win32.Build.0 = Debug|Win32 22 | {F10D22F8-AC7B-4213-8720-608E7D878CD2}.Release|Win32.ActiveCfg = Release|Win32 23 | {F10D22F8-AC7B-4213-8720-608E7D878CD2}.Release|Win32.Build.0 = Release|Win32 24 | {E4EF614B-30DF-4954-8C53-580A0BF6B589}.Debug|Win32.ActiveCfg = Debug|Win32 25 | {E4EF614B-30DF-4954-8C53-580A0BF6B589}.Debug|Win32.Build.0 = Debug|Win32 26 | {E4EF614B-30DF-4954-8C53-580A0BF6B589}.Release|Win32.ActiveCfg = Release|Win32 27 | {E4EF614B-30DF-4954-8C53-580A0BF6B589}.Release|Win32.Build.0 = Release|Win32 28 | EndGlobalSection 29 | GlobalSection(SolutionProperties) = preSolution 30 | HideSolutionNode = FALSE 31 | EndGlobalSection 32 | EndGlobal 33 | -------------------------------------------------------------------------------- /c-ares/test/gmock-1.7.0/msvc/2005/gmock_config.vsprops: -------------------------------------------------------------------------------- 1 | 2 | 7 | 11 | 15 | 16 | -------------------------------------------------------------------------------- /c-ares/test/gmock-1.7.0/msvc/2010/gmock.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 11.00 3 | # Visual C++ Express 2010 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gmock", "gmock.vcxproj", "{34681F0D-CE45-415D-B5F2-5C662DFE3BD5}" 5 | EndProject 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gmock_test", "gmock_test.vcxproj", "{F10D22F8-AC7B-4213-8720-608E7D878CD2}" 7 | EndProject 8 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gmock_main", "gmock_main.vcxproj", "{E4EF614B-30DF-4954-8C53-580A0BF6B589}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Win32 = Debug|Win32 13 | Release|Win32 = Release|Win32 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {34681F0D-CE45-415D-B5F2-5C662DFE3BD5}.Debug|Win32.ActiveCfg = Debug|Win32 17 | {34681F0D-CE45-415D-B5F2-5C662DFE3BD5}.Debug|Win32.Build.0 = Debug|Win32 18 | {34681F0D-CE45-415D-B5F2-5C662DFE3BD5}.Release|Win32.ActiveCfg = Release|Win32 19 | {34681F0D-CE45-415D-B5F2-5C662DFE3BD5}.Release|Win32.Build.0 = Release|Win32 20 | {F10D22F8-AC7B-4213-8720-608E7D878CD2}.Debug|Win32.ActiveCfg = Debug|Win32 21 | {F10D22F8-AC7B-4213-8720-608E7D878CD2}.Debug|Win32.Build.0 = Debug|Win32 22 | {F10D22F8-AC7B-4213-8720-608E7D878CD2}.Release|Win32.ActiveCfg = Release|Win32 23 | {F10D22F8-AC7B-4213-8720-608E7D878CD2}.Release|Win32.Build.0 = Release|Win32 24 | {E4EF614B-30DF-4954-8C53-580A0BF6B589}.Debug|Win32.ActiveCfg = Debug|Win32 25 | {E4EF614B-30DF-4954-8C53-580A0BF6B589}.Debug|Win32.Build.0 = Debug|Win32 26 | {E4EF614B-30DF-4954-8C53-580A0BF6B589}.Release|Win32.ActiveCfg = Release|Win32 27 | {E4EF614B-30DF-4954-8C53-580A0BF6B589}.Release|Win32.Build.0 = Release|Win32 28 | EndGlobalSection 29 | GlobalSection(SolutionProperties) = preSolution 30 | HideSolutionNode = FALSE 31 | EndGlobalSection 32 | EndGlobal 33 | -------------------------------------------------------------------------------- /c-ares/test/gmock-1.7.0/msvc/2010/gmock_config.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ../../gtest 5 | 6 | 7 | <_ProjectFileVersion>10.0.30319.1 8 | 9 | 10 | 11 | $(GTestDir)/include;%(AdditionalIncludeDirectories) 12 | 13 | 14 | 15 | 16 | $(GTestDir) 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /c-ares/test/gmock-1.7.0/scripts/generator/README: -------------------------------------------------------------------------------- 1 | 2 | The Google Mock class generator is an application that is part of cppclean. 3 | For more information about cppclean, see the README.cppclean file or 4 | visit http://code.google.com/p/cppclean/ 5 | 6 | cppclean requires Python 2.3.5 or later. If you don't have Python installed 7 | on your system, you will also need to install it. You can download Python 8 | from: http://www.python.org/download/releases/ 9 | 10 | To use the Google Mock class generator, you need to call it 11 | on the command line passing the header file and class for which you want 12 | to generate a Google Mock class. 13 | 14 | Make sure to install the scripts somewhere in your path. Then you can 15 | run the program. 16 | 17 | gmock_gen.py header-file.h [ClassName]... 18 | 19 | If no ClassNames are specified, all classes in the file are emitted. 20 | 21 | To change the indentation from the default of 2, set INDENT in 22 | the environment. For example to use an indent of 4 spaces: 23 | 24 | INDENT=4 gmock_gen.py header-file.h ClassName 25 | 26 | This version was made from SVN revision 281 in the cppclean repository. 27 | 28 | Known Limitations 29 | ----------------- 30 | Not all code will be generated properly. For example, when mocking templated 31 | classes, the template information is lost. You will need to add the template 32 | information manually. 33 | 34 | Not all permutations of using multiple pointers/references will be rendered 35 | properly. These will also have to be fixed manually. 36 | -------------------------------------------------------------------------------- /c-ares/test/gmock-1.7.0/scripts/generator/cpp/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/c-ares/test/gmock-1.7.0/scripts/generator/cpp/__init__.py -------------------------------------------------------------------------------- /c-ares/test/gmock-1.7.0/scripts/generator/cpp/keywords.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # 3 | # Copyright 2007 Neal Norwitz 4 | # Portions Copyright 2007 Google Inc. 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | 18 | """C++ keywords and helper utilities for determining keywords.""" 19 | 20 | __author__ = 'nnorwitz@google.com (Neal Norwitz)' 21 | 22 | 23 | try: 24 | # Python 3.x 25 | import builtins 26 | except ImportError: 27 | # Python 2.x 28 | import __builtin__ as builtins 29 | 30 | 31 | if not hasattr(builtins, 'set'): 32 | # Nominal support for Python 2.3. 33 | from sets import Set as set 34 | 35 | 36 | TYPES = set('bool char int long short double float void wchar_t unsigned signed'.split()) 37 | TYPE_MODIFIERS = set('auto register const inline extern static virtual volatile mutable'.split()) 38 | ACCESS = set('public protected private friend'.split()) 39 | 40 | CASTS = set('static_cast const_cast dynamic_cast reinterpret_cast'.split()) 41 | 42 | OTHERS = set('true false asm class namespace using explicit this operator sizeof'.split()) 43 | OTHER_TYPES = set('new delete typedef struct union enum typeid typename template'.split()) 44 | 45 | CONTROL = set('case switch default if else return goto'.split()) 46 | EXCEPTION = set('try catch throw'.split()) 47 | LOOP = set('while do for break continue'.split()) 48 | 49 | ALL = TYPES | TYPE_MODIFIERS | ACCESS | CASTS | OTHERS | OTHER_TYPES | CONTROL | EXCEPTION | LOOP 50 | 51 | 52 | def IsKeyword(token): 53 | return token in ALL 54 | 55 | def IsBuiltinType(token): 56 | if token in ('virtual', 'inline'): 57 | # These only apply to methods, they can't be types by themselves. 58 | return False 59 | return token in TYPES or token in TYPE_MODIFIERS 60 | -------------------------------------------------------------------------------- /c-ares/test/gmock-1.7.0/scripts/generator/cpp/utils.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # 3 | # Copyright 2007 Neal Norwitz 4 | # Portions Copyright 2007 Google Inc. 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | 18 | """Generic utilities for C++ parsing.""" 19 | 20 | __author__ = 'nnorwitz@google.com (Neal Norwitz)' 21 | 22 | 23 | import sys 24 | 25 | 26 | # Set to True to see the start/end token indices. 27 | DEBUG = True 28 | 29 | 30 | def ReadFile(filename, print_error=True): 31 | """Returns the contents of a file.""" 32 | try: 33 | fp = open(filename) 34 | try: 35 | return fp.read() 36 | finally: 37 | fp.close() 38 | except IOError: 39 | if print_error: 40 | print('Error reading %s: %s' % (filename, sys.exc_info()[1])) 41 | return None 42 | -------------------------------------------------------------------------------- /c-ares/test/gmock-1.7.0/scripts/generator/gmock_gen.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # 3 | # Copyright 2008 Google Inc. All Rights Reserved. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | """Driver for starting up Google Mock class generator.""" 18 | 19 | __author__ = 'nnorwitz@google.com (Neal Norwitz)' 20 | 21 | import os 22 | import sys 23 | 24 | if __name__ == '__main__': 25 | # Add the directory of this script to the path so we can import gmock_class. 26 | sys.path.append(os.path.dirname(__file__)) 27 | 28 | from cpp import gmock_class 29 | # Fix the docstring in case they require the usage. 30 | gmock_class.__doc__ = gmock_class.__doc__.replace('gmock_class.py', __file__) 31 | gmock_class.main() 32 | -------------------------------------------------------------------------------- /c-ares/test/gmock-1.7.0/test/gmock-port_test.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2008, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // Author: vladl@google.com (Vlad Losev) 31 | 32 | // Google Mock - a framework for writing C++ mock classes. 33 | // 34 | // This file tests the internal cross-platform support utilities. 35 | 36 | #include "gmock/internal/gmock-port.h" 37 | #include "gtest/gtest.h" 38 | 39 | // NOTE: if this file is left without tests for some reason, put a dummy 40 | // test here to make references to symbols in the gtest library and avoid 41 | // 'undefined symbol' linker errors in gmock_main: 42 | 43 | TEST(DummyTest, Dummy) {} 44 | -------------------------------------------------------------------------------- /c-ares/test/gmock-1.7.0/test/gmock_link2_test.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2008, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // Author: wan@google.com (Zhanyong Wan), vladl@google.com (Vlad Losev) 31 | 32 | // Google Mock - a framework for writing C++ mock classes. 33 | // 34 | // This file is for verifying that various Google Mock constructs do not 35 | // produce linker errors when instantiated in different translation units. 36 | // Please see gmock_link_test.h for details. 37 | 38 | #define LinkTest LinkTest2 39 | 40 | #include "test/gmock_link_test.h" 41 | -------------------------------------------------------------------------------- /c-ares/test/gmock-1.7.0/test/gmock_link_test.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2008, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // Author: wan@google.com (Zhanyong Wan), vladl@google.com (Vlad Losev) 31 | 32 | // Google Mock - a framework for writing C++ mock classes. 33 | // 34 | // This file is for verifying that various Google Mock constructs do not 35 | // produce linker errors when instantiated in different translation units. 36 | // Please see gmock_link_test.h for details. 37 | 38 | #define LinkTest LinkTest1 39 | 40 | #include "test/gmock_link_test.h" 41 | -------------------------------------------------------------------------------- /c-ares/vc/cares/vc6cares.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "cares"=".\vc6cares.dsp" - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | }}} 11 | 12 | Package=<4> 13 | {{{ 14 | }}} 15 | 16 | ############################################################################### 17 | 18 | Global: 19 | 20 | Package=<5> 21 | {{{ 22 | }}} 23 | 24 | Package=<3> 25 | {{{ 26 | }}} 27 | 28 | ############################################################################### 29 | 30 | -------------------------------------------------------------------------------- /c-ares/vc/vc6aws.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "cares"=".\cares\vc6cares.dsp" - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | }}} 11 | 12 | Package=<4> 13 | {{{ 14 | }}} 15 | 16 | ############################################################################### 17 | 18 | Project: "acountry"=".\acountry\vc6acountry.dsp" - Package Owner=<4> 19 | 20 | Package=<5> 21 | {{{ 22 | }}} 23 | 24 | Package=<4> 25 | {{{ 26 | Begin Project Dependency 27 | Project_Dep_Name cares 28 | End Project Dependency 29 | }}} 30 | 31 | ############################################################################### 32 | 33 | Project: "adig"=".\adig\vc6adig.dsp" - Package Owner=<4> 34 | 35 | Package=<5> 36 | {{{ 37 | }}} 38 | 39 | Package=<4> 40 | {{{ 41 | Begin Project Dependency 42 | Project_Dep_Name cares 43 | End Project Dependency 44 | }}} 45 | 46 | ############################################################################### 47 | 48 | Project: "ahost"=".\ahost\vc6ahost.dsp" - Package Owner=<4> 49 | 50 | Package=<5> 51 | {{{ 52 | }}} 53 | 54 | Package=<4> 55 | {{{ 56 | Begin Project Dependency 57 | Project_Dep_Name cares 58 | End Project Dependency 59 | }}} 60 | 61 | ############################################################################### 62 | 63 | Global: 64 | 65 | Package=<5> 66 | {{{ 67 | }}} 68 | 69 | Package=<3> 70 | {{{ 71 | }}} 72 | 73 | ############################################################################### 74 | 75 | -------------------------------------------------------------------------------- /c-ares/windows_port.c: -------------------------------------------------------------------------------- 1 | #include "ares_setup.h" 2 | 3 | 4 | /* only do the following on windows 5 | */ 6 | #if (defined(WIN32) || defined(WATT32)) && !defined(MSDOS) 7 | 8 | #ifdef __WATCOMC__ 9 | /* 10 | * Watcom needs a DllMain() in order to initialise the clib startup code. 11 | */ 12 | BOOL 13 | WINAPI DllMain (HINSTANCE hnd, DWORD reason, LPVOID reserved) 14 | { 15 | (void) hnd; 16 | (void) reason; 17 | (void) reserved; 18 | return (TRUE); 19 | } 20 | #endif 21 | 22 | #endif /* WIN32 builds only */ 23 | -------------------------------------------------------------------------------- /klee-build: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/klee-build -------------------------------------------------------------------------------- /klee-clang.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef __KLEE_CLANG_H__ 3 | #define __KLEE_CLANG_H__ 4 | 5 | 6 | #define CLANG_PATH "clang" 7 | #define CLANGXX_PATH "clang++" 8 | #define LLVM_AR_PATH "llvm-ar" 9 | 10 | 11 | const char* get_clang_path(void); 12 | const char* get_clangpp_path(void); 13 | const char* get_llvm_ar_path(void); 14 | 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /run_fuzz.sh: -------------------------------------------------------------------------------- 1 | 2 | 3 | KLEE="klee" 4 | TARGET_FUZZER_BINARY=$1 5 | 6 | # 7 | #if [ -z "$TARGET_BINARY" ]; then 8 | # echo ARGUMENT ERROR : LOST TARGET_BINARY !.. 9 | # echo Using : ./run_fuzz.sh %TARGET_BINARY% %FUZZER_PATH% 10 | # 11 | # exit 1 12 | #fi 13 | 14 | if [ -z "$TARGET_FUZZER_BINARY" ]; then 15 | echo ARGUMENT ERROR : LOST TARGET_FUZZER_BINARY !.. 16 | echo Using : run_fuzz.sh %TARGET_FUZZER_BINARY% 17 | 18 | exit 1 19 | fi 20 | 21 | 22 | echo Output Klee Execute Command : 23 | echo $KLEE -libc=klee -entry-point KleeFuzzingEntry $TARGET_FUZZER_BINARY 24 | echo `$KLEE -libc=klee -entry-point KleeFuzzingEntry $TARGET_FUZZER_BINARY` 25 | -------------------------------------------------------------------------------- /save_test_code/Makefile.am: -------------------------------------------------------------------------------- 1 | AUTOMAKE_OPTIONS=foreign 2 | bin_PROGRAMS=test_code 3 | test_code_SOURCES=test_code.c test_code_main.c 4 | -------------------------------------------------------------------------------- /save_test_code/autoscan.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/save_test_code/autoscan.log -------------------------------------------------------------------------------- /save_test_code/config.h.in: -------------------------------------------------------------------------------- 1 | /* config.h.in. Generated from configure.ac by autoheader. */ 2 | 3 | /* Define to 1 if you have the header file. */ 4 | #undef HAVE_INTTYPES_H 5 | 6 | /* Define to 1 if your system has a GNU libc compatible `malloc' function, and 7 | to 0 otherwise. */ 8 | #undef HAVE_MALLOC 9 | 10 | /* Define to 1 if you have the header file. */ 11 | #undef HAVE_MEMORY_H 12 | 13 | /* Define to 1 if you have the header file. */ 14 | #undef HAVE_STDINT_H 15 | 16 | /* Define to 1 if you have the header file. */ 17 | #undef HAVE_STDLIB_H 18 | 19 | /* Define to 1 if you have the header file. */ 20 | #undef HAVE_STRINGS_H 21 | 22 | /* Define to 1 if you have the header file. */ 23 | #undef HAVE_STRING_H 24 | 25 | /* Define to 1 if you have the header file. */ 26 | #undef HAVE_SYS_STAT_H 27 | 28 | /* Define to 1 if you have the header file. */ 29 | #undef HAVE_SYS_TYPES_H 30 | 31 | /* Define to 1 if you have the header file. */ 32 | #undef HAVE_UNISTD_H 33 | 34 | /* Name of package */ 35 | #undef PACKAGE 36 | 37 | /* Define to the address where bug reports for this package should be sent. */ 38 | #undef PACKAGE_BUGREPORT 39 | 40 | /* Define to the full name of this package. */ 41 | #undef PACKAGE_NAME 42 | 43 | /* Define to the full name and version of this package. */ 44 | #undef PACKAGE_STRING 45 | 46 | /* Define to the one symbol short name of this package. */ 47 | #undef PACKAGE_TARNAME 48 | 49 | /* Define to the home page for this package. */ 50 | #undef PACKAGE_URL 51 | 52 | /* Define to the version of this package. */ 53 | #undef PACKAGE_VERSION 54 | 55 | /* Define to 1 if you have the ANSI C header files. */ 56 | #undef STDC_HEADERS 57 | 58 | /* Version number of package */ 59 | #undef VERSION 60 | 61 | /* Define to rpl_malloc if the replacement function should be used. */ 62 | #undef malloc 63 | -------------------------------------------------------------------------------- /save_test_code/configure.ac: -------------------------------------------------------------------------------- 1 | # -*- Autoconf -*- 2 | # Process this file with autoconf to produce a configure script. 3 | 4 | AC_PREREQ([2.69]) 5 | AC_INIT([FULL-PACKAGE-NAME], [VERSION], [BUG-REPORT-ADDRESS]) 6 | AC_CONFIG_SRCDIR([test_code.c]) 7 | AC_CONFIG_HEADERS([config.h]) 8 | AM_INIT_AUTOMAKE 9 | 10 | # Checks for programs. 11 | AC_PROG_CC 12 | 13 | # Checks for libraries. 14 | 15 | # Checks for header files. 16 | AC_CHECK_HEADERS([memory.h stdlib.h string.h]) 17 | 18 | # Checks for typedefs, structures, and compiler characteristics. 19 | 20 | # Checks for library functions. 21 | AC_FUNC_MALLOC 22 | 23 | AC_OUTPUT(Makefile) 24 | -------------------------------------------------------------------------------- /save_test_code/readme.txt: -------------------------------------------------------------------------------- 1 | 2 | 怎么样生成./configure : 3 | 4 | 1.autoscan 5 | 2.mv configure.scan configure.ac 6 | 7 | 添加内容: 8 | AM_INIT_AUTOMAKE 9 | #AC_CONFIG_FILES([Makefile]) 10 | AC_OUTPUT(Makefile) 11 | 12 | 3.aclocal 13 | 4.autoheader 14 | 5.autoconf 15 | 6.vim Makefile.am 添加内容: 16 | AUTOMAKE_OPTIONS=foreign 17 | bin_PROGRAMS=test_code 18 | test_code_SOURCES=test_code.c test_code_main.c 19 | 20 | 7.automake --add-missing 21 | -------------------------------------------------------------------------------- /save_test_code/test_code.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | 9 | char* get_message(const char* message) { 10 | if (strlen(message) <= 4) 11 | return NULL; 12 | 13 | if (!('F' == message[0] && '\x1' == message[1])) 14 | return NULL; 15 | 16 | unsigned int message_length = *(unsigned int*)&message[2]; 17 | char* output_message = (char*)malloc(message_length); 18 | 19 | memcpy(output_message,&message[2],message_length); 20 | 21 | return output_message; 22 | } 23 | 24 | -------------------------------------------------------------------------------- /save_test_code/test_code.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef __TEST_CODE_H__ 3 | #define __TEST_CODE_H__ 4 | 5 | char* get_message(const char* message); 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /save_test_code/test_code_main.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | #include "test_code.h" 8 | 9 | 10 | int main(int argc,char** argv) { 11 | if (2 == argc) { 12 | FILE* file = fopen(argv[1],"r"); 13 | unsigned int file_length = 10; 14 | 15 | fseek(file,SEEK_END,0); 16 | 17 | file_length = ftell(file); 18 | 19 | fseek(file,SEEK_SET,0); 20 | 21 | char* file_buffer = (char*)malloc(file_length); 22 | 23 | fread(file_buffer,1,file_length,file); 24 | fclose(file); 25 | 26 | printf("file buffer length : %d \n",file_length); 27 | 28 | char* message_data = get_message(file_buffer); 29 | 30 | if (NULL == message_data) 31 | printf("Error for resolve message\n"); 32 | else 33 | printf("message data : %s\n",message_data); 34 | } 35 | 36 | return 0; 37 | } 38 | 39 | -------------------------------------------------------------------------------- /save_test_code/test_data.txt: -------------------------------------------------------------------------------- 1 | 123123123 2 | -------------------------------------------------------------------------------- /save_test_code/test_fuzzing_entry.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | #include "klee/klee.h" 8 | 9 | #include "test_code.h" 10 | 11 | 12 | int KleeFuzzingEntry(int argc,char** argv) { 13 | char buffer[0x10]; 14 | 15 | printf("sizeof buffer = %lu\n",sizeof buffer); 16 | 17 | klee_make_symbolic(&buffer, sizeof buffer, "buffer"); 18 | 19 | return (int)get_message(buffer); 20 | } 21 | -------------------------------------------------------------------------------- /test_code/Makefile.am: -------------------------------------------------------------------------------- 1 | AUTOMAKE_OPTIONS=foreign 2 | bin_PROGRAMS=test_code 3 | test_code_SOURCES=test_code.c test_code_main.c 4 | -------------------------------------------------------------------------------- /test_code/autoscan.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcatro/klee-fl/6f243982eefd1c1bf3645fd1418a49fbcb37136e/test_code/autoscan.log -------------------------------------------------------------------------------- /test_code/config.h.in: -------------------------------------------------------------------------------- 1 | /* config.h.in. Generated from configure.ac by autoheader. */ 2 | 3 | /* Define to 1 if you have the header file. */ 4 | #undef HAVE_INTTYPES_H 5 | 6 | /* Define to 1 if your system has a GNU libc compatible `malloc' function, and 7 | to 0 otherwise. */ 8 | #undef HAVE_MALLOC 9 | 10 | /* Define to 1 if you have the header file. */ 11 | #undef HAVE_MEMORY_H 12 | 13 | /* Define to 1 if you have the header file. */ 14 | #undef HAVE_STDINT_H 15 | 16 | /* Define to 1 if you have the header file. */ 17 | #undef HAVE_STDLIB_H 18 | 19 | /* Define to 1 if you have the header file. */ 20 | #undef HAVE_STRINGS_H 21 | 22 | /* Define to 1 if you have the header file. */ 23 | #undef HAVE_STRING_H 24 | 25 | /* Define to 1 if you have the header file. */ 26 | #undef HAVE_SYS_STAT_H 27 | 28 | /* Define to 1 if you have the header file. */ 29 | #undef HAVE_SYS_TYPES_H 30 | 31 | /* Define to 1 if you have the header file. */ 32 | #undef HAVE_UNISTD_H 33 | 34 | /* Name of package */ 35 | #undef PACKAGE 36 | 37 | /* Define to the address where bug reports for this package should be sent. */ 38 | #undef PACKAGE_BUGREPORT 39 | 40 | /* Define to the full name of this package. */ 41 | #undef PACKAGE_NAME 42 | 43 | /* Define to the full name and version of this package. */ 44 | #undef PACKAGE_STRING 45 | 46 | /* Define to the one symbol short name of this package. */ 47 | #undef PACKAGE_TARNAME 48 | 49 | /* Define to the home page for this package. */ 50 | #undef PACKAGE_URL 51 | 52 | /* Define to the version of this package. */ 53 | #undef PACKAGE_VERSION 54 | 55 | /* Define to 1 if you have the ANSI C header files. */ 56 | #undef STDC_HEADERS 57 | 58 | /* Version number of package */ 59 | #undef VERSION 60 | 61 | /* Define to rpl_malloc if the replacement function should be used. */ 62 | #undef malloc 63 | -------------------------------------------------------------------------------- /test_code/configure.ac: -------------------------------------------------------------------------------- 1 | # -*- Autoconf -*- 2 | # Process this file with autoconf to produce a configure script. 3 | 4 | AC_PREREQ([2.69]) 5 | AC_INIT([FULL-PACKAGE-NAME], [VERSION], [BUG-REPORT-ADDRESS]) 6 | AC_CONFIG_SRCDIR([test_code.c]) 7 | AC_CONFIG_HEADERS([config.h]) 8 | AM_INIT_AUTOMAKE 9 | 10 | # Checks for programs. 11 | AC_PROG_CC 12 | 13 | # Checks for libraries. 14 | 15 | # Checks for header files. 16 | AC_CHECK_HEADERS([memory.h stdlib.h string.h]) 17 | 18 | # Checks for typedefs, structures, and compiler characteristics. 19 | 20 | # Checks for library functions. 21 | AC_FUNC_MALLOC 22 | 23 | AC_OUTPUT(Makefile) 24 | -------------------------------------------------------------------------------- /test_code/readme.txt: -------------------------------------------------------------------------------- 1 | 2 | 怎么样生成./configure : 3 | 4 | 1.autoscan 5 | 2.mv configure.scan configure.ac 6 | 7 | 添加内容: 8 | AM_INIT_AUTOMAKE 9 | #AC_CONFIG_FILES([Makefile]) 10 | AC_OUTPUT(Makefile) 11 | 12 | 3.aclocal 13 | 4.autoheader 14 | 5.autoconf 15 | 6.vim Makefile.am 添加内容: 16 | AUTOMAKE_OPTIONS=foreign 17 | bin_PROGRAMS=test_code 18 | test_code_SOURCES=test_code.c test_code_main.c 19 | 20 | 7.automake --add-missing 21 | -------------------------------------------------------------------------------- /test_code/test_code.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | 9 | char* get_message(const char* message) { 10 | if (strlen(message) <= 4) 11 | return NULL; 12 | 13 | if (!('F' == message[0] && '\x1' == message[1])) 14 | return NULL; 15 | 16 | unsigned int message_length = *(unsigned int*)&message[2]; 17 | char* output_message = (char*)malloc(message_length); 18 | 19 | memcpy(output_message,&message[2],message_length); 20 | 21 | return output_message; 22 | } 23 | 24 | -------------------------------------------------------------------------------- /test_code/test_code.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef __TEST_CODE_H__ 3 | #define __TEST_CODE_H__ 4 | 5 | char* get_message(const char* message); 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /test_code/test_code_main.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | #include "test_code.h" 8 | 9 | 10 | int main(int argc,char** argv) { 11 | if (2 == argc) { 12 | FILE* file = fopen(argv[1],"r"); 13 | unsigned int file_length = 10; 14 | 15 | fseek(file,SEEK_END,0); 16 | 17 | file_length = ftell(file); 18 | 19 | fseek(file,SEEK_SET,0); 20 | 21 | char* file_buffer = (char*)malloc(file_length); 22 | 23 | fread(file_buffer,1,file_length,file); 24 | fclose(file); 25 | 26 | printf("file buffer length : %d \n",file_length); 27 | 28 | char* message_data = get_message(file_buffer); 29 | 30 | if (NULL == message_data) 31 | printf("Error for resolve message\n"); 32 | else 33 | printf("message data : %s\n",message_data); 34 | } 35 | 36 | return 0; 37 | } 38 | 39 | -------------------------------------------------------------------------------- /test_code/test_data.txt: -------------------------------------------------------------------------------- 1 | 123123123 2 | -------------------------------------------------------------------------------- /test_code/test_fuzzing_entry.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | #include "klee/klee.h" 8 | 9 | #include "test_code.h" 10 | 11 | 12 | int KleeFuzzingEntry(int argc,char** argv) { 13 | char buffer[0x10]; 14 | 15 | printf("sizeof buffer = %lu\n",sizeof buffer); 16 | 17 | klee_make_symbolic(&buffer, sizeof buffer, "buffer"); 18 | 19 | return (int)get_message(buffer); 20 | } 21 | --------------------------------------------------------------------------------