On Mon, Jun 18, 2012 at 9:21 PM, Arne Schwabe <a...@rfc2549.org> wrote: > Am 12.05.12 21:31, schrieb Alon Bar-Lev: >> Platform independent interface for tun provider. >> >> Split the long tun.c into platform specific files using >> tun_engine interface. >> >> Functionality is the same. >> >> Maintenance will be much easier! new options, like stacking >> several interfaces and delegate partial control to plugin. >> > I have looked at your patchset. It going in the right direction I think.
Thanks! But as time goes by it becomes harder to rebase... and the 2.4 branch is not created... so I don't know what is the future of this patchset. Although I invested a lot of time in it and it has huge potential of eliminating duplicate code from the code base. I think this is simple enough to be in 2.3, but we had this discussion already. > For "my platform" I would like to have/implement a persisent tun which > works as follows: > > - proivde tun configuration including routes and ifconfig > - open tun with the information > - keep tun open > - on reconect: compare new configuration with old configuration. > - if nothing has changed keep the old tun > - otherwise first open the new tun then close the old tun >From the Android discussion I thought that the best will be to write a plugin "platform", delegate the ip configuration to the openvpn plugin interface. Then you can implement whatever logic you need, if I understand correctly, delegate ip management to the UI. > If we redesign the tun interface I would like to support this as well. > Having this interface would also make implementing platform specific > redirect-gateway and so easier. Also the redirect variant used by > Android (binding a socket to an interface) could be implemented as a > alternative. I think this should also be done in the plugin, using an inherited unix domain socket to pass the fd. I explain this more at the Android thread if I remember correctly. Thanks! Alon.