diff --git a/include/aws/crt/dns.h b/include/aws/crt/dns.h new file mode 100644 index 000000000..fe168c5ba --- /dev/null +++ b/include/aws/crt/dns.h @@ -0,0 +1,18 @@ +#pragma once +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ +#include + +namespace Aws +{ + namespace Crt + { + + namespace dns + { + AWS_CRT_CPP_API bool IsValidIpV6(const char *host, bool is_uri_encoded); + } + } +} diff --git a/source/dns.cpp b/source/dns.cpp new file mode 100644 index 000000000..89c9e976a --- /dev/null +++ b/source/dns.cpp @@ -0,0 +1,23 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + + +#include +#include +#include + +namespace Aws +{ + namespace Crt + { + namespace dns + { + bool IsValidIpV6(const char *host, bool is_uri_encoded) + { + return aws_host_utils_is_ipv6(Aws::Crt::ByteCursorFromCString(host), is_uri_encoded); + } + } + } +} \ No newline at end of file