summaryrefslogtreecommitdiff
path: root/server.h
diff options
context:
space:
mode:
Diffstat (limited to 'server.h')
-rw-r--r--server.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/server.h b/server.h
index cb4fd76..43c5b9e 100644
--- a/server.h
+++ b/server.h
@@ -9,6 +9,7 @@ enum server_type {
enum server_stop_method {
SERVER_STOP_METHOD_UNDEFINED,
+ SERVER_STOP_METHOD_RCON,
SERVER_STOP_METHOD_EXEC
};
@@ -25,6 +26,7 @@ struct server {
struct list_head locals;
struct list_head remotes;
struct list_head proxys;
+ struct list_head rcons;
bool running;
enum server_stop_method stop_method;
@@ -36,6 +38,10 @@ struct server {
char buf[4096];
size_t len;
+ /* For rcon connections */
+ struct rcon *rcon;
+ char *rcon_password;
+
/* For announce messages */
struct iovec mcast_iov;
struct msghdr mcast_msg;
@@ -63,10 +69,16 @@ bool server_stop(struct cfg *cfg, struct server *scfg);
bool server_commit(struct cfg *cfg, struct server *scfg);
bool server_add_remote(struct cfg *cfg, struct server *scfg,
- struct sockaddr_in46 *remote);
+ struct sockaddr_in46 *addr);
bool server_add_local(struct cfg *cfg, struct server *scfg,
- struct sockaddr_in46 *local);
+ struct sockaddr_in46 *addr);
+
+bool server_add_rcon(struct cfg *cfg, struct server *scfg,
+ struct sockaddr_in46 *addr);
+
+bool server_set_rcon_password(struct cfg *cfg, struct server *scfg,
+ const char *password);
bool server_set_stop_method(struct cfg *cfg, struct server *scfg,
enum server_stop_method stop_method);