+ * \return 1 if string has a valid IPv6 address syntax, 0 if not.
+ * \sa RFC 4291
+ */
+_static_inline_ bool is_valid_ipv6_address(const char *address)
+{
+ struct in6_addr test_it;
+
+ return inet_pton(AF_INET6, address, &test_it) != 0;
+}
+
+int lookup_address(unsigned l4type, bool passive, const char *host,
+ int port_number, struct addrinfo **result);
+
+/**
+ * Generic socket creation (passive and active sockets).
+ */
+int makesock(unsigned l4type, bool passive, const char *host,
+ uint16_t port_number, struct flowopts *fo);
+
+int makesock_addrinfo(unsigned l4type, bool passive, struct addrinfo *ai,
+ struct flowopts *fo);
+
+static inline int para_connect_simple(unsigned l4type,
+ const char *host, uint16_t port)
+{
+ return makesock(l4type, 0, host, port, NULL);
+}
+
+void extract_v4_addr(const struct sockaddr_storage *ss, struct in_addr *ia);
+bool sockaddr_equal(const struct sockaddr *sa1, const struct sockaddr *sa2);
+
+/**
+ * Functions to support listening sockets.