summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuergen Beisert <j.beisert@pengutronix.de>2008-11-21 10:59:38 +0000
committerJuergen Beisert <j.beisert@pengutronix.de>2008-11-21 10:59:38 +0000
commitaa91effee74bc77682e5ae4e9462470f44022c49 (patch)
tree256cc80b1cc6eccc22025eb0cc6e282ab6fa83d6
parent1b793413c0c273990182e081ca7be255a0591ba3 (diff)
downloadptxdist-aa91effee74bc77682e5ae4e9462470f44022c49.tar.gz
ptxdist-aa91effee74bc77682e5ae4e9462470f44022c49.tar.xz
* pppd: Extend configuration
- support the plugins - add more config switches - add correct dependencies git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunks/ptxdist-trunk@9145 33e552b5-05e3-0310-8538-816dae2090ed
-rw-r--r--rules/ppp.in144
-rw-r--r--rules/ppp.make165
2 files changed, 261 insertions, 48 deletions
diff --git a/rules/ppp.in b/rules/ppp.in
index 385d0be8e..5974128fe 100644
--- a/rules/ppp.in
+++ b/rules/ppp.in
@@ -2,6 +2,12 @@
menuconfig PPP
tristate
prompt "ppp "
+ select LIBC_DL
+ select LIBPCAP if PPP_FILTER
+ select LIBPCAP_IPV6 if (PPP_IPV6 && PPP_FILTER)
+ select OPENSSL if PPP_SRP
+ select LIBC_RESOLV if PPP_PLUGINS
+ select LIBC_CRYPT if PPP_NEEDS_CRYPT
help
Just like SLIP, PPP is a protocol to send
datagrams across a serial connection, but
@@ -13,34 +19,156 @@ menuconfig PPP
if PPP
+comment "build features"
+
+config PPP_IPV6
+ bool
+ prompt "enable ipv6 support"
+ help
+ Enable IPV6 support
+
config PPP_MS_CHAP
bool
- prompt "support Micro$oft's MS-CHAP authentication protocol"
+ prompt "MS-CHAP"
+ select PPP_NEEDS_CRYPT
help
- FIXME: This item needs to be documented
+ support Micro$oft's MS-CHAP authentication protocol
config PPP_SHADOW
bool
prompt "ppp server: support for shadow passwords"
help
- FIXME: This item needs to be documented
+ Used when your pppd runs as a dialin server. Not required if it
+ is intended to run as client only.
+
+config PPP_IPX
+ bool
+ prompt "support IPX protocol"
+ help
+ For networking with Novell. Presently only if your kernel has
+ been configured to include IPX support.
-config PPP_PLUGINS
+config PPP_FILTER
+ bool
+ prompt "support filter"
+ help
+ If you run your pppd on demand its a good idea to hangup when
+ there is no traffic on the line. This entry provides the filter
+ to specify what counts as traffic and what is to be ignored.
+
+config PPP_MULTILINK
+ bool
+ prompt "support multilink"
+ select PPP_TDB
+ help
+ Multilink provides the capability to combine two or more PPP links
+ between a pair of machines into a single 'bundle', which appears as
+ a single virtual PPP link which has the combined bandwidth of the
+ individual links.
+
+menuconfig PPP_PLUGINS
bool
prompt "support plugins"
+ select PPP_NEEDS_CRYPT
+ help
+ If you want to use pppd to handle ADSL you must enable this entry
+ (refer 'ppp over ethernet').
+
+if PPP_PLUGINS
+
+config PPP_OATM
+ bool
+ prompt "ppp over atm"
help
FIXME: This item needs to be documented
-config PPP_IPX
+config PPP_RADIUS
bool
- prompt "support IPX protocol"
+ prompt "radius"
help
FIXME: This item needs to be documented
-config PPP_MULTILINK
+config PPP_RADATTR
bool
- prompt "support multilink"
+ prompt "radattr"
+ help
+ FIXME: This item needs to be documented
+
+config PPP_RADREALMS
+ bool
+ prompt "radrealms"
+ help
+ FIXME: This item needs to be documented
+
+config PPP_OE
+ bool
+ default y
+ prompt "ppp over ethernet"
+ help
+ Enable this if you are using a DSL modem connected via ethernet to
+ your host.
+
+config PPP_MINCONN
+ bool
+ prompt "minconn"
+ help
+ FIXME: This item needs to be documented
+
+config PPP_PASSPROMPT
+ bool
+ prompt "passprompt"
+ help
+ FIXME: This item needs to be documented
+
+config PPP_PASSWORDFD
+ bool
+ prompt "passwordfd"
help
FIXME: This item needs to be documented
+config PPP_WINBIND
+ bool
+ prompt "winbind"
+ help
+ FIXME: This item needs to be documented
+
+endif
+
+config PPP_NEEDS_CRYPT
+ bool
+
+config PPP_MS_CBCP
+ bool
+ help
+ M$ proprietary Callback Control Protocol
+
+config PPP_TDB
+ bool
+
+config PPP_SRP
+ bool
+
+comment "install options"
+
+config PPP_INST_CHAT
+ bool
+ prompt "install chat"
+ help
+ The chat program defines a conversational exchange between the
+ computer and the modem.
+
+config PPP_INST_PPPDUMP
+ bool
+ prompt "install pppdump"
+ help
+ The pppdump utility converts the files written using the record
+ option of pppd into a human-readable format.
+
+config PPP_INST_PPPSTATS
+ bool
+ prompt "install pppstats"
+ help
+ The pppstats utility reports PPP-related statistics at regular
+ intervals for a specified PPP interface.
+
endif
diff --git a/rules/ppp.make b/rules/ppp.make
index cf5e1654e..743f8e3f1 100644
--- a/rules/ppp.make
+++ b/rules/ppp.make
@@ -3,6 +3,7 @@
#
# Copyright (C) 2003 by Marc Kleine-Budde <kleine-budde@gmx.de> for
# GYRO net GmbH <info@gyro-net.de>, Hannover, Germany
+# Copyright (C) 2008 by Juergen Beisert <juergen@kreuzholzen.de>
#
# See CREDITS for details about who has contributed to this project.
#
@@ -30,49 +31,63 @@ PPP_DIR := $(BUILDDIR)/$(PPP)
# Get
# ----------------------------------------------------------------------------
-ppp_get: $(STATEDIR)/ppp.get
-
-$(STATEDIR)/ppp.get: $(ppp_get_deps_default)
- @$(call targetinfo, $@)
- @$(call touch, $@)
-
$(PPP_SOURCE):
- @$(call targetinfo, $@)
+ @$(call targetinfo)
@$(call get, PPP)
# ----------------------------------------------------------------------------
# Extract
# ----------------------------------------------------------------------------
-ppp_extract: $(STATEDIR)/ppp.extract
-
-$(STATEDIR)/ppp.extract: $(ppp_extract_deps_default)
- @$(call targetinfo, $@)
+$(STATEDIR)/ppp.extract:
+ @$(call targetinfo)
@$(call clean, $(PPP_DIR))
@$(call extract, PPP)
@$(call patchin, PPP)
- @$(call touch, $@)
+ @$(call touch)
# ----------------------------------------------------------------------------
# Prepare
# ----------------------------------------------------------------------------
-ppp_prepare: $(STATEDIR)/ppp.prepare
-
PPP_PATH := PATH=$(CROSS_PATH)
-PPP_MAKEVARS := CROSS=$(CROSS_ENV)
+PPP_ENV := CROSS=$(CROSS_ENV)
-$(STATEDIR)/ppp.prepare: $(ppp_prepare_deps_default)
- @$(call targetinfo, $@)
- cd $(PPP_DIR) && \
- ./configure
+#
+# path to where the shared library based plugins get installed
+# (and be searched at runtime)
+#
+PPP_SHARED_INST_PATH := /usr/lib/pppd/$(PPP_VERSION)
+
+$(STATEDIR)/ppp.prepare:
+ @$(call targetinfo)
+ cd $(PPP_DIR) && $(PPP_PATH) $(PPP_ENV) ./configure
+
+# FIXME: Should also be entries in the menu
+ @$(call disable_sh,$(PPP_DIR)/pppd/Makefile,MPPE=y)
+
+ifdef PTXCONF_PPP_TDB
+ @$(call enable_sh,$(PPP_DIR)/pppd/Makefile,USE_TDB=y)
+else
+ @$(call disable_sh,$(PPP_DIR)/pppd/Makefile,USE_TDB=y)
+endif
ifdef PTXCONF_PPP_MS_CHAP
@$(call enable_sh,$(PPP_DIR)/pppd/Makefile,CHAPMS=y)
- @$(call enable_sh,$(PPP_DIR)/pppd/Makefile,USE_CRYPT=y)
else
@$(call disable_sh,$(PPP_DIR)/pppd/Makefile,CHAPMS=y)
- @$(call disable_sh,$(PPP_DIR)/pppd/Makefile,USE_CRYPT=y)
+endif
+
+ifdef PTXCONF_PPP_IPV6
+ @$(call enable_sh,$(PPP_DIR)/pppd/Makefile,HAVE_INET6=y)
+else
+ @$(call disable_sh,$(PPP_DIR)/pppd/Makefile,HAVE_INET6=y)
+endif
+
+ifdef PTXCONF_PPP_MS_CBCP
+ @$(call enable_sh,$(PPP_DIR)/pppd/Makefile,CBCP=y)
+else
+ @$(call disable_sh,$(PPP_DIR)/pppd/Makefile,CBCP=y)
endif
ifdef PTXCONF_PPP_SHADOW
@@ -81,6 +96,12 @@ else
@$(call disable_sh,$(PPP_DIR)/pppd/Makefile,HAS_SHADOW=y)
endif
+ifdef PTXCONF_PPP_NEEDS_CRYPT
+ @$(call enable_sh,$(PPP_DIR)/pppd/Makefile,USE_CRYPT=y)
+else
+ @$(call disable_sh,$(PPP_DIR)/pppd/Makefile,USE_CRYPT=y)
+endif
+
ifdef PTXCONF_PPP_PLUGINS
@$(call enable_sh,$(PPP_DIR)/pppd/Makefile,PLUGIN=y)
else
@@ -93,41 +114,37 @@ ifndef PTXCONF_PPP_IPX
endif
ifndef PTXCONF_PPP_MULTILINK
+ @$(call disable_sh,$(PPP_DIR)/pppd/Makefile,HAVE_MULTILINK=y)
@perl -p -i -e 's/-DHAVE_MULTILINK //' $(PPP_DIR)/pppd/Makefile
@perl -p -i -e 's/multilink.o //' $(PPP_DIR)/pppd/Makefile
endif
- @$(call touch, $@)
+
+ @$(call touch)
# ----------------------------------------------------------------------------
# Compile
# ----------------------------------------------------------------------------
-ppp_compile: $(STATEDIR)/ppp.compile
-
-$(STATEDIR)/ppp.compile: $(ppp_compile_deps_default)
- @$(call targetinfo, $@)
+$(STATEDIR)/ppp.compile:
+ @$(call targetinfo)
cd $(PPP_DIR) && \
- $(PPP_PATH) $(MAKE) $(PPP_MAKEVARS) $(PARALLELMFLAGS_BROKEN)
- @$(call touch, $@)
+ $(PPP_PATH) $(MAKE) $(PPP_ENV) $(PARALLELMFLAGS_BROKEN)
+ @$(call touch)
# ----------------------------------------------------------------------------
# Install
# ----------------------------------------------------------------------------
-ppp_install: $(STATEDIR)/ppp.install
-
-$(STATEDIR)/ppp.install: $(ppp_install_deps_default)
- @$(call targetinfo, $@)
- @$(call touch, $@)
+$(STATEDIR)/ppp.install:
+ @$(call targetinfo)
+ @$(call touch)
# ----------------------------------------------------------------------------
# Target-Install
# ----------------------------------------------------------------------------
-ppp_targetinstall: $(STATEDIR)/ppp.targetinstall
-
-$(STATEDIR)/ppp.targetinstall: $(ppp_targetinstall_deps_default)
- @$(call targetinfo, $@)
+$(STATEDIR)/ppp.targetinstall:
+ @$(call targetinfo)
@$(call install_init, ppp)
@$(call install_fixup, ppp,PACKAGE,ppp)
@@ -138,16 +155,84 @@ $(STATEDIR)/ppp.targetinstall: $(ppp_targetinstall_deps_default)
@$(call install_fixup, ppp,DEPENDS,)
@$(call install_fixup, ppp,DESCRIPTION,missing)
- @$(call install_copy, ppp, 0, 0, 0755, $(PPP_DIR)/pppd/pppd, /usr/sbin/pppd)
- @$(call install_copy, ppp, 0, 0, 0755, $(PPP_DIR)/chat/chat, /usr/sbin/chat)
+ @$(call install_copy, ppp, 0, 0, 0755, \
+ $(PPP_DIR)/pppd/pppd, /usr/sbin/pppd)
+
+ifdef PTXCONF_PPP_INST_CHAT
+ @$(call install_copy, ppp, 0, 0, 0755, \
+ $(PPP_DIR)/chat/chat, /usr/sbin/chat)
+endif
# install configuration files
+ @$(call install_alternative, ppp, 0, 0, 0600, /etc/ppp/options, n)
+ @$(call install_alternative, ppp, 0, 0, 0750, /etc/ppp/ip-up, n)
+ @$(call install_alternative, ppp, 0, 0, 0750, /etc/ppp/ip-down, n)
@$(call install_alternative, ppp, 0, 0, 0600, /etc/ppp/options.server, n)
@$(call install_alternative, ppp, 0, 0, 0600, /etc/ppp/options.ttyS0, n)
@$(call install_alternative, ppp, 0, 0, 0600, /etc/ppp/pap-secrets, n)
+ @$(call install_alternative, ppp, 0, 0, 0750, /etc/init.d/pppd, n)
+
+ifdef PTXCONF_PPP_INST_PPPDUMP
+ @$(call install_copy, ppp, 0, 0, 0755, \
+ $(PPP_DIR)/pppdump/pppdump, /usr/sbin/pppdump)
+endif
+ifdef PTXCONF_PPP_INST_PPPSTATS
+ @$(call install_copy, ppp, 0, 0, 0755, \
+ $(PPP_DIR)/pppstats/pppstats, /usr/sbin/pppstats)
+endif
+
+ifdef PTXCONF_PPP_PLUGINS
+ @$(call install_copy, ppp, 0, 0, 0755, $(PPP_SHARED_INST_PATH))
+
+ifdef PTXCONF_PPP_OATM
+ @$(call install_copy, ppp, 0, 0, 0644, \
+ $(PPP_DIR)/pppd/plugins/pppoatm/pppoatm.so, \
+ $(PPP_SHARED_INST_PATH)/pppoatm.so)
+endif
+ifdef PTXCONF_PPP_RADIUS
+ @$(call install_copy, ppp, 0, 0, 0644, \
+ $(PPP_DIR)/pppd/plugins/radius/radius.so, \
+ $(PPP_SHARED_INST_PATH)/radius.so)
+endif
+ifdef PTXCONF_PPP_RADATTR
+ @$(call install_copy, ppp, 0, 0, 0644, \
+ $(PPP_DIR)/pppd/plugins/radius/radattr.so, \
+ $(PPP_SHARED_INST_PATH)/radattr.so)
+endif
+ifdef PTXCONF_PPP_RADREALMS
+ @$(call install_copy, ppp, 0, 0, 0644, \
+ $(PPP_DIR)/pppd/plugins/radius/radrealms.so, \
+ $(PPP_SHARED_INST_PATH)/radrealms.so)
+endif
+ifdef PTXCONF_PPP_OE
+ @$(call install_copy, ppp, 0, 0, 0644, \
+ $(PPP_DIR)/pppd/plugins/rp-pppoe/rp-pppoe.so, \
+ $(PPP_SHARED_INST_PATH)/rp-pppoe.so)
+endif
+ifdef PTXCONF_PPP_MINCONN
+ @$(call install_copy, ppp, 0, 0, 0644, \
+ $(PPP_DIR)/pppd/plugins/minconn.so, \
+ $(PPP_SHARED_INST_PATH)/minconn.so)
+endif
+ifdef PTXCONF_PPP_PASSPROMPT
+ @$(call install_copy, ppp, 0, 0, 0644, \
+ $(PPP_DIR)/pppd/plugins/passprompt.so, \
+ $(PPP_SHARED_INST_PATH)/passprompt.so)
+endif
+ifdef PTXCONF_PPP_PASSWORDFD
+ @$(call install_copy, ppp, 0, 0, 0644, \
+ $(PPP_DIR)/pppd/plugins/passwordfd.so, \
+ $(PPP_SHARED_INST_PATH)/passwordfd.so)
+endif
+ifdef PTXCONF_PPP_WINBIND
+ @$(call install_copy, ppp, 0, 0, 0644, \
+ $(PPP_DIR)/pppd/plugins/winbind.so, \
+ $(PPP_SHARED_INST_PATH)/winbind.so)
+endif
+endif
@$(call install_finish, ppp)
- @$(call touch, $@)
+ @$(call touch)
# ----------------------------------------------------------------------------
# Clean