* Copyright (C) 2005 by Dominic Rath *
* Dominic.Rath@gmx.de *
* *
- * Copyright (C) 2007,2008 Øyvind Harboe *
+ * Copyright (C) 2007,2008 Øyvind Harboe *
* oyvind.harboe@zylin.com *
* *
* Copyright (C) 2008 by Spencer Oliver *
#ifndef SERVER_H
#define SERVER_H
-#include "command.h"
-#include "binarybuffer.h"
-#include "replacements.h"
+#include "log.h"
-#include <sys/types.h>
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
enum connection_type
{
struct service_s *next;
} service_t;
-extern int add_service(char *name, enum connection_type type, unsigned short port, int max_connections, new_connection_handler_t new_connection_handler, input_handler_t input_handler, connection_closed_handler_t connection_closed_handler, void *priv);
-extern int server_init(void);
-extern int server_quit(void);
-extern int server_loop(command_context_t *command_context);
-extern int server_register_commands(command_context_t *context);
+int add_service(char *name, enum connection_type type, unsigned short 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_init(void);
+int server_quit(void);
+
+int server_loop(command_context_t *command_context);
+
+int server_register_commands(command_context_t *context);
+
+int server_port_command(struct command_context_s *cmd_ctx,
+ char *cmd, char **args, int argc, unsigned short *port);
extern int server_use_pipes;