From 5864a742e9997ea9bda04931e14b4fd0d97d122e Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Thu, 17 Dec 2020 20:53:11 +0000 Subject: net: function to identify ipv6 addresses in URLs --- src/net.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/net.h') diff --git a/src/net.h b/src/net.h index 0082dd6d7..391b99a9f 100644 --- a/src/net.h +++ b/src/net.h @@ -36,6 +36,9 @@ extern bool git_net_url_valid(git_net_url *url); /** Returns true if the URL is on the default port. */ extern bool git_net_url_is_default_port(git_net_url *url); +/** Returns true if the host portion of the URL is an ipv6 address. */ +extern bool git_net_url_is_ipv6(git_net_url *url); + /* Applies a redirect to the URL with a git-aware service suffix. */ extern int git_net_url_apply_redirect( git_net_url *url, -- cgit v1.2.1