Remove unfinished and unneeded PPP support
authorMarcel Holtmann <marcel@holtmann.org>
Sun, 6 Dec 2009 20:57:14 +0000 (21:57 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Sun, 6 Dec 2009 20:57:14 +0000 (21:57 +0100)
Makefile.plugins
README
bootstrap-configure
configure.ac
include/element.h
include/network.h
plugins/pppd.c [deleted file]
scripts/pppd-plugin.c [deleted file]
src/element.c
src/network.c

index 72451fc..93abe89 100644 (file)
@@ -150,13 +150,6 @@ plugins_dhclient_la_LDFLAGS = $(plugin_ldflags)
 endif
 endif
 
-if PPPD
-plugin_LTLIBRARIES += plugins/pppd.la
-plugin_objects += $(plugins_pppd_la_OBJECTS)
-plugins_pppd_la_CFLAGS = $(plugin_cflags) -DPPPD=\"@PPPD@\"
-plugins_pppd_la_LDFLAGS = $(plugin_ldflags)
-endif
-
 if RESOLVCONF
 if RESOLVCONF_BUILTIN
 builtin_modules += resolvconf
@@ -240,12 +233,6 @@ script_PROGRAMS += scripts/dhclient-script
 scripts_dhclient_script_LDADD = @DBUS_LIBS@
 endif
 
-if PPPD
-script_LTLIBRARIES += scripts/pppd-plugin.la
-
-scripts_pppd_plugin_la_LDFLAGS = -module -avoid-version
-endif
-
 
 EXTRA_DIST += plugins/polkit.policy scripts/dhclient.conf
 
diff --git a/README b/README
index 3b003e3..99a8f2e 100644 (file)
--- a/README
+++ b/README
@@ -33,7 +33,6 @@ In order to compile Connection Manager you need following software packages:
        - D-Bus library
        - udev library (optional)
        - PolicyKit (optional)
-       - PPP support (optional)
 
 To configure run:
        ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
@@ -62,13 +61,6 @@ For a working system, certain configuration options need to be enabled:
 
                Enable support for Bluetooth devices (requires BlueZ)
 
-       --enable-ppp
-
-               Enable PPP support for dialup connections (requires pppd)
-
-               The location of the pppd binary is auto-detected, but it
-               can be overwritten via --with-pppd=<path-to-binary>.
-
        --enable-udhcp
 
                Enable DHCP client support for BusyBox based systems
index 3132115..c14b420 100755 (executable)
@@ -28,7 +28,6 @@ fi
                --enable-dnsproxy=builtin \
                --enable-hso=builtin \
                --enable-mbm=builtin \
-               --enable-ppp \
                --enable-iwmx \
                --enable-iospm \
                --enable-polkit=builtin \
index 9062131..e774687 100644 (file)
@@ -180,23 +180,6 @@ AC_ARG_ENABLE(mbm,
 AM_CONDITIONAL(MBM, test "${enable_mbm}" != "no")
 AM_CONDITIONAL(MBM_BUILTIN, test "${enable_mbm}" = "builtin")
 
-AC_ARG_WITH(pppd, AC_HELP_STRING([--with-pppd=PROGRAM],
-       [specify location of pppd binary]), [path_pppd=${withval}])
-
-AC_ARG_ENABLE(ppp, AC_HELP_STRING([--enable-ppp],
-               [enable PPP support]), [enable_ppp=${enableval}])
-if (test "${enable_ppp}" = "yes"); then
-       if (test -z "${path_pppd}"); then
-               AC_PATH_PROG(PPPD, [pppd], [], $PATH:/sbin:/usr/sbin)
-       else
-               PPPD="${path_pppd}"
-               AC_SUBST(PPPD)
-       fi
-       AC_CHECK_HEADERS(pppd/pppd.h, enable_ppp=yes,
-                       AC_MSG_ERROR(PPP development files are required))
-fi
-AM_CONDITIONAL(PPPD, test "${enable_ppp}" = "yes")
-
 AC_CHECK_LIB(dl, dlopen, dummy=yes,
                        AC_MSG_ERROR(dynamic linking loader is required))
 
index cd1bf30..ec5a157 100644 (file)
@@ -46,7 +46,6 @@ enum connman_element_type {
        CONNMAN_ELEMENT_TYPE_DEVICE     = 3,
        CONNMAN_ELEMENT_TYPE_NETWORK    = 4,
        CONNMAN_ELEMENT_TYPE_SERVICE    = 5,
-       CONNMAN_ELEMENT_TYPE_PPP        = 6,
        CONNMAN_ELEMENT_TYPE_IPV4       = 7,
        CONNMAN_ELEMENT_TYPE_IPV6       = 8,
        CONNMAN_ELEMENT_TYPE_DHCP       = 9,
index f5004b8..605d2f6 100644 (file)
@@ -51,7 +51,6 @@ enum connman_network_type {
 enum connman_network_protocol {
        CONNMAN_NETWORK_PROTOCOL_UNKNOWN = 0,
        CONNMAN_NETWORK_PROTOCOL_IP      = 1,
-       CONNMAN_NETWORK_PROTOCOL_PPP     = 2,
 };
 
 enum connman_network_error {
diff --git a/plugins/pppd.c b/plugins/pppd.c
deleted file mode 100644 (file)
index bd026b9..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- *
- *  Connection Manager
- *
- *  Copyright (C) 2007-2009  Intel Corporation. All rights reserved.
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License version 2 as
- *  published by the Free Software Foundation.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#define CONNMAN_API_SUBJECT_TO_CHANGE
-#include <connman/plugin.h>
-#include <connman/driver.h>
-#include <connman/log.h>
-
-static int pppd_probe(struct connman_element *element)
-{
-       DBG("element %p name %s", element, element->name);
-
-       return -ENODEV;
-}
-
-static void pppd_remove(struct connman_element *element)
-{
-       DBG("element %p name %s", element, element->name);
-}
-
-static struct connman_driver pppd_driver = {
-       .name           = "pppd",
-       .type           = CONNMAN_ELEMENT_TYPE_PPP,
-       .probe          = pppd_probe,
-       .remove         = pppd_remove,
-};
-
-static int pppd_init(void)
-{
-       return connman_driver_register(&pppd_driver);
-}
-
-static void pppd_exit(void)
-{
-       connman_driver_unregister(&pppd_driver);
-}
-
-CONNMAN_PLUGIN_DEFINE(pppd, "Point-to-point protocol plugin", VERSION,
-               CONNMAN_PLUGIN_PRIORITY_DEFAULT, pppd_init, pppd_exit)
diff --git a/scripts/pppd-plugin.c b/scripts/pppd-plugin.c
deleted file mode 100644 (file)
index 81cb59c..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- *
- *  Connection Manager
- *
- *  Copyright (C) 2007-2009  Intel Corporation. All rights reserved.
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License version 2 as
- *  published by the Free Software Foundation.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <string.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-#include <pppd/pppd.h>
-#include <pppd/fsm.h>
-#include <pppd/ipcp.h>
-
-static void notifier_phasechange(void *data, int arg)
-{
-       printf("phasechange: data %p arg %d\n", data, arg);
-}
-
-static void notifier_exit(void *data, int arg)
-{
-       printf("exitnotify: data %p arg %d\n", data, arg);
-}
-
-static void notifier_ipup(void *data, int arg)
-{
-       ipcp_options opts = ipcp_gotoptions[0];
-       ipcp_options peer = ipcp_hisoptions[0];
-       struct in_addr ouraddr, hisaddr;
-
-       printf("ipup: data %p arg %d\n", data, arg);
-
-       memcpy(&ouraddr, &opts.ouraddr, sizeof(ouraddr));
-       memcpy(&hisaddr, &peer.hisaddr, sizeof(hisaddr));
-
-       printf("%s: %s -> %s\n",
-                       ifname, inet_ntoa(ouraddr), inet_ntoa(hisaddr));
-
-       script_unsetenv("USEPEERDNS");
-       script_unsetenv("DNS1");
-       script_unsetenv("DNS2");
-}
-
-static void notifier_ipdown(void *data, int arg)
-{
-       printf("ipdown: data %p arg %d\n", data, arg);
-}
-
-char pppd_version[] = VERSION;
-
-int plugin_init(void);
-
-int plugin_init(void)
-{
-#if 0
-       path_ipup[0] = '\0';
-       path_ipdown[0] = '\0';
-#endif
-
-       add_notifier(&phasechange, notifier_phasechange, NULL);
-       add_notifier(&exitnotify, notifier_exit, NULL);
-
-       add_notifier(&ip_up_notifier, notifier_ipup, NULL);
-       add_notifier(&ip_down_notifier, notifier_ipdown, NULL);
-
-       return 0;
-}
index 9c92166..5498762 100644 (file)
@@ -56,8 +56,6 @@ static const char *type2string(enum connman_element_type type)
                return "network";
        case CONNMAN_ELEMENT_TYPE_SERVICE:
                return "service";
-       case CONNMAN_ELEMENT_TYPE_PPP:
-               return "ppp";
        case CONNMAN_ELEMENT_TYPE_IPV4:
                return "ipv4";
        case CONNMAN_ELEMENT_TYPE_IPV6:
index 7c13f0d..c3f4a8d 100644 (file)
@@ -688,9 +688,6 @@ static gboolean set_connected(gpointer user_data)
                case CONNMAN_NETWORK_PROTOCOL_IP:
                        type = CONNMAN_ELEMENT_TYPE_DHCP;
                        break;
-               case CONNMAN_NETWORK_PROTOCOL_PPP:
-                       type = CONNMAN_ELEMENT_TYPE_PPP;
-                       break;
                }
 
                __connman_device_increase_connections(network->device);