[strongSwan-dev] VICI Python Initiate Connection

Carlos Chacon chaconc at gmail.com
Tue Dec 1 01:35:00 CET 2015


Hi,

I have the following script:

-------------------------------------------------------
s = socket.socket(socket.AF_UNIX)
s.connect("/var/run/charon.vici")
v = vici.Session(s)

ver = v.version()

print "{daemon} {version} ({sysname}, {release}, {machine})".format(**ver)

#Initiate Connection
sa = collections.OrderedDict()
sa['child'] = "EarthComm"
sa['timeout'] = '1000'
sa['init-limits'] = '1'
sa['loglevel'] = '0'

ret = v.initiate(sa)

#If removed Initiate does not work
ret.next()
ret.close()

s.close()
-------------------------------------------------------

1. Why is it, if I remove "ret.next()" the connection will not initiate?
Reading the doc, it seems that the generator should only return the logs.

2. "timeout" according to the documentation should be in seconds but charon
see's it as milliseconds is this a typo or a bug?

Thanks,
Carlos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.strongswan.org/pipermail/dev/attachments/20151130/fb507ea8/attachment.html>


More information about the Dev mailing list