* rpcd - UBUS RPC server
*
* Copyright (C) 2013 Felix Fietkau <nbd@openwrt.org>
- * Copyright (C) 2013 Jo-Philipp Wich <jow@openwrt.org>
+ * Copyright (C) 2013-2014 Jo-Philipp Wich <jow@openwrt.org>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
#ifndef __RPC_SESSION_H
#define __RPC_SESSION_H
+#include <ctype.h>
+#include <fcntl.h>
+#include <dirent.h>
+#include <unistd.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+
#include <libubox/avl.h>
#include <libubox/blobmsg_json.h>
#define RPC_SID_LEN 32
#define RPC_DEFAULT_SESSION_TIMEOUT 300
+#define RPC_DEFAULT_SESSION_ID "00000000000000000000000000000000"
+#define RPC_SESSION_DIRECTORY "/var/run/rpcd/sessions"
+#define RPC_SESSION_ACL_DIR "/usr/share/rpcd/acl.d"
struct rpc_session {
struct avl_node avl;
void rpc_session_create_cb(struct rpc_session_cb *cb);
void rpc_session_destroy_cb(struct rpc_session_cb *cb);
+void rpc_session_freeze(void);
+void rpc_session_thaw(void);
+
#endif