summaryrefslogtreecommitdiff
path: root/src/url.h
diff options
context:
space:
mode:
authorcorvid <devnull@localhost>2016-07-03 17:36:47 +0000
committercorvid <devnull@localhost>2016-07-03 17:36:47 +0000
commite6d3d297362baa3a88d1e3bfd795f871865f251a (patch)
tree2028adb3e6a93dd45197be32dda46c4616655308 /src/url.h
parentff74c1460b32c74f0c9afac32bcd480763735447 (diff)
clean up host:port usage, particularly with ipv6
Diffstat (limited to 'src/url.h')
-rw-r--r--src/url.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/url.h b/src/url.h
index 93d198f8..85066f2a 100644
--- a/src/url.h
+++ b/src/url.h
@@ -16,6 +16,12 @@
#define URL_HTTP_PORT 80
#define URL_HTTPS_PORT 443
+/* for a_Url_host_type() */
+#define URL_HOST_ERROR -1
+#define URL_HOST_NAME 0
+#define URL_HOST_IPV4 1
+#define URL_HOST_IPV6 2
+
/*
* Values for DilloUrl->flags.
* Specifies which which action to perform with an URL.
@@ -106,7 +112,7 @@ void a_Url_set_ismap_coords(DilloUrl *u, char *coord_str);
char *a_Url_decode_hex_str(const char *str);
char *a_Url_encode_hex_str(const char *str);
char *a_Url_string_strip_delimiters(const char *str);
-bool_t a_Url_host_is_ip(const char *host);
+int a_Url_host_type(const char *host);
bool_t a_Url_same_organization(const DilloUrl *u1, const DilloUrl *u2);
#ifdef __cplusplus
}