+ struct service *next;
+};
+
+int add_service(char *name, const char *port,
+ int max_connections, new_connection_handler_t new_connection_handler,
+ input_handler_t in_handler, connection_closed_handler_t close_handler,
+ void *priv);
+
+int server_preinit(void);
+int server_init(struct command_context *cmd_ctx);
+int server_quit(void);
+void exit_on_signal(int);
+
+int server_loop(struct command_context *command_context);
+
+int server_register_commands(struct command_context *context);
+
+int connection_write(struct connection *connection, const void *data, int len);
+int connection_read(struct connection *connection, void *data, int len);
+
+/**
+ * Used by server_loop(), defined in server_stubs.c
+ */
+void openocd_sleep_prelude(void);
+/**
+ * Used by server_loop(), defined in server_stubs.c
+ */
+void openocd_sleep_postlude(void);