summaryrefslogtreecommitdiff
path: root/vpn/plugins/vici-client.h
diff options
context:
space:
mode:
authorchleun.moon <chleun.moon@samsung.com>2017-04-20 11:00:24 +0900
committerchleun.moon <chleun.moon@samsung.com>2017-04-20 11:00:58 +0900
commit6289f6a099afd889a013f895fca9df34028c2fb7 (patch)
tree1e5f88972bb0a66f0ed1817b7cbb4c49b1a8ff9a /vpn/plugins/vici-client.h
parentd21359e658ca906a560143a81ac1ea6e765e9dd4 (diff)
parent13294d79e3412a68c541fd6a22840bf85521a420 (diff)
downloadconnman-6289f6a099afd889a013f895fca9df34028c2fb7.tar.gz
connman-6289f6a099afd889a013f895fca9df34028c2fb7.tar.bz2
connman-6289f6a099afd889a013f895fca9df34028c2fb7.zip
Merge branch 'ipsec' into tizen
Change-Id: I2ecaece689f43bb0c03c9c5929274bfe43e346b0 Signed-off-by: cheoleun <chleun.moon@samsung.com>
Diffstat (limited to 'vpn/plugins/vici-client.h')
-rw-r--r--vpn/plugins/vici-client.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/vpn/plugins/vici-client.h b/vpn/plugins/vici-client.h
new file mode 100644
index 00000000..91200e5a
--- /dev/null
+++ b/vpn/plugins/vici-client.h
@@ -0,0 +1,56 @@
+#ifndef __VICI_CLIENT_H
+#define __VICI_CLIENT_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* strongswan VICI plugin client part*/
+struct _VICIClient;
+typedef struct _VICIClient VICIClient;
+
+struct _VICISection;
+typedef struct _VICISection VICISection;
+
+typedef enum {
+ VICI_CMD_LOAD_CONN,
+ VICI_CMD_LOAD_SHARED,
+ VICI_CMD_LOAD_CERT,
+ VICI_CMD_LOAD_AUTH,
+ VICI_CMD_UNLOAD_AUTH,
+ VICI_CMD_LOAD_KEY,
+ VICI_CMD_INITIATE,
+ VICI_CMD_MAX,
+} VICIClientCmd;
+
+#define VICI_DEFAULT_URI "/var/run/charon.vici"
+
+typedef int (*vici_add_element)(VICISection *sect, const char *key,
+ const char *value, const char *subsection);
+
+typedef void (*vici_connect_reply_cb)(int err, void *user_data);
+
+VICISection* vici_create_section(const char *name);
+int add_subsection(const char* name, VICISection* child, VICISection* section);
+void vici_destroy_section(VICISection *sect);
+int vici_add_kv(VICISection *sect, const char *key,
+ const char *value, const char *subsection);
+int vici_add_kvl(VICISection *sect, const char *key,
+ const char *value, const char *subsection);
+int vici_add_list(VICISection* section, char *key,
+ GSList *list, const char* subsection);
+int vici_add_cert_kv(VICISection *section, const char *key,
+ const char *value, const char *subsection);
+int vici_add_cert_kvl(VICISection *section, const char *key,
+ const char *value, const char *subsection);
+
+int vici_initialize(VICIClient **vici_client);
+int vici_deinitialize(VICIClient *vici_client);
+void vici_set_connect_reply_cb(VICIClient *vici_client, vici_connect_reply_cb reply_cb, gpointer user_data);
+int vici_send_request(VICIClient *vici_client, VICIClientCmd cmd, VICISection *root);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __VICI_CLIENT_H */