stroke.h requires libstrongswan/types.h
[strongswan.git] / src / stroke / stroke.h
index cb40cf8..a5e26af 100644 (file)
@@ -28,6 +28,7 @@
  */
 #define STROKE_SOCKET "/var/run/charon.ctl"
 
+#define STROKE_BUF_LEN         2048
 
 typedef struct stroke_msg_t stroke_msg_t;
 
@@ -36,7 +37,8 @@ typedef struct stroke_msg_t stroke_msg_t;
  */
 struct stroke_msg_t {
        /* length of this message with all strings */
-       u_int16_t length;
+       u_int length;
+
        /* type of the message */
        enum {
                /* initiate a connection */
@@ -57,35 +59,43 @@ struct stroke_msg_t {
                STR_LOGTYPE,
                /* set the verbosity of a logging context */
                STR_LOGLEVEL,
+               /* show list of locally loaded certificates */
+               STR_LIST_CERTS
                /* more to come */
        } type;
+
        union {
-               /* data for STR_INITIATE, STR_INSTALL, STR_UP, STR_DOWN */
+               /* data for STR_INITIATE, STR_INSTALL, STR_UP, STR_DOWN, ... */
                struct {
                        char *name;
-               } initiate, install, terminate, status;
+               } initiate, install, terminate, status, del_conn;
+
                /* data for STR_ADD_CONN */
                struct {
                        char *name;
+                       /* is this connection handled by charon? */
+                       int ikev2;
                        struct {
                                char *id;
                                char *cert;
                                char *address;
                                char *subnet;
-                               u_int8_t subnet_mask;
+                               int subnet_mask;
                        } me, other;
                } add_conn;
+
                struct {
                        char *context;
                        char *type;
                        int enable;
                } logtype;
+
                struct {
                        char *context;
-                       u_int level;
+                       int level;
                } loglevel;
        };
-       u_int8_t buffer[];
+       char buffer[STROKE_BUF_LEN];
 };
 
 #endif /* STROKE_H_ */