[strongSwan] interact with strongswan in c++

Jacques Monin jacques.monin01 at gmail.com
Mon Jul 20 16:36:11 CEST 2015


Indeed, it seems to be exactly what I am looking for.

However, when I'm trying to compile the example program :

#include <stdio.h>
#include <errno.h>
#include <string.h>

#include <libvici.h>

int main(int argc, char *argv[])
{
    vici_conn_t *conn;
    int ret = 0;

    vici_init();
    conn = vici_connect(NULL);
    if (conn)
    {
        // do stuff
        vici_disconnect(conn);
    }
    else
    {
        ret = errno;
        fprintf(stderr, "connecting failed: %s\n", strerror(errno));
    }
    vici_deinit();
    return ret;
}


I have an error : "fatal error: libvici.h: unknown file". Am I supposed to
edit my own Makefile to compile it ?

Thanks



2015-07-20 15:05 GMT+02:00 Tobias Brunner <tobias at strongswan.org>:

> Hi Jacques,
>
> > I wanted to know if there is a way to open, close connection with out
> > using the command "ipsec up connection", "ipsec down connection" but by
> > using an API.
>
> Please have a look at the VICI interface [1] and its C API.
>
> Regards,
> Tobias
>
> [1] https://wiki.strongswan.org/projects/strongswan/wiki/Vici
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.strongswan.org/pipermail/users/attachments/20150720/74ae99c0/attachment.html>


More information about the Users mailing list