Hi Team,<div><br></div><div>I have just tried debugging it and I could see the stroke plugin which inturn is responsible for the configurations updation to the backend. </div><div><br></div><div>Would hooking up the stroke plugin work ?<br>
<br><div class="gmail_quote">On Tue, Aug 14, 2012 at 3:30 PM, krishna chaitanya <span dir="ltr"><<a href="mailto:krishnachaitanya.sanapala@gmail.com" target="_blank">krishnachaitanya.sanapala@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I am just hard coding things for time being. I wonna develop it as a full time utility.<div class="HOEnZb"><div class="h5">
<br><br><div class="gmail_quote">On Tue, Aug 14, 2012 at 3:15 PM, krishna chaitanya <span dir="ltr"><<a href="mailto:krishnachaitanya.sanapala@gmail.com" target="_blank">krishnachaitanya.sanapala@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">HI Martin,<div><br></div><div>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)</div>
<div><br></div><div><div>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)</div>
<div>{</div><div> stroke_msg_t msg;</div><div> memset(&msg, 0, sizeof(msg));</div><div> msg.length = offsetof(stroke_msg_t, buffer);</div><div> msg.type = STR_ADD_CONN;</div><div> <a href="http://msg.add_conn.name" target="_blank">msg.add_conn.name</a> = push_string(&msg, name);</div>
<div> msg.add_conn.version = version;</div><div> msg.add_conn.mode = mode;</div><div> msg.add_conn.mobike = mobike;</div><div> msg.add_conn.aggressive = aggressive;</div><div> msg.add_conn.ipcomp = force_encap;</div>
<div> msg.add_conn.algorithms.ike = push_string(&msg, algorithms);</div><div> msg.add_conn.algorithms.esp = push_string(&msg, algorithms);</div><div> msg.add_conn.dpd.delay = dpd_delay;</div>
<div>
msg.add_conn.dpd.timeout = dpd_timeout;</div><div> msg.add_conn.dpd.action = dpd_action;</div><div> /*starter_stroke_add_end(&msg, &<a href="http://msg.add_conn.me" target="_blank">msg.add_conn.me</a>, &conn->left);*/</div>
<div> /*starter_stroke_add_end(&msg, &msg.add_conn.other, &conn->right);*/</div><div> return send_stroke_msg(&msg);</div><div><br></div><div>}</div></div><div><br></div><div>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]);</div>
<div><br></div><div><br></div><div>Apart from these I have not modified even a single file or function. </div><div><br></div><div>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</div>
<div><br></div><div><div>[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</div><div>[root@localhost stroke]# ./stroke up host-host</div><div>no config named 'host-host'</div>
</div><div><br></div><div>Thanks,</div><div>KC</div><div><br></div>
</blockquote></div><br>
</div></div></blockquote></div><br></div>