1 PPPoL2TP-Android plugin 2 ======================= 3 4 This PPPoL2TP-Android plugin was written for AOSP project from scratch. It has 5 nothing to do with pppol2tp plugin from upstream ppp project [1]. 6 7 This plugin adds support for upstream kernel L2TP implementation in pppd 8 daemon. Only LAC part of L2TP is implemented, as we don't use Android devices 9 in LNS mode. 10 11 In general case, the execution flow for VPN startup on Android devices is: 12 1. Run IPSec client (racoon) 13 2. Run L2TP client (mtpd) 14 3. mtpd obtains "remote tunnel ID" and "remote session ID" from L2TP server 15 4. mtpd creates L2TP sockets (see [2] for details): 16 - tunnel management PPPoX socket 17 - session PPPoX data socket 18 5. mtpd runs pppd, passing arguments for pppol2tp-android plugin 19 6. pppd dlopen() pppol2tp-android plugin (because it receives corresponding\ 20 arguments from mtpd) 21 22 Main task of this plugin is to obtain session_fd socket from mtpd and pass it 23 back to pppd when .connect() callback is executed. In this respect it's similar 24 to old pppox.c implementation. The differences are next: 25 1. pppol2tp-android also obtains the second socket (for tunnel management) 26 which allows us to handle it properly 27 2. pppol2tp-android handles the setting of MTU/MRU size (which can be passed 28 to the plugin with pppd parameters) via kernel L2TP implementation 29 3. pppol2tp-android plugin is actually loaded dynamically with dlopen(), 30 as opposed to pppox.c which is hard-coded into pppd code 31 32 [1] https://github.com/paulusmack/ppp 33 [2] https://www.kernel.org/doc/Documentation/networking/l2tp.txt 34