-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support IPv6 endpoint #707
base: main
Are you sure you want to change the base?
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All crt namespaces start with upper case There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sure, will change |
||
{ | ||
AWS_CRT_CPP_API bool IsValidIpV6(const char *host, bool is_uri_encoded); | ||
} // namespace dns | ||
} // namespace Crt | ||
} // namespace Aws |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/** | ||
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
* SPDX-License-Identifier: Apache-2.0. | ||
*/ | ||
|
||
#include <aws/common/host_utils.h> | ||
#include <aws/crt/Types.h> | ||
#include <aws/crt/dns.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); | ||
} | ||
|
||
} // namespace dns | ||
} // namespace Crt | ||
} // namespace Aws | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: new line at the end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably want to put it into DnsUtils.h similar to existign StringUtils
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, will change the filename