-int connect_to_one PARAMS ((ip_address *, unsigned short, int));
-int connect_to_many PARAMS ((struct address_list *, unsigned short, int));
-void set_connection_host_name PARAMS ((const char *));
+/* Returned by connect_to_host when host name cannot be resolved. */
+enum {
+ E_HOST = -100
+};
+int connect_to_host (const char *, int);
+int connect_to_ip (const ip_address *, int, const char *);
+
+int bind_local (const ip_address *, int *);
+int accept_connection (int);
+
+enum {
+ ENDPOINT_LOCAL,
+ ENDPOINT_PEER
+};
+bool socket_ip_address (int, ip_address *, int);
+int socket_family (int sock, int endpoint);
+
+bool retryable_socket_connect_error (int);
+
+/* Flags for select_fd's WAIT_FOR argument. */
+enum {
+ WAIT_FOR_READ = 1,
+ WAIT_FOR_WRITE = 2
+};
+int select_fd (int, double, int);
+bool test_socket_open (int);