[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openikev2-users
Subject:    [openikev2-users] test_API with IPsec transport mode
From:       alejandro_perez () dif ! um ! es (Alejandro Perez Mendez)
Date:       2006-01-03 9:39:52
Message-ID: 1136278058.4916.8.camel () localhost ! localdomain
[Download RAW message or body]

El mar, 03--2006 a las 10:33 +0200, V?is?nen Teemu escribi?:
> Hi and thank you for answers.
> 
> 2006/1/2, Alejandro Perez Mendez <alejandro_perez@dif.um.es>:
> > El lun, 02--2006 a las 15:59 +0200, V?is?nen Teemu escribi?:
> > OpenIKEv2 is still in an unstable status. Its API may (and MUST) change
> > in the future, and Bus Events (and a lot of things) are still not fully
> > implemented.
> >
> > However, if you need some API help, try to generate documentation using
> > doxygen (but this documentation is still very incomplete).
> 
> Can you help and tell how to generate OpenIKEv2 docs with doxygen?
> 

I will send documentation to you in a private email.

> > > test_api.cpp have
> > > IPSEC_Controller::create_Policy(ts_i, ts_r, src_tunnel, dst_tunnel, 0,
> > > Enums::DIR_OUT, Enums::PROTO_ESP, Enums::TUNNEL_MODE);
> > >
> > > Can transport mode be used if there are src_tunnel and dst_tunnel
> > > variables in create_Policy?
> >
> > Usually transport mode doesn't use any "tunnel" address, so you should
> > pass NULL pointer when using transport mode. But IPsec API allows that
> > (we don't know why) so it is possible to create such policies.
> 
> I changed lines 76 and 77
> IPAddress* src_tunnel = NetworkController::getIPAddress((uint8_t*)
> "192.168.0.1", 0);
> IPAddress* dst_tunnel = NetworkController::getIPAddress((uint8_t*)
> "192.168.0.2", 0);
> to below:
> IPAddress* src_tunnel = NULL;
> IPAddress* dst_tunnel = NULL;
> 
> But then
> line 110 in test_api.cpp
> peer_configuration->peer_ids.push_back(new ID(dst_tunnel));
> throws Segmentation fault.

You are creating a ID object with a NULL IPAddress. This is not
possible. You must create the PeerID using a valid IPAddress (in
transport mode, one of the contained in the destinanition selector).

In example, if you have the following selectors:

172.20.0.0/24 172.21.1.0/24

you must add a peer id for each possible peer address (172.20.1.1,
172.20.1.2, 172.20.1.100...)

But, I repeat, test_API.cpp will be used by us as example of the API
use, but is still incomplete.

> Any help is welcome!
> 
> -Teemu V?is?nen
> _______________________________________________
> openikev2-users mailing list
> openikev2-users@dif.um.es
> https://correo.dif.um.es/cgi-bin/mailman/listinfo/openikev2-users

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic