Skip to content

Commit

Permalink
ipv6
Browse files Browse the repository at this point in the history
  • Loading branch information
sbera87 committed Feb 4, 2025
1 parent 9a820b3 commit 722218a
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
18 changes: 18 additions & 0 deletions include/aws/crt/dns.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#pragma once
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/crt/Exports.h>

namespace Aws
{
namespace Crt
{

namespace dns
{
AWS_CRT_CPP_API bool IsValidIpV6(const char *host, bool is_uri_encoded);
}
}
}
23 changes: 23 additions & 0 deletions source/dns.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/


#include <aws/crt/dns.h>
#include <aws/common/host_utils.h>
#include <aws/crt/Types.h>

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);
}
}
}
}

0 comments on commit 722218a

Please sign in to comment.