[strongSwan-dev] Help in regards to stroke
krishna chaitanya
krishnachaitanya.sanapala at gmail.com
Wed Aug 22 08:29:46 CEST 2012
Hi Team,
I tried these following calls to initiate a single connection. But yet its
not working. I just want to update a single connection via CLI i.e only
update_connection and check the feasability. Please let me know if i am
missing something.
stroke_socket_t *stroke_socket_create();
static bool open_socket(private_stroke_socket_t *this);
static job_requeue_t receive(private_stroke_socket_t *this);
static job_requeue_t process(stroke_job_context_t *ctx);
static void stroke_initiate(private_stroke_socket_t *this, stroke_msg_t
*msg, FILE *out);
stroke_control_t *stroke_control_create();
static status_t initiate(private_controller_t *this,peer_cfg_t *peer_cfg,
child_cfg_t *child_cfg,controller_cb_t callback, void *param);
static status_t initiate_execute(interface_job_t *job);
METHOD(task_manager_t, initiate, status_t,private_task_manager_t *this);
message = message_create();
METHOD(task_manager_t, retransmit, status_t,private_task_manager_t *this,
u_int32_t meage_id)
charon->sender->send(charon->sender, packet);
On Tue, Aug 14, 2012 at 6:56 PM, krishna chaitanya <
krishnachaitanya.sanapala at gmail.com> wrote:
> Hi Team,
>
> I have just tried debugging it and I could see the stroke plugin which
> inturn is responsible for the configurations updation to the backend.
>
> Would hooking up the stroke plugin work ?
>
>
> On Tue, Aug 14, 2012 at 3:30 PM, krishna chaitanya <
> krishnachaitanya.sanapala at gmail.com> wrote:
>
>> I am just hard coding things for time being. I wonna develop it as a full
>> time utility.
>>
>>
>> On Tue, Aug 14, 2012 at 3:15 PM, krishna chaitanya <
>> krishnachaitanya.sanapala at gmail.com> wrote:
>>
>>> 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 at 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 at localhost stroke]# ./stroke up host-host
>>> no config named 'host-host'
>>>
>>> Thanks,
>>> KC
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.strongswan.org/pipermail/dev/attachments/20120822/a28c9b12/attachment.html>
More information about the Dev
mailing list