1 diff -ruN ppp-2.4.2/TODO ppp-cvs-20040427/TODO
2 --- ppp-2.4.2/TODO 1970-01-01 01:00:00.000000000 +0100
3 +++ ppp-cvs-20040427/TODO 1999-03-22 07:38:09.000000000 +0100
7 +- How should we handle the case where MTU > MRU?
8 + Should we reduce the IP MTU to the link MRU (so TCP MSS is correct)?
11 + + set the IP address, possibly based on the peer's identity
12 + + have external checking of PAP user/password, CHAP response
13 + + supply the PAP user/password, CHAP secret
14 + + decide which tty to use (locking, DTR issues)
16 +- Integrate callback stuff?
18 +- Implement link quality monitoring
20 +- Implement other network control protocols
21 diff -ruN ppp-2.4.2/chat/chat.c ppp-cvs-20040427/chat/chat.c
22 --- ppp-2.4.2/chat/chat.c 2003-03-30 10:23:48.000000000 +0200
23 +++ ppp-cvs-20040427/chat/chat.c 2004-01-17 06:50:11.000000000 +0100
28 -static const char rcsid[] = "$Id: chat.c,v 1.29 2003/03/04 06:17:21 fcusack Exp $";
29 +static const char rcsid[] = "$Id: chat.c,v 1.30 2004/01/17 05:47:55 carlsonj Exp $";
34 void *copy_of __P((char *s));
35 char *grow __P((char *s, char **p, size_t len));
36 void usage __P((void));
37 -void logf __P((const char *fmt, ...));
38 +void msgf __P((const char *fmt, ...));
39 void fatal __P((int code, const char *fmt, ...));
40 SIGTYPE sigalrm __P((int signo));
41 SIGTYPE sigint __P((int signo));
44 * Send a message to syslog and/or stderr.
46 -void logf __V((const char *fmt, ...))
47 +void msgf __V((const char *fmt, ...))
52 fatal(2, "Can't set file mode flags on stdin: %m");
61 * The expectation did not occur. This is terminal.
64 - logf("Failed (%s)", fail_reason);
65 + msgf("Failed (%s)", fail_reason);
73 abort_string[n_aborts++] = s1;
76 - logf("abort on (%v)", s);
77 + msgf("abort on (%v)", s);
85 - logf("clear abort on (%v)", s);
86 + msgf("clear abort on (%v)", s);
91 report_string[n_reports++] = s1;
94 - logf("report (%v)", s);
95 + msgf("report (%v)", s);
103 - logf("clear report (%v)", s);
104 + msgf("clear report (%v)", s);
108 @@ -1173,7 +1173,7 @@
109 timeout = DEFAULT_CHAT_TIMEOUT;
112 - logf("timeout set to %d seconds", timeout);
113 + msgf("timeout set to %d seconds", timeout);
117 @@ -1236,7 +1236,7 @@
118 return ((int)c & 0x7F);
121 - logf("warning: read() on stdin returned %d", status);
122 + msgf("warning: read() on stdin returned %d", status);
125 if ((status = fcntl(0, F_GETFL, 0)) == -1)
126 @@ -1264,7 +1264,7 @@
130 - logf("warning: write() on stdout returned %d", status);
131 + msgf("warning: write() on stdout returned %d", status);
134 if ((status = fcntl(0, F_GETFL, 0)) == -1)
135 @@ -1286,9 +1286,9 @@
138 if (errno == EINTR || errno == EWOULDBLOCK)
139 - logf(" -- write timed out");
140 + msgf(" -- write timed out");
142 - logf(" -- write failed: %m");
143 + msgf(" -- write failed: %m");
147 @@ -1303,9 +1303,9 @@
151 - logf("send (??????)");
152 + msgf("send (??????)");
154 - logf("send (%v)", s);
155 + msgf("send (%v)", s);
158 alarm(timeout); alarmed = 0;
159 @@ -1392,17 +1392,17 @@
160 minlen = (len > sizeof(fail_buffer)? len: sizeof(fail_buffer)) - 1;
163 - logf("expect (%v)", string);
164 + msgf("expect (%v)", string);
167 - logf("expect string is too long");
168 + msgf("expect string is too long");
180 @@ -1416,16 +1416,16 @@
182 if (verbose && c == '\n') {
184 - logf(""); /* blank line */
185 + msgf(""); /* blank line */
187 - logf("%0.*v", s - logged, logged);
188 + msgf("%0.*v", s - logged, logged);
194 if (verbose && s >= logged + 80) {
195 - logf("%0.*v", s - logged, logged);
196 + msgf("%0.*v", s - logged, logged);
200 @@ -1470,8 +1470,8 @@
201 strncmp(s - len, string, len) == 0) {
204 - logf("%0.*v", s - logged, logged);
205 - logf(" -- got it\n");
206 + msgf("%0.*v", s - logged, logged);
207 + msgf(" -- got it\n");
211 @@ -1484,8 +1484,8 @@
212 strncmp(s - abort_len, abort_string[n], abort_len) == 0) {
215 - logf("%0.*v", s - logged, logged);
216 - logf(" -- failed");
217 + msgf("%0.*v", s - logged, logged);
218 + msgf(" -- failed");
222 @@ -1499,7 +1499,7 @@
224 if (logged < s - minlen) {
226 - logf("%0.*v", s - logged, logged);
227 + msgf("%0.*v", s - logged, logged);
231 @@ -1509,16 +1509,16 @@
234 if (alarmed && verbose)
235 - logf("warning: alarm synchronization problem");
236 + msgf("warning: alarm synchronization problem");
241 if (verbose && printed) {
243 - logf(" -- read timed out");
244 + msgf(" -- read timed out");
246 - logf(" -- read failed: %m");
247 + msgf(" -- read failed: %m");
251 diff -ruN ppp-2.4.2/configure ppp-cvs-20040427/configure
252 --- ppp-2.4.2/configure 2002-11-09 12:24:41.000000000 +0100
253 +++ ppp-cvs-20040427/configure 2004-01-17 06:50:11.000000000 +0100
256 -# $Id: configure,v 1.30 2002/11/02 19:48:12 carlsonj Exp $
257 +# $Id: configure,v 1.31 2004/01/17 05:47:55 carlsonj Exp $
259 # if [ -d /NextApps ]; then
263 5.[1-6]*) state="known"; ksrc="solaris"; makext="sol2";;
265 - if [ -x /opt/SUNWspro/bin/cc ] &&
266 + if [ -x /opt/SUNWspro/bin/cc -a "$1" != "gcc" ] &&
267 /opt/SUNWspro/bin/cc -flags >/dev/null 2>&1; then
268 : # use Sun WorkShop compiler
269 elif gcc --version >/dev/null 2>&1; then
270 diff -ruN ppp-2.4.2/contrib/pppgetpass/Makefile.linux ppp-cvs-20040427/contrib/pppgetpass/Makefile.linux
271 --- ppp-2.4.2/contrib/pppgetpass/Makefile.linux 1999-11-15 05:08:24.000000000 +0100
272 +++ ppp-cvs-20040427/contrib/pppgetpass/Makefile.linux 1970-01-01 01:00:00.000000000 +0100
274 -all: pppgetpass.vt pppgetpass.gtk
276 -pppgetpass.vt: pppgetpass.vt.o
278 -pppgetpass.gtk: pppgetpass.gtk.o
279 - $(CC) $(LDFLAGS) pppgetpass.gtk.o `gtk-config --libs` -o pppgetpass.gtk
280 -pppgetpass.gtk.o: pppgetpass.gtk.c
281 - $(CC) $(CFLAGS) -c pppgetpass.gtk.c `gtk-config --cflags`
284 - install -m 755 pppgetpass.sh /usr/bin/pppgetpass
285 - install -m 4755 -o root -g root pppgetpass.vt /usr/bin/
286 - install -m 755 -o root -g root pppgetpass.gtk /usr/X11/bin/
289 - rm -f *.o pppgetpass.gtk pppgetpass.vt core
290 diff -ruN ppp-2.4.2/contrib/pppgetpass/pppgetpass.8 ppp-cvs-20040427/contrib/pppgetpass/pppgetpass.8
291 --- ppp-2.4.2/contrib/pppgetpass/pppgetpass.8 1999-11-15 05:08:24.000000000 +0100
292 +++ ppp-cvs-20040427/contrib/pppgetpass/pppgetpass.8 1970-01-01 01:00:00.000000000 +0100
294 -.TH PPPGETPASS 8 "26 Sep 1999"
296 -pppgetpass \- prompt for PAP password
302 -the outer half of a plugin for PAP password prompting in pppd.
303 -If the peer requires PAP, and the
305 -plugin is loaded into pppd, it will run
306 -.B /usr/sbin/pppgetpass
307 -(or another program specified by the
309 -option) to prompt the user for the password.
312 diff -ruN ppp-2.4.2/contrib/pppgetpass/pppgetpass.gtk.c ppp-cvs-20040427/contrib/pppgetpass/pppgetpass.gtk.c
313 --- ppp-2.4.2/contrib/pppgetpass/pppgetpass.gtk.c 1999-11-15 05:08:24.000000000 +0100
314 +++ ppp-cvs-20040427/contrib/pppgetpass/pppgetpass.gtk.c 1970-01-01 01:00:00.000000000 +0100
317 -#include <gdk/gdk.h>
318 -#include <gtk/gtkwindow.h>
319 -#include <gtk/gtkmain.h>
320 -#include <gtk/gtkbutton.h>
321 -#include <gtk/gtkvbox.h>
322 -#include <gtk/gtklabel.h>
323 -#include <gtk/gtkentry.h>
324 -#include <gtk/gtksignal.h>
335 -static void okpressed(void *widget, void *clientdata)
337 - GtkWidget *answer=clientdata;
343 - pass=gtk_entry_get_text(GTK_ENTRY(answer));
345 - passlen=strlen(pass);
349 - if((wrote=write(outfd, pass, passlen))!=passlen) {
351 - syslog(LOG_ERR, "write error on outpipe: %m");
353 - syslog(LOG_ERR, "short write on outpipe");
359 -int main(int argc, char **argv)
361 - GtkWidget *mainwindow, *vbox, *question, *answer, *ok;
363 - gtk_init(&argc, &argv);
365 - openlog(argv[0], LOG_PID, LOG_DAEMON);
367 - syslog(LOG_WARNING, "Usage error");
370 - outfd=atoi(argv[3]);
371 - mainwindow=gtk_window_new(GTK_WINDOW_TOPLEVEL);
372 - gtk_window_set_title(GTK_WINDOW(mainwindow), "pppgetpass");
373 - gtk_signal_connect(GTK_OBJECT(mainwindow), "destroy",
374 - GTK_SIGNAL_FUNC(gtk_main_quit), 0);
376 - vbox=gtk_vbox_new(FALSE, 5);
377 - gtk_container_add(GTK_CONTAINER(mainwindow), vbox);
378 - gtk_widget_show(vbox);
380 - if(argv[1][0] && argv[2][0])
381 - snprintf(buf, sizeof buf, "Password for PPP client %s on server %s: ", argv[1], argv[2]);
382 - else if(argv[1][0] && !argv[2][0])
383 - snprintf(buf, sizeof buf, "Password for PPP client %s: ", argv[1]);
384 - else if(!argv[1][0] && argv[2][0])
385 - snprintf(buf, sizeof buf, "Password for PPP on server %s: ", argv[2]);
387 - snprintf(buf, sizeof buf, "Enter PPP password: ");
388 - question=gtk_label_new(buf);
389 - gtk_box_pack_start(GTK_BOX(vbox), question, FALSE, TRUE, 0);
390 - gtk_widget_show(question);
392 - answer=gtk_entry_new();
393 - gtk_entry_set_visibility(GTK_ENTRY(answer), 0);
394 - gtk_box_pack_start(GTK_BOX(vbox), answer, FALSE, TRUE, 0);
395 - gtk_widget_show(answer);
397 - ok=gtk_button_new_with_label("OK");
398 - gtk_box_pack_start(GTK_BOX(vbox), ok, FALSE, TRUE, 0);
399 - gtk_signal_connect(GTK_OBJECT(ok), "clicked",
400 - GTK_SIGNAL_FUNC(okpressed), answer);
401 - gtk_widget_show(ok);
403 - gtk_widget_show(mainwindow);
408 diff -ruN ppp-2.4.2/contrib/pppgetpass/pppgetpass.sh ppp-cvs-20040427/contrib/pppgetpass/pppgetpass.sh
409 --- ppp-2.4.2/contrib/pppgetpass/pppgetpass.sh 1999-11-15 05:08:24.000000000 +0100
410 +++ ppp-cvs-20040427/contrib/pppgetpass/pppgetpass.sh 1970-01-01 01:00:00.000000000 +0100
414 -if [ -z "$DISPLAY" ]; then
415 - exec pppgetpass.vt "$@"
417 - exec pppgetpass.gtk "$@"
419 diff -ruN ppp-2.4.2/contrib/pppgetpass/pppgetpass.vt.c ppp-cvs-20040427/contrib/pppgetpass/pppgetpass.vt.c
420 --- ppp-2.4.2/contrib/pppgetpass/pppgetpass.vt.c 1999-11-15 05:08:24.000000000 +0100
421 +++ ppp-cvs-20040427/contrib/pppgetpass/pppgetpass.vt.c 1970-01-01 01:00:00.000000000 +0100
429 -#include <sys/stat.h>
430 -#include <sys/ioctl.h>
432 -#include <termios.h>
435 -static int console_owner(uid_t, int);
437 -int main(int argc, char **argv)
441 - struct vt_stat origstate;
443 - char openvtname[256];
449 - char pass[256], *nl;
450 - int outfd, passlen;
452 - console=open("/dev/console", O_RDWR);
458 - openlog(argv[0], LOG_PID, LOG_DAEMON);
461 - syslog(LOG_WARNING, "Usage error");
466 - syslog(LOG_ERR, "open(/dev/console): %m");
470 - if(ioctl(console, VT_GETSTATE, &origstate)<0) {
471 - syslog(LOG_ERR, "VT_GETSTATE: %m");
476 - if(!console_owner(uid, origstate.v_active)) {
478 - for(i=0;i<64;++i) {
479 - if(i!=origstate.v_active && console_owner(uid, i))
483 - syslog(LOG_WARNING, "run by uid %lu not at console", (unsigned long)uid);
489 - if(ioctl(console, VT_OPENQRY, &openvtnum)<0) {
490 - syslog(LOG_ERR, "VT_OPENQRY: %m");
493 - if(openvtnum==-1) {
494 - syslog(LOG_ERR, "No free VTs");
498 - snprintf(openvtname, sizeof openvtname, "/dev/tty%d", openvtnum);
500 - openvt=open(openvtname, O_RDWR);
503 - syslog(LOG_ERR, "open(%s): %m", openvtname);
507 - chowned=fchown(openvt, uid, gid);
510 - syslog(LOG_ERR, "fchown(%s): %m", openvtname);
516 - if(ioctl(openvt, VT_ACTIVATE, openvtnum)<0) {
518 - syslog(LOG_ERR, "VT_ACTIVATE(%d): %m", openvtnum);
522 - while(ioctl(openvt, VT_WAITACTIVE, openvtnum)<0) {
524 - ioctl(openvt, VT_ACTIVATE, origstate.v_active);
526 - syslog(LOG_ERR, "VT_WAITACTIVE(%d): %m", openvtnum);
532 - fp=fdopen(openvt, "r+");
535 - ioctl(openvt, VT_ACTIVATE, origstate.v_active);
537 - syslog(LOG_ERR, "fdopen(%s): %m", openvtname);
541 - if(tcgetattr(openvt, &t)<0) {
543 - ioctl(openvt, VT_ACTIVATE, origstate.v_active);
545 - syslog(LOG_ERR, "tcgetattr(%s): %m", openvtname);
548 - t.c_lflag &= ~ECHO;
549 - if(tcsetattr(openvt, TCSANOW, &t)<0) {
551 - ioctl(openvt, VT_ACTIVATE, origstate.v_active);
553 - syslog(LOG_ERR, "tcsetattr(%s): %m", openvtname);
557 - if(fprintf(fp, "\033[2J\033[H")<0) {
559 - ioctl(openvt, VT_ACTIVATE, origstate.v_active);
561 - syslog(LOG_ERR, "write error on %s: %m", openvtname);
564 - if(argv[1][0] && argv[2][0]) {
565 - if(fprintf(fp, "Password for PPP client %s on server %s: ", argv[1], argv[2])<0) {
567 - ioctl(openvt, VT_ACTIVATE, origstate.v_active);
569 - syslog(LOG_ERR, "write error on %s: %m", openvtname);
572 - } else if(argv[1][0] && !argv[2][0]) {
573 - if(fprintf(fp, "Password for PPP client %s: ", argv[1])<0) {
574 - syslog(LOG_ERR, "write error on %s: %m", openvtname);
576 - ioctl(openvt, VT_ACTIVATE, origstate.v_active);
580 - } else if(!argv[1][0] && argv[2][0]) {
581 - if(fprintf(fp, "Password for PPP on server %s: ", argv[2])<0) {
583 - ioctl(openvt, VT_ACTIVATE, origstate.v_active);
585 - syslog(LOG_ERR, "write error on %s: %m", openvtname);
589 - if(fprintf(fp, "Enter PPP password: ")<0) {
591 - ioctl(openvt, VT_ACTIVATE, origstate.v_active);
593 - syslog(LOG_ERR, "write error on %s: %m", openvtname);
598 - if(!fgets(pass, sizeof pass, fp)) {
600 - ioctl(openvt, VT_ACTIVATE, origstate.v_active);
603 - syslog(LOG_ERR, "read error on %s: %m", openvtname);
607 - if((nl=strchr(pass, '\n')))
609 - passlen=strlen(pass);
611 - outfd=atoi(argv[3]);
612 - if((wrote=write(outfd, pass, passlen))!=passlen) {
614 - ioctl(openvt, VT_ACTIVATE, origstate.v_active);
617 - syslog(LOG_ERR, "write error on outpipe: %m");
619 - syslog(LOG_ERR, "short write on outpipe");
624 - ioctl(openvt, VT_ACTIVATE, origstate.v_active);
629 -static int console_owner(uid_t uid, int cons)
633 - snprintf(name, sizeof name, "/dev/tty%d", cons);
634 - if(stat(name, &st)<0) {
636 - syslog(LOG_ERR, "stat(%s): %m", name);
639 - return uid==st.st_uid;
641 diff -ruN ppp-2.4.2/include/linux/if_ether.h ppp-cvs-20040427/include/linux/if_ether.h
642 --- ppp-2.4.2/include/linux/if_ether.h 2001-05-21 05:31:50.000000000 +0200
643 +++ ppp-cvs-20040427/include/linux/if_ether.h 1970-01-01 01:00:00.000000000 +0100
646 - * INET An implementation of the TCP/IP protocol suite for the LINUX
647 - * operating system. INET is implemented using the BSD Socket
648 - * interface as the means of communication with the user level.
650 - * Global definitions for the Ethernet IEEE 802.3 interface.
652 - * Version: @(#)if_ether.h 1.0.1a 02/08/94
654 - * Author: Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
655 - * Donald Becker, <becker@super.org>
656 - * Alan Cox, <alan@redhat.com>
657 - * Steve Whitehouse, <gw7rrm@eeshack3.swan.ac.uk>
659 - * This program is free software; you can redistribute it and/or
660 - * modify it under the terms of the GNU General Public License
661 - * as published by the Free Software Foundation; either version
662 - * 2 of the License, or (at your option) any later version.
665 -#ifndef _LINUX_IF_ETHER_H
666 -#define _LINUX_IF_ETHER_H
669 - * IEEE 802.3 Ethernet magic constants. The frame sizes omit the preamble
670 - * and FCS/CRC (frame check sequence).
673 -#define ETH_ALEN 6 /* Octets in one ethernet addr */
674 -#define ETH_HLEN 14 /* Total octets in header. */
675 -#define ETH_ZLEN 60 /* Min. octets in frame sans FCS */
676 -#define ETH_DATA_LEN 1500 /* Max. octets in payload */
677 -#define ETH_FRAME_LEN 1514 /* Max. octets in frame sans FCS */
680 - * These are the defined Ethernet Protocol ID's.
683 -#define ETH_P_LOOP 0x0060 /* Ethernet Loopback packet */
684 -#define ETH_P_PUP 0x0200 /* Xerox PUP packet */
685 -#define ETH_P_PUPAT 0x0201 /* Xerox PUP Addr Trans packet */
686 -#define ETH_P_IP 0x0800 /* Internet Protocol packet */
687 -#define ETH_P_X25 0x0805 /* CCITT X.25 */
688 -#define ETH_P_ARP 0x0806 /* Address Resolution packet */
689 -#define ETH_P_BPQ 0x08FF /* G8BPQ AX.25 Ethernet Packet [ NOT AN OFFICIALLY REGISTERED ID ] */
690 -#define ETH_P_IEEEPUP 0x0a00 /* Xerox IEEE802.3 PUP packet */
691 -#define ETH_P_IEEEPUPAT 0x0a01 /* Xerox IEEE802.3 PUP Addr Trans packet */
692 -#define ETH_P_DEC 0x6000 /* DEC Assigned proto */
693 -#define ETH_P_DNA_DL 0x6001 /* DEC DNA Dump/Load */
694 -#define ETH_P_DNA_RC 0x6002 /* DEC DNA Remote Console */
695 -#define ETH_P_DNA_RT 0x6003 /* DEC DNA Routing */
696 -#define ETH_P_LAT 0x6004 /* DEC LAT */
697 -#define ETH_P_DIAG 0x6005 /* DEC Diagnostics */
698 -#define ETH_P_CUST 0x6006 /* DEC Customer use */
699 -#define ETH_P_SCA 0x6007 /* DEC Systems Comms Arch */
700 -#define ETH_P_RARP 0x8035 /* Reverse Addr Res packet */
701 -#define ETH_P_ATALK 0x809B /* Appletalk DDP */
702 -#define ETH_P_AARP 0x80F3 /* Appletalk AARP */
703 -#define ETH_P_IPX 0x8137 /* IPX over DIX */
704 -#define ETH_P_IPV6 0x86DD /* IPv6 over bluebook */
705 -#define ETH_P_PPP_DISC 0x8863 /* PPPoE discovery messages */
706 -#define ETH_P_PPP_SES 0x8864 /* PPPoE session messages */
707 -#define ETH_P_ATMMPOA 0x884c /* MultiProtocol Over ATM */
708 -#define ETH_P_ATMFATE 0x8884 /* Frame-based ATM Transport
713 - * Non DIX types. Won't clash for 1500 types.
716 -#define ETH_P_802_3 0x0001 /* Dummy type for 802.3 frames */
717 -#define ETH_P_AX25 0x0002 /* Dummy protocol id for AX.25 */
718 -#define ETH_P_ALL 0x0003 /* Every packet (be careful!!!) */
719 -#define ETH_P_802_2 0x0004 /* 802.2 frames */
720 -#define ETH_P_SNAP 0x0005 /* Internal only */
721 -#define ETH_P_DDCMP 0x0006 /* DEC DDCMP: Internal only */
722 -#define ETH_P_WAN_PPP 0x0007 /* Dummy type for WAN PPP frames*/
723 -#define ETH_P_PPP_MP 0x0008 /* Dummy type for PPP MP frames */
724 -#define ETH_P_LOCALTALK 0x0009 /* Localtalk pseudo type */
725 -#define ETH_P_PPPTALK 0x0010 /* Dummy type for Atalk over PPP*/
726 -#define ETH_P_TR_802_2 0x0011 /* 802.2 frames */
727 -#define ETH_P_MOBITEX 0x0015 /* Mobitex (kaz@cafe.net) */
728 -#define ETH_P_CONTROL 0x0016 /* Card specific control frames */
729 -#define ETH_P_IRDA 0x0017 /* Linux-IrDA */
730 -#define ETH_P_ECONET 0x0018 /* Acorn Econet */
733 - * This is an Ethernet frame header.
738 - unsigned char h_dest[ETH_ALEN]; /* destination eth addr */
739 - unsigned char h_source[ETH_ALEN]; /* source ether addr */
740 - unsigned short h_proto; /* packet type ID field */
743 -#endif /* _LINUX_IF_ETHER_H */
744 diff -ruN ppp-2.4.2/include/pcap-int.h ppp-cvs-20040427/include/pcap-int.h
745 --- ppp-2.4.2/include/pcap-int.h 2000-08-01 03:37:24.000000000 +0200
746 +++ ppp-cvs-20040427/include/pcap-int.h 2000-08-01 03:37:24.000000000 +0200
748 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
751 - * @(#) $Header: /data/cvs/ppp/include/pcap-int.h,v 1.1 2000/08/01 01:37:24 paulus Exp $ (LBL)
752 + * @(#) $Header: /cvsroot/ppp/include/pcap-int.h,v 1.1 2000/08/01 01:37:24 paulus Exp $ (LBL)
756 diff -ruN ppp-2.4.2/modules/bsd-comp.c ppp-cvs-20040427/modules/bsd-comp.c
757 --- ppp-2.4.2/modules/bsd-comp.c 1998-03-19 06:59:01.000000000 +0100
758 +++ ppp-cvs-20040427/modules/bsd-comp.c 2004-01-17 06:50:11.000000000 +0100
760 * This version is for use with STREAMS under SunOS 4.x,
761 * Digital UNIX, AIX 4.x, and SVR4 systems including Solaris 2.
763 - * $Id: bsd-comp.c,v 1.20 1996/08/28 06:31:57 paulus Exp $
764 + * $Id: bsd-comp.c,v 1.21 2004/01/17 05:47:55 carlsonj Exp $
769 #define BSD_LITTLE_ENDIAN
773 +#include <sys/sunddi.h>
776 #define PACKETPTR mblk_t *
777 #include <net/ppp-comp.h>
779 diff -ruN ppp-2.4.2/modules/deflate.c ppp-cvs-20040427/modules/deflate.c
780 --- ppp-2.4.2/modules/deflate.c 2002-12-06 10:49:15.000000000 +0100
781 +++ ppp-cvs-20040427/modules/deflate.c 2004-01-17 06:50:11.000000000 +0100
783 * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
784 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
786 - * $Id: deflate.c,v 1.11 2002/12/06 09:49:15 paulus Exp $
787 + * $Id: deflate.c,v 1.12 2004/01/17 05:47:55 carlsonj Exp $
792 #include "../common/zlib.h"
796 +#include <sys/sunddi.h>
801 #define DEFLATE_DEBUG 1
802 diff -ruN ppp-2.4.2/modules/vjcompress.c ppp-cvs-20040427/modules/vjcompress.c
803 --- ppp-2.4.2/modules/vjcompress.c 1999-09-17 04:03:56.000000000 +0200
804 +++ ppp-cvs-20040427/modules/vjcompress.c 2004-01-17 06:50:11.000000000 +0100
806 * This version is used under SunOS 4.x, Digital UNIX, AIX 4.x,
807 * and SVR4 systems including Solaris 2.
809 - * $Id: vjcompress.c,v 1.10 1999/09/15 23:49:06 masputra Exp $
810 + * $Id: vjcompress.c,v 1.11 2004/01/17 05:47:55 carlsonj Exp $
813 #include <sys/types.h>
815 #include <netinet/in_systm.h>
819 +#include <sys/sunddi.h>
822 #include <netinet/ip.h>
823 #include <netinet/tcp.h>
825 diff -ruN ppp-2.4.2/ppp.texi ppp-cvs-20040427/ppp.texi
826 --- ppp-2.4.2/ppp.texi 1970-01-01 01:00:00.000000000 +0100
827 +++ ppp-cvs-20040427/ppp.texi 1996-08-28 08:30:33.000000000 +0200
829 +\input texinfo @c -*-texinfo-*-
830 +@setfilename ppp.info
839 +START-INFO-DIR-ENTRY
840 +* PPP: (ppp). Point-to-Point Protocol.
845 +@title PPP-2.x Users' Guide
846 +@author by Paul Mackerras
849 +@node Top, Introduction, (dir), (dir)
852 +This file documents how to use the ppp-2.x package to set up network
853 +links over serial lines with the Point-to-Point Protocol.
858 +* Introduction:: Basic concepts of the Point-to-Point
859 + Protocol and the ppp-2.x package.
860 +* Installation:: How to compile and install the software.
861 +* Configuration:: How to set up your system for
862 + establishing a link to another system.
863 +* Security:: Avoid creating security holes.
864 +* Compression:: Using compression of various kinds
865 + to improve throughput.
868 +@node Introduction, Installation, Top, Top
869 +@chapter Introduction
871 +The Point-to-Point Protocol (PPP) is the protocol of choice for
872 +establishing network links over serial lines. This package (ppp-2.x)
873 +provides an implementation of PPP which supports the Internet Protocols
874 +(TCP/IP, UDP/IP, etc.) and which runs on a range of Unix workstations.
876 +A typical use of PPP is to provide a network connection, via a modem,
877 +between a workstation and an Internet Service Provider (ISP). When this
878 +connection is established, the workstation is connected to the internet,
879 +and applications running on the workstation can then make connections to
880 +other hosts anywhere on the internet. This package can be used at
881 +either or both ends of such a link.
883 +Features of PPP include:
886 +Multi-protocol support. The PPP packet encapsulation includes a
887 +protocol field, allowing packets from many different protocols to be
888 +multiplexed across a single link.
890 +Negotiation of link characteristics. During link establishment, the two
891 +systems negotiate about the link configuration parameters, such as the
892 +IP addresses of each end of the link.
894 +Authentication. Optionally, each system can be configured to require the
895 +other system to authenticate itself. In this way, access can be
896 +restricted to authorized systems.
898 +Transparency. On asynchronous serial lines, PPP can be configured to
899 +transmit certain characters as a two-character escape sequence.
901 +Compression. PPP includes support for various kinds of compression to
902 +be applied to the packets before they are transmitted.
905 +The ppp-2.x software consists of two parts:
910 +Kernel code, which establishes a network interface and passes packets
911 +between the serial port, the kernel networking code and the PPP daemon
912 +(@file{pppd}). This code is implemented using STREAMS modules on
913 +Solaris 2, SunOS 4.x, AIX 4.1 and OSF/1, and as a tty line discipline
914 +under Ultrix, NextStep, NetBSD, FreeBSD, and Linux.
917 +The PPP daemon (@file{pppd}), which negotiates with the peer to
918 +establish the link and sets up the ppp network interface. Pppd includes
919 +support for authentication. It can authenticate itself to the other
920 +system and/or require the other system to authenticate itself, so that
921 +you can control which other systems may make a PPP connection and what
922 +IP addresses they may use.
926 +* PPP Concepts:: Basic concepts and terms used with PPP.
927 +* PPP packet format:: How data is packaged up for transmission.
928 +* LCP negotiation:: The parameters which are negotiated
929 + using the Link Control Protocol.
930 +* IPCP negotiation:: The parameters which are negotiated
931 + using the IP Control Protocol.
934 +@node PPP Concepts, PPP packet format, Introduction, Introduction
935 +@section PPP Concepts
937 +To use PPP to provide a network connection between two machines, there
938 +must be some way that a stream of bytes, or characters, can be passed
939 +from one to the other, in both directions independently. We refer to
940 +this as the ``serial link''. Very often the serial link involves
941 +asynchronous communications ports and modems, but other kinds of serial
944 +The serial link must transmit (at least) 8 bits per character; PPP
945 +cannot work over a serial link which transmits only 7 bits per
946 +character. However, it need not transmit all byte values transparently.
947 +PPP has a mechanism to avoid sending certain characters if it is known
948 +that the some element of the serial link interprets them specially. For
949 +example, the DC1 and DC3 ASCII characters (control-Q and control-S) may
950 +be trapped by a modem if it is set for ``software'' flow control. PPP
951 +can send these characters as a two-character ``escape'' sequence. The
952 +set of characters which are to be transmitted as an escape sequence is
953 +represented in an ``async control character map'' (ACCM). The ``async''
954 +part refers to the fact that this facility is used for asynchronous
955 +serial links. For synchronous serial connections, the HDLC bit-stuffing
956 +procedure is used instead.
958 +The two systems connected by the serial link are called ``peers''. When
959 +we are talking from the point of view of one of the systems, the other
960 +is often referred to as ``the peer''. Sometimes we may refer to one
961 +system as a ``client'' and the other as a ``server''. This distinction
962 +refers mainly to the way the serial link is set up; usually the client
963 +is the peer that initiates the connection, for example by dialling the
964 +server with its modem.
966 +During the lifetime of a PPP connection, it proceeds through several
971 +Serial link establishment. In this phase, the serial link is set up and
972 +PPP protocol software is attached to each end of the serial link. The
973 +precise steps involved in doing this vary greatly, depending on the
974 +nature of the serial link. For the common case of modems connected
975 +through the telephone network, this involves first sending commands to
976 +the modem to cause it to dial the remote system. When the remote system
977 +answers, the local system usually has to supply a username and password,
978 +and then issue a command to invoke PPP software on the remote system.
979 +The ``chat'' program supplied with ppp-2.x provides a way to automate a
980 +dialog with the modem and the remote system. This phase is not
981 +standardized; it is outside the scope of the PPP protocol
985 +Link Control Protocol (LCP) negotiation. In this phase, the peers send
986 +LCP packets to each other to negotiate various parameters of the
987 +connection, such as the ACCM to be used in each direction, whether
988 +authentication is required, and whether or not to use various forms of
989 +compression. When the peers reach agreement on these parameters, LCP is
993 +Authentication. If one (or both) of the peers requires the other
994 +peer to authenticate itself, that occurs next. If one of the peers
995 +cannot successfully authenticate itself, the other peer terminates the
999 +Network Control Protocol (NCP) negotiation. PPP can potentially support
1000 +several different network protocols, although IP is the only network
1001 +protocol (NP) supported by the ppp-2.x package. Each NP has an
1002 +associated NCP defined for it, which is used to negotiate the specific
1003 +parameters which affect that NP. For example, the IP Control Protocol
1004 +(IPCP) is used to negotiate the IP addresses for each end of the link,
1005 +and whether the TCP header compression method described by Van Jacobsen
1006 +in RFC 1144 (``VJ compression'') is to be used.
1009 +Network communication. When each NCP has successfully negotiated the
1010 +parameters for its NP, that NCP is said to be ``up''. At that point,
1011 +the PPP link is made available for data traffic from that NP. For
1012 +example, when IPCP comes up, the PPP link is then available for carrying
1013 +IP packets (which of course includes packets from those protocols which
1014 +are layered above IP, such as TCP, UDP, etc.)
1017 +Termination. When the link is no longer required, it is terminated.
1018 +Usually this involves an exchange of LCP packets so that one peer can
1019 +notify the other that it is shutting down the link, enabling both peers
1020 +to shut down in an orderly manner. But of course there are occasions
1021 +when the link terminates because the serial link is interrupted, for
1022 +example, when a modem loses carrier and hangs up.
1026 +The protocols in the PPP family are produced by the Point-to-Point
1027 +Working Group of the Internet Engineering Task Force, and are specified
1028 +in RFC (Request for Comments) documents, available by anonymous FTP from
1031 +PPP is defined in several RFCs, in
1032 +particular RFCs 1661, 1662, and 1334. IPCP is defined in RFC 1332.
1033 +Other RFCs describe the control protocols for other network protocols
1034 +(e.g., DECnet, OSI, Appletalk). RFCs are available by anonymous FTP
1035 +from several sites including nic.ddn.mil, nnsc.nsf.net, nic.nordu.net,
1036 +ftp.nisc.sri.com, and munnari.oz.au.
1038 +@node PPP packet format, LCP negotiation, PPP Concepts, Introduction
1039 +@section PPP packet format
1041 +PPP transmits packets over the serial link using a simple encapsulation
1042 +scheme. First, a two-byte PPP Protocol field is inserted before the
1043 +data to be sent. The value in this field identifies
1044 +which higher-level protocol (either a network protocol such as IP or a
1045 +PPP control protocol such as LCP) should receive the data in the packet.
1046 +By default, a one-byte Address field with the value 0xFF, and a one-byte
1047 +Control field with the value 0x03, are inserted before the PPP Protocol
1048 +field (apparently this is supposed to provide compatibility with HDLC,
1049 +in case there is a synchronous to asynchronous converter in the serial
1052 +On slow serial links, these fields can be compressed down to one byte in
1053 +most cases. The PPP Address and Control fields are compressed by simply
1054 +omitting them (``address/control compression''). The PPP Protocol field
1055 +values are chosen so that bit 0 (the least-significant bit) of the first
1056 +(most significant) byte is always 0, and bit 0 of the second byte is
1057 +always 1. The PPP Protocol field can be compressed by omitting the
1058 +first byte, provided that it is 0 (``protocol compression''). The
1059 +values for this field are assigned so that the first byte is zero for
1060 +all of the commonly-used network protocols. For example, the PPP
1061 +Protocol field value for IP is 0x21.
1063 +For asynchronous serial links, which do not provide any packet framing
1064 +or transparency, a further encapsulation is used as follows. First a
1065 +16-bit Frame Check Sequence (FCS) is computed over the packet to be
1066 +sent, and appended as two bytes to the end of the packet.
1068 +Then each byte of the packet is examined, and if it contains one of the
1069 +characters which are to be escaped, it is replaced by a two byte
1070 +sequence: the 0x7d character '}', followed by the character with bit 5
1071 +inverted. For example, the control-C character (0x03) could be replaced
1072 +by the two-byte sequence 0x7d, 0x23 ('}#'). The 0x7d and 0x7e ('~')
1073 +characters are always escaped, and the 0x5e ('^') character may not be
1076 +Finally, a ``flag'' character (0x7e, '~') is inserted at the beginning
1077 +and end of the packet to mark the packet boundaries. The initial flag
1078 +may be omitted if this packet immediately follows another packet, as the
1079 +ending flag for the previous packet can serve as the beginning flag of
1082 +@node LCP negotiation, IPCP negotiation, PPP packet format, Introduction
1083 +@section LCP negotiation
1085 +The LCP negotiation process actually involves two sets of negotiations,
1086 +one for each direction of the PPP connection. Thus A will send B
1087 +packets (``Configure-Requests'') describing what characteristics A would
1088 +like to have apply to the B -> A direction of the link, that is, to the
1089 +packets that A will receive. Similarly B will send A packets describing
1090 +the characteristics it would like to have apply to the packets it will
1091 +be receiving. These characteristics need not necessarily be the same in
1094 +The parameters which are negotiated for each direction of the connection
1099 +Maximum Receive Unit (MRU): indicates the maximum packet size which we
1100 +are prepared to receive (specifically the maximum size of the
1101 +data portion of the packet). The default value is 1500, but on
1102 +slow serial links, smaller values give better response. The choice of
1103 +MRU is discussed below (see xxx).
1106 +Async Control Character Map (ACCM): indicates the set of control
1107 +characters (characters with ASCII values in the range 0 - 31) which we
1108 +wish to receive in escaped form. The default is that the sender should
1109 +escape all characters in the range 0 - 31.
1112 +Authentication Protocol: indicates which protocol we would like the peer
1113 +to use to authenticate itself. Common choices are the Password
1114 +Authentication Protocol (PAP) and the Cryptographic Handshake
1115 +Authentication Protocol (CHAP).
1118 +Quality Protocol: indicates which protocol which we would like the peer
1119 +to use to send us link quality reports. The ppp-2.x package does not
1120 +currently support link quality reports.
1123 +Magic Number: a randomly-chosen number, different from the peer's magic
1124 +number. If we persistently receive our own magic number in the peer's
1125 +configure-request packets, then we can conclude that the serial link is
1129 +Protocol Field Compression: indicates that we wish the peer to compress
1130 +the PPP Protocol field to one byte, where possible, in the packets it
1134 +Address/Control Field Compression: indicates that we wish the peer to
1135 +compress the PPP Address/Control fields (by simply omitting them) in the
1139 +@node IPCP negotiation, , LCP negotiation, Introduction
1140 +@section IPCP negotiation
1142 +The IPCP negotiation process is very similar to the LCP negotiation
1143 +process, except that of course different parameters are negotiated.
1144 +The parameters which are negotiated using IPCP are:
1148 +IP Address: the IP address (32-bit host IP number) which we plan to use
1149 +as the local address for our end of the link.
1152 +TCP header compression: indicates (a) that we wish the peer to compress
1153 +the TCP/IP headers of TCP/IP packets that it sends, using the Van
1154 +Jacobson algorithm as described in RFC1144; (b) the maximum slot ID that
1155 +we wish the peer to use, and (c) whether we are prepared to accept
1156 +packets with the slot ID field compressed (omitted).
1158 +With Van Jacobson (VJ) compression, the receiver and transmitter (for
1159 +one direction of the connection) both keep a table, with a certain
1160 +number of ``slots'', where each slot holds the TCP/IP header of the most
1161 +recently transmitted packet for one TCP connection. If a packet is to
1162 +be transmitted for a TCP connection which does not have a slot currently
1163 +allocated, the VJ scheme will allocate one of the slots and send the
1164 +entire TCP/IP header, together with the slot number. For many packets,
1165 +there will be a slot already allocated for the TCP connection, and the
1166 +VJ scheme will then often be able to replace the entire TCP/IP header
1167 +with a much smaller compressed header (typically only 3 - 7 bytes)
1168 +describing which fields of the TCP/IP header have changed, and by how
1169 +much. If there are many more active connections than slots, the
1170 +efficiency of the VJ scheme will drop, because it will not be able to
1171 +send compressed headers as often.
1173 +Usually the compressed header includes a one-byte slot index, indicating
1174 +which TCP connection the packet is for. It is possible to reduce the
1175 +header size by omitting the slot index when the packet has the same slot
1176 +index as the previous packet. However, this introduces a danger if the
1177 +lower levels of the PPP software can sometimes drop damaged packets
1178 +without informing the VJ decompressor, as it may then assume the wrong
1179 +slot index for packets which have the slot index field omitted. With
1180 +the ppp-2.x software, however, the probability of this happening is
1181 +generally very small (see xxx).
1185 +@node Installation, Configuration, Introduction, Top
1186 +@chapter Installation
1188 +Because ppp-2.x includes code which must be incorporated into the
1189 +kernel, its installation process is necessarily quite heavily
1190 +system-dependent. In addition, you will require super-user privileges
1191 +(root access) to install the code.
1193 +Some systems provide a ``modload'' facility, which allows you to load
1194 +new code into a running kernel without relinking the kernel or
1195 +rebooting. Under Solaris 2, SunOS 4.x, Linux, OSF/1 and NextStep, this
1196 +is the recommended (or only) way to install the kernel portion of the
1199 +Under the remaining supported operating systems (NetBSD, FreeBSD,
1200 +Ultrix), it is necessary to go through the process of creating a new
1201 +kernel image and reboot. (Note that NetBSD and FreeBSD have a modload
1202 +facility, but ppp-2.x is currently not configured to take advantage of
1205 +Detailed installation instructions for each operating system are
1206 +contained in the README files in the ppp-2.x distribution. In general,
1207 +the process involves executing the commands @samp{./configure},
1208 +@samp{make} and (as root) @samp{make install} in the ppp-2.x
1209 +distribution directory. (The Linux port requires the installation of
1210 +some header files before compiling; see README.linux for details.)
1212 +@node Configuration, Security, Installation, Top
1213 +@chapter Configuration
1215 +Once the ppp-2.x software is installed, you need to configure your
1216 +system for the particular PPP connections you wish to allow. Typically,
1217 +the elements you need to configure are:
1221 +How the serial link is established and how pppd gets invoked.
1223 +Setting up syslog to log messages from pppd to the console and/or
1226 +Pppd options to be used.
1228 +Authentication secrets to use in authenticating us to the peer
1229 +and/or the peer to us.
1231 +The IP addresses for each end of the link.
1234 +In most cases, the system you are configuring will either be a
1235 +@dfn{client} system, actively initiating a PPP connection on user
1236 +request, or it will be a @dfn{server} system, passively waiting for
1237 +connections from client systems. Other arrangements are possible, but
1238 +the instructions in this system assume that you are configuring either a
1239 +client or a server.
1241 +These instructions also assume that the serial link involves a serial
1242 +communications port (that is, a tty device), since pppd requires a
1246 +* Client machines::
1247 +* Server machines::
1248 +* Setting up syslog::
1250 +* Authentication secrets files::
1254 +@node Client machines, Server machines, Configuration, Configuration
1255 +@section Client machines
1257 +On a client machine, the way that the user requests that a connection be
1258 +established is by running pppd, either directly or through a shell
1259 +script. Pppd should be given the name of the serial port to use as an
1260 +option. In this mode, pppd will fork and detach itself from its
1261 +controlling terminal, so that the shell will return to its prompt. (If
1262 +this behaviour is not desired, use the -detach option.)
1264 +Usually, the connect option should also be used. The connect option
1265 +takes an argument which is a command to run to establish the serial link
1266 +and invoke PPP software on the remote machine. This command is run with
1267 +its standard input and standard output connected to the serial port.
1268 +Giving the connect option to pppd also has the side-effect of causing
1269 +pppd to open the serial port without waiting for the modem carrier
1272 +The process of establishing the serial link often involves a dialog. If
1273 +the serial port is connected to a modem, we first need to send some
1274 +commands to the modem to configure it and dial the remote system. Often
1275 +there is then a dialog with the remote system to supply a username and
1276 +password. The @file{chat} program supplied with the ppp-2.x package is
1277 +useful for automating such dialogs. Chat uses a @dfn{script} consisting
1278 +of alternately strings to expect to receive on the serial port, and
1279 +strings to send on the serial port. The script can also specify strings
1280 +which indicate an error and abort the dialog.
1282 +@node Server machines, , Client machines, Configuration
1283 +@section Server machines
1285 +There are generally three ways in which a server machine can be set up
1286 +to allow client machines to establish a PPP link:
1290 +Client machines log in as regular users (often via a serial port
1291 +connected to a modem, but possibly through a telnet or rlogin session)
1292 +and then run pppd as a shell command.
1294 +Client machines log in using a username whose login shell is pppd
1295 +or a script which runs pppd.
1297 +Client machines connect to a serial port which has a pppd running
1298 +permanently on it (instead of a "getty" or other program providing a
1302 +Method 1 is very simple to set up, and is useful where existing users of
1303 +a system have remote machines (for example at home) from which they want
1304 +to establish a PPP connection from time to time. Methods 2 and 3
1305 +possibly have a security advantage in that they do not allow PPP client
1306 +systems access to a shell. Method 2 allows regular logins and PPP
1307 +connections on the same port, while with method 3, would-be crackers may
1308 +well be frustrated (unless they speak fluent PPP).
1310 +With any of these methods, I strongly recommend that you configure PPP
1311 +to require authentication from the client, by including the `auth'
1312 +option in the /etc/ppp/options file.
1314 +@node Setting up syslog, , Server machines, Configuration
1315 +@section Setting up syslog
1317 +Pppd uses the @file{syslog} facility to report information about the
1318 +state of the connection, as does @file{chat}. It is useful to set up
1319 +syslog to print some of these messages on the console, and to record
1320 +most of them to a file. The messages from pppd are logged with facility
1321 +@samp{daemon} and one of three levels:
1324 +@samp{notice} for messages about important events such as the
1325 +connection becoming available for IP traffic and the local and remote IP
1328 +@samp{info} for messages about less important events, such as
1329 +detecting a modem hangup.
1331 +@samp{debug} for messages which are of use in working out why the
1332 +connection is not working properly.
1335 +The messages from chat are logged with facility @samp{local2} and level
1338 +Syslog is controlled by the syslog configuration file
1339 +@file{/etc/syslog.conf}. Generally the standard configuration will log
1340 +facility @samp{daemon} messages with level @samp{notice} and above to a
1341 +system log file such as @file{/var/log/syslog} (the name may vary on
1342 +different systems). I find it useful to have the notice level messages
1343 +from pppd displayed on the console, and all messages from pppd and chat
1344 +logged to a file such as @file{/etc/ppp/log}. To achieve this,
1345 +find the line in /etc/syslog.conf which has /dev/console
1346 +on the right-hand side, and add `daemon.notice' on the left. This
1347 +line should end up something like this:
1350 +*.err;kern.debug;auth.notice;mail.crit;daemon.notice /dev/console
1353 +And add a line like this:
1356 +daemon,local2.debug /etc/ppp/log
1359 +The space between the left and right hand sides is one or more tabs, not
1360 +spaces, and there are no tabs or spaces at the beginning of the line.
1362 +You will need to create an empty @file{/etc/ppp/log} file; syslogd will
1363 +not create it. Once you have modified @file{/etc/syslog.conf}, you need
1364 +to either reboot or notify syslogd to re-read the file. On most
1365 +systems, you notify syslogd by sending it a SIGHUP signal. Syslogd's
1366 +process ID is usually stored in a file such as @file{/etc/syslogd.pid}
1367 +or @file{/var/run/syslog.pid}. Thus you can notify syslogd to re-read
1368 +the file by executing a command such as:
1371 +kill -HUP `cat /etc/syslogd.pid`
1374 +@node Pppd options, , Setting up syslog, Configuration
1375 +@section Pppd options
1377 +@node Authentication secrets files, , Pppd options, Configuration
1378 +@section Authentication secrets files
1380 +@node IP Addresses, , Authentication secrets files, Configuration
1381 +@section IP Addresses
1383 +@node Security, Compression, Configuration, Top
1386 +@node Compression, , Security, Top
1387 +@chapter Compression
1390 diff -ruN ppp-2.4.2/pppd/Makefile.sol2 ppp-cvs-20040427/pppd/Makefile.sol2
1391 --- ppp-2.4.2/pppd/Makefile.sol2 2003-11-27 22:25:25.000000000 +0100
1392 +++ ppp-cvs-20040427/pppd/Makefile.sol2 2002-11-02 20:50:09.000000000 +0100
1395 # Makefile for pppd under Solaris 2.
1396 -# $Id: Makefile.sol2,v 1.24 2003/11/27 21:25:25 paulus Exp $
1397 +# $Id: Makefile.sol2,v 1.23 2002/11/02 19:48:12 carlsonj Exp $
1400 include ../Makedefs.com
1402 CFLAGS = -I../include -DSVR4 -DSOL2 $(COPTS)
1403 LIBS = -lsocket -lnsl
1405 -OBJS = main.o magic.o fsm.o lcp.o ipcp.o upap.o chap-new.o eap.o md5.o \
1406 - tty.o ccp.o ecp.o auth.o options.o demand.o utils.o sys-solaris.o
1407 +OBJS = main.o magic.o fsm.o lcp.o ipcp.o upap.o chap.o eap.o md5.o tty.o \
1408 + ccp.o ecp.o auth.o options.o demand.o utils.o sys-solaris.o
1411 # uncomment the following to enable plugins
1412 diff -ruN ppp-2.4.2/pppd/Makefile.sunos4 ppp-cvs-20040427/pppd/Makefile.sunos4
1413 --- ppp-2.4.2/pppd/Makefile.sunos4 2003-11-27 22:25:25.000000000 +0100
1414 +++ ppp-cvs-20040427/pppd/Makefile.sunos4 2002-11-02 20:50:09.000000000 +0100
1417 # Makefile for pppd under SunOS 4.
1418 -# $Id: Makefile.sunos4,v 1.14 2003/11/27 21:25:25 paulus Exp $
1419 +# $Id: Makefile.sunos4,v 1.13 2002/11/02 19:48:12 carlsonj Exp $
1422 include ../sunos4/Makedefs
1427 -OBJS = main.o magic.o fsm.o lcp.o ipcp.o upap.o chap-new.o md5.o ccp.o ecp.o \
1428 +OBJS = main.o magic.o fsm.o lcp.o ipcp.o upap.o chap.o md5.o ccp.o ecp.o \
1429 auth.o options.o demand.o utils.o sys-sunos4.o tty.o eap.o
1432 diff -ruN ppp-2.4.2/pppd/chap-new.c ppp-cvs-20040427/pppd/chap-new.c
1433 --- ppp-2.4.2/pppd/chap-new.c 2003-11-27 23:22:36.000000000 +0100
1434 +++ ppp-cvs-20040427/pppd/chap-new.c 2004-01-17 06:50:11.000000000 +0100
1436 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1439 -#define RCSID "$Id: chap-new.c,v 1.3 2003/11/27 22:22:36 paulus Exp $"
1440 +#define RCSID "$Id: chap-new.c,v 1.4 2004/01/17 05:47:55 carlsonj Exp $"
1445 int (*chap_verify_hook)(char *name, char *ourname, int id,
1446 struct chap_digest_type *digest,
1447 unsigned char *challenge, unsigned char *response,
1448 - unsigned char *message, int message_space) = NULL;
1449 + char *message, int message_space) = NULL;
1454 static int chap_verify_response(char *name, char *ourname, int id,
1455 struct chap_digest_type *digest,
1456 unsigned char *challenge, unsigned char *response,
1457 - unsigned char *message, int message_space);
1458 + char *message, int message_space);
1459 static void chap_respond(struct chap_client_state *cs, int id,
1460 unsigned char *pkt, int len);
1461 static void chap_handle_status(struct chap_client_state *cs, int code, int id,
1462 @@ -306,11 +306,11 @@
1464 int response_len, ok, mlen;
1465 unsigned char *response, *p;
1466 - unsigned char *name = NULL; /* initialized to shut gcc up */
1467 + char *name = NULL; /* initialized to shut gcc up */
1468 int (*verifier)(char *, char *, int, struct chap_digest_type *,
1469 - unsigned char *, unsigned char *, unsigned char *, int);
1470 + unsigned char *, unsigned char *, char *, int);
1471 char rname[MAXNAMELEN+1];
1472 - unsigned char message[256];
1473 + char message[256];
1475 if ((ss->flags & LOWERUP) == 0)
1479 GETCHAR(response_len, pkt);
1480 len -= response_len + 1; /* length of name */
1481 - name = pkt + response_len;
1482 + name = (char *)pkt + response_len;
1486 @@ -391,14 +391,14 @@
1487 chap_verify_response(char *name, char *ourname, int id,
1488 struct chap_digest_type *digest,
1489 unsigned char *challenge, unsigned char *response,
1490 - unsigned char *message, int message_space)
1491 + char *message, int message_space)
1494 - char secret[MAXSECRETLEN];
1495 + unsigned char secret[MAXSECRETLEN];
1498 /* Get the secret that the peer is supposed to know */
1499 - if (!get_secret(0, name, ourname, secret, &secret_len, 1)) {
1500 + if (!get_secret(0, name, ourname, (char *)secret, &secret_len, 1)) {
1501 error("No CHAP secret found for authenticating %q", name);
1504 diff -ruN ppp-2.4.2/pppd/chap-new.h ppp-cvs-20040427/pppd/chap-new.h
1505 --- ppp-2.4.2/pppd/chap-new.h 2003-06-11 14:47:31.000000000 +0200
1506 +++ ppp-cvs-20040427/pppd/chap-new.h 2004-01-17 06:50:12.000000000 +0100
1508 extern int (*chap_verify_hook)(char *name, char *ourname, int id,
1509 struct chap_digest_type *digest,
1510 unsigned char *challenge, unsigned char *response,
1511 - unsigned char *message, int message_space);
1512 + char *message, int message_space);
1514 /* Called by digest code to register a digest type */
1515 extern void chap_register_digest(struct chap_digest_type *);
1516 diff -ruN ppp-2.4.2/pppd/chap_ms.c ppp-cvs-20040427/pppd/chap_ms.c
1517 --- ppp-2.4.2/pppd/chap_ms.c 2003-11-18 11:42:56.000000000 +0100
1518 +++ ppp-cvs-20040427/pppd/chap_ms.c 2004-04-14 04:40:21.000000000 +0200
1523 -#define RCSID "$Id: chap_ms.c,v 1.30 2003/07/10 17:59:33 fcusack Exp $"
1524 +#define RCSID "$Id: chap_ms.c,v 1.31 2004/04/14 02:39:39 carlsonj Exp $"
1528 @@ -164,9 +164,11 @@
1529 chapms_generate_challenge(unsigned char *challenge)
1532 +#ifdef DEBUGMPPEKEY
1533 if (mschap_challenge && strlen(mschap_challenge) == 8)
1534 memcpy(challenge, mschap_challenge, 8);
1537 random_bytes(challenge, 8);
1540 @@ -174,9 +176,11 @@
1541 chapms2_generate_challenge(unsigned char *challenge)
1544 +#ifdef DEBUGMPPEKEY
1545 if (mschap_challenge && strlen(mschap_challenge) == 16)
1546 memcpy(challenge, mschap_challenge, 16);
1549 random_bytes(challenge, 16);
1555 /* Generate the expected response. */
1556 - ChapMS(challenge, secret, secret_len, &md);
1557 + ChapMS(challenge, (char *)secret, secret_len, &md);
1560 /* Determine which part of response to verify against */
1563 /* Generate the expected response and our mutual auth. */
1564 ChapMS2(challenge, rmd->PeerChallenge, name,
1565 - secret, secret_len, &md,
1566 - saresponse, MS_CHAP2_AUTHENTICATOR);
1567 + (char *)secret, secret_len, &md,
1568 + (unsigned char *)saresponse, MS_CHAP2_AUTHENTICATOR);
1570 /* compare MDs and send the appropriate status */
1572 @@ -326,8 +330,13 @@
1574 challenge++; /* skip length, should be 16 */
1575 *response++ = MS_CHAP2_RESPONSE_LEN;
1576 - ChapMS2(challenge, mschap2_peer_challenge, our_name,
1577 - secret, secret_len,
1578 + ChapMS2(challenge,
1579 +#ifdef DEBUGMPPEKEY
1580 + mschap2_peer_challenge,
1584 + our_name, secret, secret_len,
1585 (MS_Chap2Response *) response, private,
1586 MS_CHAP2_AUTHENTICATEE);
1590 chapms2_check_success(unsigned char *msg, int len, unsigned char *private)
1592 - if ((len < MS_AUTH_RESPONSE_LENGTH + 2) || strncmp(msg, "S=", 2)) {
1593 + if ((len < MS_AUTH_RESPONSE_LENGTH + 2) ||
1594 + strncmp((char *)msg, "S=", 2) != 0) {
1595 /* Packet does not start with "S=" */
1596 error("MS-CHAPv2 Success packet is badly formed.");
1599 /* Authenticator Response matches. */
1600 msg += MS_AUTH_RESPONSE_LENGTH; /* Eat it */
1601 len -= MS_AUTH_RESPONSE_LENGTH;
1602 - if ((len >= 3) && !strncmp(msg, " M=", 3)) {
1603 + if ((len >= 3) && !strncmp((char *)msg, " M=", 3)) {
1604 msg += 3; /* Eat the delimiter */
1606 /* Packet has extra text which does not begin " M=" */
1608 SHA1_Init(&sha1Context);
1609 SHA1_Update(&sha1Context, PeerChallenge, 16);
1610 SHA1_Update(&sha1Context, rchallenge, 16);
1611 - SHA1_Update(&sha1Context, user, strlen(user));
1612 + SHA1_Update(&sha1Context, (unsigned char *)user, strlen(user));
1613 SHA1_Final(sha1Hash, &sha1Context);
1615 BCOPY(sha1Hash, Challenge, 8);
1619 MD4Init(&md4Context);
1620 - MD4Update(&md4Context, secret, mdlen);
1621 + MD4Update(&md4Context, (unsigned char *)secret, mdlen);
1622 MD4Final(hash, &md4Context);
1627 /* Hash the Unicode version of the secret (== password). */
1628 ascii2unicode(secret, secret_len, unicodePassword);
1629 - NTPasswordHash(unicodePassword, secret_len * 2, PasswordHash);
1630 + NTPasswordHash((char *)unicodePassword, secret_len * 2, PasswordHash);
1632 ChallengeResponse(rchallenge, PasswordHash, NTResponse);
1634 @@ -539,11 +549,12 @@
1635 u_char PasswordHash[MD4_SIGNATURE_SIZE];
1636 u_char Challenge[8];
1638 - ChallengeHash(PeerChallenge, rchallenge, username, Challenge);
1639 + ChallengeHash(PeerChallenge, (unsigned char *)rchallenge, username,
1642 /* Hash the Unicode version of the secret (== password). */
1643 ascii2unicode(secret, secret_len, unicodePassword);
1644 - NTPasswordHash(unicodePassword, secret_len * 2, PasswordHash);
1645 + NTPasswordHash((char *)unicodePassword, secret_len * 2, PasswordHash);
1647 ChallengeResponse(Challenge, PasswordHash, NTResponse);
1651 /* Hash (x2) the Unicode version of the secret (== password). */
1652 ascii2unicode(secret, secret_len, unicodePassword);
1653 - NTPasswordHash(unicodePassword, secret_len * 2, PasswordHash);
1654 - NTPasswordHash(PasswordHash, sizeof(PasswordHash), PasswordHashHash);
1655 + NTPasswordHash((char *)unicodePassword, secret_len * 2, PasswordHash);
1656 + NTPasswordHash((char *)PasswordHash, sizeof(PasswordHash),
1657 + PasswordHashHash);
1659 SHA1_Init(&sha1Context);
1660 SHA1_Update(&sha1Context, PasswordHashHash, sizeof(PasswordHashHash));
1663 /* Convert to ASCII hex string. */
1664 for (i = 0; i < MAX((MS_AUTH_RESPONSE_LENGTH / 2), sizeof(Digest)); i++)
1665 - sprintf(&authResponse[i * 2], "%02X", Digest[i]);
1666 + sprintf((char *)&authResponse[i * 2], "%02X", Digest[i]);
1671 sizeof(response->PeerChallenge));
1673 /* Generate the NT-Response */
1674 - ChapMS2_NT(rchallenge, response->PeerChallenge, user,
1675 + ChapMS2_NT((char *)rchallenge, response->PeerChallenge, user,
1676 secret, secret_len, response->NTResp);
1678 /* Generate the Authenticator Response. */
1679 diff -ruN ppp-2.4.2/pppd/fsm.c ppp-cvs-20040427/pppd/fsm.c
1680 --- ppp-2.4.2/pppd/fsm.c 2003-06-29 12:06:14.000000000 +0200
1681 +++ ppp-cvs-20040427/pppd/fsm.c 2004-02-02 05:00:11.000000000 +0100
1683 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1686 -#define RCSID "$Id: fsm.c,v 1.20 2003/06/29 10:06:14 paulus Exp $"
1687 +#define RCSID "$Id: fsm.c,v 1.22 2004/02/02 03:57:19 carlsonj Exp $"
1691 @@ -201,6 +201,44 @@
1696 + * terminate_layer - Start process of shutting down the FSM
1698 + * Cancel any timeout running, notify upper layers we're done, and
1699 + * send a terminate-request message as configured.
1702 +terminate_layer(f, nextstate)
1706 + if( f->state != OPENED )
1707 + UNTIMEOUT(fsm_timeout, f); /* Cancel timeout */
1708 + else if( f->callbacks->down )
1709 + (*f->callbacks->down)(f); /* Inform upper layers we're down */
1711 + /* Init restart counter and send Terminate-Request */
1712 + f->retransmits = f->maxtermtransmits;
1713 + fsm_sdata(f, TERMREQ, f->reqid = ++f->id,
1714 + (u_char *) f->term_reason, f->term_reason_len);
1716 + if (f->retransmits == 0) {
1718 + * User asked for no terminate requests at all; just close it.
1719 + * We've already fired off one Terminate-Request just to be nice
1720 + * to the peer, but we're not going to wait for a reply.
1722 + f->state = nextstate == CLOSING ? CLOSED : STOPPED;
1723 + if( f->callbacks->finished )
1724 + (*f->callbacks->finished)(f);
1728 + TIMEOUT(fsm_timeout, f, f->timeouttime);
1731 + f->state = nextstate;
1735 * fsm_close - Start closing connection.
1736 @@ -230,19 +268,7 @@
1740 - if( f->state != OPENED )
1741 - UNTIMEOUT(fsm_timeout, f); /* Cancel timeout */
1742 - else if( f->callbacks->down )
1743 - (*f->callbacks->down)(f); /* Inform upper layers we're down */
1745 - /* Init restart counter, send Terminate-Request */
1746 - f->retransmits = f->maxtermtransmits;
1747 - fsm_sdata(f, TERMREQ, f->reqid = ++f->id,
1748 - (u_char *) f->term_reason, f->term_reason_len);
1749 - TIMEOUT(fsm_timeout, f, f->timeouttime);
1752 - f->state = CLOSING;
1753 + terminate_layer(f, CLOSING);
1757 @@ -689,17 +715,7 @@
1761 - if( f->callbacks->down )
1762 - (*f->callbacks->down)(f);
1764 - /* Init restart counter, send Terminate-Request */
1765 - f->retransmits = f->maxtermtransmits;
1766 - fsm_sdata(f, TERMREQ, f->reqid = ++f->id,
1767 - (u_char *) f->term_reason, f->term_reason_len);
1768 - TIMEOUT(fsm_timeout, f, f->timeouttime);
1771 - f->state = STOPPING;
1772 + terminate_layer(f, STOPPING);
1776 diff -ruN ppp-2.4.2/pppd/main.c ppp-cvs-20040427/pppd/main.c
1777 --- ppp-2.4.2/pppd/main.c 2004-01-13 05:00:34.000000000 +0100
1778 +++ ppp-cvs-20040427/pppd/main.c 2004-04-12 13:25:19.000000000 +0200
1780 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1783 -#define RCSID "$Id: main.c,v 1.131 2004/01/13 04:00:34 paulus Exp $"
1784 +#define RCSID "$Id: main.c,v 1.136 2004/04/12 11:20:19 paulus Exp $"
1792 +static sigset_t signals_handled;
1794 static sigjmp_buf sigjmp;
1796 @@ -648,16 +649,15 @@
1799 struct timeval timo;
1802 kill_link = open_ccp_flag = 0;
1803 if (sigsetjmp(sigjmp, 1) == 0) {
1804 - sigprocmask(SIG_BLOCK, &mask, NULL);
1805 + sigprocmask(SIG_BLOCK, &signals_handled, NULL);
1806 if (got_sighup || got_sigterm || got_sigusr2 || got_sigchld) {
1807 - sigprocmask(SIG_UNBLOCK, &mask, NULL);
1808 + sigprocmask(SIG_UNBLOCK, &signals_handled, NULL);
1811 - sigprocmask(SIG_UNBLOCK, &mask, NULL);
1812 + sigprocmask(SIG_UNBLOCK, &signals_handled, NULL);
1813 wait_input(timeleft(&timo));
1816 @@ -692,19 +692,18 @@
1819 struct sigaction sa;
1823 * Compute mask of all interesting signals and install signal handlers
1824 * for each. Only one signal handler may be active at a time. Therefore,
1825 * all other signals should be masked when any handler is executing.
1827 - sigemptyset(&mask);
1828 - sigaddset(&mask, SIGHUP);
1829 - sigaddset(&mask, SIGINT);
1830 - sigaddset(&mask, SIGTERM);
1831 - sigaddset(&mask, SIGCHLD);
1832 - sigaddset(&mask, SIGUSR2);
1833 + sigemptyset(&signals_handled);
1834 + sigaddset(&signals_handled, SIGHUP);
1835 + sigaddset(&signals_handled, SIGINT);
1836 + sigaddset(&signals_handled, SIGTERM);
1837 + sigaddset(&signals_handled, SIGCHLD);
1838 + sigaddset(&signals_handled, SIGUSR2);
1840 #define SIGNAL(s, handler) do { \
1841 sa.sa_handler = handler; \
1843 fatal("Couldn't establish signal handler (%d): %m", s); \
1846 - sa.sa_mask = mask;
1847 + sa.sa_mask = signals_handled;
1849 SIGNAL(SIGHUP, hup); /* Hangup */
1850 SIGNAL(SIGINT, term); /* Interrupt */
1851 @@ -1173,6 +1172,7 @@
1852 info("Connect time %d.%d minutes.", t/10, t%10);
1853 info("Sent %u bytes, received %u bytes.",
1854 link_stats.bytes_out, link_stats.bytes_in);
1855 + link_stats_valid = 0;
1859 @@ -1329,6 +1329,7 @@
1862 * kill_my_pg - send a signal to our process group, and ignore it ourselves.
1863 + * We assume that sig is currently blocked.
1867 @@ -1336,10 +1337,22 @@
1869 struct sigaction act, oldact;
1871 + sigemptyset(&act.sa_mask); /* unnecessary in fact */
1872 act.sa_handler = SIG_IGN;
1874 - sigaction(sig, &act, &oldact);
1877 + * The kill() above made the signal pending for us, as well as
1878 + * the rest of our process group, but we don't want it delivered
1879 + * to us. It is blocked at the moment. Setting it to be ignored
1880 + * will cause the pending signal to be discarded. If we did the
1881 + * kill() after setting the signal to be ignored, it is unspecified
1882 + * (by POSIX) whether the signal is immediately discarded or left
1883 + * pending, and in fact Linux would leave it pending, and so it
1884 + * would be delivered after the current signal handler exits,
1885 + * leading to an infinite loop.
1887 + sigaction(sig, &act, &oldact);
1888 sigaction(sig, &oldact, NULL);
1891 diff -ruN ppp-2.4.2/pppd/plugins/Makefile ppp-cvs-20040427/pppd/plugins/Makefile
1892 --- ppp-2.4.2/pppd/plugins/Makefile 2004-01-13 04:56:24.000000000 +0100
1893 +++ ppp-cvs-20040427/pppd/plugins/Makefile 1970-01-01 01:00:00.000000000 +0100
1897 -CFLAGS = $(COPTS) -I.. -I../../include -fPIC
1899 -INSTALL = install -o root
1901 -SUBDIRS := rp-pppoe
1902 -# Uncomment the next line to include the radius authentication plugin
1903 -# SUBDIRS += radius
1904 -PLUGINS := minconn.so passprompt.so passwordfd.so
1906 -# include dependencies if present
1907 -ifeq (.depend,$(wildcard .depend))
1912 - for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d all; done
1915 - $(CC) -o $@ $(LDFLAGS) $(CFLAGS) $^
1917 -VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../patchlevel.h)
1918 -LIBDIR = $(DESTDIR)/usr/lib/pppd/$(VERSION)
1920 -install: $(PLUGINS)
1921 - $(INSTALL) -d $(LIBDIR)
1922 - $(INSTALL) $? $(LIBDIR)
1923 - for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d INSTALL=$(INSTALL) \
1924 - LIBDIR=$(LIBDIR) install; done
1927 - rm -f *.o *.so *.a
1928 - for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d clean; done
1931 - $(CPP) -M $(CFLAGS) *.c >.depend
1932 - for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d depend; done
1933 diff -ruN ppp-2.4.2/pppd/plugins/radius/CVS/Entries ppp-cvs-20040427/pppd/plugins/radius/CVS/Entries
1934 --- ppp-2.4.2/pppd/plugins/radius/CVS/Entries 2002-12-04 22:49:09.000000000 +0100
1935 +++ ppp-cvs-20040427/pppd/plugins/radius/CVS/Entries 1970-01-01 01:00:00.000000000 +0100
1937 -/pppd-radattr.8/1.1/Tue Jan 22 16:03:00 2002//
1938 -/pppd-radius.8/1.4/Tue Apr 2 13:55:00 2002//
1939 -/radattr.c/1.1/Tue Jan 22 16:03:00 2002//
1941 -/Makefile.linux/1.5/Sat Nov 9 11:24:42 2002//
1942 -/radrealms.c/1.1/Sat Oct 5 04:35:24 2002//
1943 -/radius.c/1.18/Wed Dec 4 21:49:09 2002//
1944 diff -ruN ppp-2.4.2/pppd/plugins/radius/CVS/Repository ppp-cvs-20040427/pppd/plugins/radius/CVS/Repository
1945 --- ppp-2.4.2/pppd/plugins/radius/CVS/Repository 2002-09-07 12:37:51.000000000 +0200
1946 +++ ppp-cvs-20040427/pppd/plugins/radius/CVS/Repository 1970-01-01 01:00:00.000000000 +0100
1948 -ppp/pppd/plugins/radius
1949 diff -ruN ppp-2.4.2/pppd/plugins/radius/CVS/Root ppp-cvs-20040427/pppd/plugins/radius/CVS/Root
1950 --- ppp-2.4.2/pppd/plugins/radius/CVS/Root 2002-09-07 12:37:51.000000000 +0200
1951 +++ ppp-cvs-20040427/pppd/plugins/radius/CVS/Root 1970-01-01 01:00:00.000000000 +0100
1953 -samba.org:/data/cvs
1954 diff -ruN ppp-2.4.2/pppd/plugins/radius/Makefile ppp-cvs-20040427/pppd/plugins/radius/Makefile
1955 --- ppp-2.4.2/pppd/plugins/radius/Makefile 2002-11-09 12:24:42.000000000 +0100
1956 +++ ppp-cvs-20040427/pppd/plugins/radius/Makefile 1970-01-01 01:00:00.000000000 +0100
1958 -# Makefile for RADIUS plugin
1960 -# Copyright 2002 Roaring Penguin Software Inc.
1964 -PLUGIN=radius.so radattr.so radrealms.so
1965 -CFLAGS=-I../.. -I../../../include -Iradiusclient/include -O2
1967 -# Uncomment the next line to include support for Microsoft's
1968 -# MS-CHAP authentication protocol.
1970 -# Uncomment the next line to include support for MPPE.
1972 -# Uncomment the next lint to include support for traffic limiting
1976 -CFLAGS += -DCHAPMS=1
1982 -CFLAGS += -DMAXOCTETS=1
1988 - $(MAKE) $(MFLAGS) -C radiusclient install
1989 - $(INSTALL) -d -m 755 $(LIBDIR)
1990 - $(INSTALL) -s -c -m 755 radius.so $(LIBDIR)
1991 - $(INSTALL) -s -c -m 755 radattr.so $(LIBDIR)
1992 - $(INSTALL) -s -c -m 755 radrealms.so $(LIBDIR)
1993 - $(INSTALL) -c -m 444 pppd-radius.8 $(MANDIR)/man8
1994 - $(INSTALL) -c -m 444 pppd-radattr.8 $(MANDIR)/man8
1996 -radius.so: radiusclient/lib/.libs/libradiusclient.a radius.o
1997 - gcc -o radius.so -shared radius.o radiusclient/lib/.libs/libradiusclient.a
1999 -radattr.so: radattr.o
2000 - gcc -o radattr.so -shared radattr.o
2002 -radrealms.so: radrealms.o
2003 - gcc -o radrealms.so -shared radrealms.o
2006 - gcc $(CFLAGS) -c -o radius.o -fPIC radius.c
2008 -radattr.o: radattr.c
2009 - gcc $(CFLAGS) -c -o radattr.o -fPIC radattr.c
2011 -radrealms.o: radrealms.c
2012 - gcc $(CFLAGS) -c -o radrealms.o -fPIC radrealms.c
2014 -radiusclient/lib/.libs/libradiusclient.a:
2015 - test -r radiusclient/Makefile || \
2016 - (cd radiusclient; \
2017 - ./configure --prefix=/usr \
2018 - --sysconfdir=/etc \
2021 - $(MAKE) -C radiusclient
2024 - $(MAKE) $(MFLAGS) -C radiusclient clean
2029 - $(MAKE) $(MFLAGS) -C radiusclient distclean
2031 -dist-clean: distclean
2032 diff -ruN ppp-2.4.2/pppd/plugins/radius/pppd-radius.8 ppp-cvs-20040427/pppd/plugins/radius/pppd-radius.8
2033 --- ppp-2.4.2/pppd/plugins/radius/pppd-radius.8 2002-04-02 15:55:00.000000000 +0200
2034 +++ ppp-cvs-20040427/pppd/plugins/radius/pppd-radius.8 2004-03-26 14:30:16.000000000 +0100
2036 .\" manual page [] for RADIUS plugin for pppd 2.4
2037 -.\" $Id: pppd-radius.8,v 1.4 2002/04/02 13:55:00 dfs Exp $
2038 +.\" $Id: pppd-radius.8,v 1.5 2004/03/26 13:27:17 kad Exp $
2039 .\" SH section heading
2040 .\" SS subsection heading
2043 used, then the plugin uses
2044 .I /etc/radiusclient/radiusclient.conf
2045 as the configuration file.
2047 +.BI "avpair " attribute=value
2048 +Adds an Attribute-Value pair to be passed on to the RADIUS server on each request.
2051 +Sets Radius NAS-Port attribute to number equal to interface name (Default)
2054 +Sets Radius NAS-Port attribute value via libradiusclient library
2057 To use the plugin, simply supply the
2058 diff -ruN ppp-2.4.2/pppd/plugins/radius/radius.c ppp-cvs-20040427/pppd/plugins/radius/radius.c
2059 --- ppp-2.4.2/pppd/plugins/radius/radius.c 2004-01-13 03:26:11.000000000 +0100
2060 +++ ppp-cvs-20040427/pppd/plugins/radius/radius.c 2004-04-12 07:20:16.000000000 +0200
2063 ***********************************************************************/
2064 static char const RCSID[] =
2065 -"$Id: radius.c,v 1.22 2004/01/11 08:01:30 paulus Exp $";
2066 +"$Id: radius.c,v 1.25 2004/04/12 05:16:37 kad Exp $";
2069 #include "chap-new.h"
2072 struct avpopt *next;
2074 +static bool portnummap = 0;
2076 static option_t Options[] = {
2077 { "radius-config-file", o_string, &config_file },
2078 { "avpair", o_special, add_avp },
2079 + { "map-to-ttyname", o_bool, &portnummap,
2080 + "Set Radius NAS-Port attribute value via libradiusclient library", OPT_PRIO | 1 },
2081 + { "map-to-ifname", o_bool, &portnummap,
2082 + "Set Radius NAS-Port attribute to number as in interface name (Default)", OPT_PRIOSUB | 0 },
2088 /* Hack... the "port" is the ppp interface number. Should really be
2090 - rstate.client_port = get_client_port(ifname);
2091 + rstate.client_port = get_client_port(portnummap ? devnam : ifname);
2093 av_type = PW_FRAMED;
2094 rc_avpair_add(&send, PW_SERVICE_TYPE, &av_type, 0, VENDOR_NONE);
2096 /* Put user with potentially realm added in rstate.user */
2097 if (!rstate.done_chap_once) {
2098 make_username_realm(user);
2099 - rstate.client_port = get_client_port (ifname);
2100 + rstate.client_port = get_client_port (portnummap ? devnam : ifname);
2101 if (radius_pre_auth_hook) {
2102 radius_pre_auth_hook(rstate.user,
2105 rc_avpair_add(&send, PW_ACCT_AUTHENTIC, &av_type, 0, VENDOR_NONE);
2108 - av_type = PW_ASYNC;
2109 + av_type = ( using_pty ? PW_VIRTUAL : ( sync_serial ? PW_SYNC : PW_ASYNC ) );
2110 rc_avpair_add(&send, PW_NAS_PORT_TYPE, &av_type, 0, VENDOR_NONE);
2112 hisaddr = ho->hisaddr;
2113 @@ -981,9 +986,56 @@
2114 remote_number, 0, VENDOR_NONE);
2117 - av_type = PW_ASYNC;
2118 + av_type = ( using_pty ? PW_VIRTUAL : ( sync_serial ? PW_SYNC : PW_ASYNC ) );
2119 rc_avpair_add(&send, PW_NAS_PORT_TYPE, &av_type, 0, VENDOR_NONE);
2121 + av_type = PW_NAS_ERROR;
2122 + switch( status ) {
2124 + case EXIT_USER_REQUEST:
2125 + av_type = PW_USER_REQUEST;
2129 + case EXIT_PEER_DEAD:
2130 + case EXIT_CONNECT_FAILED:
2131 + av_type = PW_LOST_CARRIER;
2134 + case EXIT_INIT_FAILED:
2135 + case EXIT_OPEN_FAILED:
2136 + case EXIT_LOCK_FAILED:
2137 + case EXIT_PTYCMD_FAILED:
2138 + av_type = PW_PORT_ERROR;
2141 + case EXIT_PEER_AUTH_FAILED:
2142 + case EXIT_AUTH_TOPEER_FAILED:
2143 + case EXIT_NEGOTIATION_FAILED:
2144 + case EXIT_CNID_AUTH_FAILED:
2145 + av_type = PW_SERVICE_UNAVAILABLE;
2148 + case EXIT_IDLE_TIMEOUT:
2149 + av_type = PW_ACCT_IDLE_TIMEOUT;
2152 + case EXIT_CONNECT_TIME:
2153 + av_type = PW_ACCT_SESSION_TIMEOUT;
2157 + case EXIT_TRAFFIC_LIMIT:
2158 + av_type = PW_NAS_REQUEST;
2163 + av_type = PW_NAS_ERROR;
2166 + rc_avpair_add(&send, PW_ACCT_TERMINATE_CAUSE, &av_type, 0, VENDOR_NONE);
2168 hisaddr = ho->hisaddr;
2169 av_type = htonl(hisaddr);
2170 rc_avpair_add(&send, PW_FRAMED_IP_ADDRESS , &av_type , 0, VENDOR_NONE);
2171 @@ -1077,7 +1129,7 @@
2172 remote_number, 0, VENDOR_NONE);
2175 - av_type = PW_ASYNC;
2176 + av_type = ( using_pty ? PW_VIRTUAL : ( sync_serial ? PW_SYNC : PW_ASYNC ) );
2177 rc_avpair_add(&send, PW_NAS_PORT_TYPE, &av_type, 0, VENDOR_NONE);
2179 hisaddr = ho->hisaddr;
2180 diff -ruN ppp-2.4.2/pppd/plugins/radius/radiusclient/CVS/Entries ppp-cvs-20040427/pppd/plugins/radius/radiusclient/CVS/Entries
2181 --- ppp-2.4.2/pppd/plugins/radius/radiusclient/CVS/Entries 2002-09-07 12:37:54.000000000 +0200
2182 +++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/CVS/Entries 1970-01-01 01:00:00.000000000 +0100
2184 -/BUGS/1.1/Tue Jan 22 16:03:00 2002//
2185 -/CHANGES/1.1/Tue Jan 22 16:03:00 2002//
2186 -/COPYRIGHT/1.1/Tue Jan 22 16:03:00 2002//
2187 -/Makefile.am/1.1/Tue Jan 22 16:03:00 2002//
2188 -/Makefile.in/1.1/Tue Jan 22 16:03:00 2002//
2189 -/README/1.1/Tue Jan 22 16:03:00 2002//
2190 -/README.radexample/1.1/Tue Jan 22 16:03:00 2002//
2191 -/acconfig.h/1.1/Tue Jan 22 16:03:00 2002//
2192 -/aclocal.m4/1.2/Mon Jun 24 12:57:15 2002//
2193 -/config.guess/1.1/Tue Jan 22 16:03:00 2002//
2194 -/config.h.in/1.3/Thu Jul 25 16:29:16 2002//
2195 -/config.sub/1.1/Tue Jan 22 16:03:00 2002//
2196 -/configure/1.1/Tue Jan 22 16:03:00 2002//
2197 -/configure.in/1.1/Tue Jan 22 16:03:00 2002//
2198 -/install-sh/1.1/Tue Jan 22 16:03:00 2002//
2199 -/ltconfig/1.1/Tue Jan 22 16:03:00 2002//
2200 -/ltmain.sh/1.1/Tue Jan 22 16:03:00 2002//
2201 -/missing/1.1/Tue Jan 22 16:03:00 2002//
2202 -/mkinstalldirs/1.1/Tue Jan 22 16:03:00 2002//
2203 -/stamp-h.in/1.1/Tue Jan 22 16:03:00 2002//
2212 diff -ruN ppp-2.4.2/pppd/plugins/radius/radiusclient/CVS/Repository ppp-cvs-20040427/pppd/plugins/radius/radiusclient/CVS/Repository
2213 --- ppp-2.4.2/pppd/plugins/radius/radiusclient/CVS/Repository 2002-09-07 12:37:51.000000000 +0200
2214 +++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/CVS/Repository 1970-01-01 01:00:00.000000000 +0100
2216 -ppp/pppd/plugins/radius/radiusclient
2217 diff -ruN ppp-2.4.2/pppd/plugins/radius/radiusclient/CVS/Root ppp-cvs-20040427/pppd/plugins/radius/radiusclient/CVS/Root
2218 --- ppp-2.4.2/pppd/plugins/radius/radiusclient/CVS/Root 2002-09-07 12:37:51.000000000 +0200
2219 +++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/CVS/Root 1970-01-01 01:00:00.000000000 +0100
2221 -samba.org:/data/cvs
2222 diff -ruN ppp-2.4.2/pppd/plugins/radius/radiusclient/doc/CVS/Entries ppp-cvs-20040427/pppd/plugins/radius/radiusclient/doc/CVS/Entries
2223 --- ppp-2.4.2/pppd/plugins/radius/radiusclient/doc/CVS/Entries 2002-09-07 12:37:52.000000000 +0200
2224 +++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/doc/CVS/Entries 1970-01-01 01:00:00.000000000 +0100
2226 -/Makefile.am/1.1/Tue Jan 22 16:03:01 2002//
2227 -/Makefile.in/1.1/Tue Jan 22 16:03:01 2002//
2228 -/instop.html/1.1/Tue Jan 22 16:03:01 2002//
2230 diff -ruN ppp-2.4.2/pppd/plugins/radius/radiusclient/doc/CVS/Repository ppp-cvs-20040427/pppd/plugins/radius/radiusclient/doc/CVS/Repository
2231 --- ppp-2.4.2/pppd/plugins/radius/radiusclient/doc/CVS/Repository 2002-09-07 12:37:52.000000000 +0200
2232 +++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/doc/CVS/Repository 1970-01-01 01:00:00.000000000 +0100
2234 -ppp/pppd/plugins/radius/radiusclient/doc
2235 diff -ruN ppp-2.4.2/pppd/plugins/radius/radiusclient/doc/CVS/Root ppp-cvs-20040427/pppd/plugins/radius/radiusclient/doc/CVS/Root
2236 --- ppp-2.4.2/pppd/plugins/radius/radiusclient/doc/CVS/Root 2002-09-07 12:37:52.000000000 +0200
2237 +++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/doc/CVS/Root 1970-01-01 01:00:00.000000000 +0100
2239 -samba.org:/data/cvs
2240 diff -ruN ppp-2.4.2/pppd/plugins/radius/radiusclient/etc/CVS/Entries ppp-cvs-20040427/pppd/plugins/radius/radiusclient/etc/CVS/Entries
2241 --- ppp-2.4.2/pppd/plugins/radius/radiusclient/etc/CVS/Entries 2002-11-09 12:24:42.000000000 +0100
2242 +++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/etc/CVS/Entries 1970-01-01 01:00:00.000000000 +0100
2244 -/dictionary.ascend/1.1/Tue Jan 22 16:03:01 2002//
2245 -/dictionary.compat/1.1/Tue Jan 22 16:03:01 2002//
2246 -/dictionary.merit/1.1/Tue Jan 22 16:03:01 2002//
2247 -/dictionary.microsoft/1.1/Wed Mar 6 13:23:09 2002//
2248 -/issue/1.1/Tue Jan 22 16:03:01 2002//
2249 -/port-id-map/1.1/Tue Jan 22 16:03:01 2002//
2250 -/servers/1.1/Tue Jan 22 16:03:01 2002//
2251 -/Makefile.am/1.4/Sat Nov 9 11:24:42 2002//
2252 -/Makefile.in/1.5/Sat Nov 9 11:24:42 2002//
2253 -/dictionary/1.9/Sat Nov 9 11:24:42 2002//
2254 -/radiusclient.conf.in/1.2/Sat Nov 9 11:24:42 2002//
2255 -/realms/1.1/Sat Oct 5 04:35:24 2002//
2257 diff -ruN ppp-2.4.2/pppd/plugins/radius/radiusclient/etc/CVS/Repository ppp-cvs-20040427/pppd/plugins/radius/radiusclient/etc/CVS/Repository
2258 --- ppp-2.4.2/pppd/plugins/radius/radiusclient/etc/CVS/Repository 2002-09-07 12:37:52.000000000 +0200
2259 +++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/etc/CVS/Repository 1970-01-01 01:00:00.000000000 +0100
2261 -ppp/pppd/plugins/radius/radiusclient/etc
2262 diff -ruN ppp-2.4.2/pppd/plugins/radius/radiusclient/etc/CVS/Root ppp-cvs-20040427/pppd/plugins/radius/radiusclient/etc/CVS/Root
2263 --- ppp-2.4.2/pppd/plugins/radius/radiusclient/etc/CVS/Root 2002-09-07 12:37:52.000000000 +0200
2264 +++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/etc/CVS/Root 1970-01-01 01:00:00.000000000 +0100
2266 -samba.org:/data/cvs
2267 diff -ruN ppp-2.4.2/pppd/plugins/radius/radiusclient/include/CVS/Entries ppp-cvs-20040427/pppd/plugins/radius/radiusclient/include/CVS/Entries
2268 --- ppp-2.4.2/pppd/plugins/radius/radiusclient/include/CVS/Entries 2002-12-04 22:49:09.000000000 +0100
2269 +++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/include/CVS/Entries 1970-01-01 01:00:00.000000000 +0100
2271 -/Makefile.am/1.1/Tue Jan 22 16:03:01 2002//
2272 -/Makefile.in/1.1/Tue Jan 22 16:03:01 2002//
2273 -/includes.h/1.2/Wed Feb 27 15:51:19 2002//
2274 -/messages.h/1.2/Wed Feb 27 15:51:19 2002//
2275 -/pathnames.h/1.2/Wed Feb 27 15:51:19 2002//
2276 -/radiusclient.h/1.9/Wed Dec 4 21:49:09 2002//
2278 diff -ruN ppp-2.4.2/pppd/plugins/radius/radiusclient/include/CVS/Repository ppp-cvs-20040427/pppd/plugins/radius/radiusclient/include/CVS/Repository
2279 --- ppp-2.4.2/pppd/plugins/radius/radiusclient/include/CVS/Repository 2002-09-07 12:37:52.000000000 +0200
2280 +++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/include/CVS/Repository 1970-01-01 01:00:00.000000000 +0100
2282 -ppp/pppd/plugins/radius/radiusclient/include
2283 diff -ruN ppp-2.4.2/pppd/plugins/radius/radiusclient/include/CVS/Root ppp-cvs-20040427/pppd/plugins/radius/radiusclient/include/CVS/Root
2284 --- ppp-2.4.2/pppd/plugins/radius/radiusclient/include/CVS/Root 2002-09-07 12:37:52.000000000 +0200
2285 +++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/include/CVS/Root 1970-01-01 01:00:00.000000000 +0100
2287 -samba.org:/data/cvs
2288 diff -ruN ppp-2.4.2/pppd/plugins/radius/radiusclient/lib/CVS/Entries ppp-cvs-20040427/pppd/plugins/radius/radiusclient/lib/CVS/Entries
2289 --- ppp-2.4.2/pppd/plugins/radius/radiusclient/lib/CVS/Entries 2002-12-04 22:49:09.000000000 +0100
2290 +++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/lib/CVS/Entries 1970-01-01 01:00:00.000000000 +0100
2292 -/Makefile.am/1.1/Tue Jan 22 16:03:02 2002//
2293 -/Makefile.in/1.2/Wed Feb 20 02:22:35 2002//
2294 -/clientid.c/1.2/Wed Feb 27 15:51:20 2002//
2295 -/dict.c/1.2/Tue Mar 5 15:14:06 2002//
2296 -/env.c/1.2/Wed Feb 27 15:51:20 2002//
2297 -/ip_util.c/1.2/Wed Feb 27 15:51:20 2002//
2298 -/lock.c/1.2/Wed Feb 27 15:51:20 2002//
2299 -/log.c/1.2/Wed Feb 27 15:51:20 2002//
2300 -/md5.c/1.2/Wed Feb 27 15:51:20 2002//
2301 -/memcmp.c/1.2/Wed Feb 27 15:51:20 2002//
2302 -/sendserver.c/1.4/Tue Apr 2 14:09:35 2002//
2303 -/strcasecmp.c/1.2/Wed Feb 27 15:51:20 2002//
2304 -/strdup.c/1.2/Wed Feb 27 15:51:20 2002//
2305 -/strerror.c/1.2/Wed Feb 27 15:51:20 2002//
2306 -/util.c/1.2/Wed Feb 27 15:51:20 2002//
2307 -/buildreq.c/1.4/Sat Nov 9 11:24:43 2002//
2308 -/config.c/1.3/Sat Nov 9 11:24:43 2002//
2309 -/options.h/1.2/Sat Nov 9 11:24:43 2002//
2310 -/avpair.c/1.3/Wed Dec 4 21:49:09 2002//
2312 diff -ruN ppp-2.4.2/pppd/plugins/radius/radiusclient/lib/CVS/Repository ppp-cvs-20040427/pppd/plugins/radius/radiusclient/lib/CVS/Repository
2313 --- ppp-2.4.2/pppd/plugins/radius/radiusclient/lib/CVS/Repository 2002-09-07 12:37:53.000000000 +0200
2314 +++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/lib/CVS/Repository 1970-01-01 01:00:00.000000000 +0100
2316 -ppp/pppd/plugins/radius/radiusclient/lib
2317 diff -ruN ppp-2.4.2/pppd/plugins/radius/radiusclient/lib/CVS/Root ppp-cvs-20040427/pppd/plugins/radius/radiusclient/lib/CVS/Root
2318 --- ppp-2.4.2/pppd/plugins/radius/radiusclient/lib/CVS/Root 2002-09-07 12:37:53.000000000 +0200
2319 +++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/lib/CVS/Root 1970-01-01 01:00:00.000000000 +0100
2321 -samba.org:/data/cvs
2322 diff -ruN ppp-2.4.2/pppd/plugins/radius/radiusclient/login.radius/CVS/Entries ppp-cvs-20040427/pppd/plugins/radius/radiusclient/login.radius/CVS/Entries
2323 --- ppp-2.4.2/pppd/plugins/radius/radiusclient/login.radius/CVS/Entries 2002-09-07 12:37:54.000000000 +0200
2324 +++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/login.radius/CVS/Entries 1970-01-01 01:00:00.000000000 +0100
2326 -/Makefile.am/1.1/Tue Jan 22 16:03:02 2002//
2327 -/Makefile.in/1.1/Tue Jan 22 16:03:02 2002//
2328 -/README/1.1/Tue Jan 22 16:03:02 2002//
2329 -/login.radius/1.1/Tue Jan 22 16:03:02 2002//
2331 diff -ruN ppp-2.4.2/pppd/plugins/radius/radiusclient/login.radius/CVS/Repository ppp-cvs-20040427/pppd/plugins/radius/radiusclient/login.radius/CVS/Repository
2332 --- ppp-2.4.2/pppd/plugins/radius/radiusclient/login.radius/CVS/Repository 2002-09-07 12:37:53.000000000 +0200
2333 +++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/login.radius/CVS/Repository 1970-01-01 01:00:00.000000000 +0100
2335 -ppp/pppd/plugins/radius/radiusclient/login.radius
2336 diff -ruN ppp-2.4.2/pppd/plugins/radius/radiusclient/login.radius/CVS/Root ppp-cvs-20040427/pppd/plugins/radius/radiusclient/login.radius/CVS/Root
2337 --- ppp-2.4.2/pppd/plugins/radius/radiusclient/login.radius/CVS/Root 2002-09-07 12:37:53.000000000 +0200
2338 +++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/login.radius/CVS/Root 1970-01-01 01:00:00.000000000 +0100
2340 -samba.org:/data/cvs
2341 diff -ruN ppp-2.4.2/pppd/plugins/radius/radiusclient/login.radius/migs/CVS/Entries ppp-cvs-20040427/pppd/plugins/radius/radiusclient/login.radius/migs/CVS/Entries
2342 --- ppp-2.4.2/pppd/plugins/radius/radiusclient/login.radius/migs/CVS/Entries 2002-09-07 12:37:53.000000000 +0200
2343 +++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/login.radius/migs/CVS/Entries 1970-01-01 01:00:00.000000000 +0100
2345 -/Makefile.am/1.1/Tue Jan 22 16:03:02 2002//
2346 -/Makefile.in/1.1/Tue Jan 22 16:03:02 2002//
2347 -/README/1.1/Tue Jan 22 16:03:02 2002//
2348 -/ip-down/1.1/Tue Jan 22 16:03:02 2002//
2349 -/ip-up/1.1/Tue Jan 22 16:03:02 2002//
2350 -/login.radius/1.1/Tue Jan 22 16:03:02 2002//
2352 diff -ruN ppp-2.4.2/pppd/plugins/radius/radiusclient/login.radius/migs/CVS/Repository ppp-cvs-20040427/pppd/plugins/radius/radiusclient/login.radius/migs/CVS/Repository
2353 --- ppp-2.4.2/pppd/plugins/radius/radiusclient/login.radius/migs/CVS/Repository 2002-09-07 12:37:53.000000000 +0200
2354 +++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/login.radius/migs/CVS/Repository 1970-01-01 01:00:00.000000000 +0100
2356 -ppp/pppd/plugins/radius/radiusclient/login.radius/migs
2357 diff -ruN ppp-2.4.2/pppd/plugins/radius/radiusclient/login.radius/migs/CVS/Root ppp-cvs-20040427/pppd/plugins/radius/radiusclient/login.radius/migs/CVS/Root
2358 --- ppp-2.4.2/pppd/plugins/radius/radiusclient/login.radius/migs/CVS/Root 2002-09-07 12:37:53.000000000 +0200
2359 +++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/login.radius/migs/CVS/Root 1970-01-01 01:00:00.000000000 +0100
2361 -samba.org:/data/cvs
2362 diff -ruN ppp-2.4.2/pppd/plugins/radius/radiusclient/man/CVS/Entries ppp-cvs-20040427/pppd/plugins/radius/radiusclient/man/CVS/Entries
2363 --- ppp-2.4.2/pppd/plugins/radius/radiusclient/man/CVS/Entries 2002-09-07 12:37:53.000000000 +0200
2364 +++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/man/CVS/Entries 1970-01-01 01:00:00.000000000 +0100
2366 -/Makefile.am/1.1/Tue Jan 22 16:03:02 2002//
2367 -/Makefile.in/1.1/Tue Jan 22 16:03:02 2002//
2369 diff -ruN ppp-2.4.2/pppd/plugins/radius/radiusclient/man/CVS/Repository ppp-cvs-20040427/pppd/plugins/radius/radiusclient/man/CVS/Repository
2370 --- ppp-2.4.2/pppd/plugins/radius/radiusclient/man/CVS/Repository 2002-09-07 12:37:53.000000000 +0200
2371 +++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/man/CVS/Repository 1970-01-01 01:00:00.000000000 +0100
2373 -ppp/pppd/plugins/radius/radiusclient/man
2374 diff -ruN ppp-2.4.2/pppd/plugins/radius/radiusclient/man/CVS/Root ppp-cvs-20040427/pppd/plugins/radius/radiusclient/man/CVS/Root
2375 --- ppp-2.4.2/pppd/plugins/radius/radiusclient/man/CVS/Root 2002-09-07 12:37:53.000000000 +0200
2376 +++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/man/CVS/Root 1970-01-01 01:00:00.000000000 +0100
2378 -samba.org:/data/cvs
2379 diff -ruN ppp-2.4.2/pppd/plugins/radius/radiusclient/patches/CVS/Entries ppp-cvs-20040427/pppd/plugins/radius/radiusclient/patches/CVS/Entries
2380 --- ppp-2.4.2/pppd/plugins/radius/radiusclient/patches/CVS/Entries 2002-09-07 12:37:53.000000000 +0200
2381 +++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/patches/CVS/Entries 1970-01-01 01:00:00.000000000 +0100
2383 -/Makefile.am/1.1/Tue Jan 22 16:03:03 2002//
2384 -/Makefile.in/1.1/Tue Jan 22 16:03:03 2002//
2385 -/README/1.1/Tue Jan 22 16:03:03 2002//
2386 -/merit-2.4.21-CHAP.diff/1.1/Tue Jan 22 16:03:04 2002//
2387 -/radiusd-1.16.accounting.diff/1.1/Tue Jan 22 16:03:04 2002//
2388 -/radiusd-1.16.shadow.diff/1.1/Tue Jan 22 16:03:04 2002//
2390 diff -ruN ppp-2.4.2/pppd/plugins/radius/radiusclient/patches/CVS/Repository ppp-cvs-20040427/pppd/plugins/radius/radiusclient/patches/CVS/Repository
2391 --- ppp-2.4.2/pppd/plugins/radius/radiusclient/patches/CVS/Repository 2002-09-07 12:37:53.000000000 +0200
2392 +++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/patches/CVS/Repository 1970-01-01 01:00:00.000000000 +0100
2394 -ppp/pppd/plugins/radius/radiusclient/patches
2395 diff -ruN ppp-2.4.2/pppd/plugins/radius/radiusclient/patches/CVS/Root ppp-cvs-20040427/pppd/plugins/radius/radiusclient/patches/CVS/Root
2396 --- ppp-2.4.2/pppd/plugins/radius/radiusclient/patches/CVS/Root 2002-09-07 12:37:53.000000000 +0200
2397 +++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/patches/CVS/Root 1970-01-01 01:00:00.000000000 +0100
2399 -samba.org:/data/cvs
2400 diff -ruN ppp-2.4.2/pppd/plugins/radius/radiusclient/src/CVS/Entries ppp-cvs-20040427/pppd/plugins/radius/radiusclient/src/CVS/Entries
2401 --- ppp-2.4.2/pppd/plugins/radius/radiusclient/src/CVS/Entries 2002-09-07 12:37:53.000000000 +0200
2402 +++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/src/CVS/Entries 1970-01-01 01:00:00.000000000 +0100
2404 -/Makefile.am/1.1/Tue Jan 22 16:03:04 2002//
2405 -/Makefile.in/1.1/Tue Jan 22 16:03:04 2002//
2406 -/local.c/1.1/Tue Jan 22 16:03:04 2002//
2407 -/radacct.c/1.1/Tue Jan 22 16:03:04 2002//
2408 -/radexample-debug/1.1/Tue Jan 22 16:03:04 2002//
2409 -/radexample.c/1.2/Tue Apr 2 14:09:35 2002//
2410 -/radius.c/1.2/Tue Apr 2 14:09:35 2002//
2411 -/radlogin.c/1.1/Tue Jan 22 16:03:04 2002//
2412 -/radlogin.h/1.1/Tue Jan 22 16:03:05 2002//
2413 -/radstatus.c/1.1/Tue Jan 22 16:03:05 2002//
2415 diff -ruN ppp-2.4.2/pppd/plugins/radius/radiusclient/src/CVS/Repository ppp-cvs-20040427/pppd/plugins/radius/radiusclient/src/CVS/Repository
2416 --- ppp-2.4.2/pppd/plugins/radius/radiusclient/src/CVS/Repository 2002-09-07 12:37:53.000000000 +0200
2417 +++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/src/CVS/Repository 1970-01-01 01:00:00.000000000 +0100
2419 -ppp/pppd/plugins/radius/radiusclient/src
2420 diff -ruN ppp-2.4.2/pppd/plugins/radius/radiusclient/src/CVS/Root ppp-cvs-20040427/pppd/plugins/radius/radiusclient/src/CVS/Root
2421 --- ppp-2.4.2/pppd/plugins/radius/radiusclient/src/CVS/Root 2002-09-07 12:37:53.000000000 +0200
2422 +++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/src/CVS/Root 1970-01-01 01:00:00.000000000 +0100
2424 -samba.org:/data/cvs
2425 diff -ruN ppp-2.4.2/pppd/plugins/rp-pppoe/CVS/Entries ppp-cvs-20040427/pppd/plugins/rp-pppoe/CVS/Entries
2426 --- ppp-2.4.2/pppd/plugins/rp-pppoe/CVS/Entries 2002-09-07 12:37:54.000000000 +0200
2427 +++ ppp-cvs-20040427/pppd/plugins/rp-pppoe/CVS/Entries 1970-01-01 01:00:00.000000000 +0100
2429 -/Makefile.linux/1.1/Fri Dec 14 02:55:20 2001//
2430 -/common.c/1.1/Fri Dec 14 02:55:20 2001//
2431 -/config.h/1.1/Fri Dec 14 02:55:20 2001//
2432 -/debug.c/1.1/Fri Dec 14 02:55:20 2001//
2433 -/discovery.c/1.1/Fri Dec 14 02:55:20 2001//
2434 -/if.c/1.1/Fri Dec 14 02:55:20 2001//
2435 -/plugin.c/1.7/Tue Apr 2 13:11:00 2002//
2436 -/pppoe.h/1.1/Fri Dec 14 02:55:20 2001//
2438 diff -ruN ppp-2.4.2/pppd/plugins/rp-pppoe/CVS/Repository ppp-cvs-20040427/pppd/plugins/rp-pppoe/CVS/Repository
2439 --- ppp-2.4.2/pppd/plugins/rp-pppoe/CVS/Repository 2002-09-07 12:37:53.000000000 +0200
2440 +++ ppp-cvs-20040427/pppd/plugins/rp-pppoe/CVS/Repository 1970-01-01 01:00:00.000000000 +0100
2442 -ppp/pppd/plugins/rp-pppoe
2443 diff -ruN ppp-2.4.2/pppd/plugins/rp-pppoe/CVS/Root ppp-cvs-20040427/pppd/plugins/rp-pppoe/CVS/Root
2444 --- ppp-2.4.2/pppd/plugins/rp-pppoe/CVS/Root 2002-09-07 12:37:53.000000000 +0200
2445 +++ ppp-cvs-20040427/pppd/plugins/rp-pppoe/CVS/Root 1970-01-01 01:00:00.000000000 +0100
2447 -samba.org:/data/cvs
2448 diff -ruN ppp-2.4.2/pppd/plugins/rp-pppoe/Makefile ppp-cvs-20040427/pppd/plugins/rp-pppoe/Makefile
2449 --- ppp-2.4.2/pppd/plugins/rp-pppoe/Makefile 2004-01-13 04:57:55.000000000 +0100
2450 +++ ppp-cvs-20040427/pppd/plugins/rp-pppoe/Makefile 1970-01-01 01:00:00.000000000 +0100
2452 -# Generated automatically from Makefile.in by configure.
2453 -#***********************************************************************
2457 -# Makefile for Roaring Penguin's Linux PPPoE plugin.
2459 -# Copyright (C) 2001 Roaring Penguin Software Inc.
2461 -# This program may be distributed according to the terms of the GNU
2462 -# General Public License, version 2 or (at your option) any later version.
2464 -# $Id: Makefile.linux,v 1.2 2004/01/13 03:57:55 paulus Exp $
2465 -#***********************************************************************
2467 -# Version is set ONLY IN THE MAKEFILE! Don't delete this!
2471 -CFLAGS=$(COPTS) -I../../../include/linux
2474 -rp-pppoe.so: libplugin.a plugin.o
2475 - gcc -o rp-pppoe.so -shared plugin.o libplugin.a
2478 - $(INSTALL) -d -m 755 $(LIBDIR)
2479 - $(INSTALL) -s -c -m 4550 rp-pppoe.so $(LIBDIR)
2485 - gcc '-DRP_VERSION="$(VERSION)"' $(CFLAGS) -I../../.. -c -o plugin.o -fPIC plugin.c
2487 -libplugin.a: discovery.o if.o common.o debug.o
2490 -discovery.o: discovery.c
2491 - gcc $(CFLAGS) '-DVERSION="$(VERSION)"' -c -o discovery.o -fPIC discovery.c
2494 - gcc $(CFLAGS) '-DVERSION="$(VERSION)"' -c -o if.o -fPIC if.c
2497 - gcc $(CFLAGS) '-DVERSION="$(VERSION)"' -c -o debug.o -fPIC debug.c
2500 - gcc $(CFLAGS) '-DVERSION="$(VERSION)"' -c -o common.o -fPIC common.c
2502 diff -ruN ppp-2.4.2/pppd/pppd.8 ppp-cvs-20040427/pppd/pppd.8
2503 --- ppp-2.4.2/pppd/pppd.8 2004-01-15 06:09:00.000000000 +0100
2504 +++ ppp-cvs-20040427/pppd/pppd.8 2004-04-27 20:25:12.000000000 +0200
2506 .\" manual page [] for pppd 2.4
2507 -.\" $Id: pppd.8,v 1.76 2004/01/15 05:09:00 paulus Exp $
2508 +.\" $Id: pppd.8,v 1.77 2004/04/27 18:22:58 fcusack Exp $
2509 .\" SH section heading
2510 .\" SS subsection heading
2512 @@ -955,11 +955,11 @@
2513 Require the use of MPPE, with 128\-bit encryption.
2516 -Require the peer to authenticate itself using MS-CHAP [Microsft Challenge
2517 +Require the peer to authenticate itself using MS-CHAP [Microsoft Challenge
2518 Handshake Authentication Protocol] authentication.
2520 .B require-mschap-v2
2521 -Require the peer to authenticate itself using MS-CHAPv2 [Microsft Challenge
2522 +Require the peer to authenticate itself using MS-CHAPv2 [Microsoft Challenge
2523 Handshake Authentication Protocol, Version 2] authentication.
2526 diff -ruN ppp-2.4.2/pppd/tty.c ppp-cvs-20040427/pppd/tty.c
2527 --- ppp-2.4.2/pppd/tty.c 2004-01-13 05:17:59.000000000 +0100
2528 +++ ppp-cvs-20040427/pppd/tty.c 2004-01-17 06:50:12.000000000 +0100
2530 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
2533 -#define RCSID "$Id: tty.c,v 1.13 2004/01/13 04:17:59 paulus Exp $"
2534 +#define RCSID "$Id: tty.c,v 1.14 2004/01/17 05:47:55 carlsonj Exp $"
2543 struct stat statbuf;
2548 diff -ruN ppp-2.4.2/pppdump/bsd-comp.c ppp-cvs-20040427/pppdump/bsd-comp.c
2549 --- ppp-2.4.2/pppdump/bsd-comp.c 1999-04-16 13:34:42.000000000 +0200
2550 +++ ppp-cvs-20040427/pppdump/bsd-comp.c 2004-01-17 06:50:12.000000000 +0100
2555 - * $Id: bsd-comp.c,v 1.3 1999/04/16 11:35:59 paulus Exp $
2556 + * $Id: bsd-comp.c,v 1.4 2004/01/17 05:47:55 carlsonj Exp $
2559 #include <sys/types.h>
2563 +#include <string.h>
2564 #include "ppp_defs.h"
2565 #include "ppp-comp.h"
2567 diff -ruN ppp-2.4.2/pppdump/deflate.c ppp-cvs-20040427/pppdump/deflate.c
2568 --- ppp-2.4.2/pppdump/deflate.c 2002-12-06 10:49:16.000000000 +0100
2569 +++ ppp-cvs-20040427/pppdump/deflate.c 2004-01-17 06:50:12.000000000 +0100
2571 * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
2572 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
2574 - * $Id: deflate.c,v 1.4 2002/12/06 09:49:16 paulus Exp $
2575 + * $Id: deflate.c,v 1.5 2004/01/17 05:47:55 carlsonj Exp $
2578 #include <sys/types.h>
2582 +#include <string.h>
2583 #include "ppp_defs.h"
2584 #include "ppp-comp.h"
2586 diff -ruN ppp-2.4.2/pppdump/pppdump.c ppp-cvs-20040427/pppdump/pppdump.c
2587 --- ppp-2.4.2/pppdump/pppdump.c 2002-12-06 10:17:02.000000000 +0100
2588 +++ ppp-cvs-20040427/pppdump/pppdump.c 2004-01-17 06:50:12.000000000 +0100
2593 +#include <stdlib.h>
2595 #include <sys/types.h>
2596 #include "ppp_defs.h"
2599 extern char *optarg;
2620 unsigned char dbuf[8192];
2631 handle_ccp(cp, dp, len)
2642 diff -ruN ppp-2.4.2/scripts/callback ppp-cvs-20040427/scripts/callback
2643 --- ppp-2.4.2/scripts/callback 1995-08-09 04:49:51.000000000 +0200
2644 +++ ppp-cvs-20040427/scripts/callback 2004-04-12 07:30:11.000000000 +0200
2646 ABORT '\nNO ANSWER\r' \
2647 ABORT '\nRINGING\r\n\r\nRINGING\r' \
2649 - 'OK-+++\c-OK' 'AT&C0&D2S0=0H0 \
2650 + 'OK-+++\c-OK' 'AT&C0&D2S0=0H0' \
2654 diff -ruN ppp-2.4.2/scripts/ipv6-down.sample ppp-cvs-20040427/scripts/ipv6-down.sample
2655 --- ppp-2.4.2/scripts/ipv6-down.sample 1999-08-23 08:07:07.000000000 +0200
2656 +++ ppp-cvs-20040427/scripts/ipv6-down.sample 2004-04-12 07:45:18.000000000 +0200
2658 # Kill the router advertisement daemon on this interface.
2659 # The killing procedure is copied from RedHat 6.0 initscripts.
2664 -PIDFILE=/var/run/radvd-$DEVICE.pid
2665 +PIDFILE="/var/run/radvd-$DEVICE.pid"
2667 -[ -f $PIDFILE ] || exit 0
2668 +[ -f "$PIDFILE" ] || exit 0
2671 +PID="$(cat "$PIDFILE")"
2672 if [ "$PID" != "" ]; then
2673 - if ps h $PID >/dev/null 2>&1; then
2675 + if ps h "$PID" >/dev/null 2>&1; then
2678 - if ps h $PID >/dev/null 2>&1; then
2679 + if ps h "$PID" >/dev/null 2>&1; then
2681 - if ps h $PID >/dev/null 2>&1; then
2683 + if ps h "$PID" >/dev/null 2>&1; then
2692 diff -ruN ppp-2.4.2/scripts/ipv6-up.sample ppp-cvs-20040427/scripts/ipv6-up.sample
2693 --- ppp-2.4.2/scripts/ipv6-up.sample 1999-08-23 08:07:07.000000000 +0200
2694 +++ ppp-cvs-20040427/scripts/ipv6-up.sample 2004-04-12 07:45:18.000000000 +0200
2696 # Start router advertisements on this link.
2697 # Based on radvd 0.5.0 behaviour
2702 -CFGFILE=/usr/inet6/etc/radvd.conf-$DEVICE
2703 -PIDFILE=/var/run/radvd-$DEVICE.pid
2704 +CFGFILE="/etc/radvd.conf-$DEVICE"
2705 +PIDFILE="/var/run/radvd-$DEVICE.pid"
2706 +EXEFILE="/usr/sbin/radvd"
2708 -if [ -x /usr/inet6/sbin/radvd && -f $CFGFILE ]; then
2710 - if [ ! -f $PIDFILE ]; then
2711 +if [ -x "$EXEFILE" -a -f "$CFGFILE" ]; then
2713 + if [ ! -f "$PIDFILE" ]; then
2714 echo "error: $PIDFILE is not a regular file. Aborting"
2718 - PID=`cat $PIDFILE`
2719 - if [ "$PID" != "" ]; then
2720 - ps h $PID >/dev/null 2>&1 && exit 0
2721 + PID="$(cat "$PIDFILE")"
2722 + if [ -n "$PID" ]; then
2723 + ps h "$PID" >/dev/null 2>&1 && exit 0
2726 # radvd 0.5.0 doesn't write a pid-file so we do it here
2727 # enabling debugging keeps radvd in foreground, putting it
2728 # on background gives us the PID.
2729 - /usr/inet6/sbin/radvd -d 1 -C $CFGFILE &
2731 + "$EXEFILE" -d 1 -C "$CFGFILE" &
2732 + echo $! >"$PIDFILE"
2734 diff -ruN ppp-2.4.2/scripts/pon ppp-cvs-20040427/scripts/pon
2735 --- ppp-2.4.2/scripts/pon 2002-11-25 00:30:44.000000000 +0100
2736 +++ ppp-cvs-20040427/scripts/pon 2004-04-12 07:45:18.000000000 +0200
2740 +PPP_ON_BOOT=/etc/ppp/ppp_on_boot
2744 Usage: pon [provider] [arguments]
2746 -If pon is invoked without arguments, /etc/ppp/ppp_on_boot file will be
2747 +If pon is invoked without arguments, $PPP_ON_BOOT file will be
2748 run, presuming it exists and is executable. Otherwise, a PPP connection
2749 will be started using settings from /etc/ppp/peers/provider.
2750 If you specify one argument, a PPP connection will be started using
2755 -if [ -z "$1" -a -x /etc/ppp/ppp_on_boot ]; then
2756 - exec /etc/ppp/ppp_on_boot
2757 +if [ -z "$1" -a -x "$PPP_ON_BOOT" ]; then
2758 + exec "$PPP_ON_BOOT"
2761 if [ -z "$1" -a ! -f /etc/ppp/peers/provider ]; then
2762 diff -ruN ppp-2.4.2/svr4/Makedefs ppp-cvs-20040427/svr4/Makedefs
2763 --- ppp-2.4.2/svr4/Makedefs 1970-01-01 01:00:00.000000000 +0100
2764 +++ ppp-cvs-20040427/svr4/Makedefs 2000-06-09 03:36:34.000000000 +0200
2767 +# defines common to several Makefiles
2770 +INSTALL= /usr/sbin/install
2772 +BINDIR = /usr/local/bin
2773 +MANDIR = /usr/local/man
2778 +# For compiling with gcc, comment out the COPTS definition above and
2779 +# uncomment the next 2 definitions.
2782 diff -ruN ppp-2.4.2/svr4/Makedefs.sol2 ppp-cvs-20040427/svr4/Makedefs.sol2
2783 --- ppp-2.4.2/svr4/Makedefs.sol2 1970-01-01 01:00:00.000000000 +0100
2784 +++ ppp-cvs-20040427/svr4/Makedefs.sol2 1999-09-21 22:50:31.000000000 +0200
2787 +# Generic make definitions for Solaris 2
2789 +# $Id: Makedefs.sol2,v 1.3 1999/09/21 20:37:20 masputra Exp $
2792 +include ../svr4/Makedefs
2794 +CPPFLAGS = -D_KERNEL -DSVR4 -DSOL2 -DPRIOQ -DDEBUG -I../include
2795 +CFLAGS = $(CPPFLAGS) $(COPTS)
2797 +# lint-specific variables
2800 +LINT_OPT_64 = -Xarch=v9 -errchk=longptr64
2803 +LINT_32 += -erroff=E_BAD_PTR_CAST_ALIGN
2804 +LINT_32 += -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED
2805 +LINT_32 += -erroff=E_SUSPICIOUS_COMPARISON
2806 +LINT_32 += -erroff=E_CAST_UINT_TO_SIGNED_INT
2807 +LINT_32 += -erroff=E_PASS_UINT_TO_SIGNED_INT
2808 +LINT_32 += -erroff=E_INVALID_ANNOTATION_NAME
2809 +LINT_32 += -erroff=E_FUNC_ARG_UNUSED
2810 +# This might be needed, but zlib.c and vjcompress.c will squawk
2812 +LINT_32 += -erroff=E_CASE_FALLTHRU
2813 +LINT_32 += -erroff=E_RET_INT_IMPLICITLY
2814 +LINT_32 += -erroff=E_FUNC_NO_RET_VAL
2815 +# Some STREAMS macros will be noisy too when this isn't ignored
2816 +LINT_32 += -erroff=E_CONSTANT_CONDITION
2817 +LINT_32 += -erroff=E_CONST_EXPR
2819 +# Extra noise suppressant for 64-bit
2821 +EXTRA_OFF += -erroff=E_CAST_INT_TO_SMALL_INT
2822 +EXTRA_OFF += -erroff=E_CAST_INT_CONST_TO_SMALL_INT
2823 +EXTRA_OFF += -erroff=E_CAST_TO_PTR_FROM_INT
2824 +EXTRA_OFF += -erroff=E_ASSIGN_INT_TO_SMALL_INT
2825 +EXTRA_OFF += -erroff=E_ASSIGN_INT_FROM_BIG_CONST
2826 +EXTRA_OFF += -erroff=E_CONST_PROMOTED_UNSIGNED_LL
2827 +EXTRA_OFF += -erroff=E_CONST_PROMOTED_LONG_LONG
2828 +EXTRA_OFF += -erroff=E_CONST_TRUNCATED_BY_ASSIGN
2829 +EXTRA_OFF += -erroff=E_PASS_INT_FROM_BIG_CONST
2830 +EXTRA_OFF += -erroff=E_COMP_INT_WITH_LARGE_INT
2831 +EXTRA_OFF += -erroff=E_ASSIGN_UINT_TO_SIGNED_INT
2832 +EXTRA_OFF += -erroff=E_ASSIGN_NARROW_CONV
2833 +EXTRA_OFF += -erroff=E_PASS_INT_TO_SMALL_INT
2834 +EXTRA_OFF += -erroff=E_PTR_CONV_LOSES_BITS
2836 +LINT_64 = $(LINT_32)
2837 +LINT_64 += $(EXTRA_OFF)
2839 +LINTFLAGS64 = -Xa -nsxmuF -errtags=yes $(LINT_OPT_64) $(LINT_64)
2840 +LINT64 = $(LINT) -c $(LINTFLAGS64) $(CPPFLAGS)
2842 +LINTFLAGS32 = -Xa -nsxmuF -errtags=yes $(LINT_OPT_32) $(LINT_32)
2843 +LINT32 = $(LINT) -c $(LINTFLAGS32) $(CPPFLAGS)
2845 diff -ruN ppp-2.4.2/svr4/Makefile.sol2 ppp-cvs-20040427/svr4/Makefile.sol2
2846 --- ppp-2.4.2/svr4/Makefile.sol2 1970-01-01 01:00:00.000000000 +0100
2847 +++ ppp-cvs-20040427/svr4/Makefile.sol2 1999-09-21 22:50:32.000000000 +0200
2850 +# Makefile for STREAMS modules for Solaris 2.
2852 +# $Id: Makefile.sol2,v 1.18 1999/09/21 20:37:20 masputra Exp $
2855 +include Makedefs.sol2
2857 +COPTS += -xO2 -xspace -W0,-Lt
2859 +COMP_OBJS = ppp_comp.o bsd-comp.o deflate.o zlib.o vjcompress.o \
2862 +all: ppp ppp_ahdl ppp_comp
2864 +ppp: ppp.o ppp_mod.o
2865 + ld -r -o $@ ppp.o ppp_mod.o
2868 +ppp_ahdl: ppp_ahdlc.o ppp_ahdlc_mod.o
2869 + ld -r -o $@ ppp_ahdlc.o ppp_ahdlc_mod.o
2872 +ppp_comp: $(COMP_OBJS)
2873 + ld -r -o $@ $(COMP_OBJS)
2876 +bsd-comp.o: ../modules/bsd-comp.c
2877 + $(CC) $(CFLAGS) -c $?
2878 +deflate.o: ../modules/deflate.c
2879 + $(CC) $(CFLAGS) -c $?
2880 +ppp.o: ../modules/ppp.c
2881 + $(CC) $(CFLAGS) -c $?
2882 +ppp_mod.o: ppp_mod.c
2883 + $(CC) $(CFLAGS) -c $?
2884 +ppp_ahdlc_mod.o: ppp_ahdlc_mod.c
2885 + $(CC) $(CFLAGS) -c $?
2886 +ppp_ahdlc.o: ../modules/ppp_ahdlc.c
2887 + $(CC) $(CFLAGS) -c $?
2888 +ppp_comp.o: ../modules/ppp_comp.c
2889 + $(CC) $(CFLAGS) -c $?
2890 +ppp_comp_mod.o: ppp_comp_mod.c
2891 + $(CC) $(CFLAGS) -c $?
2892 +vjcompress.o: ../modules/vjcompress.c
2893 + $(CC) $(CFLAGS) -c $?
2894 +zlib.o: ../common/zlib.c
2895 + $(CC) $(CFLAGS) -c $?
2898 + cp ppp ppp.conf /kernel/drv
2899 + cp ppp_comp ppp_ahdl /kernel/strmod
2900 + if grep clone:ppp /etc/minor_perm; then :; else \
2901 + echo clone:ppp 0644 root sys >>/etc/minor_perm; fi
2902 + /usr/sbin/rem_drv ppp 2>/dev/null || true
2903 + /usr/sbin/add_drv ppp
2905 +SRCS = ../modules/ppp.c ppp_mod.c ../modules/ppp_ahdlc.c ppp_ahdlc_mod.c \
2906 + ../modules/ppp_comp.c ../modules/bsd-comp.c ../modules/deflate.c \
2907 + ../common/zlib.c ../modules/vjcompress.c ppp_comp_mod.c
2913 + rm -f ppp ppp_comp ppp_ahdl *.o *~ core
2915 diff -ruN ppp-2.4.2/svr4/Makefile.sol2-64 ppp-cvs-20040427/svr4/Makefile.sol2-64
2916 --- ppp-2.4.2/svr4/Makefile.sol2-64 1970-01-01 01:00:00.000000000 +0100
2917 +++ ppp-cvs-20040427/svr4/Makefile.sol2-64 1999-09-21 22:50:33.000000000 +0200
2920 +# Makefile for 64-bit STREAMS modules for Solaris 2.
2922 +# $Id: Makefile.sol2-64,v 1.3 1999/09/21 20:37:20 masputra Exp $
2925 +include Makedefs.sol2
2927 +# Sun's cc flag for LP64 compilation / linkage
2928 +COPTS += -xchip=ultra -xarch=v9 -Wc,-xcode=abs32 -Wc,-Qiselect-regsym=0 -xO3 -xspace -W0,-Lt
2930 +# subdirectory where 64-bit objects / binaries will be placed
2933 +# Name of legacy Makefile (for 32-bit binaries)
2934 +STD_MAKE = Makefile.sol2
2936 +COMP_OBJS = $(LP64DIR)/ppp_comp.o $(LP64DIR)/bsd-comp.o \
2937 + $(LP64DIR)/deflate.o $(LP64DIR)/zlib.o $(LP64DIR)/vjcompress.o \
2938 + $(LP64DIR)/ppp_comp_mod.o
2940 +all: std_objs $(LP64DIR) ppp ppp_ahdl ppp_comp
2943 + $(MAKE) -f $(STD_MAKE) all
2945 +ppp: $(LP64DIR)/ppp.o $(LP64DIR)/ppp_mod.o
2946 + ld -r -o $(LP64DIR)/$@ $(LP64DIR)/ppp.o $(LP64DIR)/ppp_mod.o
2947 + chmod +x $(LP64DIR)/$@
2949 +ppp_ahdl: $(LP64DIR)/ppp_ahdlc.o $(LP64DIR)/ppp_ahdlc_mod.o
2950 + ld -r -o $(LP64DIR)/$@ $(LP64DIR)/ppp_ahdlc.o $(LP64DIR)/ppp_ahdlc_mod.o
2951 + chmod +x $(LP64DIR)/$@
2953 +ppp_comp: $(COMP_OBJS)
2954 + ld -r -o $(LP64DIR)/$@ $(COMP_OBJS)
2955 + chmod +x $(LP64DIR)/$@
2957 +$(LP64DIR)/bsd-comp.o: ../modules/bsd-comp.c
2958 + $(CC) $(CFLAGS) -c $? -o $@
2959 +$(LP64DIR)/deflate.o: ../modules/deflate.c
2960 + $(CC) $(CFLAGS) -c $? -o $@
2961 +$(LP64DIR)/ppp.o: ../modules/ppp.c
2962 + $(CC) $(CFLAGS) -c $? -o $@
2963 +$(LP64DIR)/ppp_mod.o: ppp_mod.c
2964 + $(CC) $(CFLAGS) -c $? -o $@
2965 +$(LP64DIR)/ppp_ahdlc_mod.o: ppp_ahdlc_mod.c
2966 + $(CC) $(CFLAGS) -c $? -o $@
2967 +$(LP64DIR)/ppp_ahdlc.o: ../modules/ppp_ahdlc.c
2968 + $(CC) $(CFLAGS) -c $? -o $@
2969 +$(LP64DIR)/ppp_comp.o: ../modules/ppp_comp.c
2970 + $(CC) $(CFLAGS) -c $? -o $@
2971 +$(LP64DIR)/ppp_comp_mod.o: ppp_comp_mod.c
2972 + $(CC) $(CFLAGS) -c $? -o $@
2973 +$(LP64DIR)/vjcompress.o: ../modules/vjcompress.c
2974 + $(CC) $(CFLAGS) -c $? -o $@
2975 +$(LP64DIR)/zlib.o: ../common/zlib.c
2976 + $(CC) $(CFLAGS) -c $? -o $@
2979 + mkdir -m 755 -p $@
2982 + cp ppp ppp.conf /kernel/drv
2983 + cp ppp_comp ppp_ahdl /kernel/strmod
2984 + cp $(LP64DIR)/ppp /kernel/drv/$(LP64DIR)
2985 + cp $(LP64DIR)/ppp_comp $(LP64DIR)/ppp_ahdl /kernel/strmod/$(LP64DIR)
2986 + if grep clone:ppp /etc/minor_perm; then :; else \
2987 + echo clone:ppp 0644 root sys >>/etc/minor_perm; fi
2988 + /usr/sbin/rem_drv ppp 2>/dev/null || true
2989 + /usr/sbin/add_drv ppp
2991 +SRCS = ../modules/ppp.c ppp_mod.c ../modules/ppp_ahdlc.c ppp_ahdlc_mod.c \
2992 + ../modules/ppp_comp.c ../modules/bsd-comp.c ../modules/deflate.c \
2993 + ../common/zlib.c ../modules/vjcompress.c ppp_comp_mod.c
3002 + $(MAKE) -f $(STD_MAKE) clean
3003 + rm -f $(LP64DIR)/ppp $(LP64DIR)/ppp_comp $(LP64DIR)/ppp_ahdl $(LP64DIR)/*.o $(LP64DIR)/*~ $(LP64DIR)/core
3004 diff -ruN ppp-2.4.2/svr4/Makefile.top ppp-cvs-20040427/svr4/Makefile.top
3005 --- ppp-2.4.2/svr4/Makefile.top 1970-01-01 01:00:00.000000000 +0100
3006 +++ ppp-cvs-20040427/svr4/Makefile.top 1999-04-01 14:37:44.000000000 +0200
3009 +# ppp top level makefile for SVR4 and Solaris 2
3011 +# $Id: Makefile.top,v 1.8 1999/04/01 11:44:55 paulus Exp $
3014 +include svr4/Makedefs
3017 + cd chat; $(MAKE) all
3018 + cd pppd; $(MAKE) all
3019 + cd pppstats; $(MAKE) all
3020 + cd pppdump; $(MAKE) all
3021 + cd svr4; $(MAKE) all
3023 +install: $(BINDIR) $(MANDIR)/man8 install-progs install-etcppp
3026 + cd chat; $(MAKE) install
3027 + cd pppd; $(MAKE) install
3028 + cd pppstats; $(MAKE) install
3029 + cd pppdump; $(MAKE) install
3030 + cd svr4; $(MAKE) install
3032 +install-etcppp: $(ETCDIR) $(ETCDIR)/options $(ETCDIR)/pap-secrets \
3033 + $(ETCDIR)/chap-secrets
3036 + cp etc.ppp/options $@
3038 +$(ETCDIR)/pap-secrets:
3039 + $(INSTALL) -f $(ETCDIR) -m 600 etc.ppp/pap-secrets
3040 +$(ETCDIR)/chap-secrets:
3041 + $(INSTALL) -f $(ETCDIR) -m 600 etc.ppp/chap-secrets
3044 + mkdir -m 755 -p $@
3046 + mkdir -m 755 -p $@
3048 + mkdir -m 755 -p $@
3052 + cd chat; $(MAKE) clean
3053 + cd pppd; $(MAKE) clean
3054 + cd pppstats; $(MAKE) clean
3055 + cd pppdump; $(MAKE) clean
3056 + cd svr4; $(MAKE) clean
3058 diff -ruN ppp-2.4.2/svr4/ppp.Master ppp-cvs-20040427/svr4/ppp.Master
3059 --- ppp-2.4.2/svr4/ppp.Master 1970-01-01 01:00:00.000000000 +0100
3060 +++ ppp-cvs-20040427/svr4/ppp.Master 1995-10-27 04:58:28.000000000 +0100
3062 +ppp - Sciof ppp 0 0 1 128 -1
3063 diff -ruN ppp-2.4.2/svr4/ppp.Node ppp-cvs-20040427/svr4/ppp.Node
3064 --- ppp-2.4.2/svr4/ppp.Node 1970-01-01 01:00:00.000000000 +0100
3065 +++ ppp-cvs-20040427/svr4/ppp.Node 1995-10-27 04:58:36.000000000 +0100
3068 diff -ruN ppp-2.4.2/svr4/ppp.System ppp-cvs-20040427/svr4/ppp.System
3069 --- ppp-2.4.2/svr4/ppp.System 1970-01-01 01:00:00.000000000 +0100
3070 +++ ppp-cvs-20040427/svr4/ppp.System 1995-10-27 04:58:37.000000000 +0100
3072 +ppp Y 1 0 0 0 0 0 0 0
3073 diff -ruN ppp-2.4.2/svr4/ppp.conf ppp-cvs-20040427/svr4/ppp.conf
3074 --- ppp-2.4.2/svr4/ppp.conf 1970-01-01 01:00:00.000000000 +0100
3075 +++ ppp-cvs-20040427/svr4/ppp.conf 1995-06-01 06:39:00.000000000 +0200
3077 +name="ppp" parent="pseudo" instance=0;
3078 diff -ruN ppp-2.4.2/svr4/ppp_ahdl.Master ppp-cvs-20040427/svr4/ppp_ahdl.Master
3079 --- ppp-2.4.2/svr4/ppp_ahdl.Master 1970-01-01 01:00:00.000000000 +0100
3080 +++ ppp-cvs-20040427/svr4/ppp_ahdl.Master 1995-10-27 04:58:32.000000000 +0100
3082 +ppp_ahdl - iSf phdl 0 0 1 1 -1
3083 diff -ruN ppp-2.4.2/svr4/ppp_ahdl.System ppp-cvs-20040427/svr4/ppp_ahdl.System
3084 --- ppp-2.4.2/svr4/ppp_ahdl.System 1970-01-01 01:00:00.000000000 +0100
3085 +++ ppp-cvs-20040427/svr4/ppp_ahdl.System 1995-10-27 04:58:38.000000000 +0100
3087 +ppp_ahdl Y 1 0 0 0 0 0 0 0
3088 diff -ruN ppp-2.4.2/svr4/ppp_ahdlc_mod.c ppp-cvs-20040427/svr4/ppp_ahdlc_mod.c
3089 --- ppp-2.4.2/svr4/ppp_ahdlc_mod.c 1970-01-01 01:00:00.000000000 +0100
3090 +++ ppp-cvs-20040427/svr4/ppp_ahdlc_mod.c 1995-12-11 06:21:02.000000000 +0100
3092 +#include <sys/types.h>
3093 +#include <sys/param.h>
3094 +#include <sys/conf.h>
3095 +#include <sys/modctl.h>
3096 +#include <sys/sunddi.h>
3098 +extern struct streamtab ppp_ahdlcinfo;
3100 +static struct fmodsw fsw = {
3103 + D_NEW | D_MP | D_MTQPAIR
3106 +extern struct mod_ops mod_strmodops;
3108 +static struct modlstrmod modlstrmod = {
3110 + "PPP async HDLC module",
3114 +static struct modlinkage modlinkage = {
3116 + (void *) &modlstrmod,
3121 + * Entry points for modloading.
3126 + return mod_install(&modlinkage);
3132 + return mod_remove(&modlinkage);
3137 + struct modinfo *mip;
3139 + return mod_info(&modlinkage, mip);
3141 diff -ruN ppp-2.4.2/svr4/ppp_comp.Master ppp-cvs-20040427/svr4/ppp_comp.Master
3142 --- ppp-2.4.2/svr4/ppp_comp.Master 1970-01-01 01:00:00.000000000 +0100
3143 +++ ppp-cvs-20040427/svr4/ppp_comp.Master 1995-10-27 04:58:34.000000000 +0100
3145 +ppp_comp - iSf pcmp 0 0 1 1 -1
3146 diff -ruN ppp-2.4.2/svr4/ppp_comp.System ppp-cvs-20040427/svr4/ppp_comp.System
3147 --- ppp-2.4.2/svr4/ppp_comp.System 1970-01-01 01:00:00.000000000 +0100
3148 +++ ppp-cvs-20040427/svr4/ppp_comp.System 1995-10-27 04:58:40.000000000 +0100
3150 +ppp_comp Y 1 0 0 0 0 0 0 0
3151 diff -ruN ppp-2.4.2/svr4/ppp_comp_mod.c ppp-cvs-20040427/svr4/ppp_comp_mod.c
3152 --- ppp-2.4.2/svr4/ppp_comp_mod.c 1970-01-01 01:00:00.000000000 +0100
3153 +++ ppp-cvs-20040427/svr4/ppp_comp_mod.c 2002-12-06 10:50:10.000000000 +0100
3156 + * ppp_comp_mod.c - modload support for PPP compression STREAMS module.
3158 + * Copyright (c) 1994 Paul Mackerras. All rights reserved.
3160 + * Redistribution and use in source and binary forms, with or without
3161 + * modification, are permitted provided that the following conditions
3164 + * 1. Redistributions of source code must retain the above copyright
3165 + * notice, this list of conditions and the following disclaimer.
3167 + * 2. Redistributions in binary form must reproduce the above copyright
3168 + * notice, this list of conditions and the following disclaimer in
3169 + * the documentation and/or other materials provided with the
3172 + * 3. The name(s) of the authors of this software must not be used to
3173 + * endorse or promote products derived from this software without
3174 + * prior written permission.
3176 + * 4. Redistributions of any form whatsoever must retain the following
3178 + * "This product includes software developed by Paul Mackerras
3179 + * <paulus@samba.org>".
3181 + * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO
3182 + * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
3183 + * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY
3184 + * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
3185 + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
3186 + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
3187 + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
3189 + * $Id: ppp_comp_mod.c,v 1.3 2002/12/06 09:49:16 paulus Exp $
3193 + * This file is used under Solaris 2.
3195 +#include <sys/types.h>
3196 +#include <sys/param.h>
3197 +#include <sys/conf.h>
3198 +#include <sys/modctl.h>
3199 +#include <sys/sunddi.h>
3201 +extern struct streamtab ppp_compinfo;
3203 +static struct fmodsw fsw = {
3206 + D_NEW | D_MP | D_MTQPAIR
3209 +extern struct mod_ops mod_strmodops;
3211 +static struct modlstrmod modlstrmod = {
3213 + "PPP compression module",
3217 +static struct modlinkage modlinkage = {
3219 + (void *) &modlstrmod,
3224 + * Entry points for modloading.
3229 + return mod_install(&modlinkage);
3235 + return mod_remove(&modlinkage);
3240 + struct modinfo *mip;
3242 + return mod_info(&modlinkage, mip);
3244 diff -ruN ppp-2.4.2/svr4/ppp_mod.c ppp-cvs-20040427/svr4/ppp_mod.c
3245 --- ppp-2.4.2/svr4/ppp_mod.c 1970-01-01 01:00:00.000000000 +0100
3246 +++ ppp-cvs-20040427/svr4/ppp_mod.c 2002-12-06 10:50:10.000000000 +0100
3249 + * ppp_mod.c - modload support for PPP pseudo-device driver.
3251 + * Copyright (c) 1994 Paul Mackerras. All rights reserved.
3253 + * Redistribution and use in source and binary forms, with or without
3254 + * modification, are permitted provided that the following conditions
3257 + * 1. Redistributions of source code must retain the above copyright
3258 + * notice, this list of conditions and the following disclaimer.
3260 + * 2. Redistributions in binary form must reproduce the above copyright
3261 + * notice, this list of conditions and the following disclaimer in
3262 + * the documentation and/or other materials provided with the
3265 + * 3. The name(s) of the authors of this software must not be used to
3266 + * endorse or promote products derived from this software without
3267 + * prior written permission.
3269 + * 4. Redistributions of any form whatsoever must retain the following
3271 + * "This product includes software developed by Paul Mackerras
3272 + * <paulus@samba.org>".
3274 + * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO
3275 + * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
3276 + * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY
3277 + * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
3278 + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
3279 + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
3280 + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
3282 + * $Id: ppp_mod.c,v 1.4 2002/12/06 09:49:16 paulus Exp $
3286 + * This file is used under Solaris 2.
3289 +#include <sys/types.h>
3290 +#include <sys/param.h>
3291 +#include <sys/stat.h>
3292 +#include <sys/conf.h>
3293 +#include <sys/modctl.h>
3294 +#include <sys/sunddi.h>
3295 +#include <sys/ksynch.h>
3303 +static int ppp_identify __P((dev_info_t *));
3304 +static int ppp_attach __P((dev_info_t *, ddi_attach_cmd_t));
3305 +static int ppp_detach __P((dev_info_t *, ddi_detach_cmd_t));
3306 +static int ppp_devinfo __P((dev_info_t *, ddi_info_cmd_t, void *, void **));
3308 +extern struct streamtab pppinfo;
3309 +extern krwlock_t ppp_lower_lock;
3311 +static dev_info_t *ppp_dip;
3313 +static struct cb_ops cb_ppp_ops = {
3314 + nulldev, nulldev, nodev, nodev, /* cb_open, ... */
3315 + nodev, nodev, nodev, nodev, /* cb_dump, ... */
3316 + nodev, nodev, nodev, nochpoll, /* cb_devmap, ... */
3317 + ddi_prop_op, /* cb_prop_op */
3318 + &pppinfo, /* cb_stream */
3319 + D_NEW|D_MP|D_MTQPAIR|D_MTOUTPERIM|D_MTOCEXCL /* cb_flag */
3322 +static struct dev_ops ppp_ops = {
3323 + DEVO_REV, /* devo_rev */
3324 + 0, /* devo_refcnt */
3325 + ppp_devinfo, /* devo_getinfo */
3326 + ppp_identify, /* devo_identify */
3327 + nulldev, /* devo_probe */
3328 + ppp_attach, /* devo_attach */
3329 + ppp_detach, /* devo_detach */
3330 + nodev, /* devo_reset */
3331 + &cb_ppp_ops, /* devo_cb_ops */
3332 + NULL /* devo_bus_ops */
3336 + * Module linkage information
3339 +static struct modldrv modldrv = {
3340 + &mod_driverops, /* says this is a pseudo driver */
3341 + "PPP-2.3 multiplexing driver",
3342 + &ppp_ops /* driver ops */
3345 +static struct modlinkage modlinkage = {
3347 + (void *) &modldrv,
3354 + return mod_install(&modlinkage);
3360 + return mod_remove(&modlinkage);
3365 + struct modinfo *mip;
3367 + return mod_info(&modlinkage, mip);
3374 + return strcmp(ddi_get_name(dip), "ppp") == 0? DDI_IDENTIFIED:
3375 + DDI_NOT_IDENTIFIED;
3379 +ppp_attach(dip, cmd)
3381 + ddi_attach_cmd_t cmd;
3384 + if (cmd != DDI_ATTACH)
3385 + return DDI_FAILURE;
3386 + if (ddi_create_minor_node(dip, "ppp", S_IFCHR, 0, DDI_PSEUDO, CLONE_DEV)
3388 + ddi_remove_minor_node(dip, NULL);
3389 + return DDI_FAILURE;
3391 + rw_init(&ppp_lower_lock, NULL, RW_DRIVER, NULL);
3392 + return DDI_SUCCESS;
3396 +ppp_detach(dip, cmd)
3398 + ddi_detach_cmd_t cmd;
3400 + rw_destroy(&ppp_lower_lock);
3401 + ddi_remove_minor_node(dip, NULL);
3402 + return DDI_SUCCESS;
3406 +ppp_devinfo(dip, cmd, arg, result)
3408 + ddi_info_cmd_t cmd;
3414 + error = DDI_SUCCESS;
3416 + case DDI_INFO_DEVT2DEVINFO:
3417 + if (ppp_dip == NULL)
3418 + error = DDI_FAILURE;
3420 + *result = (void *) ppp_dip;
3422 + case DDI_INFO_DEVT2INSTANCE:
3426 + error = DDI_FAILURE;