summaryrefslogtreecommitdiff
path: root/src/server/server.h
diff options
context:
space:
mode:
authorØyvind Harboe <oyvind.harboe@zylin.com>2010-09-27 08:48:31 +0200
committerØyvind Harboe <oyvind.harboe@zylin.com>2010-10-01 10:21:33 +0200
commit6c137a2fc0bf53b9c0b8eda51e6f5361552b0112 (patch)
tree6adbd7dd5dc88bd6d21240b6668ea4a22ae92a89 /src/server/server.h
parentcb2dba2c1257e0aa80edc9a171a9c5cd7b2822f8 (diff)
downloadopenocd+libswd-6c137a2fc0bf53b9c0b8eda51e6f5361552b0112.tar.gz
openocd+libswd-6c137a2fc0bf53b9c0b8eda51e6f5361552b0112.tar.bz2
openocd+libswd-6c137a2fc0bf53b9c0b8eda51e6f5361552b0112.tar.xz
openocd+libswd-6c137a2fc0bf53b9c0b8eda51e6f5361552b0112.zip
server: specify port as a string
This will allow switching to using named pipes. Split this out as a seperate commit to make changes easier to follow. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Diffstat (limited to 'src/server/server.h')
-rw-r--r--src/server/server.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/server/server.h b/src/server/server.h
index 46188bb4..2c9ed445 100644
--- a/src/server/server.h
+++ b/src/server/server.h
@@ -75,6 +75,11 @@ int add_service(char *name, enum connection_type type, unsigned short port,
input_handler_t in_handler, connection_closed_handler_t close_handler,
void *priv);
+int add_service_pipe(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);
@@ -101,6 +106,10 @@ void openocd_sleep_postlude(void);
* Call server_port like a normal COMMAND_HANDLER with an extra @a out parameter
* to receive the specified port number.
*/
+#define SERVER_PIPE_COMMAND() \
+ COMMAND_HELPER(server_pipe_command, const char **out)
+SERVER_PIPE_COMMAND();
+
#define SERVER_PORT_COMMAND() \
COMMAND_HELPER(server_port_command, unsigned short *out)