X-Git-Url: https://git.strongswan.org/?p=strongswan.git;a=blobdiff_plain;f=src%2Fstroke%2Fstroke.h;h=a5e26af4afc96b1843dab199fad9d7c739f3c9d3;hp=7e45b3c7d5747fc090431e46b6110a4066411846;hb=180f924ba5bd1d5ff54ef2e9588f810f34e32c61;hpb=7ba69503aa48653ec2a940dced46a7aadd929159 diff --git a/src/stroke/stroke.h b/src/stroke/stroke.h index 7e45b3c..a5e26af 100644 --- a/src/stroke/stroke.h +++ b/src/stroke/stroke.h @@ -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,7 @@ 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 { @@ -64,10 +65,11 @@ struct stroke_msg_t { } 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; @@ -81,17 +83,19 @@ struct stroke_msg_t { int subnet_mask; } me, other; } add_conn; + struct { char *context; char *type; int enable; } logtype; + struct { char *context; int level; } loglevel; }; - u_int8_t buffer[]; + char buffer[STROKE_BUF_LEN]; }; #endif /* STROKE_H_ */