Hi, this patchset is still in RFC status meaning that it is not ready yet and vpn does not work but sources compile ok and create connman-vpnd by default. I am sending it in order to get feedback in the early stages of vpnd development.
Changes to ConnMan 1.6: - all VPN plugins and code is moved into vpn/plugins directory - IP address functions moved from ipconfig.c to ipaddress.c so that the vpnd can use them - device creation is moved from inet.c to device.c because it is a more logical place and makes possible to reuse inet.c code in vpnd - log init takes now the program name and version number as a parameter - provider init and cleanup is removed from connman main.c - vpnd will reuse connman source but some of the code needed forking like ipconfig.c (interactions with connection.c and service.c), manager.c (vpnd has new dbus api), rtnl.c (calls technology which is not used in vpnd). The new files are named vpn-xxx.c in order to minimize the number of files that have same name both in src/ and vpn/ directories. - vpnd will reuse these parts of connman: logging (log.c), dbus errors (error.c), plugin mgmt (plugin.c), execing programs (task.c), IP address manipulation (ipaddress.c), interface/address mgmt (inet.c), generic dbus handling (dbus.c), storage handling (storage.c) - vpnd daemon is compiled if user enables any of the vpn plugins in configure - vpnd plugins are installed by default into /usr/lib/connman/plugins-vpn directory so that they are not confused with connman plugins TODO: - move src/provider.c code into vpnd, probably small amount of code will remain in provider.c that would then call the new connman vpn plugin - implement connman-vpn plugin that handles communication with vpnd - implement vpnd dbus api Comments? Anything totally wrong? Do this instead of that? Cheers, Jukka Jukka Rissanen (6): doc: VPN daemon API descriptions ipconfig: Move IP address API into separate ipaddress.c file device: Move device creation func into device.c log: Give program name and version in log init main: Do not call provider init/cleanup any more vpn: New vpn daemon that handles vpn connections and clients .gitignore | 3 + Makefile.am | 70 ++- Makefile.plugins | 107 ++-- configure.ac | 6 + doc/vpn-connection-api.txt | 118 ++++ doc/vpn-manager-api.txt | 50 ++ doc/vpn-overview.txt | 60 ++ include/device.h | 1 + include/inet.h | 1 - include/ipaddress.h | 56 ++ include/ipconfig.h | 19 +- plugins/iwmxsdk.c | 4 +- plugins/l2tp.c | 530 ---------------- plugins/openconnect.c | 281 --------- plugins/openvpn.c | 310 ---------- plugins/pptp.c | 336 ---------- plugins/vpn.c | 534 ---------------- plugins/vpn.h | 48 -- plugins/vpnc.c | 341 ----------- src/connman.h | 5 +- src/detect.c | 2 +- src/device.c | 178 ++++++ src/dhcp.c | 4 +- src/inet.c | 173 ------ src/ipaddress.c | 200 ++++++ src/ipconfig.c | 167 +---- src/log.c | 5 +- src/main.c | 5 +- src/plugin.c | 2 +- src/tethering.c | 4 +- unit/test-nat.c | 2 +- vpn/main.c | 257 ++++++++ vpn/plugins/l2tp.c | 530 ++++++++++++++++ vpn/plugins/openconnect.c | 282 +++++++++ vpn/plugins/openvpn.c | 311 ++++++++++ vpn/plugins/pptp.c | 336 ++++++++++ vpn/plugins/vpn.c | 536 ++++++++++++++++ vpn/plugins/vpn.h | 48 ++ vpn/plugins/vpnc.c | 342 +++++++++++ vpn/vpn-dbus.conf | 14 + vpn/vpn-dbus.h | 49 ++ vpn/vpn-ipconfig.c | 454 ++++++++++++++ vpn/vpn-manager.c | 125 ++++ vpn/vpn-polkit.conf | 10 + vpn/vpn-provider.c | 1457 ++++++++++++++++++++++++++++++++++++++++++++ vpn/vpn-provider.h | 121 ++++ vpn/vpn-rtnl.c | 1185 +++++++++++++++++++++++++++++++++++ vpn/vpn-rtnl.h | 65 ++ vpn/vpn.h | 98 +++ vpn/vpn.service.in | 11 + vpn/vpn.ver | 8 + 51 files changed, 7054 insertions(+), 2807 deletions(-) create mode 100644 doc/vpn-connection-api.txt create mode 100644 doc/vpn-manager-api.txt create mode 100644 doc/vpn-overview.txt create mode 100644 include/ipaddress.h delete mode 100644 plugins/l2tp.c delete mode 100644 plugins/openconnect.c delete mode 100644 plugins/openvpn.c delete mode 100644 plugins/pptp.c delete mode 100644 plugins/vpn.c delete mode 100644 plugins/vpn.h delete mode 100644 plugins/vpnc.c create mode 100644 src/ipaddress.c create mode 100644 vpn/main.c create mode 100644 vpn/plugins/l2tp.c create mode 100644 vpn/plugins/openconnect.c create mode 100644 vpn/plugins/openvpn.c create mode 100644 vpn/plugins/pptp.c create mode 100644 vpn/plugins/vpn.c create mode 100644 vpn/plugins/vpn.h create mode 100644 vpn/plugins/vpnc.c create mode 100644 vpn/vpn-dbus.conf create mode 100644 vpn/vpn-dbus.h create mode 100644 vpn/vpn-ipconfig.c create mode 100644 vpn/vpn-manager.c create mode 100644 vpn/vpn-polkit.conf create mode 100644 vpn/vpn-provider.c create mode 100644 vpn/vpn-provider.h create mode 100644 vpn/vpn-rtnl.c create mode 100644 vpn/vpn-rtnl.h create mode 100644 vpn/vpn.h create mode 100644 vpn/vpn.service.in create mode 100644 vpn/vpn.ver -- 1.7.9.5 _______________________________________________ connman mailing list [email protected] http://lists.connman.net/listinfo/connman
