On Wed, 2018-01-10 at 16:50 +0000, Anisimov Vasiliy wrote:
> Hello!
> I’m trying to implement prototype with support of OpenConnect on iOS.
>  
> I’ve compiled OpenConnect with GnuTLS and all works fine on
> establishing connection step.
> But I can’t understand what I should do to adopt OpenConnect for
> usage iOS NEPacketTunnelFlow’s read and write packets methods.
> NEPacketTunnelFlow is high level abstraction under tun interfaces.
> And I don’t have access to tun device directly. I can just read and
> write IP packets using read and write methods.
>  
> Can you please help me to understand what I should change (maybe just
> key words) to be able setup tunnel from iOS framework and send
> packets received from NEPacketTunnelFlow to OpenConnect?

Overload the os_setup_tun(), os_write_tun() and os_read_tun() methods.
See tun-win32.c for an example.

You also need a notification that the tun is readable, ideally, to hook
into the polling mechanism.

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
openconnect-devel mailing list
openconnect-devel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/openconnect-devel

Reply via email to