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 = add_connection(argv[2],atoi(argv[3]),atoi(argv[4]),atoi(argv[5]),atoi(argv[6]),atoi(argv[7]),atoi(argv[8]),argv[9],atoi(argv[10]),atoi(argv[11]),atoi(argv[12]),argv[13], argv[14],argv[15]); 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@localhost stroke]# ./stroke add host-host 2 1 1 1 7 1 aes-cbc-hmac 100 10 2 10.10.10.233 10.10.10.200 psk [root@localhost stroke]# ./stroke up host-host no config named 'host-host' Thanks, KC
_______________________________________________ Dev mailing list Dev@lists.strongswan.org https://lists.strongswan.org/mailman/listinfo/dev