My attempts to port openconnect to windows (cygwin)

Johannes Michler orgler at
Sun Feb 20 16:47:35 EST 2011


unfortunately, I don't know too much on the details how tun/tap and
tun/tap on windows in special is working. I tried to ping my
openconnect-IP from another host, but there is no additional
log-activity on my openconnect-windows-client then :-(

If there is some documentation on the tun_mainloop I could try to dig
deeper into this, but I'm not very experienced in C-programming (being
a java/c#-developer :-)  ), so I think it would be easier if someone
who knows the openconnect-code would have a look at my provided

I tried to do a git diff, but I don't know how to include new files in
the diff, so you can get them by my last mail...

Best regards,

2011/2/20 David Woodhouse <dwmw2 at>
> On Sun, 2011-02-20 at 19:45 +0100, Johannes Michler wrote:
> > Then I looked at vpnc and tried to understand what has to be done
> > differently with cygwin. I think most changes should appear in the
> > tun.c-file, most other files should be platform-independent. So I wrote some
> > code to open the tun-device (copied a log from vpnc). I finally managed to
> > compile openconnect.
> Thank you for working on this; I had another user saying only today that
> it would be useful to have it working on Windows.
> If you could post your changes in 'diff -up' or 'git diff' form rather
> than just sending the modified C files, that would make life a lot
> easier. Please also post plain text only, not HTML. The list doesn't
> normally accept HTML.
> When you say you can't transfer any data, what exactly *does* happen?
> You know your IP address from the VPN connection... if you attempt to
> send packets to that IP address from some other host on the VPN or
> internal network, does openconnect see them coming over the tunnel?
> Do they reach the host? Does openconnect see any packets coming *back*
> from the host?
> My first suspicion might be the 'packet type' header on the tun/tap
> device. Do you need to provide one? Are you?
> --
> dwmw2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openconnect.diff
Type: application/octet-stream
Size: 10022 bytes
Desc: not available
URL: <>

More information about the openconnect-devel mailing list