diff options
author | Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org> | 2001-03-23 04:41:52 +0000 |
---|---|---|
committer | Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org> | 2001-03-23 04:41:52 +0000 |
commit | cea48283088a8fd02b1eca42d054562216d8f75d (patch) | |
tree | 2e65ef1be1f5c19cfa0238055efb688c7b8dd28e /net/rp-pppoe | |
parent | 6a30f581c785a67bfa498464ead12b526e38ca92 (diff) | |
download | ports-cea48283088a8fd02b1eca42d054562216d8f75d.tar.gz ports-cea48283088a8fd02b1eca42d054562216d8f75d.zip |
Notes
Diffstat (limited to 'net/rp-pppoe')
-rw-r--r-- | net/rp-pppoe/Makefile | 81 | ||||
-rw-r--r-- | net/rp-pppoe/distinfo | 1 | ||||
-rw-r--r-- | net/rp-pppoe/files/patch-src::pppoe-server.c | 25 | ||||
-rw-r--r-- | net/rp-pppoe/files/patch-src::pppoe-sniff.c | 36 | ||||
-rw-r--r-- | net/rp-pppoe/files/patch-src::pppoe.c | 50 | ||||
-rw-r--r-- | net/rp-pppoe/files/patch-src::pppoe.h | 12 | ||||
-rw-r--r-- | net/rp-pppoe/pkg-comment | 1 | ||||
-rw-r--r-- | net/rp-pppoe/pkg-descr | 9 | ||||
-rw-r--r-- | net/rp-pppoe/pkg-message | 25 | ||||
-rw-r--r-- | net/rp-pppoe/pkg-plist | 22 |
10 files changed, 262 insertions, 0 deletions
diff --git a/net/rp-pppoe/Makefile b/net/rp-pppoe/Makefile new file mode 100644 index 000000000000..e4b5061102e0 --- /dev/null +++ b/net/rp-pppoe/Makefile @@ -0,0 +1,81 @@ +# New ports collection makefile for: popular pppd pppoe client +# Date created: 22 Mar 2001 +# Whom: Mario Sergio Fujikawa Ferreira <liouxFreeBSD.org> +# +# $FreeBSD$ +# + +PORTNAME= rp-pppoe +PORTVERSION= 2.8 +CATEGORIES= net +MASTER_SITES= http://www.roaringpenguin.com/pppoe/ + +MAINTAINER= lioux@FreeBSD.org + +BROKEN= Does not work well with FreeBSD\'s pppd, yet.\ + Need help to be fixed + +GNU_CONFIGURE= yes +USE_GMAKE= yes +CONFIGURE_WRKSRC= ${WRKSRC}/src +BUILD_WRKSRC= ${WRKSRC}/src + +MAN5= pppoe.conf.5 +MAN8= adsl-connect.8 adsl-setup.8 adsl-start.8 adsl-status.8 \ + adsl-stop.8 pppoe-relay.8 pppoe-server.8 pppoe-sniff.8 \ + pppoe.8 + +CONFIG_FILES= firewall-masq firewall-standalone pap-secrets \ + pppoe-server-options pppoe.conf +DOC_FILES= CHANGES HOW-TO-CONNECT KERNEL-MODE-PPPOE LICENSE \ + PROBLEMS +SCRIPT_FILES= adsl-connect adsl-init adsl-setup adsl-start \ + adsl-status adsl-stop + +post-patch: + @${PERL} -pi -ne "s!/etc/ppp!${PREFIX}/etc/ppp!g" ${WRKSRC}/man/* + @${PERL} -pi -ne 's!/etc/ppp!\$$\(prefix)/etc/ppp!g' \ + ${WRKSRC}/src/Makefile.in +.for file in adsl-connect adsl-init adsl-setup adsl-start + @${PERL} -pi -ne 's!/etc/+ppp!\$$\{prefix}/etc/ppp!g' \ + ${WRKSRC}/scripts/${file}.in +.endfor + @${PERL} -pi -ne 's!pty!tty!g' ${WRKSRC}/scripts/adsl-connect.in + @${PERL} -pi -ne 's!/var/lock/subsys/adsl!/var/tmp/rp_pppoe_adsl!g' \ + ${WRKSRC}/scripts/adsl-init.in +.for file in adsl-status adsl-stop.in + @${PERL} -pi -ne "s!/etc/ppp!${PREFIX}/etc/ppp!g" \ + ${WRKSRC}/scripts/${file} +.endfor + +do-install: +# Binaries +.for file in pppoe pppoe-server pppoe-sniff + @${INSTALL_PROGRAM} ${BUILD_WRKSRC}/${file} ${PREFIX}/sbin +.endfor +# Configurations + @${MKDIR} ${PREFIX}/etc/ppp +.for file in ${CONFIG_FILES} + @${INSTALL_DATA} ${WRKSRC}/configs/${file} \ + ${PREFIX}/etc/ppp/${file}.sample +.endfor +.if !exists(${PREFIX}/etc/ppp/pppoe.conf) + ${INSTALL_SCRIPT} ${PREFIX}/etc/ppp/pppoe.conf.sample \ + ${PREFIX}/etc/ppp/pppoe.conf +.endif +# Manual pages + @${INSTALL_MAN} ${WRKSRC}/man/${MAN5} ${PREFIX}/man/man5 +.for file in ${MAN8} + @${INSTALL_MAN} ${WRKSRC}/man/${file} ${PREFIX}/man/man8 +.endfor +# Scripts +.for file in ${SCRIPT_FILES} + @${INSTALL_SCRIPT} ${WRKSRC}/scripts/${file} ${PREFIX}/sbin +.endfor +# Documentation +.ifndef (NOPORTDOCS) + @${MKDIR} ${PREFIX}/share/doc/${PORTNAME} + @${INSTALL_DATA} ${WRKSRC}/doc/* ${PREFIX}/share/doc/${PORTNAME} +.endif /* NOPORTDOCS */ + +.include <bsd.port.mk> diff --git a/net/rp-pppoe/distinfo b/net/rp-pppoe/distinfo new file mode 100644 index 000000000000..6cab1ef76a77 --- /dev/null +++ b/net/rp-pppoe/distinfo @@ -0,0 +1 @@ +MD5 (rp-pppoe-2.8.tar.gz) = 2e39b83cac26527b625236cd96fc7bb3 diff --git a/net/rp-pppoe/files/patch-src::pppoe-server.c b/net/rp-pppoe/files/patch-src::pppoe-server.c new file mode 100644 index 000000000000..53e10a04d988 --- /dev/null +++ b/net/rp-pppoe/files/patch-src::pppoe-server.c @@ -0,0 +1,25 @@ +--- src/pppoe-server.c.orig Mon Feb 5 14:34:27 2001 ++++ src/pppoe-server.c Thu Mar 22 17:56:25 2001 +@@ -47,6 +47,10 @@ + #include <sys/wait.h> + #endif + ++#ifdef HAVE_SYS_PARAM_H ++#include <sys/param.h> ++#endif ++ + #include <signal.h> + + /* Hack for daemonizing */ +@@ -1032,7 +1036,11 @@ + char buffer[SMALLBUF]; + + argv[0] = "pppd"; ++#if (defined(BSD) && (BSD >= 199103)) ++ argv[1] = "tty"; ++#else /* Not BSD, e.g., Linux || Solaris */ + argv[1] = "pty"; ++#endif + + snprintf(buffer, SMALLBUF, "%s -I %s -e %d:%02x:%02x:%02x:%02x:%02x:%02x%s", + PPPOE_PATH, IfName, diff --git a/net/rp-pppoe/files/patch-src::pppoe-sniff.c b/net/rp-pppoe/files/patch-src::pppoe-sniff.c new file mode 100644 index 000000000000..7ff9ce55208c --- /dev/null +++ b/net/rp-pppoe/files/patch-src::pppoe-sniff.c @@ -0,0 +1,36 @@ +--- src/pppoe-sniff.c.orig Thu Mar 22 14:35:59 2001 ++++ src/pppoe-sniff.c Thu Mar 22 14:49:39 2001 +@@ -33,6 +33,9 @@ + void dlokack(int fd, char *bufp); + #endif + ++/* function prototype */ ++void sysErr(char const *); ++ + /* Default interface if no -I option given */ + #define DEFAULT_IF "eth0" + +@@ -43,6 +46,23 @@ + + char *IfName = NULL; /* Interface name */ + char *ServiceName = NULL; /* Service name */ ++ ++/********************************************************************** ++*%FUNCTION: sysErr ++*%ARGUMENTS: ++* str -- error message ++*%RETURNS: ++* Nothing ++*%DESCRIPTION: ++* Prints a message plus the errno value to syslog. ++***********************************************************************/ ++void ++sysErr(char const *str) ++{ ++ char buf[1024]; ++ sprintf(buf, "%.256s: %.256s", str, strerror(errno)); ++ printErr(buf); ++} + + /********************************************************************** + *%FUNCTION: parsePADRTags diff --git a/net/rp-pppoe/files/patch-src::pppoe.c b/net/rp-pppoe/files/patch-src::pppoe.c new file mode 100644 index 000000000000..1a941f1f03b0 --- /dev/null +++ b/net/rp-pppoe/files/patch-src::pppoe.c @@ -0,0 +1,50 @@ +--- src/pppoe.c.orig Thu Mar 22 02:50:33 2001 ++++ src/pppoe.c Thu Mar 22 14:42:44 2001 +@@ -109,7 +109,7 @@ + * packet before passing it here. + ***********************************************************************/ + void +-sessionDiscoveryPacket(PPPoEPacket *packet) ++sessionDiscoveryPacket(PPPoEConnection *conn, PPPoEPacket *packet) + { + /* Sanity check */ + if (packet->code != CODE_PADT) { +@@ -117,7 +117,7 @@ + } + + /* It's a PADT, all right. Is it for us? */ +- if (packet->session != Session) { ++ if (packet->session != conn->session) { + /* Nope, ignore it */ + return; + } +@@ -222,9 +222,9 @@ + /* check for buffered session data */ + while (BPF_BUFFER_HAS_DATA) { + if (conn->synchronous) { +- syncReadFromEth(conn->sessionSocket, optClampMSS); ++ syncReadFromEth(conn, conn->sessionSocket, optClampMSS); + } else { +- asyncReadFromEth(conn->sessionSocket, optClampMSS); ++ asyncReadFromEth(conn, conn->sessionSocket, optClampMSS); + } + } + #endif +@@ -642,7 +642,7 @@ + /* Make sure this is a session packet before processing further */ + type = etherType(&packet); + if (type == Eth_PPPOE_Discovery) { +- sessionDiscoveryPacket(&packet); ++ sessionDiscoveryPacket(conn,&packet); + } else if (type != Eth_PPPOE_Session) { + return; + } +@@ -767,7 +767,7 @@ + /* Make sure this is a session packet before processing further */ + type = etherType(&packet); + if (type == Eth_PPPOE_Discovery) { +- sessionDiscoveryPacket(&packet); ++ sessionDiscoveryPacket(conn,&packet); + } else if (type != Eth_PPPOE_Session) { + return; + } diff --git a/net/rp-pppoe/files/patch-src::pppoe.h b/net/rp-pppoe/files/patch-src::pppoe.h new file mode 100644 index 000000000000..553053e1df3e --- /dev/null +++ b/net/rp-pppoe/files/patch-src::pppoe.h @@ -0,0 +1,12 @@ +--- src/pppoe.h.orig Thu Mar 22 14:43:00 2001 ++++ src/pppoe.h Thu Mar 22 14:47:21 2001 +@@ -72,7 +72,8 @@ + #ifdef USE_BPF + extern int bpfSize; + struct PPPoEPacketStruct; +-void sessionDiscoveryPacket(struct PPPoEPacketStruct *packet); ++struct PPPoEConnectionStruct; ++void sessionDiscoveryPacket(struct PPPoEConnectionStruct *conn, struct PPPoEPacketStruct *packet); + #define BPF_BUFFER_IS_EMPTY (bpfSize <= 0) + #define BPF_BUFFER_HAS_DATA (bpfSize > 0) + #define ethhdr ether_header diff --git a/net/rp-pppoe/pkg-comment b/net/rp-pppoe/pkg-comment new file mode 100644 index 000000000000..630e3f8f7206 --- /dev/null +++ b/net/rp-pppoe/pkg-comment @@ -0,0 +1 @@ +The popular Roaring Penguin's PPPoE software diff --git a/net/rp-pppoe/pkg-descr b/net/rp-pppoe/pkg-descr new file mode 100644 index 000000000000..884f465be2a9 --- /dev/null +++ b/net/rp-pppoe/pkg-descr @@ -0,0 +1,9 @@ +PPPoE (Point-to-Point Protocol over Ethernet) is a protocol used +by many ADSL service providers. Roaring Penguin's PPPoE software +is a reliable program for connecting unix systems to PPPoE service +providers without requiring any kernel patches. + +It currently does not work under FreeBSD. It is being provided in +the hope that the community may help get it working. + +WWW: http://www.roaringpenguin.com/pppoe/ diff --git a/net/rp-pppoe/pkg-message b/net/rp-pppoe/pkg-message new file mode 100644 index 000000000000..e8f66d3a4a31 --- /dev/null +++ b/net/rp-pppoe/pkg-message @@ -0,0 +1,25 @@ +Understand for C and C++ can't be used without a license code. + +You need a limited time period license to run the product in +evaluation mode. One can be obtained in the www site. + +A permanent license can be purchased there, too. + +The Understand_c program will try to write a license file under +/usr/local/share/understand_c/license when you register it. + +Registration instructions: + +1) Make sure that the user running Understand_c when entering the +registration code has proper permissions to create files under +/usr/local/share/understand_c/license when your register it. +Understand_c will try to create a file under this directory to save +the registration information. This applies for both evaluation and +permanent licenses. + +2) Verify that the files created under +/usr/local/share/understand_c/license are accessible by all users +who will be using Understand_c. Usually ''chmod -R a=r+X +/usr/local/share/understand_c/license'' will do. + +http://www.scitools.com/ diff --git a/net/rp-pppoe/pkg-plist b/net/rp-pppoe/pkg-plist new file mode 100644 index 000000000000..e44553a22478 --- /dev/null +++ b/net/rp-pppoe/pkg-plist @@ -0,0 +1,22 @@ +sbin/adsl-connect +sbin/adsl-init +sbin/adsl-setup +sbin/adsl-start +sbin/adsl-status +sbin/adsl-stop +sbin/pppoe +sbin/pppoe-server +sbin/pppoe-sniff +%%PORTDOCS%%share/doc/rp-pppoe/CHANGES +%%PORTDOCS%%share/doc/rp-pppoe/HOW-TO-CONNECT +%%PORTDOCS%%share/doc/rp-pppoe/KERNEL-MODE-PPPOE +%%PORTDOCS%%share/doc/rp-pppoe/LICENSE +%%PORTDOCS%%share/doc/rp-pppoe/PROBLEMS +%%PORTDOCS%%@dirrm share/doc/rp-pppoe +etc/ppp/firewall-masq.sample +etc/ppp/firewall-standalone.sample +etc/ppp/pap-secrets.sample +etc/ppp/pppoe-server-options.sample +etc/ppp/pppoe.conf.sample +@unexec rmdir %D/etc/ppp 2>/dev/null || true +@unexec echo "If you are permanently removing pppoe, you should also ``rm -Rf ${PKG_PREFIX}/etc/ppp'' removing any configuration and password files left." | /usr/bin/fmt |