Recognize IPv6 addresses for "adb connect".

Bug: http://b/22559299
Change-Id: I32891d706b5010c38db84a056e76dd279b780f75
diff --git a/adb_utils.h b/adb_utils.h
index c816d00..e0aa1ba 100644
--- a/adb_utils.h
+++ b/adb_utils.h
@@ -28,4 +28,15 @@
 
 void dump_hex(const void* ptr, size_t byte_count);
 
+// Parses 'address' into 'host' and 'port'.
+// If no port is given, takes the default from *port.
+// 'canonical_address' then becomes "host:port" or "[host]:port" as appropriate.
+// Note that no real checking is done that 'host' or 'port' is valid; that's
+// left to getaddrinfo(3).
+// Returns false on failure and sets *error to an appropriate message.
+bool parse_host_and_port(const std::string& address,
+                         std::string* canonical_address,
+                         std::string* host, int* port,
+                         std::string* error);
+
 #endif