[strongSwan-dev] Help in regards to stroke

krishna chaitanya krishnachaitanya.sanapala at gmail.com
Tue Aug 14 11:45:26 CEST 2012

HI Martin,

I tried developing the stroke code by modifying the add_connection in
stroke.c in the following way ( I just hardcoded to see the functionalities)

static int add_connection(char *name,int version,int mode,int mobike,int
aggressive,int force_encap,int ipcomp,char *algorithms,int dpd_delay,int
dpd_timeout,int dpd_action,char *sourceip,char *destinationip,char *auth)
        stroke_msg_t msg;
        memset(&msg, 0, sizeof(msg));
        msg.length = offsetof(stroke_msg_t, buffer);
        msg.type = STR_ADD_CONN;
        msg.add_conn.name = push_string(&msg, name);
        msg.add_conn.version = version;
        msg.add_conn.mode = mode;
        msg.add_conn.mobike = mobike;
        msg.add_conn.aggressive = aggressive;
        msg.add_conn.ipcomp = force_encap;
        msg.add_conn.algorithms.ike = push_string(&msg, algorithms);
        msg.add_conn.algorithms.esp = push_string(&msg, algorithms);
        msg.add_conn.dpd.delay = dpd_delay;
        msg.add_conn.dpd.timeout = dpd_timeout;
        msg.add_conn.dpd.action = dpd_action;
        /*starter_stroke_add_end(&msg, &msg.add_conn.me, &conn->left);*/
        /*starter_stroke_add_end(&msg, &msg.add_conn.other, &conn->right);*/
        return send_stroke_msg(&msg);


res =

Apart from these I have not modified even a single file or function.

I was able to build up the image with these modifications and then tried
the following. I know that stroke utility is not fully functional. I could
see stub code. But I did these to develop an utility on the lines of whack.
Could you please help if this would work or in any ways. Thanks

[root at localhost stroke]# ./stroke add host-host 2 1 1 1 7 1 aes-cbc-hmac
100 10 2 psk
[root at localhost stroke]# ./stroke up host-host
no config named 'host-host'

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.strongswan.org/pipermail/dev/attachments/20120814/31be78b5/attachment.html>

More information about the Dev mailing list