diff --git a/VERSION b/VERSION index 1a44cad74..0f7217737 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.30.1 +0.30.2 diff --git a/include/aws/crt/DnsUtils.h b/include/aws/crt/DnsUtils.h new file mode 100644 index 000000000..c2271bca9 --- /dev/null +++ b/include/aws/crt/DnsUtils.h @@ -0,0 +1,17 @@ +#pragma once +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ +#include + +namespace Aws +{ + namespace Crt + { + namespace DnsUtils + { + AWS_CRT_CPP_API bool IsValidIpV6(const char *host, bool is_uri_encoded); + } // namespace DnsUtils + } // namespace Crt +} // namespace Aws diff --git a/source/DnsUtils.cpp b/source/DnsUtils.cpp new file mode 100644 index 000000000..ba345bb57 --- /dev/null +++ b/source/DnsUtils.cpp @@ -0,0 +1,24 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include +#include + +namespace Aws +{ + namespace Crt + { + namespace DnsUtils + { + + bool IsValidIpV6(const char *host, bool is_uri_encoded) + { + return aws_host_utils_is_ipv6(Aws::Crt::ByteCursorFromCString(host), is_uri_encoded); + } + + } // namespace DnsUtils + } // namespace Crt +} // namespace Aws