summaryrefslogtreecommitdiffstats
path: root/obsolete-buildroot/sources/openwrt/patches/ppp/000_ppp-2.4.2-cvs-20040427.patch
blob: 7ccc1b448b8d00044e84dab9ccff20674f6f0e87 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
diff -ruN ppp-2.4.2/TODO ppp-cvs-20040427/TODO
--- ppp-2.4.2/TODO	1970-01-01 01:00:00.000000000 +0100
+++ ppp-cvs-20040427/TODO	1999-03-22 07:38:09.000000000 +0100
@@ -0,0 +1,16 @@
+* Things to do *
+
+- How should we handle the case where MTU > MRU?
+  Should we reduce the IP MTU to the link MRU (so TCP MSS is correct)?
+
+- Provide ways to:
+  + set the IP address, possibly based on the peer's identity
+  + have external checking of PAP user/password, CHAP response
+  + supply the PAP user/password, CHAP secret
+  + decide which tty to use (locking, DTR issues)
+
+- Integrate callback stuff?
+
+- Implement link quality monitoring
+
+- Implement other network control protocols
diff -ruN ppp-2.4.2/chat/chat.c ppp-cvs-20040427/chat/chat.c
--- ppp-2.4.2/chat/chat.c	2003-03-30 10:23:48.000000000 +0200
+++ ppp-cvs-20040427/chat/chat.c	2004-01-17 06:50:11.000000000 +0100
@@ -87,7 +87,7 @@
 #endif
 
 #ifndef lint
-static const char rcsid[] = "$Id: chat.c,v 1.29 2003/03/04 06:17:21 fcusack Exp $";
+static const char rcsid[] = "$Id: chat.c,v 1.30 2004/01/17 05:47:55 carlsonj Exp $";
 #endif
 
 #include <stdio.h>
@@ -213,7 +213,7 @@
 void *copy_of __P((char *s));
 char *grow __P((char *s, char **p, size_t len));
 void usage __P((void));
-void logf __P((const char *fmt, ...));
+void msgf __P((const char *fmt, ...));
 void fatal __P((int code, const char *fmt, ...));
 SIGTYPE sigalrm __P((int signo));
 SIGTYPE sigint __P((int signo));
@@ -495,7 +495,7 @@
 /*
  * Send a message to syslog and/or stderr.
  */
-void logf __V((const char *fmt, ...))
+void msgf __V((const char *fmt, ...))
 {
     va_list args;
 
@@ -558,7 +558,7 @@
 	fatal(2, "Can't set file mode flags on stdin: %m");
 
     if (verbose)
-	logf("alarm");
+	msgf("alarm");
 }
 
 void unalarm()
@@ -1001,9 +1001,9 @@
  * The expectation did not occur. This is terminal.
  */
     if (fail_reason)
-	logf("Failed (%s)", fail_reason);
+	msgf("Failed (%s)", fail_reason);
     else
-	logf("Failed");
+	msgf("Failed");
     terminate(exit_code);
 }
 
@@ -1079,7 +1079,7 @@
 	abort_string[n_aborts++] = s1;
 
 	if (verbose)
-	    logf("abort on (%v)", s);
+	    msgf("abort on (%v)", s);
 	return;
     }
 
@@ -1105,7 +1105,7 @@
 		pack++;
 		n_aborts--;
 		if (verbose)
-		    logf("clear abort on (%v)", s);
+		    msgf("clear abort on (%v)", s);
 	    }
 	}
         free(s1);
@@ -1129,7 +1129,7 @@
 	report_string[n_reports++] = s1;
 	
 	if (verbose)
-	    logf("report (%v)", s);
+	    msgf("report (%v)", s);
 	return;
     }
 
@@ -1155,7 +1155,7 @@
 		pack++;
 		n_reports--;
 		if (verbose)
-		    logf("clear report (%v)", s);
+		    msgf("clear report (%v)", s);
 	    }
 	}
         free(s1);
@@ -1173,7 +1173,7 @@
 	    timeout = DEFAULT_CHAT_TIMEOUT;
 
 	if (verbose)
-	    logf("timeout set to %d seconds", timeout);
+	    msgf("timeout set to %d seconds", timeout);
 
 	return;
     }
@@ -1236,7 +1236,7 @@
 	return ((int)c & 0x7F);
 
     default:
-	logf("warning: read() on stdin returned %d", status);
+	msgf("warning: read() on stdin returned %d", status);
 
     case -1:
 	if ((status = fcntl(0, F_GETFL, 0)) == -1)
@@ -1264,7 +1264,7 @@
 	return (0);
 	
     default:
-	logf("warning: write() on stdout returned %d", status);
+	msgf("warning: write() on stdout returned %d", status);
 	
     case -1:
 	if ((status = fcntl(0, F_GETFL, 0)) == -1)
@@ -1286,9 +1286,9 @@
 
 	if (verbose) {
 	    if (errno == EINTR || errno == EWOULDBLOCK)
-		logf(" -- write timed out");
+		msgf(" -- write timed out");
 	    else
-		logf(" -- write failed: %m");
+		msgf(" -- write failed: %m");
 	}
 	return (0);
     }
@@ -1303,9 +1303,9 @@
 
     if (verbose) {
 	if (quiet)
-	    logf("send (??????)");
+	    msgf("send (??????)");
 	else
-	    logf("send (%v)", s);
+	    msgf("send (%v)", s);
     }
 
     alarm(timeout); alarmed = 0;
@@ -1392,17 +1392,17 @@
     minlen = (len > sizeof(fail_buffer)? len: sizeof(fail_buffer)) - 1;
 
     if (verbose)
-	logf("expect (%v)", string);
+	msgf("expect (%v)", string);
 
     if (len > STR_LEN) {
-	logf("expect string is too long");
+	msgf("expect string is too long");
 	exit_code = 1;
 	return 0;
     }
 
     if (len == 0) {
 	if (verbose)
-	    logf("got it");
+	    msgf("got it");
 	return (1);
     }
 
@@ -1416,16 +1416,16 @@
 	    echo_stderr(c);
 	if (verbose && c == '\n') {
 	    if (s == logged)
-		logf("");	/* blank line */
+		msgf("");	/* blank line */
 	    else
-		logf("%0.*v", s - logged, logged);
+		msgf("%0.*v", s - logged, logged);
 	    logged = s + 1;
 	}
 
 	*s++ = c;
 
 	if (verbose && s >= logged + 80) {
-	    logf("%0.*v", s - logged, logged);
+	    msgf("%0.*v", s - logged, logged);
 	    logged = s;
 	}
 
@@ -1470,8 +1470,8 @@
 	    strncmp(s - len, string, len) == 0) {
 	    if (verbose) {
 		if (s > logged)
-		    logf("%0.*v", s - logged, logged);
-		logf(" -- got it\n");
+		    msgf("%0.*v", s - logged, logged);
+		msgf(" -- got it\n");
 	    }
 
 	    alarm(0);
@@ -1484,8 +1484,8 @@
 		strncmp(s - abort_len, abort_string[n], abort_len) == 0) {
 		if (verbose) {
 		    if (s > logged)
-			logf("%0.*v", s - logged, logged);
-		    logf(" -- failed");
+			msgf("%0.*v", s - logged, logged);
+		    msgf(" -- failed");
 		}
 
 		alarm(0);
@@ -1499,7 +1499,7 @@
 	if (s >= end) {
 	    if (logged < s - minlen) {
 		if (verbose)
-		    logf("%0.*v", s - logged, logged);
+		    msgf("%0.*v", s - logged, logged);
 		logged = s;
 	    }
 	    s -= minlen;
@@ -1509,16 +1509,16 @@
 	}
 
 	if (alarmed && verbose)
-	    logf("warning: alarm synchronization problem");
+	    msgf("warning: alarm synchronization problem");
     }
 
     alarm(0);
     
     if (verbose && printed) {
 	if (alarmed)
-	    logf(" -- read timed out");
+	    msgf(" -- read timed out");
 	else
-	    logf(" -- read failed: %m");
+	    msgf(" -- read failed: %m");
     }
 
     exit_code = 3;
diff -ruN ppp-2.4.2/configure ppp-cvs-20040427/configure
--- ppp-2.4.2/configure	2002-11-09 12:24:41.000000000 +0100
+++ ppp-cvs-20040427/configure	2004-01-17 06:50:11.000000000 +0100
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $Id: configure,v 1.30 2002/11/02 19:48:12 carlsonj Exp $
+# $Id: configure,v 1.31 2004/01/17 05:47:55 carlsonj Exp $
 
 #  if [ -d /NextApps ]; then
 #    system="NeXTStep"
@@ -27,7 +27,7 @@
 	      esac;;
       5.[1-6]*)	state="known"; ksrc="solaris"; makext="sol2";;
     esac
-    if [ -x /opt/SUNWspro/bin/cc ] &&
+    if [ -x /opt/SUNWspro/bin/cc -a "$1" != "gcc" ] &&
        /opt/SUNWspro/bin/cc -flags >/dev/null 2>&1; then
       : # use Sun WorkShop compiler
     elif gcc --version >/dev/null 2>&1; then
diff -ruN ppp-2.4.2/contrib/pppgetpass/Makefile.linux ppp-cvs-20040427/contrib/pppgetpass/Makefile.linux
--- ppp-2.4.2/contrib/pppgetpass/Makefile.linux	1999-11-15 05:08:24.000000000 +0100
+++ ppp-cvs-20040427/contrib/pppgetpass/Makefile.linux	1970-01-01 01:00:00.000000000 +0100
@@ -1,16 +0,0 @@
-all: pppgetpass.vt pppgetpass.gtk
-
-pppgetpass.vt: pppgetpass.vt.o
-
-pppgetpass.gtk: pppgetpass.gtk.o
-	$(CC) $(LDFLAGS) pppgetpass.gtk.o `gtk-config --libs` -o pppgetpass.gtk
-pppgetpass.gtk.o: pppgetpass.gtk.c
-	$(CC) $(CFLAGS) -c pppgetpass.gtk.c `gtk-config --cflags`
-
-install: all
-	install -m 755 pppgetpass.sh /usr/bin/pppgetpass
-	install -m 4755 -o root -g root pppgetpass.vt /usr/bin/
-	install -m 755 -o root -g root pppgetpass.gtk /usr/X11/bin/
-
-clean:
-	rm -f *.o pppgetpass.gtk pppgetpass.vt core
diff -ruN ppp-2.4.2/contrib/pppgetpass/pppgetpass.8 ppp-cvs-20040427/contrib/pppgetpass/pppgetpass.8
--- ppp-2.4.2/contrib/pppgetpass/pppgetpass.8	1999-11-15 05:08:24.000000000 +0100
+++ ppp-cvs-20040427/contrib/pppgetpass/pppgetpass.8	1970-01-01 01:00:00.000000000 +0100
@@ -1,18 +0,0 @@
-.TH PPPGETPASS 8 "26 Sep 1999"
-.SH NAME
-pppgetpass \- prompt for PAP password
-.SH SYNOPSIS
-.B pppgetpass
-.I client server fd
-.SH DESCRIPTION
-.B pppgetpass
-the outer half of a plugin for PAP password prompting in pppd.
-If the peer requires PAP, and the
-.B passprompt.so
-plugin is loaded into pppd, it will run
-.B /usr/sbin/pppgetpass
-(or another program specified by the
-.B promptprog
-option) to prompt the user for the password.
-.SH SEE ALSO
-pppd(8)
diff -ruN ppp-2.4.2/contrib/pppgetpass/pppgetpass.gtk.c ppp-cvs-20040427/contrib/pppgetpass/pppgetpass.gtk.c
--- ppp-2.4.2/contrib/pppgetpass/pppgetpass.gtk.c	1999-11-15 05:08:24.000000000 +0100
+++ ppp-cvs-20040427/contrib/pppgetpass/pppgetpass.gtk.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,92 +0,0 @@
-#include <glib.h>
-#include <gdk/gdk.h>
-#include <gtk/gtkwindow.h>
-#include <gtk/gtkmain.h>
-#include <gtk/gtkbutton.h>
-#include <gtk/gtkvbox.h>
-#include <gtk/gtklabel.h>
-#include <gtk/gtkentry.h>
-#include <gtk/gtksignal.h>
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <syslog.h>
-
-int outfd;
-int err;
-
-static void okpressed(void *widget, void *clientdata)
-{
-  GtkWidget *answer=clientdata;
-  gchar *pass;
-  int passlen;
-  ssize_t wrote;
-  (void)widget;
-
-  pass=gtk_entry_get_text(GTK_ENTRY(answer));
-
-  passlen=strlen(pass);
-  if(!passlen)
-    return;
-
-  if((wrote=write(outfd, pass, passlen))!=passlen) {
-    if(wrote<0)
-      syslog(LOG_ERR, "write error on outpipe: %m");
-    else
-      syslog(LOG_ERR, "short write on outpipe");
-    err=1;
-  }
-  gtk_main_quit();
-}
-
-int main(int argc, char **argv)
-{
-  GtkWidget *mainwindow, *vbox, *question, *answer, *ok;
-  char buf[1024];
-  gtk_init(&argc, &argv);
-
-  openlog(argv[0], LOG_PID, LOG_DAEMON);
-  if(argc!=4) {
-    syslog(LOG_WARNING, "Usage error");
-    return 1;
-  }
-  outfd=atoi(argv[3]);
-  mainwindow=gtk_window_new(GTK_WINDOW_TOPLEVEL);
-  gtk_window_set_title(GTK_WINDOW(mainwindow), "pppgetpass");
-  gtk_signal_connect(GTK_OBJECT(mainwindow), "destroy",
-                     GTK_SIGNAL_FUNC(gtk_main_quit), 0);
-
-  vbox=gtk_vbox_new(FALSE, 5);
-  gtk_container_add(GTK_CONTAINER(mainwindow), vbox);
-  gtk_widget_show(vbox);
-
-  if(argv[1][0] && argv[2][0])
-    snprintf(buf, sizeof buf, "Password for PPP client %s on server %s: ", argv[1], argv[2]);
-  else if(argv[1][0] && !argv[2][0])
-    snprintf(buf, sizeof buf, "Password for PPP client %s: ", argv[1]);
-  else if(!argv[1][0] && argv[2][0])
-    snprintf(buf, sizeof buf, "Password for PPP on server %s: ", argv[2]);
-  else
-    snprintf(buf, sizeof buf, "Enter PPP password: ");
-  question=gtk_label_new(buf);
-  gtk_box_pack_start(GTK_BOX(vbox), question, FALSE, TRUE, 0);
-  gtk_widget_show(question);
-
-  answer=gtk_entry_new();
-  gtk_entry_set_visibility(GTK_ENTRY(answer), 0);
-  gtk_box_pack_start(GTK_BOX(vbox), answer, FALSE, TRUE, 0);
-  gtk_widget_show(answer);
-
-  ok=gtk_button_new_with_label("OK");
-  gtk_box_pack_start(GTK_BOX(vbox), ok, FALSE, TRUE, 0);
-  gtk_signal_connect(GTK_OBJECT(ok), "clicked",
-                     GTK_SIGNAL_FUNC(okpressed), answer);
-  gtk_widget_show(ok);
-
-  gtk_widget_show(mainwindow);
-  gtk_main();
-
-  return err;
-}
diff -ruN ppp-2.4.2/contrib/pppgetpass/pppgetpass.sh ppp-cvs-20040427/contrib/pppgetpass/pppgetpass.sh
--- ppp-2.4.2/contrib/pppgetpass/pppgetpass.sh	1999-11-15 05:08:24.000000000 +0100
+++ ppp-cvs-20040427/contrib/pppgetpass/pppgetpass.sh	1970-01-01 01:00:00.000000000 +0100
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-if [ -z "$DISPLAY" ]; then
-  exec pppgetpass.vt "$@"
-else
-  exec pppgetpass.gtk "$@"
-fi
diff -ruN ppp-2.4.2/contrib/pppgetpass/pppgetpass.vt.c ppp-cvs-20040427/contrib/pppgetpass/pppgetpass.vt.c
--- ppp-2.4.2/contrib/pppgetpass/pppgetpass.vt.c	1999-11-15 05:08:24.000000000 +0100
+++ ppp-cvs-20040427/contrib/pppgetpass/pppgetpass.vt.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,218 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <sys/stat.h>
-#include <sys/ioctl.h>
-#include <syslog.h>
-#include <termios.h>
-#include <sys/vt.h>
-
-static int console_owner(uid_t, int);
-
-int main(int argc, char **argv)
-{
-  int console;
-  uid_t uid;
-  struct vt_stat origstate;
-  int openvtnum;
-  char openvtname[256];
-  int openvt;
-  gid_t gid;
-  int chowned;
-  FILE *fp;
-  struct termios t;
-  char pass[256], *nl;
-  int outfd, passlen;
-  ssize_t wrote;
-  console=open("/dev/console", O_RDWR);
-
-  uid=getuid();
-  gid=getgid();
-  seteuid(uid);
-
-  openlog(argv[0], LOG_PID, LOG_DAEMON);
-
-  if(argc!=4) {
-    syslog(LOG_WARNING, "Usage error");
-    return 1;
-  }
-
-  if(console<0) {
-    syslog(LOG_ERR, "open(/dev/console): %m");
-    return 1;
-  }
-
-  if(ioctl(console, VT_GETSTATE, &origstate)<0) {
-    syslog(LOG_ERR, "VT_GETSTATE: %m");
-    return 1;
-  }
-
-  if(uid) {
-    if(!console_owner(uid, origstate.v_active)) {
-      int i;
-      for(i=0;i<64;++i) {
-        if(i!=origstate.v_active && console_owner(uid, i))
-          break;
-      }
-      if(i==64) {
-        syslog(LOG_WARNING, "run by uid %lu not at console", (unsigned long)uid);
-        return 1;
-      }
-    }
-  }
-
-  if(ioctl(console, VT_OPENQRY, &openvtnum)<0) {
-    syslog(LOG_ERR, "VT_OPENQRY: %m");
-    return 1;
-  }
-  if(openvtnum==-1) {
-    syslog(LOG_ERR, "No free VTs");
-    return 1;
-  }
-
-  snprintf(openvtname, sizeof openvtname, "/dev/tty%d", openvtnum);
-  seteuid(0);
-  openvt=open(openvtname, O_RDWR);
-  if(openvt<0) {
-    seteuid(uid);
-    syslog(LOG_ERR, "open(%s): %m", openvtname);
-    return 1;
-  }
-
-  chowned=fchown(openvt, uid, gid);
-  if(chowned<0) {
-    seteuid(uid);
-    syslog(LOG_ERR, "fchown(%s): %m", openvtname);
-    return 1;
-  }
-
-  close(console);
-
-  if(ioctl(openvt, VT_ACTIVATE, openvtnum)<0) {
-    seteuid(uid);
-    syslog(LOG_ERR, "VT_ACTIVATE(%d): %m", openvtnum);
-    return 1;
-  }
-
-  while(ioctl(openvt, VT_WAITACTIVE, openvtnum)<0) {
-    if(errno!=EINTR) {
-      ioctl(openvt, VT_ACTIVATE, origstate.v_active);
-      seteuid(uid);
-      syslog(LOG_ERR, "VT_WAITACTIVE(%d): %m", openvtnum);
-      return 1;
-    }
-  }
-
-  seteuid(uid);
-  fp=fdopen(openvt, "r+");
-  if(!fp) {
-    seteuid(0);
-    ioctl(openvt, VT_ACTIVATE, origstate.v_active);
-    seteuid(uid);
-    syslog(LOG_ERR, "fdopen(%s): %m", openvtname);
-    return 1;
-  }
-
-  if(tcgetattr(openvt, &t)<0) {
-    seteuid(0);
-    ioctl(openvt, VT_ACTIVATE, origstate.v_active);
-    seteuid(uid);
-    syslog(LOG_ERR, "tcgetattr(%s): %m", openvtname);
-    return 1;
-  }
-  t.c_lflag &= ~ECHO;
-  if(tcsetattr(openvt, TCSANOW, &t)<0) {
-    seteuid(0);
-    ioctl(openvt, VT_ACTIVATE, origstate.v_active);
-    seteuid(uid);
-    syslog(LOG_ERR, "tcsetattr(%s): %m", openvtname);
-    return 1;
-  }
-
-  if(fprintf(fp, "\033[2J\033[H")<0) {
-    seteuid(0);
-    ioctl(openvt, VT_ACTIVATE, origstate.v_active);
-    seteuid(uid);
-    syslog(LOG_ERR, "write error on %s: %m", openvtname);
-    return 1;
-  }
-  if(argv[1][0] && argv[2][0]) {
-    if(fprintf(fp, "Password for PPP client %s on server %s: ", argv[1], argv[2])<0) {
-      seteuid(0);
-      ioctl(openvt, VT_ACTIVATE, origstate.v_active);
-      seteuid(uid);
-      syslog(LOG_ERR, "write error on %s: %m", openvtname);
-      return 1;
-    }
-  } else if(argv[1][0] && !argv[2][0]) {
-    if(fprintf(fp, "Password for PPP client %s: ", argv[1])<0) {
-      syslog(LOG_ERR, "write error on %s: %m", openvtname);
-      seteuid(0);
-      ioctl(openvt, VT_ACTIVATE, origstate.v_active);
-      seteuid(uid);
-      return 1;
-    }
-  } else if(!argv[1][0] && argv[2][0]) {
-    if(fprintf(fp, "Password for PPP on server %s: ", argv[2])<0) {
-      seteuid(0);
-      ioctl(openvt, VT_ACTIVATE, origstate.v_active);
-      seteuid(uid);
-      syslog(LOG_ERR, "write error on %s: %m", openvtname);
-      return 1;
-    }
-  } else {
-    if(fprintf(fp, "Enter PPP password: ")<0) {
-      seteuid(0);
-      ioctl(openvt, VT_ACTIVATE, origstate.v_active);
-      seteuid(uid);
-      syslog(LOG_ERR, "write error on %s: %m", openvtname);
-      return 1;
-    }
-  }
-
-  if(!fgets(pass, sizeof pass, fp)) {
-    seteuid(0);
-    ioctl(openvt, VT_ACTIVATE, origstate.v_active);
-    seteuid(uid);
-    if(ferror(fp)) {
-      syslog(LOG_ERR, "read error on %s: %m", openvtname);
-    }
-    return 1;
-  }
-  if((nl=strchr(pass, '\n'))) 
-    *nl=0;
-  passlen=strlen(pass);
-  
-  outfd=atoi(argv[3]);
-  if((wrote=write(outfd, pass, passlen))!=passlen) {
-    seteuid(0);
-    ioctl(openvt, VT_ACTIVATE, origstate.v_active);
-    seteuid(uid);
-    if(wrote<0)
-      syslog(LOG_ERR, "write error on outpipe: %m");
-    else
-      syslog(LOG_ERR, "short write on outpipe");
-    return 1;
-  }
-
-  seteuid(0);
-  ioctl(openvt, VT_ACTIVATE, origstate.v_active);
-  seteuid(uid);
-  return 0;
-}
-
-static int console_owner(uid_t uid, int cons)
-{
-  char name[256];
-  struct stat st;
-  snprintf(name, sizeof name, "/dev/tty%d", cons);
-  if(stat(name, &st)<0) {
-    if(errno!=ENOENT)
-      syslog(LOG_ERR, "stat(%s): %m", name);
-    return 0;
-  }
-  return uid==st.st_uid;
-}
diff -ruN ppp-2.4.2/include/linux/if_ether.h ppp-cvs-20040427/include/linux/if_ether.h
--- ppp-2.4.2/include/linux/if_ether.h	2001-05-21 05:31:50.000000000 +0200
+++ ppp-cvs-20040427/include/linux/if_ether.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,99 +0,0 @@
-/*
- * INET		An implementation of the TCP/IP protocol suite for the LINUX
- *		operating system.  INET is implemented using the  BSD Socket
- *		interface as the means of communication with the user level.
- *
- *		Global definitions for the Ethernet IEEE 802.3 interface.
- *
- * Version:	@(#)if_ether.h	1.0.1a	02/08/94
- *
- * Author:	Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
- *		Donald Becker, <becker@super.org>
- *		Alan Cox, <alan@redhat.com>
- *		Steve Whitehouse, <gw7rrm@eeshack3.swan.ac.uk>
- *
- *		This program is free software; you can redistribute it and/or
- *		modify it under the terms of the GNU General Public License
- *		as published by the Free Software Foundation; either version
- *		2 of the License, or (at your option) any later version.
- */
- 
-#ifndef _LINUX_IF_ETHER_H
-#define _LINUX_IF_ETHER_H
-
-/*
- *	IEEE 802.3 Ethernet magic constants.  The frame sizes omit the preamble
- *	and FCS/CRC (frame check sequence). 
- */
-
-#define ETH_ALEN	6		/* Octets in one ethernet addr	 */
-#define ETH_HLEN	14		/* Total octets in header.	 */
-#define ETH_ZLEN	60		/* Min. octets in frame sans FCS */
-#define ETH_DATA_LEN	1500		/* Max. octets in payload	 */
-#define ETH_FRAME_LEN	1514		/* Max. octets in frame sans FCS */
-
-/*
- *	These are the defined Ethernet Protocol ID's.
- */
-
-#define ETH_P_LOOP	0x0060		/* Ethernet Loopback packet	*/
-#define ETH_P_PUP	0x0200		/* Xerox PUP packet		*/
-#define ETH_P_PUPAT	0x0201		/* Xerox PUP Addr Trans packet	*/
-#define ETH_P_IP	0x0800		/* Internet Protocol packet	*/
-#define ETH_P_X25	0x0805		/* CCITT X.25			*/
-#define ETH_P_ARP	0x0806		/* Address Resolution packet	*/
-#define	ETH_P_BPQ	0x08FF		/* G8BPQ AX.25 Ethernet Packet	[ NOT AN OFFICIALLY REGISTERED ID ] */
-#define ETH_P_IEEEPUP	0x0a00		/* Xerox IEEE802.3 PUP packet */
-#define ETH_P_IEEEPUPAT	0x0a01		/* Xerox IEEE802.3 PUP Addr Trans packet */
-#define ETH_P_DEC       0x6000          /* DEC Assigned proto           */
-#define ETH_P_DNA_DL    0x6001          /* DEC DNA Dump/Load            */
-#define ETH_P_DNA_RC    0x6002          /* DEC DNA Remote Console       */
-#define ETH_P_DNA_RT    0x6003          /* DEC DNA Routing              */
-#define ETH_P_LAT       0x6004          /* DEC LAT                      */
-#define ETH_P_DIAG      0x6005          /* DEC Diagnostics              */
-#define ETH_P_CUST      0x6006          /* DEC Customer use             */
-#define ETH_P_SCA       0x6007          /* DEC Systems Comms Arch       */
-#define ETH_P_RARP      0x8035		/* Reverse Addr Res packet	*/
-#define ETH_P_ATALK	0x809B		/* Appletalk DDP		*/
-#define ETH_P_AARP	0x80F3		/* Appletalk AARP		*/
-#define ETH_P_IPX	0x8137		/* IPX over DIX			*/
-#define ETH_P_IPV6	0x86DD		/* IPv6 over bluebook		*/
-#define ETH_P_PPP_DISC	0x8863		/* PPPoE discovery messages     */
-#define ETH_P_PPP_SES	0x8864		/* PPPoE session messages	*/
-#define ETH_P_ATMMPOA	0x884c		/* MultiProtocol Over ATM	*/
-#define ETH_P_ATMFATE	0x8884		/* Frame-based ATM Transport
-					 * over Ethernet
-					 */
-
-/*
- *	Non DIX types. Won't clash for 1500 types.
- */
- 
-#define ETH_P_802_3	0x0001		/* Dummy type for 802.3 frames  */
-#define ETH_P_AX25	0x0002		/* Dummy protocol id for AX.25  */
-#define ETH_P_ALL	0x0003		/* Every packet (be careful!!!) */
-#define ETH_P_802_2	0x0004		/* 802.2 frames 		*/
-#define ETH_P_SNAP	0x0005		/* Internal only		*/
-#define ETH_P_DDCMP     0x0006          /* DEC DDCMP: Internal only     */
-#define ETH_P_WAN_PPP   0x0007          /* Dummy type for WAN PPP frames*/
-#define ETH_P_PPP_MP    0x0008          /* Dummy type for PPP MP frames */
-#define ETH_P_LOCALTALK 0x0009		/* Localtalk pseudo type 	*/
-#define ETH_P_PPPTALK	0x0010		/* Dummy type for Atalk over PPP*/
-#define ETH_P_TR_802_2	0x0011		/* 802.2 frames 		*/
-#define ETH_P_MOBITEX	0x0015		/* Mobitex (kaz@cafe.net)	*/
-#define ETH_P_CONTROL	0x0016		/* Card specific control frames */
-#define ETH_P_IRDA	0x0017		/* Linux-IrDA			*/
-#define ETH_P_ECONET	0x0018		/* Acorn Econet			*/
-
-/*
- *	This is an Ethernet frame header.
- */
- 
-struct ethhdr 
-{
-	unsigned char	h_dest[ETH_ALEN];	/* destination eth addr	*/
-	unsigned char	h_source[ETH_ALEN];	/* source ether addr	*/
-	unsigned short	h_proto;		/* packet type ID field	*/
-};
-
-#endif	/* _LINUX_IF_ETHER_H */
diff -ruN ppp-2.4.2/include/pcap-int.h ppp-cvs-20040427/include/pcap-int.h
--- ppp-2.4.2/include/pcap-int.h	2000-08-01 03:37:24.000000000 +0200
+++ ppp-cvs-20040427/include/pcap-int.h	2000-08-01 03:37:24.000000000 +0200
@@ -30,7 +30,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * @(#) $Header: /data/cvs/ppp/include/pcap-int.h,v 1.1 2000/08/01 01:37:24 paulus Exp $ (LBL)
+ * @(#) $Header: /cvsroot/ppp/include/pcap-int.h,v 1.1 2000/08/01 01:37:24 paulus Exp $ (LBL)
  */
 
 #ifndef pcap_int_h
diff -ruN ppp-2.4.2/modules/bsd-comp.c ppp-cvs-20040427/modules/bsd-comp.c
--- ppp-2.4.2/modules/bsd-comp.c	1998-03-19 06:59:01.000000000 +0100
+++ ppp-cvs-20040427/modules/bsd-comp.c	2004-01-17 06:50:11.000000000 +0100
@@ -41,7 +41,7 @@
  * This version is for use with STREAMS under SunOS 4.x,
  * Digital UNIX, AIX 4.x, and SVR4 systems including Solaris 2.
  *
- * $Id: bsd-comp.c,v 1.20 1996/08/28 06:31:57 paulus Exp $
+ * $Id: bsd-comp.c,v 1.21 2004/01/17 05:47:55 carlsonj Exp $
  */
 
 #ifdef AIX4
@@ -66,6 +66,10 @@
 #define BSD_LITTLE_ENDIAN
 #endif
 
+#ifdef SOL2
+#include <sys/sunddi.h>
+#endif
+
 #define PACKETPTR	mblk_t *
 #include <net/ppp-comp.h>
 
diff -ruN ppp-2.4.2/modules/deflate.c ppp-cvs-20040427/modules/deflate.c
--- ppp-2.4.2/modules/deflate.c	2002-12-06 10:49:15.000000000 +0100
+++ ppp-cvs-20040427/modules/deflate.c	2004-01-17 06:50:11.000000000 +0100
@@ -35,7 +35,7 @@
  * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
  * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
- * $Id: deflate.c,v 1.11 2002/12/06 09:49:15 paulus Exp $
+ * $Id: deflate.c,v 1.12 2004/01/17 05:47:55 carlsonj Exp $
  */
 
 #ifdef AIX4
@@ -56,6 +56,10 @@
 #include "../common/zlib.h"
 #endif
 
+#ifdef SOL2
+#include <sys/sunddi.h>
+#endif
+
 #if DO_DEFLATE
 
 #define DEFLATE_DEBUG	1
diff -ruN ppp-2.4.2/modules/vjcompress.c ppp-cvs-20040427/modules/vjcompress.c
--- ppp-2.4.2/modules/vjcompress.c	1999-09-17 04:03:56.000000000 +0200
+++ ppp-cvs-20040427/modules/vjcompress.c	2004-01-17 06:50:11.000000000 +0100
@@ -29,7 +29,7 @@
  * This version is used under SunOS 4.x, Digital UNIX, AIX 4.x,
  * and SVR4 systems including Solaris 2.
  *
- * $Id: vjcompress.c,v 1.10 1999/09/15 23:49:06 masputra Exp $
+ * $Id: vjcompress.c,v 1.11 2004/01/17 05:47:55 carlsonj Exp $
  */
 
 #include <sys/types.h>
@@ -56,6 +56,10 @@
 #include <netinet/in_systm.h>
 #endif
 
+#ifdef SOL2
+#include <sys/sunddi.h>
+#endif
+
 #include <netinet/ip.h>
 #include <netinet/tcp.h>
 
diff -ruN ppp-2.4.2/ppp.texi ppp-cvs-20040427/ppp.texi
--- ppp-2.4.2/ppp.texi	1970-01-01 01:00:00.000000000 +0100
+++ ppp-cvs-20040427/ppp.texi	1996-08-28 08:30:33.000000000 +0200
@@ -0,0 +1,561 @@
+\input texinfo @c -*-texinfo-*-
+@setfilename ppp.info
+@settitle PPP
+
+@iftex
+@finalout
+@end iftex
+
+@ifinfo
+@format
+START-INFO-DIR-ENTRY
+* PPP: (ppp).                   Point-to-Point Protocol.
+END-INFO-DIR-ENTRY
+@end format
+
+@titlepage
+@title PPP-2.x Users' Guide
+@author by Paul Mackerras
+@end titlepage
+
+@node Top, Introduction, (dir), (dir)
+
+@ifinfo
+This file documents how to use the ppp-2.x package to set up network
+links over serial lines with the Point-to-Point Protocol.
+
+@end ifinfo
+
+@menu
+* Introduction::                Basic concepts of the Point-to-Point
+                                Protocol and the ppp-2.x package.
+* Installation::                How to compile and install the software.
+* Configuration::               How to set up your system for
+                                establishing a link to another system.
+* Security::                    Avoid creating security holes.
+* Compression::                 Using compression of various kinds
+                                to improve throughput.
+@end menu
+
+@node Introduction, Installation, Top, Top
+@chapter Introduction
+
+The Point-to-Point Protocol (PPP) is the protocol of choice for
+establishing network links over serial lines.  This package (ppp-2.x)
+provides an implementation of PPP which supports the Internet Protocols
+(TCP/IP, UDP/IP, etc.) and which runs on a range of Unix workstations.
+
+A typical use of PPP is to provide a network connection, via a modem,
+between a workstation and an Internet Service Provider (ISP).  When this
+connection is established, the workstation is connected to the internet,
+and applications running on the workstation can then make connections to
+other hosts anywhere on the internet.  This package can be used at
+either or both ends of such a link.
+
+Features of PPP include:
+@itemize @bullet
+@item
+Multi-protocol support.  The PPP packet encapsulation includes a
+protocol field, allowing packets from many different protocols to be
+multiplexed across a single link.
+@item
+Negotiation of link characteristics.  During link establishment, the two
+systems negotiate about the link configuration parameters, such as the
+IP addresses of each end of the link.
+@item
+Authentication.  Optionally, each system can be configured to require the
+other system to authenticate itself.  In this way, access can be
+restricted to authorized systems.
+@item
+Transparency.  On asynchronous serial lines, PPP can be configured to
+transmit certain characters as a two-character escape sequence.
+@item
+Compression.  PPP includes support for various kinds of compression to
+be applied to the packets before they are transmitted.
+@end itemize
+
+The ppp-2.x software consists of two parts:
+
+@itemize @bullet
+
+@item
+Kernel code, which establishes a network interface and passes packets
+between the serial port, the kernel networking code and the PPP daemon
+(@file{pppd}).  This code is implemented using STREAMS modules on
+Solaris 2, SunOS 4.x, AIX 4.1 and OSF/1, and as a tty line discipline
+under Ultrix, NextStep, NetBSD, FreeBSD, and Linux.
+
+@item
+The PPP daemon (@file{pppd}), which negotiates with the peer to
+establish the link and sets up the ppp network interface.  Pppd includes
+support for authentication.  It can authenticate itself to the other
+system and/or require the other system to authenticate itself, so that
+you can control which other systems may make a PPP connection and what
+IP addresses they may use.
+@end itemize
+
+@menu
+* PPP Concepts::                Basic concepts and terms used with PPP.
+* PPP packet format::           How data is packaged up for transmission.
+* LCP negotiation::             The parameters which are negotiated
+				using the Link Control Protocol.
+* IPCP negotiation::            The parameters which are negotiated
+				using the IP Control Protocol.
+@end menu
+
+@node PPP Concepts, PPP packet format, Introduction, Introduction
+@section PPP Concepts
+
+To use PPP to provide a network connection between two machines, there
+must be some way that a stream of bytes, or characters, can be passed
+from one to the other, in both directions independently.  We refer to
+this as the ``serial link''.  Very often the serial link involves
+asynchronous communications ports and modems, but other kinds of serial
+link are possible.
+
+The serial link must transmit (at least) 8 bits per character; PPP
+cannot work over a serial link which transmits only 7 bits per
+character.  However, it need not transmit all byte values transparently. 
+PPP has a mechanism to avoid sending certain characters if it is known
+that the some element of the serial link interprets them specially.  For
+example, the DC1 and DC3 ASCII characters (control-Q and control-S) may
+be trapped by a modem if it is set for ``software'' flow control.  PPP
+can send these characters as a two-character ``escape'' sequence.  The
+set of characters which are to be transmitted as an escape sequence is
+represented in an ``async control character map'' (ACCM).  The ``async''
+part refers to the fact that this facility is used for asynchronous
+serial links.  For synchronous serial connections, the HDLC bit-stuffing
+procedure is used instead.
+
+The two systems connected by the serial link are called ``peers''.  When
+we are talking from the point of view of one of the systems, the other
+is often referred to as ``the peer''.  Sometimes we may refer to one
+system as a ``client'' and the other as a ``server''.  This distinction
+refers mainly to the way the serial link is set up; usually the client
+is the peer that initiates the connection, for example by dialling the
+server with its modem.
+
+During the lifetime of a PPP connection, it proceeds through several
+phases:
+
+@enumerate
+@item
+Serial link establishment.  In this phase, the serial link is set up and
+PPP protocol software is attached to each end of the serial link.  The
+precise steps involved in doing this vary greatly, depending on the
+nature of the serial link.  For the common case of modems connected
+through the telephone network, this involves first sending commands to
+the modem to cause it to dial the remote system.  When the remote system
+answers, the local system usually has to supply a username and password,
+and then issue a command to invoke PPP software on the remote system.
+The ``chat'' program supplied with ppp-2.x provides a way to automate a
+dialog with the modem and the remote system.  This phase is not
+standardized; it is outside the scope of the PPP protocol
+specifications.
+
+@item
+Link Control Protocol (LCP) negotiation.  In this phase, the peers send
+LCP packets to each other to negotiate various parameters of the
+connection, such as the ACCM to be used in each direction, whether
+authentication is required, and whether or not to use various forms of
+compression.  When the peers reach agreement on these parameters, LCP is
+said to be ``up''.
+
+@item
+Authentication.  If one (or both) of the peers requires the other
+peer to authenticate itself, that occurs next.  If one of the peers
+cannot successfully authenticate itself, the other peer terminates the
+link.
+
+@item
+Network Control Protocol (NCP) negotiation.  PPP can potentially support
+several different network protocols, although IP is the only network
+protocol (NP) supported by the ppp-2.x package.  Each NP has an
+associated NCP defined for it, which is used to negotiate the specific
+parameters which affect that NP.  For example, the IP Control Protocol
+(IPCP) is used to negotiate the IP addresses for each end of the link,
+and whether the TCP header compression method described by Van Jacobsen
+in RFC 1144 (``VJ compression'') is to be used.
+
+@item
+Network communication.  When each NCP has successfully negotiated the
+parameters for its NP, that NCP is said to be ``up''.  At that point,
+the PPP link is made available for data traffic from that NP.  For
+example, when IPCP comes up, the PPP link is then available for carrying
+IP packets (which of course includes packets from those protocols which
+are layered above IP, such as TCP, UDP, etc.)
+
+@item
+Termination.  When the link is no longer required, it is terminated.
+Usually this involves an exchange of LCP packets so that one peer can
+notify the other that it is shutting down the link, enabling both peers
+to shut down in an orderly manner.  But of course there are occasions
+when the link terminates because the serial link is interrupted, for
+example, when a modem loses carrier and hangs up.
+
+@end enumerate
+
+The protocols in the PPP family are produced by the Point-to-Point
+Working Group of the Internet Engineering Task Force, and are specified
+in RFC (Request for Comments) documents, available by anonymous FTP from
+several sites.
+
+PPP is defined in several RFCs, in
+particular RFCs 1661, 1662, and 1334.  IPCP is defined in RFC 1332.
+Other RFCs describe the control protocols for other network protocols
+(e.g., DECnet, OSI, Appletalk).  RFCs are available by anonymous FTP
+from several sites including nic.ddn.mil, nnsc.nsf.net, nic.nordu.net,
+ftp.nisc.sri.com, and munnari.oz.au.
+
+@node PPP packet format, LCP negotiation, PPP Concepts, Introduction
+@section PPP packet format
+
+PPP transmits packets over the serial link using a simple encapsulation
+scheme.  First, a two-byte PPP Protocol field is inserted before the
+data to be sent.  The value in this field identifies
+which higher-level protocol (either a network protocol such as IP or a
+PPP control protocol such as LCP) should receive the data in the packet.
+By default, a one-byte Address field with the value 0xFF, and a one-byte
+Control field with the value 0x03, are inserted before the PPP Protocol
+field (apparently this is supposed to provide compatibility with HDLC,
+in case there is a synchronous to asynchronous converter in the serial
+link).
+
+On slow serial links, these fields can be compressed down to one byte in
+most cases.  The PPP Address and Control fields are compressed by simply
+omitting them (``address/control compression'').  The PPP Protocol field
+values are chosen so that bit 0 (the least-significant bit) of the first
+(most significant) byte is always 0, and bit 0 of the second byte is
+always 1.  The PPP Protocol field can be compressed by omitting the
+first byte, provided that it is 0 (``protocol compression'').  The
+values for this field are assigned so that the first byte is zero for
+all of the commonly-used network protocols.  For example, the PPP
+Protocol field value for IP is 0x21.
+
+For asynchronous serial links, which do not provide any packet framing
+or transparency, a further encapsulation is used as follows.  First a
+16-bit Frame Check Sequence (FCS) is computed over the packet to be
+sent, and appended as two bytes to the end of the packet.
+
+Then each byte of the packet is examined, and if it contains one of the
+characters which are to be escaped, it is replaced by a two byte
+sequence: the 0x7d character '}', followed by the character with bit 5
+inverted.  For example, the control-C character (0x03) could be replaced
+by the two-byte sequence 0x7d, 0x23 ('}#').  The 0x7d and 0x7e ('~')
+characters are always escaped, and the 0x5e ('^') character may not be
+escaped.
+
+Finally, a ``flag'' character (0x7e, '~') is inserted at the beginning
+and end of the packet to mark the packet boundaries.  The initial flag
+may be omitted if this packet immediately follows another packet, as the
+ending flag for the previous packet can serve as the beginning flag of
+this packet.
+
+@node LCP negotiation, IPCP negotiation, PPP packet format, Introduction
+@section LCP negotiation
+
+The LCP negotiation process actually involves two sets of negotiations,
+one for each direction of the PPP connection.  Thus A will send B
+packets (``Configure-Requests'') describing what characteristics A would
+like to have apply to the B -> A direction of the link, that is, to the
+packets that A will receive.  Similarly B will send A packets describing
+the characteristics it would like to have apply to the packets it will
+be receiving.  These characteristics need not necessarily be the same in
+both directions.
+
+The parameters which are negotiated for each direction of the connection
+using LCP are:
+
+@itemize @bullet
+@item
+Maximum Receive Unit (MRU): indicates the maximum packet size which we
+are prepared to receive (specifically the maximum size of the
+data portion of the packet).  The default value is 1500, but on
+slow serial links, smaller values give better response.  The choice of
+MRU is discussed below (see xxx).
+
+@item
+Async Control Character Map (ACCM): indicates the set of control
+characters (characters with ASCII values in the range 0 - 31) which we
+wish to receive in escaped form.  The default is that the sender should
+escape all characters in the range 0 - 31.
+
+@item
+Authentication Protocol: indicates which protocol we would like the peer
+to use to authenticate itself.  Common choices are the Password
+Authentication Protocol (PAP) and the Cryptographic Handshake
+Authentication Protocol (CHAP).
+
+@item
+Quality Protocol: indicates which protocol which we would like the peer
+to use to send us link quality reports.  The ppp-2.x package does not
+currently support link quality reports.
+
+@item
+Magic Number: a randomly-chosen number, different from the peer's magic
+number.  If we persistently receive our own magic number in the peer's
+configure-request packets, then we can conclude that the serial link is
+looped back.
+
+@item
+Protocol Field Compression: indicates that we wish the peer to compress
+the PPP Protocol field to one byte, where possible, in the packets it
+sends.
+
+@item
+Address/Control Field Compression: indicates that we wish the peer to
+compress the PPP Address/Control fields (by simply omitting them) in the
+packets it sends.
+@end itemize
+
+@node IPCP negotiation,  , LCP negotiation, Introduction
+@section IPCP negotiation
+
+The IPCP negotiation process is very similar to the LCP negotiation
+process, except that of course different parameters are negotiated.
+The parameters which are negotiated using IPCP are:
+
+@itemize @bullet
+@item
+IP Address: the IP address (32-bit host IP number) which we plan to use
+as the local address for our end of the link.
+
+@item
+TCP header compression: indicates (a) that we wish the peer to compress
+the TCP/IP headers of TCP/IP packets that it sends, using the Van
+Jacobson algorithm as described in RFC1144; (b) the maximum slot ID that
+we wish the peer to use, and (c) whether we are prepared to accept
+packets with the slot ID field compressed (omitted).
+
+With Van Jacobson (VJ) compression, the receiver and transmitter (for
+one direction of the connection) both keep a table, with a certain
+number of ``slots'', where each slot holds the TCP/IP header of the most
+recently transmitted packet for one TCP connection.  If a packet is to
+be transmitted for a TCP connection which does not have a slot currently
+allocated, the VJ scheme will allocate one of the slots and send the
+entire TCP/IP header, together with the slot number.  For many packets,
+there will be a slot already allocated for the TCP connection, and the
+VJ scheme will then often be able to replace the entire TCP/IP header
+with a much smaller compressed header (typically only 3 - 7 bytes)
+describing which fields of the TCP/IP header have changed, and by how
+much.  If there are many more active connections than slots, the
+efficiency of the VJ scheme will drop, because it will not be able to
+send compressed headers as often.
+
+Usually the compressed header includes a one-byte slot index, indicating
+which TCP connection the packet is for.  It is possible to reduce the
+header size by omitting the slot index when the packet has the same slot
+index as the previous packet.  However, this introduces a danger if the
+lower levels of the PPP software can sometimes drop damaged packets
+without informing the VJ decompressor, as it may then assume the wrong
+slot index for packets which have the slot index field omitted.  With
+the ppp-2.x software, however, the probability of this happening is
+generally very small (see xxx).
+
+@end itemize
+
+@node Installation, Configuration, Introduction, Top
+@chapter Installation
+
+Because ppp-2.x includes code which must be incorporated into the
+kernel, its installation process is necessarily quite heavily
+system-dependent.  In addition, you will require super-user privileges
+(root access) to install the code.
+
+Some systems provide a ``modload'' facility, which allows you to load
+new code into a running kernel without relinking the kernel or
+rebooting.  Under Solaris 2, SunOS 4.x, Linux, OSF/1 and NextStep, this
+is the recommended (or only) way to install the kernel portion of the
+ppp-2.x package.
+
+Under the remaining supported operating systems (NetBSD, FreeBSD,
+Ultrix), it is necessary to go through the process of creating a new
+kernel image and reboot.  (Note that NetBSD and FreeBSD have a modload
+facility, but ppp-2.x is currently not configured to take advantage of
+it.)
+
+Detailed installation instructions for each operating system are
+contained in the README files in the ppp-2.x distribution.  In general,
+the process involves executing the commands @samp{./configure},
+@samp{make} and (as root) @samp{make install} in the ppp-2.x
+distribution directory.  (The Linux port requires the installation of
+some header files before compiling; see README.linux for details.)
+
+@node Configuration, Security, Installation, Top
+@chapter Configuration
+
+Once the ppp-2.x software is installed, you need to configure your
+system for the particular PPP connections you wish to allow.  Typically,
+the elements you need to configure are:
+
+@itemize @bullet
+@item
+How the serial link is established and how pppd gets invoked.
+@item
+Setting up syslog to log messages from pppd to the console and/or
+system log files.
+@item
+Pppd options to be used.
+@item
+Authentication secrets to use in authenticating us to the peer
+and/or the peer to us.
+@item
+The IP addresses for each end of the link.
+@end itemize
+
+In most cases, the system you are configuring will either be a
+@dfn{client} system, actively initiating a PPP connection on user
+request, or it will be a @dfn{server} system, passively waiting for
+connections from client systems.  Other arrangements are possible, but
+the instructions in this system assume that you are configuring either a
+client or a server.
+
+These instructions also assume that the serial link involves a serial
+communications port (that is, a tty device), since pppd requires a
+serial port.
+
+@menu
+* Client machines::  
+* Server machines::  
+* Setting up syslog::           
+* Pppd options::                
+* Authentication secrets files::  
+* IP Addresses::                
+@end menu
+
+@node Client machines, Server machines, Configuration, Configuration
+@section Client machines
+
+On a client machine, the way that the user requests that a connection be
+established is by running pppd, either directly or through a shell
+script.  Pppd should be given the name of the serial port to use as an
+option.  In this mode, pppd will fork and detach itself from its
+controlling terminal, so that the shell will return to its prompt.  (If
+this behaviour is not desired, use the -detach option.)
+
+Usually, the connect option should also be used.  The connect option
+takes an argument which is a command to run to establish the serial link
+and invoke PPP software on the remote machine.  This command is run with
+its standard input and standard output connected to the serial port.
+Giving the connect option to pppd also has the side-effect of causing
+pppd to open the serial port without waiting for the modem carrier
+detect signal.
+
+The process of establishing the serial link often involves a dialog.  If
+the serial port is connected to a modem, we first need to send some
+commands to the modem to configure it and dial the remote system.  Often
+there is then a dialog with the remote system to supply a username and
+password.  The @file{chat} program supplied with the ppp-2.x package is
+useful for automating such dialogs.  Chat uses a @dfn{script} consisting
+of alternately strings to expect to receive on the serial port, and
+strings to send on the serial port.  The script can also specify strings
+which indicate an error and abort the dialog.
+
+@node Server machines, , Client machines, Configuration
+@section Server machines
+
+There are generally three ways in which a server machine can be set up
+to allow client machines to establish a PPP link:
+
+@enumerate
+@item
+Client machines log in as regular users (often via a serial port
+connected to a modem, but possibly through a telnet or rlogin session)
+and then run pppd as a shell command.
+@item
+Client machines log in using a username whose login shell is pppd
+or a script which runs pppd.
+@item
+Client machines connect to a serial port which has a pppd running
+permanently on it (instead of a "getty" or other program providing a
+login service).
+@end enumerate
+
+Method 1 is very simple to set up, and is useful where existing users of
+a system have remote machines (for example at home) from which they want
+to establish a PPP connection from time to time.  Methods 2 and 3
+possibly have a security advantage in that they do not allow PPP client
+systems access to a shell.  Method 2 allows regular logins and PPP
+connections on the same port, while with method 3, would-be crackers may
+well be frustrated (unless they speak fluent PPP).
+
+With any of these methods, I strongly recommend that you configure PPP
+to require authentication from the client, by including the `auth'
+option in the /etc/ppp/options file.
+
+@node Setting up syslog, , Server machines, Configuration
+@section Setting up syslog
+
+Pppd uses the @file{syslog} facility to report information about the
+state of the connection, as does @file{chat}.  It is useful to set up
+syslog to print some of these messages on the console, and to record
+most of them to a file.  The messages from pppd are logged with facility
+@samp{daemon} and one of three levels:
+@itemize @bullet
+@item
+@samp{notice} for messages about important events such as the
+connection becoming available for IP traffic and the local and remote IP
+addresses in use.
+@item
+@samp{info} for messages about less important events, such as
+detecting a modem hangup.
+@item
+@samp{debug} for messages which are of use in working out why the
+connection is not working properly.
+@end itemize
+
+The messages from chat are logged with facility @samp{local2} and level
+@samp{debug}.
+
+Syslog is controlled by the syslog configuration file
+@file{/etc/syslog.conf}.  Generally the standard configuration will log
+facility @samp{daemon} messages with level @samp{notice} and above to a
+system log file such as @file{/var/log/syslog} (the name may vary on
+different systems).  I find it useful to have the notice level messages
+from pppd displayed on the console, and all messages from pppd and chat
+logged to a file such as @file{/etc/ppp/log}.  To achieve this,
+find the line in /etc/syslog.conf which has /dev/console
+on the right-hand side, and add `daemon.notice' on the left.  This
+line should end up something like this:
+
+@example
+*.err;kern.debug;auth.notice;mail.crit;daemon.notice    /dev/console
+@end example
+
+And add a line like this:
+
+@example
+daemon,local2.debug                                     /etc/ppp/log
+@end example
+
+The space between the left and right hand sides is one or more tabs, not
+spaces, and there are no tabs or spaces at the beginning of the line.
+
+You will need to create an empty @file{/etc/ppp/log} file; syslogd will
+not create it.  Once you have modified @file{/etc/syslog.conf}, you need
+to either reboot or notify syslogd to re-read the file.  On most
+systems, you notify syslogd by sending it a SIGHUP signal.  Syslogd's
+process ID is usually stored in a file such as @file{/etc/syslogd.pid}
+or @file{/var/run/syslog.pid}.  Thus you can notify syslogd to re-read
+the file by executing a command such as:
+
+@example
+kill -HUP `cat /etc/syslogd.pid`
+@end example
+
+@node Pppd options, , Setting up syslog, Configuration
+@section Pppd options
+
+@node Authentication secrets files, , Pppd options, Configuration
+@section Authentication secrets files
+
+@node IP Addresses,  , Authentication secrets files, Configuration
+@section IP Addresses
+
+@node Security, Compression, Configuration, Top
+@chapter Security
+
+@node Compression,  , Security, Top
+@chapter Compression
+
+@bye
diff -ruN ppp-2.4.2/pppd/Makefile.sol2 ppp-cvs-20040427/pppd/Makefile.sol2
--- ppp-2.4.2/pppd/Makefile.sol2	2003-11-27 22:25:25.000000000 +0100
+++ ppp-cvs-20040427/pppd/Makefile.sol2	2002-11-02 20:50:09.000000000 +0100
@@ -1,6 +1,6 @@
 #
 # Makefile for pppd under Solaris 2.
-# $Id: Makefile.sol2,v 1.24 2003/11/27 21:25:25 paulus Exp $
+# $Id: Makefile.sol2,v 1.23 2002/11/02 19:48:12 carlsonj Exp $
 #
 
 include ../Makedefs.com
@@ -8,8 +8,8 @@
 CFLAGS	=  -I../include -DSVR4 -DSOL2 $(COPTS)
 LIBS	= -lsocket -lnsl
 
-OBJS	=  main.o magic.o fsm.o lcp.o ipcp.o upap.o chap-new.o eap.o md5.o \
-	tty.o ccp.o ecp.o auth.o options.o demand.o utils.o sys-solaris.o
+OBJS	=  main.o magic.o fsm.o lcp.o ipcp.o upap.o chap.o eap.o md5.o tty.o \
+	ccp.o ecp.o auth.o options.o demand.o utils.o sys-solaris.o
 
 #
 # uncomment the following to enable plugins
diff -ruN ppp-2.4.2/pppd/Makefile.sunos4 ppp-cvs-20040427/pppd/Makefile.sunos4
--- ppp-2.4.2/pppd/Makefile.sunos4	2003-11-27 22:25:25.000000000 +0100
+++ ppp-cvs-20040427/pppd/Makefile.sunos4	2002-11-02 20:50:09.000000000 +0100
@@ -1,6 +1,6 @@
 #
 # Makefile for pppd under SunOS 4.
-# $Id: Makefile.sunos4,v 1.14 2003/11/27 21:25:25 paulus Exp $
+# $Id: Makefile.sunos4,v 1.13 2002/11/02 19:48:12 carlsonj Exp $
 #
 
 include ../sunos4/Makedefs
@@ -12,7 +12,7 @@
 
 all: pppd
 
-OBJS = main.o magic.o fsm.o lcp.o ipcp.o upap.o chap-new.o md5.o ccp.o ecp.o \
+OBJS = main.o magic.o fsm.o lcp.o ipcp.o upap.o chap.o md5.o ccp.o ecp.o \
 	auth.o options.o demand.o utils.o sys-sunos4.o tty.o eap.o
 
 pppd:	$(OBJS)
diff -ruN ppp-2.4.2/pppd/chap-new.c ppp-cvs-20040427/pppd/chap-new.c
--- ppp-2.4.2/pppd/chap-new.c	2003-11-27 23:22:36.000000000 +0100
+++ ppp-cvs-20040427/pppd/chap-new.c	2004-01-17 06:50:11.000000000 +0100
@@ -33,7 +33,7 @@
  * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-#define RCSID	"$Id: chap-new.c,v 1.3 2003/11/27 22:22:36 paulus Exp $"
+#define RCSID	"$Id: chap-new.c,v 1.4 2004/01/17 05:47:55 carlsonj Exp $"
 
 #include <stdlib.h>
 #include <string.h>
@@ -49,7 +49,7 @@
 int (*chap_verify_hook)(char *name, char *ourname, int id,
 			struct chap_digest_type *digest,
 			unsigned char *challenge, unsigned char *response,
-			unsigned char *message, int message_space) = NULL;
+			char *message, int message_space) = NULL;
 
 /*
  * Option variables.
@@ -119,7 +119,7 @@
 static int chap_verify_response(char *name, char *ourname, int id,
 		struct chap_digest_type *digest,
 		unsigned char *challenge, unsigned char *response,
-		unsigned char *message, int message_space);
+		char *message, int message_space);
 static void chap_respond(struct chap_client_state *cs, int id,
 		unsigned char *pkt, int len);
 static void chap_handle_status(struct chap_client_state *cs, int code, int id,
@@ -306,11 +306,11 @@
 {
 	int response_len, ok, mlen;
 	unsigned char *response, *p;
-	unsigned char *name = NULL;	/* initialized to shut gcc up */
+	char *name = NULL;	/* initialized to shut gcc up */
 	int (*verifier)(char *, char *, int, struct chap_digest_type *,
-		unsigned char *, unsigned char *, unsigned char *, int);
+		unsigned char *, unsigned char *, char *, int);
 	char rname[MAXNAMELEN+1];
-	unsigned char message[256];
+	char message[256];
 
 	if ((ss->flags & LOWERUP) == 0)
 		return;
@@ -322,7 +322,7 @@
 		response = pkt;
 		GETCHAR(response_len, pkt);
 		len -= response_len + 1;	/* length of name */
-		name = pkt + response_len;
+		name = (char *)pkt + response_len;
 		if (len < 0)
 			return;
 
@@ -391,14 +391,14 @@
 chap_verify_response(char *name, char *ourname, int id,
 		     struct chap_digest_type *digest,
 		     unsigned char *challenge, unsigned char *response,
-		     unsigned char *message, int message_space)
+		     char *message, int message_space)
 {
 	int ok;
-	char secret[MAXSECRETLEN];
+	unsigned char secret[MAXSECRETLEN];
 	int secret_len;
 
 	/* Get the secret that the peer is supposed to know */
-	if (!get_secret(0, name, ourname, secret, &secret_len, 1)) {
+	if (!get_secret(0, name, ourname, (char *)secret, &secret_len, 1)) {
 		error("No CHAP secret found for authenticating %q", name);
 		return 0;
 	}
diff -ruN ppp-2.4.2/pppd/chap-new.h ppp-cvs-20040427/pppd/chap-new.h
--- ppp-2.4.2/pppd/chap-new.h	2003-06-11 14:47:31.000000000 +0200
+++ ppp-cvs-20040427/pppd/chap-new.h	2004-01-17 06:50:12.000000000 +0100
@@ -123,7 +123,7 @@
 extern int (*chap_verify_hook)(char *name, char *ourname, int id,
 			struct chap_digest_type *digest,
 			unsigned char *challenge, unsigned char *response,
-			unsigned char *message, int message_space);
+			char *message, int message_space);
 
 /* Called by digest code to register a digest type */
 extern void chap_register_digest(struct chap_digest_type *);
diff -ruN ppp-2.4.2/pppd/chap_ms.c ppp-cvs-20040427/pppd/chap_ms.c
--- ppp-2.4.2/pppd/chap_ms.c	2003-11-18 11:42:56.000000000 +0100
+++ ppp-cvs-20040427/pppd/chap_ms.c	2004-04-14 04:40:21.000000000 +0200
@@ -74,7 +74,7 @@
  *
  */
 
-#define RCSID	"$Id: chap_ms.c,v 1.30 2003/07/10 17:59:33 fcusack Exp $"
+#define RCSID	"$Id: chap_ms.c,v 1.31 2004/04/14 02:39:39 carlsonj Exp $"
 
 #ifdef CHAPMS
 
@@ -164,9 +164,11 @@
 chapms_generate_challenge(unsigned char *challenge)
 {
 	*challenge++ = 8;
+#ifdef DEBUGMPPEKEY
 	if (mschap_challenge && strlen(mschap_challenge) == 8)
 		memcpy(challenge, mschap_challenge, 8);
 	else
+#endif
 		random_bytes(challenge, 8);
 }
 
@@ -174,9 +176,11 @@
 chapms2_generate_challenge(unsigned char *challenge)
 {
 	*challenge++ = 16;
+#ifdef DEBUGMPPEKEY
 	if (mschap_challenge && strlen(mschap_challenge) == 16)
 		memcpy(challenge, mschap_challenge, 16);
 	else
+#endif
 		random_bytes(challenge, 16);
 }
 
@@ -207,7 +211,7 @@
 #endif
 
 	/* Generate the expected response. */
-	ChapMS(challenge, secret, secret_len, &md);
+	ChapMS(challenge, (char *)secret, secret_len, &md);
 
 #ifdef MSLANMAN
 	/* Determine which part of response to verify against */
@@ -250,8 +254,8 @@
 
 	/* Generate the expected response and our mutual auth. */
 	ChapMS2(challenge, rmd->PeerChallenge, name,
-		secret, secret_len, &md,
-		saresponse, MS_CHAP2_AUTHENTICATOR);
+		(char *)secret, secret_len, &md,
+		(unsigned char *)saresponse, MS_CHAP2_AUTHENTICATOR);
 
 	/* compare MDs and send the appropriate status */
 	/*
@@ -326,8 +330,13 @@
 {
 	challenge++;	/* skip length, should be 16 */
 	*response++ = MS_CHAP2_RESPONSE_LEN;
-	ChapMS2(challenge, mschap2_peer_challenge, our_name,
-		secret, secret_len,
+	ChapMS2(challenge,
+#ifdef DEBUGMPPEKEY
+		mschap2_peer_challenge,
+#else
+		NULL,
+#endif
+		our_name, secret, secret_len,
 		(MS_Chap2Response *) response, private,
 		MS_CHAP2_AUTHENTICATEE);
 }
@@ -335,7 +344,8 @@
 static int
 chapms2_check_success(unsigned char *msg, int len, unsigned char *private)
 {
-	if ((len < MS_AUTH_RESPONSE_LENGTH + 2) || strncmp(msg, "S=", 2)) {
+	if ((len < MS_AUTH_RESPONSE_LENGTH + 2) ||
+	    strncmp((char *)msg, "S=", 2) != 0) {
 		/* Packet does not start with "S=" */
 		error("MS-CHAPv2 Success packet is badly formed.");
 		return 0;
@@ -351,7 +361,7 @@
 	/* Authenticator Response matches. */
 	msg += MS_AUTH_RESPONSE_LENGTH; /* Eat it */
 	len -= MS_AUTH_RESPONSE_LENGTH;
-	if ((len >= 3) && !strncmp(msg, " M=", 3)) {
+	if ((len >= 3) && !strncmp((char *)msg, " M=", 3)) {
 		msg += 3; /* Eat the delimiter */
 	} else if (len) {
 		/* Packet has extra text which does not begin " M=" */
@@ -477,7 +487,7 @@
     SHA1_Init(&sha1Context);
     SHA1_Update(&sha1Context, PeerChallenge, 16);
     SHA1_Update(&sha1Context, rchallenge, 16);
-    SHA1_Update(&sha1Context, user, strlen(user));
+    SHA1_Update(&sha1Context, (unsigned char *)user, strlen(user));
     SHA1_Final(sha1Hash, &sha1Context);
 
     BCOPY(sha1Hash, Challenge, 8);
@@ -512,7 +522,7 @@
     MD4_CTX		md4Context;
 
     MD4Init(&md4Context);
-    MD4Update(&md4Context, secret, mdlen);
+    MD4Update(&md4Context, (unsigned char *)secret, mdlen);
     MD4Final(hash, &md4Context);
 
 }
@@ -526,7 +536,7 @@
 
     /* Hash the Unicode version of the secret (== password). */
     ascii2unicode(secret, secret_len, unicodePassword);
-    NTPasswordHash(unicodePassword, secret_len * 2, PasswordHash);
+    NTPasswordHash((char *)unicodePassword, secret_len * 2, PasswordHash);
 
     ChallengeResponse(rchallenge, PasswordHash, NTResponse);
 }
@@ -539,11 +549,12 @@
     u_char	PasswordHash[MD4_SIGNATURE_SIZE];
     u_char	Challenge[8];
 
-    ChallengeHash(PeerChallenge, rchallenge, username, Challenge);
+    ChallengeHash(PeerChallenge, (unsigned char *)rchallenge, username,
+		  Challenge);
 
     /* Hash the Unicode version of the secret (== password). */
     ascii2unicode(secret, secret_len, unicodePassword);
-    NTPasswordHash(unicodePassword, secret_len * 2, PasswordHash);
+    NTPasswordHash((char *)unicodePassword, secret_len * 2, PasswordHash);
 
     ChallengeResponse(Challenge, PasswordHash, NTResponse);
 }
@@ -603,8 +614,9 @@
 
     /* Hash (x2) the Unicode version of the secret (== password). */
     ascii2unicode(secret, secret_len, unicodePassword);
-    NTPasswordHash(unicodePassword, secret_len * 2, PasswordHash);
-    NTPasswordHash(PasswordHash, sizeof(PasswordHash), PasswordHashHash);
+    NTPasswordHash((char *)unicodePassword, secret_len * 2, PasswordHash);
+    NTPasswordHash((char *)PasswordHash, sizeof(PasswordHash),
+		   PasswordHashHash);
 
     SHA1_Init(&sha1Context);
     SHA1_Update(&sha1Context, PasswordHashHash, sizeof(PasswordHashHash));
@@ -622,7 +634,7 @@
 
     /* Convert to ASCII hex string. */
     for (i = 0; i < MAX((MS_AUTH_RESPONSE_LENGTH / 2), sizeof(Digest)); i++)
-	sprintf(&authResponse[i * 2], "%02X", Digest[i]);
+	sprintf((char *)&authResponse[i * 2], "%02X", Digest[i]);
 }
 
 
@@ -825,7 +837,7 @@
 	      sizeof(response->PeerChallenge));
 
     /* Generate the NT-Response */
-    ChapMS2_NT(rchallenge, response->PeerChallenge, user,
+    ChapMS2_NT((char *)rchallenge, response->PeerChallenge, user,
 	       secret, secret_len, response->NTResp);
 
     /* Generate the Authenticator Response. */
diff -ruN ppp-2.4.2/pppd/fsm.c ppp-cvs-20040427/pppd/fsm.c
--- ppp-2.4.2/pppd/fsm.c	2003-06-29 12:06:14.000000000 +0200
+++ ppp-cvs-20040427/pppd/fsm.c	2004-02-02 05:00:11.000000000 +0100
@@ -40,7 +40,7 @@
  * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-#define RCSID	"$Id: fsm.c,v 1.20 2003/06/29 10:06:14 paulus Exp $"
+#define RCSID	"$Id: fsm.c,v 1.22 2004/02/02 03:57:19 carlsonj Exp $"
 
 /*
  * TODO:
@@ -201,6 +201,44 @@
     }
 }
 
+/*
+ * terminate_layer - Start process of shutting down the FSM
+ *
+ * Cancel any timeout running, notify upper layers we're done, and
+ * send a terminate-request message as configured.
+ */
+static void
+terminate_layer(f, nextstate)
+    fsm *f;
+    int nextstate;
+{
+    if( f->state != OPENED )
+	UNTIMEOUT(fsm_timeout, f);	/* Cancel timeout */
+    else if( f->callbacks->down )
+	(*f->callbacks->down)(f);	/* Inform upper layers we're down */
+
+    /* Init restart counter and send Terminate-Request */
+    f->retransmits = f->maxtermtransmits;
+    fsm_sdata(f, TERMREQ, f->reqid = ++f->id,
+	      (u_char *) f->term_reason, f->term_reason_len);
+
+    if (f->retransmits == 0) {
+	/*
+	 * User asked for no terminate requests at all; just close it.
+	 * We've already fired off one Terminate-Request just to be nice
+	 * to the peer, but we're not going to wait for a reply.
+	 */
+	f->state = nextstate == CLOSING ? CLOSED : STOPPED;
+	if( f->callbacks->finished )
+	    (*f->callbacks->finished)(f);
+	return;
+    }
+
+    TIMEOUT(fsm_timeout, f, f->timeouttime);
+    --f->retransmits;
+
+    f->state = nextstate;
+}
 
 /*
  * fsm_close - Start closing connection.
@@ -230,19 +268,7 @@
     case ACKRCVD:
     case ACKSENT:
     case OPENED:
-	if( f->state != OPENED )
-	    UNTIMEOUT(fsm_timeout, f);	/* Cancel timeout */
-	else if( f->callbacks->down )
-	    (*f->callbacks->down)(f);	/* Inform upper layers we're down */
-
-	/* Init restart counter, send Terminate-Request */
-	f->retransmits = f->maxtermtransmits;
-	fsm_sdata(f, TERMREQ, f->reqid = ++f->id,
-		  (u_char *) f->term_reason, f->term_reason_len);
-	TIMEOUT(fsm_timeout, f, f->timeouttime);
-	--f->retransmits;
-
-	f->state = CLOSING;
+	terminate_layer(f, CLOSING);
 	break;
     }
 }
@@ -689,17 +715,7 @@
 	break;
 
     case OPENED:
-	if( f->callbacks->down )
-	    (*f->callbacks->down)(f);
-
-	/* Init restart counter, send Terminate-Request */
-	f->retransmits = f->maxtermtransmits;
-	fsm_sdata(f, TERMREQ, f->reqid = ++f->id,
-		  (u_char *) f->term_reason, f->term_reason_len);
-	TIMEOUT(fsm_timeout, f, f->timeouttime);
-	--f->retransmits;
-
-	f->state = STOPPING;
+	terminate_layer(f, STOPPING);
 	break;
 
     default:
diff -ruN ppp-2.4.2/pppd/main.c ppp-cvs-20040427/pppd/main.c
--- ppp-2.4.2/pppd/main.c	2004-01-13 05:00:34.000000000 +0100
+++ ppp-cvs-20040427/pppd/main.c	2004-04-12 13:25:19.000000000 +0200
@@ -40,7 +40,7 @@
  * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-#define RCSID	"$Id: main.c,v 1.131 2004/01/13 04:00:34 paulus Exp $"
+#define RCSID	"$Id: main.c,v 1.136 2004/04/12 11:20:19 paulus Exp $"
 
 #include <stdio.h>
 #include <ctype.h>
@@ -150,6 +150,7 @@
 int got_sigterm;
 int got_sighup;
 
+static sigset_t signals_handled;
 static int waiting;
 static sigjmp_buf sigjmp;
 
@@ -648,16 +649,15 @@
 handle_events()
 {
     struct timeval timo;
-    sigset_t mask;
 
     kill_link = open_ccp_flag = 0;
     if (sigsetjmp(sigjmp, 1) == 0) {
-	sigprocmask(SIG_BLOCK, &mask, NULL);
+	sigprocmask(SIG_BLOCK, &signals_handled, NULL);
 	if (got_sighup || got_sigterm || got_sigusr2 || got_sigchld) {
-	    sigprocmask(SIG_UNBLOCK, &mask, NULL);
+	    sigprocmask(SIG_UNBLOCK, &signals_handled, NULL);
 	} else {
 	    waiting = 1;
-	    sigprocmask(SIG_UNBLOCK, &mask, NULL);
+	    sigprocmask(SIG_UNBLOCK, &signals_handled, NULL);
 	    wait_input(timeleft(&timo));
 	}
     }
@@ -692,19 +692,18 @@
 setup_signals()
 {
     struct sigaction sa;
-    sigset_t mask;
 
     /*
      * Compute mask of all interesting signals and install signal handlers
      * for each.  Only one signal handler may be active at a time.  Therefore,
      * all other signals should be masked when any handler is executing.
      */
-    sigemptyset(&mask);
-    sigaddset(&mask, SIGHUP);
-    sigaddset(&mask, SIGINT);
-    sigaddset(&mask, SIGTERM);
-    sigaddset(&mask, SIGCHLD);
-    sigaddset(&mask, SIGUSR2);
+    sigemptyset(&signals_handled);
+    sigaddset(&signals_handled, SIGHUP);
+    sigaddset(&signals_handled, SIGINT);
+    sigaddset(&signals_handled, SIGTERM);
+    sigaddset(&signals_handled, SIGCHLD);
+    sigaddset(&signals_handled, SIGUSR2);
 
 #define SIGNAL(s, handler)	do { \
 	sa.sa_handler = handler; \
@@ -712,7 +711,7 @@
 	    fatal("Couldn't establish signal handler (%d): %m", s); \
     } while (0)
 
-    sa.sa_mask = mask;
+    sa.sa_mask = signals_handled;
     sa.sa_flags = 0;
     SIGNAL(SIGHUP, hup);		/* Hangup */
     SIGNAL(SIGINT, term);		/* Interrupt */
@@ -1173,6 +1172,7 @@
        info("Connect time %d.%d minutes.", t/10, t%10);
        info("Sent %u bytes, received %u bytes.",
 	    link_stats.bytes_out, link_stats.bytes_in);
+       link_stats_valid = 0;
     }
 }
 
@@ -1329,6 +1329,7 @@
 
 /*
  * kill_my_pg - send a signal to our process group, and ignore it ourselves.
+ * We assume that sig is currently blocked.
  */
 static void
 kill_my_pg(sig)
@@ -1336,10 +1337,22 @@
 {
     struct sigaction act, oldact;
 
+    sigemptyset(&act.sa_mask);		/* unnecessary in fact */
     act.sa_handler = SIG_IGN;
     act.sa_flags = 0;
-    sigaction(sig, &act, &oldact);
     kill(0, sig);
+    /*
+     * The kill() above made the signal pending for us, as well as
+     * the rest of our process group, but we don't want it delivered
+     * to us.  It is blocked at the moment.  Setting it to be ignored
+     * will cause the pending signal to be discarded.  If we did the
+     * kill() after setting the signal to be ignored, it is unspecified
+     * (by POSIX) whether the signal is immediately discarded or left
+     * pending, and in fact Linux would leave it pending, and so it
+     * would be delivered after the current signal handler exits,
+     * leading to an infinite loop.
+     */
+    sigaction(sig, &act, &oldact);
     sigaction(sig, &oldact, NULL);
 }
 
diff -ruN ppp-2.4.2/pppd/plugins/Makefile ppp-cvs-20040427/pppd/plugins/Makefile
--- ppp-2.4.2/pppd/plugins/Makefile	2004-01-13 04:56:24.000000000 +0100
+++ ppp-cvs-20040427/pppd/plugins/Makefile	1970-01-01 01:00:00.000000000 +0100
@@ -1,38 +0,0 @@
-CC	= gcc
-COPTS	= -O2 -g
-CFLAGS	= $(COPTS) -I.. -I../../include -fPIC
-LDFLAGS	= -shared
-INSTALL	= install -o root
-
-SUBDIRS := rp-pppoe
-# Uncomment the next line to include the radius authentication plugin
-# SUBDIRS += radius
-PLUGINS := minconn.so passprompt.so passwordfd.so
-
-# include dependencies if present
-ifeq (.depend,$(wildcard .depend))
-include .depend
-endif
-
-all:	$(PLUGINS)
-	for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d all; done
-
-%.so: %.c
-	$(CC) -o $@ $(LDFLAGS) $(CFLAGS) $^
-
-VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../patchlevel.h)
-LIBDIR	= $(DESTDIR)/usr/lib/pppd/$(VERSION)
-
-install: $(PLUGINS)
-	$(INSTALL) -d $(LIBDIR)
-	$(INSTALL) $? $(LIBDIR)
-	for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d INSTALL=$(INSTALL) \
-				LIBDIR=$(LIBDIR) install; done
-
-clean:
-	rm -f *.o *.so *.a
-	for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d clean; done
-
-depend:
-	$(CPP) -M $(CFLAGS) *.c >.depend
-	for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d depend; done
diff -ruN ppp-2.4.2/pppd/plugins/radius/CVS/Entries ppp-cvs-20040427/pppd/plugins/radius/CVS/Entries
--- ppp-2.4.2/pppd/plugins/radius/CVS/Entries	2002-12-04 22:49:09.000000000 +0100
+++ ppp-cvs-20040427/pppd/plugins/radius/CVS/Entries	1970-01-01 01:00:00.000000000 +0100
@@ -1,7 +0,0 @@
-/pppd-radattr.8/1.1/Tue Jan 22 16:03:00 2002//
-/pppd-radius.8/1.4/Tue Apr  2 13:55:00 2002//
-/radattr.c/1.1/Tue Jan 22 16:03:00 2002//
-D/radiusclient////
-/Makefile.linux/1.5/Sat Nov  9 11:24:42 2002//
-/radrealms.c/1.1/Sat Oct  5 04:35:24 2002//
-/radius.c/1.18/Wed Dec  4 21:49:09 2002//
diff -ruN ppp-2.4.2/pppd/plugins/radius/CVS/Repository ppp-cvs-20040427/pppd/plugins/radius/CVS/Repository
--- ppp-2.4.2/pppd/plugins/radius/CVS/Repository	2002-09-07 12:37:51.000000000 +0200
+++ ppp-cvs-20040427/pppd/plugins/radius/CVS/Repository	1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-ppp/pppd/plugins/radius
diff -ruN ppp-2.4.2/pppd/plugins/radius/CVS/Root ppp-cvs-20040427/pppd/plugins/radius/CVS/Root
--- ppp-2.4.2/pppd/plugins/radius/CVS/Root	2002-09-07 12:37:51.000000000 +0200
+++ ppp-cvs-20040427/pppd/plugins/radius/CVS/Root	1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-samba.org:/data/cvs
diff -ruN ppp-2.4.2/pppd/plugins/radius/Makefile ppp-cvs-20040427/pppd/plugins/radius/Makefile
--- ppp-2.4.2/pppd/plugins/radius/Makefile	2002-11-09 12:24:42.000000000 +0100
+++ ppp-cvs-20040427/pppd/plugins/radius/Makefile	1970-01-01 01:00:00.000000000 +0100
@@ -1,74 +0,0 @@
-# Makefile for RADIUS plugin
-#
-# Copyright 2002 Roaring Penguin Software Inc.
-#
-
-MANDIR=/usr/man
-PLUGIN=radius.so radattr.so radrealms.so
-CFLAGS=-I../.. -I../../../include -Iradiusclient/include -O2
-
-# Uncomment the next line to include support for Microsoft's
-# MS-CHAP authentication protocol.
-CHAPMS=y
-# Uncomment the next line to include support for MPPE.
-MPPE=y
-# Uncomment the next lint to include support for traffic limiting
-MAXOCTETS=y
-
-ifdef CHAPMS
-CFLAGS += -DCHAPMS=1
-ifdef MPPE
-CFLAGS += -DMPPE=1
-endif
-endif
-ifdef MAXOCTETS
-CFLAGS += -DMAXOCTETS=1
-endif
-
-all: $(PLUGIN)
-
-install: all
-	$(MAKE) $(MFLAGS) -C radiusclient install
-	$(INSTALL) -d -m 755 $(LIBDIR)
-	$(INSTALL) -s -c -m 755 radius.so $(LIBDIR)
-	$(INSTALL) -s -c -m 755 radattr.so $(LIBDIR)
-	$(INSTALL) -s -c -m 755 radrealms.so $(LIBDIR)
-	$(INSTALL) -c -m 444 pppd-radius.8 $(MANDIR)/man8
-	$(INSTALL) -c -m 444 pppd-radattr.8 $(MANDIR)/man8
-
-radius.so: radiusclient/lib/.libs/libradiusclient.a radius.o
-	gcc -o radius.so -shared radius.o radiusclient/lib/.libs/libradiusclient.a
-
-radattr.so: radattr.o
-	gcc -o radattr.so -shared radattr.o
-
-radrealms.so: radrealms.o
-	gcc -o radrealms.so -shared radrealms.o
-
-radius.o: radius.c
-	gcc $(CFLAGS) -c -o radius.o -fPIC radius.c
-
-radattr.o: radattr.c
-	gcc $(CFLAGS) -c -o radattr.o -fPIC radattr.c
-
-radrealms.o: radrealms.c
-	gcc $(CFLAGS) -c -o radrealms.o -fPIC radrealms.c
-
-radiusclient/lib/.libs/libradiusclient.a:
-	test -r radiusclient/Makefile ||           \
-		(cd radiusclient;                  \
-		 ./configure --prefix=/usr         \
-			     --sysconfdir=/etc     \
-			     --enable-shared       \
-			     --enable-static)
-	$(MAKE) -C radiusclient
-
-clean:
-	$(MAKE) $(MFLAGS) -C radiusclient clean
-	rm -f *.o *.so
-
-distclean:
-	rm -f *.o *.so
-	$(MAKE) $(MFLAGS) -C radiusclient distclean
-
-dist-clean: distclean
diff -ruN ppp-2.4.2/pppd/plugins/radius/pppd-radius.8 ppp-cvs-20040427/pppd/plugins/radius/pppd-radius.8
--- ppp-2.4.2/pppd/plugins/radius/pppd-radius.8	2002-04-02 15:55:00.000000000 +0200
+++ ppp-cvs-20040427/pppd/plugins/radius/pppd-radius.8	2004-03-26 14:30:16.000000000 +0100
@@ -1,5 +1,5 @@
 .\" manual page [] for RADIUS plugin for pppd 2.4
-.\" $Id: pppd-radius.8,v 1.4 2002/04/02 13:55:00 dfs Exp $
+.\" $Id: pppd-radius.8,v 1.5 2004/03/26 13:27:17 kad Exp $
 .\" SH section heading
 .\" SS subsection heading
 .\" LP paragraph
@@ -40,6 +40,15 @@
 used, then the plugin uses
 .I /etc/radiusclient/radiusclient.conf
 as the configuration file.
+.TP
+.BI "avpair " attribute=value
+Adds an Attribute-Value pair to be passed on to the RADIUS server on each request.
+.TP
+.BI map-to-ifname
+Sets Radius NAS-Port attribute to number equal to interface name (Default)
+.TP
+.BI map-to-ttyname
+Sets Radius NAS-Port attribute value via libradiusclient library
 
 .SH USAGE
 To use the plugin, simply supply the
diff -ruN ppp-2.4.2/pppd/plugins/radius/radius.c ppp-cvs-20040427/pppd/plugins/radius/radius.c
--- ppp-2.4.2/pppd/plugins/radius/radius.c	2004-01-13 03:26:11.000000000 +0100
+++ ppp-cvs-20040427/pppd/plugins/radius/radius.c	2004-04-12 07:20:16.000000000 +0200
@@ -24,7 +24,7 @@
 *
 ***********************************************************************/
 static char const RCSID[] =
-"$Id: radius.c,v 1.22 2004/01/11 08:01:30 paulus Exp $";
+"$Id: radius.c,v 1.25 2004/04/12 05:16:37 kad Exp $";
 
 #include "pppd.h"
 #include "chap-new.h"
@@ -52,10 +52,15 @@
     char *vpstr;
     struct avpopt *next;
 } *avpopt = NULL;
+static bool portnummap = 0;
 
 static option_t Options[] = {
     { "radius-config-file", o_string, &config_file },
     { "avpair", o_special, add_avp },
+    { "map-to-ttyname", o_bool, &portnummap,
+	"Set Radius NAS-Port attribute value via libradiusclient library", OPT_PRIO | 1 },
+    { "map-to-ifname", o_bool, &portnummap,
+	"Set Radius NAS-Port attribute to number as in interface name (Default)", OPT_PRIOSUB | 0 },
     { NULL }
 };
 
@@ -264,7 +269,7 @@
 
     /* Hack... the "port" is the ppp interface number.  Should really be
        the tty */
-    rstate.client_port = get_client_port(ifname);
+    rstate.client_port = get_client_port(portnummap ? devnam : ifname);
 
     av_type = PW_FRAMED;
     rc_avpair_add(&send, PW_SERVICE_TYPE, &av_type, 0, VENDOR_NONE);
@@ -363,7 +368,7 @@
     /* Put user with potentially realm added in rstate.user */
     if (!rstate.done_chap_once) {
 	make_username_realm(user);
-	rstate.client_port = get_client_port (ifname);
+	rstate.client_port = get_client_port (portnummap ? devnam : ifname);
 	if (radius_pre_auth_hook) {
 	    radius_pre_auth_hook(rstate.user,
 				 &rstate.authserver,
@@ -881,7 +886,7 @@
     rc_avpair_add(&send, PW_ACCT_AUTHENTIC, &av_type, 0, VENDOR_NONE);
 
 
-    av_type = PW_ASYNC;
+    av_type = ( using_pty ? PW_VIRTUAL : ( sync_serial ? PW_SYNC : PW_ASYNC ) );
     rc_avpair_add(&send, PW_NAS_PORT_TYPE, &av_type, 0, VENDOR_NONE);
 
     hisaddr = ho->hisaddr;
@@ -981,9 +986,56 @@
 		       remote_number, 0, VENDOR_NONE);
     }
 
-    av_type = PW_ASYNC;
+    av_type = ( using_pty ? PW_VIRTUAL : ( sync_serial ? PW_SYNC : PW_ASYNC ) );
     rc_avpair_add(&send, PW_NAS_PORT_TYPE, &av_type, 0, VENDOR_NONE);
 
+    av_type = PW_NAS_ERROR;
+    switch( status ) {
+	case EXIT_OK:
+	case EXIT_USER_REQUEST:
+	    av_type = PW_USER_REQUEST;
+	    break;
+
+	case EXIT_HANGUP:
+	case EXIT_PEER_DEAD:
+	case EXIT_CONNECT_FAILED:
+	    av_type = PW_LOST_CARRIER;
+	    break;
+
+	case EXIT_INIT_FAILED:
+	case EXIT_OPEN_FAILED:
+	case EXIT_LOCK_FAILED:
+	case EXIT_PTYCMD_FAILED:
+	    av_type = PW_PORT_ERROR;
+	    break;
+
+	case EXIT_PEER_AUTH_FAILED:
+	case EXIT_AUTH_TOPEER_FAILED:
+	case EXIT_NEGOTIATION_FAILED:
+	case EXIT_CNID_AUTH_FAILED:
+	    av_type = PW_SERVICE_UNAVAILABLE;
+	    break;
+
+	case EXIT_IDLE_TIMEOUT:
+	    av_type = PW_ACCT_IDLE_TIMEOUT;
+	    break;
+
+	case EXIT_CONNECT_TIME:
+	    av_type = PW_ACCT_SESSION_TIMEOUT;
+	    break;
+	    
+#ifdef MAXOCTETS
+	case EXIT_TRAFFIC_LIMIT:
+	    av_type = PW_NAS_REQUEST;
+	    break;
+#endif
+
+	default:
+	    av_type = PW_NAS_ERROR;
+	    break;
+    }
+    rc_avpair_add(&send, PW_ACCT_TERMINATE_CAUSE, &av_type, 0, VENDOR_NONE);
+
     hisaddr = ho->hisaddr;
     av_type = htonl(hisaddr);
     rc_avpair_add(&send, PW_FRAMED_IP_ADDRESS , &av_type , 0, VENDOR_NONE);
@@ -1077,7 +1129,7 @@
 		       remote_number, 0, VENDOR_NONE);
     }
 
-    av_type = PW_ASYNC;
+    av_type = ( using_pty ? PW_VIRTUAL : ( sync_serial ? PW_SYNC : PW_ASYNC ) );
     rc_avpair_add(&send, PW_NAS_PORT_TYPE, &av_type, 0, VENDOR_NONE);
 
     hisaddr = ho->hisaddr;
diff -ruN ppp-2.4.2/pppd/plugins/radius/radiusclient/CVS/Entries ppp-cvs-20040427/pppd/plugins/radius/radiusclient/CVS/Entries
--- ppp-2.4.2/pppd/plugins/radius/radiusclient/CVS/Entries	2002-09-07 12:37:54.000000000 +0200
+++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/CVS/Entries	1970-01-01 01:00:00.000000000 +0100
@@ -1,28 +0,0 @@
-/BUGS/1.1/Tue Jan 22 16:03:00 2002//
-/CHANGES/1.1/Tue Jan 22 16:03:00 2002//
-/COPYRIGHT/1.1/Tue Jan 22 16:03:00 2002//
-/Makefile.am/1.1/Tue Jan 22 16:03:00 2002//
-/Makefile.in/1.1/Tue Jan 22 16:03:00 2002//
-/README/1.1/Tue Jan 22 16:03:00 2002//
-/README.radexample/1.1/Tue Jan 22 16:03:00 2002//
-/acconfig.h/1.1/Tue Jan 22 16:03:00 2002//
-/aclocal.m4/1.2/Mon Jun 24 12:57:15 2002//
-/config.guess/1.1/Tue Jan 22 16:03:00 2002//
-/config.h.in/1.3/Thu Jul 25 16:29:16 2002//
-/config.sub/1.1/Tue Jan 22 16:03:00 2002//
-/configure/1.1/Tue Jan 22 16:03:00 2002//
-/configure.in/1.1/Tue Jan 22 16:03:00 2002//
-/install-sh/1.1/Tue Jan 22 16:03:00 2002//
-/ltconfig/1.1/Tue Jan 22 16:03:00 2002//
-/ltmain.sh/1.1/Tue Jan 22 16:03:00 2002//
-/missing/1.1/Tue Jan 22 16:03:00 2002//
-/mkinstalldirs/1.1/Tue Jan 22 16:03:00 2002//
-/stamp-h.in/1.1/Tue Jan 22 16:03:00 2002//
-D/doc////
-D/etc////
-D/include////
-D/lib////
-D/login.radius////
-D/man////
-D/patches////
-D/src////
diff -ruN ppp-2.4.2/pppd/plugins/radius/radiusclient/CVS/Repository ppp-cvs-20040427/pppd/plugins/radius/radiusclient/CVS/Repository
--- ppp-2.4.2/pppd/plugins/radius/radiusclient/CVS/Repository	2002-09-07 12:37:51.000000000 +0200
+++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/CVS/Repository	1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-ppp/pppd/plugins/radius/radiusclient
diff -ruN ppp-2.4.2/pppd/plugins/radius/radiusclient/CVS/Root ppp-cvs-20040427/pppd/plugins/radius/radiusclient/CVS/Root
--- ppp-2.4.2/pppd/plugins/radius/radiusclient/CVS/Root	2002-09-07 12:37:51.000000000 +0200
+++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/CVS/Root	1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-samba.org:/data/cvs
diff -ruN ppp-2.4.2/pppd/plugins/radius/radiusclient/doc/CVS/Entries ppp-cvs-20040427/pppd/plugins/radius/radiusclient/doc/CVS/Entries
--- ppp-2.4.2/pppd/plugins/radius/radiusclient/doc/CVS/Entries	2002-09-07 12:37:52.000000000 +0200
+++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/doc/CVS/Entries	1970-01-01 01:00:00.000000000 +0100
@@ -1,4 +0,0 @@
-/Makefile.am/1.1/Tue Jan 22 16:03:01 2002//
-/Makefile.in/1.1/Tue Jan 22 16:03:01 2002//
-/instop.html/1.1/Tue Jan 22 16:03:01 2002//
-D
diff -ruN ppp-2.4.2/pppd/plugins/radius/radiusclient/doc/CVS/Repository ppp-cvs-20040427/pppd/plugins/radius/radiusclient/doc/CVS/Repository
--- ppp-2.4.2/pppd/plugins/radius/radiusclient/doc/CVS/Repository	2002-09-07 12:37:52.000000000 +0200
+++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/doc/CVS/Repository	1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-ppp/pppd/plugins/radius/radiusclient/doc
diff -ruN ppp-2.4.2/pppd/plugins/radius/radiusclient/doc/CVS/Root ppp-cvs-20040427/pppd/plugins/radius/radiusclient/doc/CVS/Root
--- ppp-2.4.2/pppd/plugins/radius/radiusclient/doc/CVS/Root	2002-09-07 12:37:52.000000000 +0200
+++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/doc/CVS/Root	1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-samba.org:/data/cvs
diff -ruN ppp-2.4.2/pppd/plugins/radius/radiusclient/etc/CVS/Entries ppp-cvs-20040427/pppd/plugins/radius/radiusclient/etc/CVS/Entries
--- ppp-2.4.2/pppd/plugins/radius/radiusclient/etc/CVS/Entries	2002-11-09 12:24:42.000000000 +0100
+++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/etc/CVS/Entries	1970-01-01 01:00:00.000000000 +0100
@@ -1,13 +0,0 @@
-/dictionary.ascend/1.1/Tue Jan 22 16:03:01 2002//
-/dictionary.compat/1.1/Tue Jan 22 16:03:01 2002//
-/dictionary.merit/1.1/Tue Jan 22 16:03:01 2002//
-/dictionary.microsoft/1.1/Wed Mar  6 13:23:09 2002//
-/issue/1.1/Tue Jan 22 16:03:01 2002//
-/port-id-map/1.1/Tue Jan 22 16:03:01 2002//
-/servers/1.1/Tue Jan 22 16:03:01 2002//
-/Makefile.am/1.4/Sat Nov  9 11:24:42 2002//
-/Makefile.in/1.5/Sat Nov  9 11:24:42 2002//
-/dictionary/1.9/Sat Nov  9 11:24:42 2002//
-/radiusclient.conf.in/1.2/Sat Nov  9 11:24:42 2002//
-/realms/1.1/Sat Oct  5 04:35:24 2002//
-D
diff -ruN ppp-2.4.2/pppd/plugins/radius/radiusclient/etc/CVS/Repository ppp-cvs-20040427/pppd/plugins/radius/radiusclient/etc/CVS/Repository
--- ppp-2.4.2/pppd/plugins/radius/radiusclient/etc/CVS/Repository	2002-09-07 12:37:52.000000000 +0200
+++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/etc/CVS/Repository	1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-ppp/pppd/plugins/radius/radiusclient/etc
diff -ruN ppp-2.4.2/pppd/plugins/radius/radiusclient/etc/CVS/Root ppp-cvs-20040427/pppd/plugins/radius/radiusclient/etc/CVS/Root
--- ppp-2.4.2/pppd/plugins/radius/radiusclient/etc/CVS/Root	2002-09-07 12:37:52.000000000 +0200
+++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/etc/CVS/Root	1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-samba.org:/data/cvs
diff -ruN ppp-2.4.2/pppd/plugins/radius/radiusclient/include/CVS/Entries ppp-cvs-20040427/pppd/plugins/radius/radiusclient/include/CVS/Entries
--- ppp-2.4.2/pppd/plugins/radius/radiusclient/include/CVS/Entries	2002-12-04 22:49:09.000000000 +0100
+++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/include/CVS/Entries	1970-01-01 01:00:00.000000000 +0100
@@ -1,7 +0,0 @@
-/Makefile.am/1.1/Tue Jan 22 16:03:01 2002//
-/Makefile.in/1.1/Tue Jan 22 16:03:01 2002//
-/includes.h/1.2/Wed Feb 27 15:51:19 2002//
-/messages.h/1.2/Wed Feb 27 15:51:19 2002//
-/pathnames.h/1.2/Wed Feb 27 15:51:19 2002//
-/radiusclient.h/1.9/Wed Dec  4 21:49:09 2002//
-D
diff -ruN ppp-2.4.2/pppd/plugins/radius/radiusclient/include/CVS/Repository ppp-cvs-20040427/pppd/plugins/radius/radiusclient/include/CVS/Repository
--- ppp-2.4.2/pppd/plugins/radius/radiusclient/include/CVS/Repository	2002-09-07 12:37:52.000000000 +0200
+++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/include/CVS/Repository	1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-ppp/pppd/plugins/radius/radiusclient/include
diff -ruN ppp-2.4.2/pppd/plugins/radius/radiusclient/include/CVS/Root ppp-cvs-20040427/pppd/plugins/radius/radiusclient/include/CVS/Root
--- ppp-2.4.2/pppd/plugins/radius/radiusclient/include/CVS/Root	2002-09-07 12:37:52.000000000 +0200
+++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/include/CVS/Root	1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-samba.org:/data/cvs
diff -ruN ppp-2.4.2/pppd/plugins/radius/radiusclient/lib/CVS/Entries ppp-cvs-20040427/pppd/plugins/radius/radiusclient/lib/CVS/Entries
--- ppp-2.4.2/pppd/plugins/radius/radiusclient/lib/CVS/Entries	2002-12-04 22:49:09.000000000 +0100
+++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/lib/CVS/Entries	1970-01-01 01:00:00.000000000 +0100
@@ -1,20 +0,0 @@
-/Makefile.am/1.1/Tue Jan 22 16:03:02 2002//
-/Makefile.in/1.2/Wed Feb 20 02:22:35 2002//
-/clientid.c/1.2/Wed Feb 27 15:51:20 2002//
-/dict.c/1.2/Tue Mar  5 15:14:06 2002//
-/env.c/1.2/Wed Feb 27 15:51:20 2002//
-/ip_util.c/1.2/Wed Feb 27 15:51:20 2002//
-/lock.c/1.2/Wed Feb 27 15:51:20 2002//
-/log.c/1.2/Wed Feb 27 15:51:20 2002//
-/md5.c/1.2/Wed Feb 27 15:51:20 2002//
-/memcmp.c/1.2/Wed Feb 27 15:51:20 2002//
-/sendserver.c/1.4/Tue Apr  2 14:09:35 2002//
-/strcasecmp.c/1.2/Wed Feb 27 15:51:20 2002//
-/strdup.c/1.2/Wed Feb 27 15:51:20 2002//
-/strerror.c/1.2/Wed Feb 27 15:51:20 2002//
-/util.c/1.2/Wed Feb 27 15:51:20 2002//
-/buildreq.c/1.4/Sat Nov  9 11:24:43 2002//
-/config.c/1.3/Sat Nov  9 11:24:43 2002//
-/options.h/1.2/Sat Nov  9 11:24:43 2002//
-/avpair.c/1.3/Wed Dec  4 21:49:09 2002//
-D
diff -ruN ppp-2.4.2/pppd/plugins/radius/radiusclient/lib/CVS/Repository ppp-cvs-20040427/pppd/plugins/radius/radiusclient/lib/CVS/Repository
--- ppp-2.4.2/pppd/plugins/radius/radiusclient/lib/CVS/Repository	2002-09-07 12:37:53.000000000 +0200
+++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/lib/CVS/Repository	1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-ppp/pppd/plugins/radius/radiusclient/lib
diff -ruN ppp-2.4.2/pppd/plugins/radius/radiusclient/lib/CVS/Root ppp-cvs-20040427/pppd/plugins/radius/radiusclient/lib/CVS/Root
--- ppp-2.4.2/pppd/plugins/radius/radiusclient/lib/CVS/Root	2002-09-07 12:37:53.000000000 +0200
+++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/lib/CVS/Root	1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-samba.org:/data/cvs
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
--- ppp-2.4.2/pppd/plugins/radius/radiusclient/login.radius/CVS/Entries	2002-09-07 12:37:54.000000000 +0200
+++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/login.radius/CVS/Entries	1970-01-01 01:00:00.000000000 +0100
@@ -1,5 +0,0 @@
-/Makefile.am/1.1/Tue Jan 22 16:03:02 2002//
-/Makefile.in/1.1/Tue Jan 22 16:03:02 2002//
-/README/1.1/Tue Jan 22 16:03:02 2002//
-/login.radius/1.1/Tue Jan 22 16:03:02 2002//
-D/migs////
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
--- ppp-2.4.2/pppd/plugins/radius/radiusclient/login.radius/CVS/Repository	2002-09-07 12:37:53.000000000 +0200
+++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/login.radius/CVS/Repository	1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-ppp/pppd/plugins/radius/radiusclient/login.radius
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
--- ppp-2.4.2/pppd/plugins/radius/radiusclient/login.radius/CVS/Root	2002-09-07 12:37:53.000000000 +0200
+++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/login.radius/CVS/Root	1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-samba.org:/data/cvs
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
--- ppp-2.4.2/pppd/plugins/radius/radiusclient/login.radius/migs/CVS/Entries	2002-09-07 12:37:53.000000000 +0200
+++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/login.radius/migs/CVS/Entries	1970-01-01 01:00:00.000000000 +0100
@@ -1,7 +0,0 @@
-/Makefile.am/1.1/Tue Jan 22 16:03:02 2002//
-/Makefile.in/1.1/Tue Jan 22 16:03:02 2002//
-/README/1.1/Tue Jan 22 16:03:02 2002//
-/ip-down/1.1/Tue Jan 22 16:03:02 2002//
-/ip-up/1.1/Tue Jan 22 16:03:02 2002//
-/login.radius/1.1/Tue Jan 22 16:03:02 2002//
-D
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
--- ppp-2.4.2/pppd/plugins/radius/radiusclient/login.radius/migs/CVS/Repository	2002-09-07 12:37:53.000000000 +0200
+++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/login.radius/migs/CVS/Repository	1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-ppp/pppd/plugins/radius/radiusclient/login.radius/migs
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
--- ppp-2.4.2/pppd/plugins/radius/radiusclient/login.radius/migs/CVS/Root	2002-09-07 12:37:53.000000000 +0200
+++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/login.radius/migs/CVS/Root	1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-samba.org:/data/cvs
diff -ruN ppp-2.4.2/pppd/plugins/radius/radiusclient/man/CVS/Entries ppp-cvs-20040427/pppd/plugins/radius/radiusclient/man/CVS/Entries
--- ppp-2.4.2/pppd/plugins/radius/radiusclient/man/CVS/Entries	2002-09-07 12:37:53.000000000 +0200
+++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/man/CVS/Entries	1970-01-01 01:00:00.000000000 +0100
@@ -1,3 +0,0 @@
-/Makefile.am/1.1/Tue Jan 22 16:03:02 2002//
-/Makefile.in/1.1/Tue Jan 22 16:03:02 2002//
-D
diff -ruN ppp-2.4.2/pppd/plugins/radius/radiusclient/man/CVS/Repository ppp-cvs-20040427/pppd/plugins/radius/radiusclient/man/CVS/Repository
--- ppp-2.4.2/pppd/plugins/radius/radiusclient/man/CVS/Repository	2002-09-07 12:37:53.000000000 +0200
+++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/man/CVS/Repository	1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-ppp/pppd/plugins/radius/radiusclient/man
diff -ruN ppp-2.4.2/pppd/plugins/radius/radiusclient/man/CVS/Root ppp-cvs-20040427/pppd/plugins/radius/radiusclient/man/CVS/Root
--- ppp-2.4.2/pppd/plugins/radius/radiusclient/man/CVS/Root	2002-09-07 12:37:53.000000000 +0200
+++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/man/CVS/Root	1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-samba.org:/data/cvs
diff -ruN ppp-2.4.2/pppd/plugins/radius/radiusclient/patches/CVS/Entries ppp-cvs-20040427/pppd/plugins/radius/radiusclient/patches/CVS/Entries
--- ppp-2.4.2/pppd/plugins/radius/radiusclient/patches/CVS/Entries	2002-09-07 12:37:53.000000000 +0200
+++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/patches/CVS/Entries	1970-01-01 01:00:00.000000000 +0100
@@ -1,7 +0,0 @@
-/Makefile.am/1.1/Tue Jan 22 16:03:03 2002//
-/Makefile.in/1.1/Tue Jan 22 16:03:03 2002//
-/README/1.1/Tue Jan 22 16:03:03 2002//
-/merit-2.4.21-CHAP.diff/1.1/Tue Jan 22 16:03:04 2002//
-/radiusd-1.16.accounting.diff/1.1/Tue Jan 22 16:03:04 2002//
-/radiusd-1.16.shadow.diff/1.1/Tue Jan 22 16:03:04 2002//
-D
diff -ruN ppp-2.4.2/pppd/plugins/radius/radiusclient/patches/CVS/Repository ppp-cvs-20040427/pppd/plugins/radius/radiusclient/patches/CVS/Repository
--- ppp-2.4.2/pppd/plugins/radius/radiusclient/patches/CVS/Repository	2002-09-07 12:37:53.000000000 +0200
+++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/patches/CVS/Repository	1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-ppp/pppd/plugins/radius/radiusclient/patches
diff -ruN ppp-2.4.2/pppd/plugins/radius/radiusclient/patches/CVS/Root ppp-cvs-20040427/pppd/plugins/radius/radiusclient/patches/CVS/Root
--- ppp-2.4.2/pppd/plugins/radius/radiusclient/patches/CVS/Root	2002-09-07 12:37:53.000000000 +0200
+++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/patches/CVS/Root	1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-samba.org:/data/cvs
diff -ruN ppp-2.4.2/pppd/plugins/radius/radiusclient/src/CVS/Entries ppp-cvs-20040427/pppd/plugins/radius/radiusclient/src/CVS/Entries
--- ppp-2.4.2/pppd/plugins/radius/radiusclient/src/CVS/Entries	2002-09-07 12:37:53.000000000 +0200
+++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/src/CVS/Entries	1970-01-01 01:00:00.000000000 +0100
@@ -1,11 +0,0 @@
-/Makefile.am/1.1/Tue Jan 22 16:03:04 2002//
-/Makefile.in/1.1/Tue Jan 22 16:03:04 2002//
-/local.c/1.1/Tue Jan 22 16:03:04 2002//
-/radacct.c/1.1/Tue Jan 22 16:03:04 2002//
-/radexample-debug/1.1/Tue Jan 22 16:03:04 2002//
-/radexample.c/1.2/Tue Apr  2 14:09:35 2002//
-/radius.c/1.2/Tue Apr  2 14:09:35 2002//
-/radlogin.c/1.1/Tue Jan 22 16:03:04 2002//
-/radlogin.h/1.1/Tue Jan 22 16:03:05 2002//
-/radstatus.c/1.1/Tue Jan 22 16:03:05 2002//
-D
diff -ruN ppp-2.4.2/pppd/plugins/radius/radiusclient/src/CVS/Repository ppp-cvs-20040427/pppd/plugins/radius/radiusclient/src/CVS/Repository
--- ppp-2.4.2/pppd/plugins/radius/radiusclient/src/CVS/Repository	2002-09-07 12:37:53.000000000 +0200
+++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/src/CVS/Repository	1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-ppp/pppd/plugins/radius/radiusclient/src
diff -ruN ppp-2.4.2/pppd/plugins/radius/radiusclient/src/CVS/Root ppp-cvs-20040427/pppd/plugins/radius/radiusclient/src/CVS/Root
--- ppp-2.4.2/pppd/plugins/radius/radiusclient/src/CVS/Root	2002-09-07 12:37:53.000000000 +0200
+++ ppp-cvs-20040427/pppd/plugins/radius/radiusclient/src/CVS/Root	1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-samba.org:/data/cvs
diff -ruN ppp-2.4.2/pppd/plugins/rp-pppoe/CVS/Entries ppp-cvs-20040427/pppd/plugins/rp-pppoe/CVS/Entries
--- ppp-2.4.2/pppd/plugins/rp-pppoe/CVS/Entries	2002-09-07 12:37:54.000000000 +0200
+++ ppp-cvs-20040427/pppd/plugins/rp-pppoe/CVS/Entries	1970-01-01 01:00:00.000000000 +0100
@@ -1,9 +0,0 @@
-/Makefile.linux/1.1/Fri Dec 14 02:55:20 2001//
-/common.c/1.1/Fri Dec 14 02:55:20 2001//
-/config.h/1.1/Fri Dec 14 02:55:20 2001//
-/debug.c/1.1/Fri Dec 14 02:55:20 2001//
-/discovery.c/1.1/Fri Dec 14 02:55:20 2001//
-/if.c/1.1/Fri Dec 14 02:55:20 2001//
-/plugin.c/1.7/Tue Apr  2 13:11:00 2002//
-/pppoe.h/1.1/Fri Dec 14 02:55:20 2001//
-D
diff -ruN ppp-2.4.2/pppd/plugins/rp-pppoe/CVS/Repository ppp-cvs-20040427/pppd/plugins/rp-pppoe/CVS/Repository
--- ppp-2.4.2/pppd/plugins/rp-pppoe/CVS/Repository	2002-09-07 12:37:53.000000000 +0200
+++ ppp-cvs-20040427/pppd/plugins/rp-pppoe/CVS/Repository	1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-ppp/pppd/plugins/rp-pppoe
diff -ruN ppp-2.4.2/pppd/plugins/rp-pppoe/CVS/Root ppp-cvs-20040427/pppd/plugins/rp-pppoe/CVS/Root
--- ppp-2.4.2/pppd/plugins/rp-pppoe/CVS/Root	2002-09-07 12:37:53.000000000 +0200
+++ ppp-cvs-20040427/pppd/plugins/rp-pppoe/CVS/Root	1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-samba.org:/data/cvs
diff -ruN ppp-2.4.2/pppd/plugins/rp-pppoe/Makefile ppp-cvs-20040427/pppd/plugins/rp-pppoe/Makefile
--- ppp-2.4.2/pppd/plugins/rp-pppoe/Makefile	2004-01-13 04:57:55.000000000 +0100
+++ ppp-cvs-20040427/pppd/plugins/rp-pppoe/Makefile	1970-01-01 01:00:00.000000000 +0100
@@ -1,50 +0,0 @@
-# Generated automatically from Makefile.in by configure.
-#***********************************************************************
-#
-# Makefile
-#
-# Makefile for Roaring Penguin's Linux PPPoE plugin.
-#
-# Copyright (C) 2001 Roaring Penguin Software Inc.
-#
-# This program may be distributed according to the terms of the GNU
-# General Public License, version 2 or (at your option) any later version.
-#
-# $Id: Makefile.linux,v 1.2 2004/01/13 03:57:55 paulus Exp $
-#***********************************************************************
-
-# Version is set ONLY IN THE MAKEFILE!  Don't delete this!
-VERSION=3.3
-
-COPTS=-O2 -g
-CFLAGS=$(COPTS) -I../../../include/linux
-all: rp-pppoe.so
-
-rp-pppoe.so: libplugin.a plugin.o
-	gcc -o rp-pppoe.so -shared plugin.o libplugin.a
-
-install: all
-	$(INSTALL) -d -m 755 $(LIBDIR)
-	$(INSTALL) -s -c -m 4550 rp-pppoe.so $(LIBDIR)
-
-clean:
-	rm -f *.o *.so
-
-plugin.o: plugin.c
-	gcc '-DRP_VERSION="$(VERSION)"' $(CFLAGS) -I../../..  -c -o plugin.o -fPIC plugin.c
-
-libplugin.a: discovery.o if.o common.o debug.o
-	ar -rc $@ $^
-
-discovery.o: discovery.c
-	gcc $(CFLAGS) '-DVERSION="$(VERSION)"' -c -o discovery.o -fPIC discovery.c
-
-if.o: if.c
-	gcc $(CFLAGS) '-DVERSION="$(VERSION)"' -c -o if.o -fPIC if.c
-
-debug.o: debug.c
-	gcc $(CFLAGS) '-DVERSION="$(VERSION)"' -c -o debug.o -fPIC debug.c
-
-common.o: common.c
-	gcc $(CFLAGS) '-DVERSION="$(VERSION)"' -c -o common.o -fPIC common.c
-
diff -ruN ppp-2.4.2/pppd/pppd.8 ppp-cvs-20040427/pppd/pppd.8
--- ppp-2.4.2/pppd/pppd.8	2004-01-15 06:09:00.000000000 +0100
+++ ppp-cvs-20040427/pppd/pppd.8	2004-04-27 20:25:12.000000000 +0200
@@ -1,5 +1,5 @@
 .\" manual page [] for pppd 2.4
-.\" $Id: pppd.8,v 1.76 2004/01/15 05:09:00 paulus Exp $
+.\" $Id: pppd.8,v 1.77 2004/04/27 18:22:58 fcusack Exp $
 .\" SH section heading
 .\" SS subsection heading
 .\" LP paragraph
@@ -955,11 +955,11 @@
 Require the use of MPPE, with 128\-bit encryption.
 .TP
 .B require-mschap
-Require the peer to authenticate itself using MS-CHAP [Microsft Challenge
+Require the peer to authenticate itself using MS-CHAP [Microsoft Challenge
 Handshake Authentication Protocol] authentication.
 .TP
 .B require-mschap-v2
-Require the peer to authenticate itself using MS-CHAPv2 [Microsft Challenge
+Require the peer to authenticate itself using MS-CHAPv2 [Microsoft Challenge
 Handshake Authentication Protocol, Version 2] authentication.
 .TP
 .B require-eap
diff -ruN ppp-2.4.2/pppd/tty.c ppp-cvs-20040427/pppd/tty.c
--- ppp-2.4.2/pppd/tty.c	2004-01-13 05:17:59.000000000 +0100
+++ ppp-cvs-20040427/pppd/tty.c	2004-01-17 06:50:12.000000000 +0100
@@ -73,7 +73,7 @@
  * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-#define RCSID	"$Id: tty.c,v 1.13 2004/01/13 04:17:59 paulus Exp $"
+#define RCSID	"$Id: tty.c,v 1.14 2004/01/17 05:47:55 carlsonj Exp $"
 
 #include <stdio.h>
 #include <ctype.h>
@@ -512,7 +512,9 @@
 {
 	char *connector;
 	int fdflags;
+#ifndef __linux__
 	struct stat statbuf;
+#endif
 	char numbuf[16];
 
 	/*
diff -ruN ppp-2.4.2/pppdump/bsd-comp.c ppp-cvs-20040427/pppdump/bsd-comp.c
--- ppp-2.4.2/pppdump/bsd-comp.c	1999-04-16 13:34:42.000000000 +0200
+++ ppp-cvs-20040427/pppdump/bsd-comp.c	2004-01-17 06:50:12.000000000 +0100
@@ -38,12 +38,14 @@
  */
 
 /*
- * $Id: bsd-comp.c,v 1.3 1999/04/16 11:35:59 paulus Exp $
+ * $Id: bsd-comp.c,v 1.4 2004/01/17 05:47:55 carlsonj Exp $
  */
 
 #include <sys/types.h>
+#include <stdio.h>
 #include <stddef.h>
 #include <stdlib.h>
+#include <string.h>
 #include "ppp_defs.h"
 #include "ppp-comp.h"
 
diff -ruN ppp-2.4.2/pppdump/deflate.c ppp-cvs-20040427/pppdump/deflate.c
--- ppp-2.4.2/pppdump/deflate.c	2002-12-06 10:49:16.000000000 +0100
+++ ppp-cvs-20040427/pppdump/deflate.c	2004-01-17 06:50:12.000000000 +0100
@@ -33,12 +33,14 @@
  * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
  * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
- * $Id: deflate.c,v 1.4 2002/12/06 09:49:16 paulus Exp $
+ * $Id: deflate.c,v 1.5 2004/01/17 05:47:55 carlsonj Exp $
  */
 
 #include <sys/types.h>
+#include <stdio.h>
 #include <stddef.h>
 #include <stdlib.h>
+#include <string.h>
 #include "ppp_defs.h"
 #include "ppp-comp.h"
 #include "zlib.h"
diff -ruN ppp-2.4.2/pppdump/pppdump.c ppp-cvs-20040427/pppdump/pppdump.c
--- ppp-2.4.2/pppdump/pppdump.c	2002-12-06 10:17:02.000000000 +0100
+++ ppp-cvs-20040427/pppdump/pppdump.c	2004-01-17 06:50:12.000000000 +0100
@@ -35,6 +35,7 @@
  */
 #include <stdio.h>
 #include <unistd.h>
+#include <stdlib.h>
 #include <time.h>
 #include <sys/types.h>
 #include "ppp_defs.h"
@@ -53,6 +54,12 @@
 extern int optind;
 extern char *optarg;
 
+void dumplog();
+void dumpppp();
+void show_time();
+void handle_ccp();
+
+int
 main(ac, av)
     int ac;
     char **av;
@@ -105,6 +112,7 @@
     exit(0);
 }
 
+void
 dumplog(f)
     FILE *f;
 {
@@ -244,6 +252,7 @@
 
 unsigned char dbuf[8192];
 
+void
 dumpppp(f)
     FILE *f;
 {
@@ -429,6 +438,7 @@
     NULL
 };
 
+void
 handle_ccp(cp, dp, len)
     struct pkt *cp;
     u_char *dp;
@@ -485,6 +495,7 @@
     }
 }
 
+void
 show_time(f, c)
     FILE *f;
     int c;
diff -ruN ppp-2.4.2/scripts/callback ppp-cvs-20040427/scripts/callback
--- ppp-2.4.2/scripts/callback	1995-08-09 04:49:51.000000000 +0200
+++ ppp-cvs-20040427/scripts/callback	2004-04-12 07:30:11.000000000 +0200
@@ -33,7 +33,7 @@
 	ABORT		'\nNO ANSWER\r'			\
 	ABORT		'\nRINGING\r\n\r\nRINGING\r'	\
 	''		AT				\
-	'OK-+++\c-OK'	'AT&C0&D2S0=0H0			\
+	'OK-+++\c-OK'	'AT&C0&D2S0=0H0'		\
 	TIMEOUT		30				\
 	OK		ATDT$TELEPHONE			\
 	CONNECT		''				\
diff -ruN ppp-2.4.2/scripts/ipv6-down.sample ppp-cvs-20040427/scripts/ipv6-down.sample
--- ppp-2.4.2/scripts/ipv6-down.sample	1999-08-23 08:07:07.000000000 +0200
+++ ppp-cvs-20040427/scripts/ipv6-down.sample	2004-04-12 07:45:18.000000000 +0200
@@ -8,24 +8,24 @@
 # Kill the router advertisement daemon on this interface.
 # The killing procedure is copied from RedHat 6.0 initscripts.
 
-DEVICE=$1
+DEVICE="$1"
 
-PIDFILE=/var/run/radvd-$DEVICE.pid
+PIDFILE="/var/run/radvd-$DEVICE.pid"
 
-[ -f $PIDFILE ] || exit 0
+[ -f "$PIDFILE" ] || exit 0
 
-PID=`cat $PIDFILE`
+PID="$(cat "$PIDFILE")"
 if [ "$PID" != "" ]; then
-    if ps h $PID >/dev/null 2>&1; then
-	kill -TERM $PID
+    if ps h "$PID" >/dev/null 2>&1; then
+	kill -TERM "$PID"
 	usleep 10000
-	if ps h $PID >/dev/null 2>&1; then
+	if ps h "$PID" >/dev/null 2>&1; then
 	    sleep 1
-	    if ps h $PID >/dev/null 2>&1; then
-		kill -KILL $PID
+	    if ps h "$PID" >/dev/null 2>&1; then
+		kill -KILL "$PID"
 	    fi
 	fi
     fi
 fi
 
-rm -f $PIDFILE
+rm -f "$PIDFILE"
diff -ruN ppp-2.4.2/scripts/ipv6-up.sample ppp-cvs-20040427/scripts/ipv6-up.sample
--- ppp-2.4.2/scripts/ipv6-up.sample	1999-08-23 08:07:07.000000000 +0200
+++ ppp-cvs-20040427/scripts/ipv6-up.sample	2004-04-12 07:45:18.000000000 +0200
@@ -8,26 +8,27 @@
 # Start router advertisements on this link.
 # Based on radvd 0.5.0 behaviour
 
-DEVICE=$1
+DEVICE="$1"
 
-CFGFILE=/usr/inet6/etc/radvd.conf-$DEVICE
-PIDFILE=/var/run/radvd-$DEVICE.pid
+CFGFILE="/etc/radvd.conf-$DEVICE"
+PIDFILE="/var/run/radvd-$DEVICE.pid"
+EXEFILE="/usr/sbin/radvd"
 
-if [ -x /usr/inet6/sbin/radvd && -f $CFGFILE ]; then
-    touch $PIDFILE
-    if [ ! -f $PIDFILE ]; then
+if [ -x "$EXEFILE" -a -f "$CFGFILE" ]; then
+    touch "$PIDFILE"
+    if [ ! -f "$PIDFILE" ]; then
 	echo "error: $PIDFILE is not a regular file. Aborting"
 	exit 0
     fi
 
-    PID=`cat $PIDFILE`
-    if [ "$PID" != "" ]; then
-	ps h $PID >/dev/null 2>&1 && exit 0
+    PID="$(cat "$PIDFILE")"
+    if [ -n "$PID" ]; then
+	ps h "$PID" >/dev/null 2>&1 && exit 0
     fi
 
     # radvd 0.5.0 doesn't write a pid-file so we do it here
     # enabling debugging keeps radvd in foreground, putting it
     # on background gives us the PID.
-    /usr/inet6/sbin/radvd -d 1 -C $CFGFILE &
-    echo $! >$PIDFILE
+    "$EXEFILE" -d 1 -C "$CFGFILE" &
+    echo $! >"$PIDFILE"
 fi
diff -ruN ppp-2.4.2/scripts/pon ppp-cvs-20040427/scripts/pon
--- ppp-2.4.2/scripts/pon	2002-11-25 00:30:44.000000000 +0100
+++ ppp-cvs-20040427/scripts/pon	2004-04-12 07:45:18.000000000 +0200
@@ -1,10 +1,12 @@
 #!/bin/sh
 
+PPP_ON_BOOT=/etc/ppp/ppp_on_boot
+
 case "$1" in
   -*) echo "
 Usage: pon [provider] [arguments]
 
-If pon is invoked without arguments, /etc/ppp/ppp_on_boot file will be
+If pon is invoked without arguments, $PPP_ON_BOOT file will be
 run, presuming it exists and is executable. Otherwise, a PPP connection
 will be started using settings from /etc/ppp/peers/provider.
 If you specify one argument, a PPP connection will be started using
@@ -16,8 +18,8 @@
       ;;
 esac
 
-if [ -z "$1" -a -x /etc/ppp/ppp_on_boot ]; then
-  exec /etc/ppp/ppp_on_boot
+if [ -z "$1" -a -x "$PPP_ON_BOOT" ]; then
+  exec "$PPP_ON_BOOT"
 fi
 
 if [ -z "$1" -a ! -f /etc/ppp/peers/provider ]; then
diff -ruN ppp-2.4.2/svr4/Makedefs ppp-cvs-20040427/svr4/Makedefs
--- ppp-2.4.2/svr4/Makedefs	1970-01-01 01:00:00.000000000 +0100
+++ ppp-cvs-20040427/svr4/Makedefs	2000-06-09 03:36:34.000000000 +0200
@@ -0,0 +1,16 @@
+#
+# defines common to several Makefiles
+#
+
+INSTALL= /usr/sbin/install
+
+BINDIR = /usr/local/bin
+MANDIR = /usr/local/man
+ETCDIR = /etc/ppp
+
+COPTS = -O -Xa
+
+# For compiling with gcc, comment out the COPTS definition above and
+# uncomment the next 2 definitions.
+#CC = gcc
+#COPTS = -O2
diff -ruN ppp-2.4.2/svr4/Makedefs.sol2 ppp-cvs-20040427/svr4/Makedefs.sol2
--- ppp-2.4.2/svr4/Makedefs.sol2	1970-01-01 01:00:00.000000000 +0100
+++ ppp-cvs-20040427/svr4/Makedefs.sol2	1999-09-21 22:50:31.000000000 +0200
@@ -0,0 +1,59 @@
+#
+# Generic make definitions for Solaris 2
+#
+# $Id: Makedefs.sol2,v 1.3 1999/09/21 20:37:20 masputra Exp $
+#
+
+include ../svr4/Makedefs
+
+CPPFLAGS	= -D_KERNEL -DSVR4 -DSOL2 -DPRIOQ -DDEBUG -I../include
+CFLAGS		= $(CPPFLAGS) $(COPTS)
+
+# lint-specific variables
+LINT            = lint
+LINT_OPT_32     =
+LINT_OPT_64     = -Xarch=v9 -errchk=longptr64
+
+LINT_32     	=
+LINT_32     	+= -erroff=E_BAD_PTR_CAST_ALIGN
+LINT_32     	+= -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED
+LINT_32     	+= -erroff=E_SUSPICIOUS_COMPARISON
+LINT_32     	+= -erroff=E_CAST_UINT_TO_SIGNED_INT
+LINT_32     	+= -erroff=E_PASS_UINT_TO_SIGNED_INT
+LINT_32     	+= -erroff=E_INVALID_ANNOTATION_NAME
+LINT_32     	+= -erroff=E_FUNC_ARG_UNUSED
+# This might be needed, but zlib.c and vjcompress.c will squawk 
+# when not ignored
+LINT_32		+= -erroff=E_CASE_FALLTHRU
+LINT_32		+= -erroff=E_RET_INT_IMPLICITLY
+LINT_32		+= -erroff=E_FUNC_NO_RET_VAL
+# Some STREAMS macros will be noisy too when this isn't ignored
+LINT_32		+= -erroff=E_CONSTANT_CONDITION
+LINT_32		+= -erroff=E_CONST_EXPR
+
+# Extra noise suppressant for 64-bit
+EXTRA_OFF 	=
+EXTRA_OFF 	+= -erroff=E_CAST_INT_TO_SMALL_INT
+EXTRA_OFF 	+= -erroff=E_CAST_INT_CONST_TO_SMALL_INT
+EXTRA_OFF 	+= -erroff=E_CAST_TO_PTR_FROM_INT
+EXTRA_OFF 	+= -erroff=E_ASSIGN_INT_TO_SMALL_INT
+EXTRA_OFF 	+= -erroff=E_ASSIGN_INT_FROM_BIG_CONST
+EXTRA_OFF 	+= -erroff=E_CONST_PROMOTED_UNSIGNED_LL
+EXTRA_OFF 	+= -erroff=E_CONST_PROMOTED_LONG_LONG
+EXTRA_OFF 	+= -erroff=E_CONST_TRUNCATED_BY_ASSIGN
+EXTRA_OFF 	+= -erroff=E_PASS_INT_FROM_BIG_CONST
+EXTRA_OFF 	+= -erroff=E_COMP_INT_WITH_LARGE_INT
+EXTRA_OFF 	+= -erroff=E_ASSIGN_UINT_TO_SIGNED_INT
+EXTRA_OFF 	+= -erroff=E_ASSIGN_NARROW_CONV
+EXTRA_OFF 	+= -erroff=E_PASS_INT_TO_SMALL_INT
+EXTRA_OFF 	+= -erroff=E_PTR_CONV_LOSES_BITS
+
+LINT_64     	= $(LINT_32)
+LINT_64     	+= $(EXTRA_OFF)
+
+LINTFLAGS64     = -Xa -nsxmuF -errtags=yes $(LINT_OPT_64) $(LINT_64)
+LINT64          = $(LINT) -c $(LINTFLAGS64) $(CPPFLAGS)
+
+LINTFLAGS32     = -Xa -nsxmuF -errtags=yes $(LINT_OPT_32) $(LINT_32)
+LINT32          = $(LINT) -c $(LINTFLAGS32) $(CPPFLAGS)
+
diff -ruN ppp-2.4.2/svr4/Makefile.sol2 ppp-cvs-20040427/svr4/Makefile.sol2
--- ppp-2.4.2/svr4/Makefile.sol2	1970-01-01 01:00:00.000000000 +0100
+++ ppp-cvs-20040427/svr4/Makefile.sol2	1999-09-21 22:50:32.000000000 +0200
@@ -0,0 +1,66 @@
+#
+# Makefile for STREAMS modules for Solaris 2.
+#
+# $Id: Makefile.sol2,v 1.18 1999/09/21 20:37:20 masputra Exp $
+#
+
+include Makedefs.sol2
+
+COPTS += -xO2 -xspace -W0,-Lt
+
+COMP_OBJS = ppp_comp.o bsd-comp.o deflate.o zlib.o vjcompress.o \
+	ppp_comp_mod.o
+
+all:	ppp ppp_ahdl ppp_comp
+
+ppp:	ppp.o ppp_mod.o
+	ld -r -o $@ ppp.o ppp_mod.o
+	chmod +x $@
+
+ppp_ahdl: ppp_ahdlc.o ppp_ahdlc_mod.o
+	ld -r -o $@ ppp_ahdlc.o ppp_ahdlc_mod.o
+	chmod +x $@
+
+ppp_comp: $(COMP_OBJS)
+	ld -r -o $@ $(COMP_OBJS)
+	chmod +x $@
+
+bsd-comp.o:	../modules/bsd-comp.c
+	$(CC) $(CFLAGS) -c $?
+deflate.o:	../modules/deflate.c
+	$(CC) $(CFLAGS) -c $?
+ppp.o:	../modules/ppp.c
+	$(CC) $(CFLAGS) -c $?
+ppp_mod.o:	ppp_mod.c
+	$(CC) $(CFLAGS) -c $?
+ppp_ahdlc_mod.o: ppp_ahdlc_mod.c
+	$(CC) $(CFLAGS) -c $?
+ppp_ahdlc.o: ../modules/ppp_ahdlc.c
+	$(CC) $(CFLAGS) -c $?
+ppp_comp.o: ../modules/ppp_comp.c
+	$(CC) $(CFLAGS) -c $?
+ppp_comp_mod.o:	ppp_comp_mod.c
+	$(CC) $(CFLAGS) -c $?
+vjcompress.o:	../modules/vjcompress.c
+	$(CC) $(CFLAGS) -c $?
+zlib.o:	../common/zlib.c
+	$(CC) $(CFLAGS) -c $?
+
+install:
+	cp ppp ppp.conf /kernel/drv
+	cp ppp_comp ppp_ahdl /kernel/strmod
+	if grep clone:ppp /etc/minor_perm; then :; else \
+	  echo clone:ppp 0644 root sys >>/etc/minor_perm; fi
+	/usr/sbin/rem_drv ppp 2>/dev/null || true
+	/usr/sbin/add_drv ppp
+
+SRCS	= ../modules/ppp.c ppp_mod.c ../modules/ppp_ahdlc.c ppp_ahdlc_mod.c \
+	../modules/ppp_comp.c ../modules/bsd-comp.c ../modules/deflate.c \
+	../common/zlib.c ../modules/vjcompress.c ppp_comp_mod.c
+
+lint:
+	$(LINT32) $(SRCS)
+
+clean:
+	rm -f ppp ppp_comp ppp_ahdl *.o *~ core
+	rm -f *.ln
diff -ruN ppp-2.4.2/svr4/Makefile.sol2-64 ppp-cvs-20040427/svr4/Makefile.sol2-64
--- ppp-2.4.2/svr4/Makefile.sol2-64	1970-01-01 01:00:00.000000000 +0100
+++ ppp-cvs-20040427/svr4/Makefile.sol2-64	1999-09-21 22:50:33.000000000 +0200
@@ -0,0 +1,85 @@
+#
+# Makefile for 64-bit STREAMS modules for Solaris 2.
+#
+# $Id: Makefile.sol2-64,v 1.3 1999/09/21 20:37:20 masputra Exp $
+#
+
+include Makedefs.sol2
+
+# Sun's cc flag for LP64 compilation / linkage
+COPTS 		+= -xchip=ultra -xarch=v9 -Wc,-xcode=abs32 -Wc,-Qiselect-regsym=0 -xO3 -xspace -W0,-Lt
+
+# subdirectory where 64-bit objects / binaries will be placed
+LP64DIR		= sparcv9
+
+# Name of legacy Makefile (for 32-bit binaries)
+STD_MAKE	= Makefile.sol2
+
+COMP_OBJS	= $(LP64DIR)/ppp_comp.o $(LP64DIR)/bsd-comp.o \
+		$(LP64DIR)/deflate.o $(LP64DIR)/zlib.o $(LP64DIR)/vjcompress.o \
+		$(LP64DIR)/ppp_comp_mod.o
+
+all:	std_objs $(LP64DIR) ppp ppp_ahdl ppp_comp
+
+std_objs:
+	$(MAKE) -f $(STD_MAKE) all
+
+ppp:	$(LP64DIR)/ppp.o $(LP64DIR)/ppp_mod.o
+	ld -r -o $(LP64DIR)/$@ $(LP64DIR)/ppp.o $(LP64DIR)/ppp_mod.o
+	chmod +x $(LP64DIR)/$@
+
+ppp_ahdl: $(LP64DIR)/ppp_ahdlc.o $(LP64DIR)/ppp_ahdlc_mod.o
+	ld -r -o $(LP64DIR)/$@ $(LP64DIR)/ppp_ahdlc.o $(LP64DIR)/ppp_ahdlc_mod.o
+	chmod +x $(LP64DIR)/$@
+
+ppp_comp: $(COMP_OBJS)
+	ld -r -o $(LP64DIR)/$@ $(COMP_OBJS)
+	chmod +x $(LP64DIR)/$@
+
+$(LP64DIR)/bsd-comp.o: ../modules/bsd-comp.c
+	$(CC) $(CFLAGS) -c $? -o $@
+$(LP64DIR)/deflate.o: ../modules/deflate.c
+	$(CC) $(CFLAGS) -c $? -o $@
+$(LP64DIR)/ppp.o:	../modules/ppp.c
+	$(CC) $(CFLAGS) -c $? -o $@
+$(LP64DIR)/ppp_mod.o:	ppp_mod.c
+	$(CC) $(CFLAGS) -c $? -o $@
+$(LP64DIR)/ppp_ahdlc_mod.o: ppp_ahdlc_mod.c
+	$(CC) $(CFLAGS) -c $? -o $@
+$(LP64DIR)/ppp_ahdlc.o: ../modules/ppp_ahdlc.c
+	$(CC) $(CFLAGS) -c $? -o $@
+$(LP64DIR)/ppp_comp.o: ../modules/ppp_comp.c
+	$(CC) $(CFLAGS) -c $? -o $@
+$(LP64DIR)/ppp_comp_mod.o: ppp_comp_mod.c
+	$(CC) $(CFLAGS) -c $? -o $@
+$(LP64DIR)/vjcompress.o: ../modules/vjcompress.c
+	$(CC) $(CFLAGS) -c $? -o $@
+$(LP64DIR)/zlib.o:	../common/zlib.c
+	$(CC) $(CFLAGS) -c $? -o $@
+
+$(LP64DIR):
+	mkdir -m 755 -p $@
+
+install:
+	cp ppp ppp.conf /kernel/drv
+	cp ppp_comp ppp_ahdl /kernel/strmod
+	cp $(LP64DIR)/ppp /kernel/drv/$(LP64DIR)
+	cp $(LP64DIR)/ppp_comp $(LP64DIR)/ppp_ahdl /kernel/strmod/$(LP64DIR)
+	if grep clone:ppp /etc/minor_perm; then :; else \
+	  echo clone:ppp 0644 root sys >>/etc/minor_perm; fi
+	/usr/sbin/rem_drv ppp 2>/dev/null || true
+	/usr/sbin/add_drv ppp
+
+SRCS	= ../modules/ppp.c ppp_mod.c ../modules/ppp_ahdlc.c ppp_ahdlc_mod.c \
+	../modules/ppp_comp.c ../modules/bsd-comp.c ../modules/deflate.c \
+	../common/zlib.c ../modules/vjcompress.c ppp_comp_mod.c
+
+lint:
+	$(LINT64) $(SRCS)
+
+lint-32:
+	$(LINT32) $(SRCS)
+
+clean:
+	$(MAKE) -f $(STD_MAKE) clean
+	rm -f $(LP64DIR)/ppp $(LP64DIR)/ppp_comp $(LP64DIR)/ppp_ahdl $(LP64DIR)/*.o $(LP64DIR)/*~ $(LP64DIR)/core
diff -ruN ppp-2.4.2/svr4/Makefile.top ppp-cvs-20040427/svr4/Makefile.top
--- ppp-2.4.2/svr4/Makefile.top	1970-01-01 01:00:00.000000000 +0100
+++ ppp-cvs-20040427/svr4/Makefile.top	1999-04-01 14:37:44.000000000 +0200
@@ -0,0 +1,50 @@
+#
+# ppp top level makefile for SVR4 and Solaris 2
+#
+# $Id: Makefile.top,v 1.8 1999/04/01 11:44:55 paulus Exp $
+#
+
+include svr4/Makedefs
+
+all:
+	cd chat; $(MAKE) all
+	cd pppd; $(MAKE) all
+	cd pppstats; $(MAKE) all
+	cd pppdump; $(MAKE) all
+	cd svr4; $(MAKE) all
+
+install: $(BINDIR) $(MANDIR)/man8 install-progs install-etcppp
+
+install-progs:
+	cd chat; $(MAKE) install
+	cd pppd; $(MAKE) install
+	cd pppstats; $(MAKE) install
+	cd pppdump; $(MAKE) install
+	cd svr4; $(MAKE) install
+
+install-etcppp: $(ETCDIR) $(ETCDIR)/options $(ETCDIR)/pap-secrets \
+	$(ETCDIR)/chap-secrets
+
+$(ETCDIR)/options:
+	cp etc.ppp/options $@
+	chmod go-w $@
+$(ETCDIR)/pap-secrets:
+	$(INSTALL) -f $(ETCDIR) -m 600 etc.ppp/pap-secrets
+$(ETCDIR)/chap-secrets:
+	$(INSTALL) -f $(ETCDIR) -m 600 etc.ppp/chap-secrets
+
+$(BINDIR):
+	mkdir -m 755 -p $@
+$(MANDIR)/man8:
+	mkdir -m 755 -p $@
+$(ETCDIR):
+	mkdir -m 755 -p $@
+
+clean:
+	rm -f *~
+	cd chat; $(MAKE) clean
+	cd pppd; $(MAKE) clean
+	cd pppstats; $(MAKE) clean
+	cd pppdump; $(MAKE) clean
+	cd svr4; $(MAKE) clean
+
diff -ruN ppp-2.4.2/svr4/ppp.Master ppp-cvs-20040427/svr4/ppp.Master
--- ppp-2.4.2/svr4/ppp.Master	1970-01-01 01:00:00.000000000 +0100
+++ ppp-cvs-20040427/svr4/ppp.Master	1995-10-27 04:58:28.000000000 +0100
@@ -0,0 +1 @@
+ppp	-	Sciof	ppp	0	0	1	128	-1
diff -ruN ppp-2.4.2/svr4/ppp.Node ppp-cvs-20040427/svr4/ppp.Node
--- ppp-2.4.2/svr4/ppp.Node	1970-01-01 01:00:00.000000000 +0100
+++ ppp-cvs-20040427/svr4/ppp.Node	1995-10-27 04:58:36.000000000 +0100
@@ -0,0 +1 @@
+clone	ppp	c	ppp
diff -ruN ppp-2.4.2/svr4/ppp.System ppp-cvs-20040427/svr4/ppp.System
--- ppp-2.4.2/svr4/ppp.System	1970-01-01 01:00:00.000000000 +0100
+++ ppp-cvs-20040427/svr4/ppp.System	1995-10-27 04:58:37.000000000 +0100
@@ -0,0 +1 @@
+ppp	Y	1	0	0	0	0	0	0	0
diff -ruN ppp-2.4.2/svr4/ppp.conf ppp-cvs-20040427/svr4/ppp.conf
--- ppp-2.4.2/svr4/ppp.conf	1970-01-01 01:00:00.000000000 +0100
+++ ppp-cvs-20040427/svr4/ppp.conf	1995-06-01 06:39:00.000000000 +0200
@@ -0,0 +1 @@
+name="ppp" parent="pseudo" instance=0;
diff -ruN ppp-2.4.2/svr4/ppp_ahdl.Master ppp-cvs-20040427/svr4/ppp_ahdl.Master
--- ppp-2.4.2/svr4/ppp_ahdl.Master	1970-01-01 01:00:00.000000000 +0100
+++ ppp-cvs-20040427/svr4/ppp_ahdl.Master	1995-10-27 04:58:32.000000000 +0100
@@ -0,0 +1 @@
+ppp_ahdl	-	iSf	phdl	0	0	1	1	-1
diff -ruN ppp-2.4.2/svr4/ppp_ahdl.System ppp-cvs-20040427/svr4/ppp_ahdl.System
--- ppp-2.4.2/svr4/ppp_ahdl.System	1970-01-01 01:00:00.000000000 +0100
+++ ppp-cvs-20040427/svr4/ppp_ahdl.System	1995-10-27 04:58:38.000000000 +0100
@@ -0,0 +1 @@
+ppp_ahdl	Y	1	0	0	0	0	0	0	0
diff -ruN ppp-2.4.2/svr4/ppp_ahdlc_mod.c ppp-cvs-20040427/svr4/ppp_ahdlc_mod.c
--- ppp-2.4.2/svr4/ppp_ahdlc_mod.c	1970-01-01 01:00:00.000000000 +0100
+++ ppp-cvs-20040427/svr4/ppp_ahdlc_mod.c	1995-12-11 06:21:02.000000000 +0100
@@ -0,0 +1,49 @@
+#include <sys/types.h>
+#include <sys/param.h>
+#include <sys/conf.h>
+#include <sys/modctl.h>
+#include <sys/sunddi.h>
+
+extern struct streamtab ppp_ahdlcinfo;
+
+static struct fmodsw fsw = {
+    "ppp_ahdl",
+    &ppp_ahdlcinfo,
+    D_NEW | D_MP | D_MTQPAIR
+};
+
+extern struct mod_ops mod_strmodops;
+
+static struct modlstrmod modlstrmod = {
+    &mod_strmodops,
+    "PPP async HDLC module",
+    &fsw
+};
+
+static struct modlinkage modlinkage = {
+    MODREV_1,
+    (void *) &modlstrmod,
+    NULL
+};
+
+/*
+ * Entry points for modloading.
+ */
+int
+_init(void)
+{
+    return mod_install(&modlinkage);
+}
+
+int
+_fini(void)
+{
+    return mod_remove(&modlinkage);
+}
+
+int
+_info(mip)
+    struct modinfo *mip;
+{
+    return mod_info(&modlinkage, mip);
+}
diff -ruN ppp-2.4.2/svr4/ppp_comp.Master ppp-cvs-20040427/svr4/ppp_comp.Master
--- ppp-2.4.2/svr4/ppp_comp.Master	1970-01-01 01:00:00.000000000 +0100
+++ ppp-cvs-20040427/svr4/ppp_comp.Master	1995-10-27 04:58:34.000000000 +0100
@@ -0,0 +1 @@
+ppp_comp	-	iSf	pcmp	0	0	1	1	-1
diff -ruN ppp-2.4.2/svr4/ppp_comp.System ppp-cvs-20040427/svr4/ppp_comp.System
--- ppp-2.4.2/svr4/ppp_comp.System	1970-01-01 01:00:00.000000000 +0100
+++ ppp-cvs-20040427/svr4/ppp_comp.System	1995-10-27 04:58:40.000000000 +0100
@@ -0,0 +1 @@
+ppp_comp	Y	1	0	0	0	0	0	0	0
diff -ruN ppp-2.4.2/svr4/ppp_comp_mod.c ppp-cvs-20040427/svr4/ppp_comp_mod.c
--- ppp-2.4.2/svr4/ppp_comp_mod.c	1970-01-01 01:00:00.000000000 +0100
+++ ppp-cvs-20040427/svr4/ppp_comp_mod.c	2002-12-06 10:50:10.000000000 +0100
@@ -0,0 +1,89 @@
+/*
+ * ppp_comp_mod.c - modload support for PPP compression STREAMS module.
+ *
+ * Copyright (c) 1994 Paul Mackerras. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. The name(s) of the authors of this software must not be used to
+ *    endorse or promote products derived from this software without
+ *    prior written permission.
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ *    acknowledgment:
+ *    "This product includes software developed by Paul Mackerras
+ *     <paulus@samba.org>".
+ *
+ * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY
+ * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * $Id: ppp_comp_mod.c,v 1.3 2002/12/06 09:49:16 paulus Exp $
+ */
+
+/*
+ * This file is used under Solaris 2.
+ */
+#include <sys/types.h>
+#include <sys/param.h>
+#include <sys/conf.h>
+#include <sys/modctl.h>
+#include <sys/sunddi.h>
+
+extern struct streamtab ppp_compinfo;
+
+static struct fmodsw fsw = {
+    "ppp_comp",
+    &ppp_compinfo,
+    D_NEW | D_MP | D_MTQPAIR
+};
+
+extern struct mod_ops mod_strmodops;
+
+static struct modlstrmod modlstrmod = {
+    &mod_strmodops,
+    "PPP compression module",
+    &fsw
+};
+
+static struct modlinkage modlinkage = {
+    MODREV_1,
+    (void *) &modlstrmod,
+    NULL
+};
+
+/*
+ * Entry points for modloading.
+ */
+int
+_init(void)
+{
+    return mod_install(&modlinkage);
+}
+
+int
+_fini(void)
+{
+    return mod_remove(&modlinkage);
+}
+
+int
+_info(mip)
+    struct modinfo *mip;
+{
+    return mod_info(&modlinkage, mip);
+}
diff -ruN ppp-2.4.2/svr4/ppp_mod.c ppp-cvs-20040427/svr4/ppp_mod.c
--- ppp-2.4.2/svr4/ppp_mod.c	1970-01-01 01:00:00.000000000 +0100
+++ ppp-cvs-20040427/svr4/ppp_mod.c	2002-12-06 10:50:10.000000000 +0100
@@ -0,0 +1,182 @@
+/*
+ * ppp_mod.c - modload support for PPP pseudo-device driver.
+ *
+ * Copyright (c) 1994 Paul Mackerras. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. The name(s) of the authors of this software must not be used to
+ *    endorse or promote products derived from this software without
+ *    prior written permission.
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ *    acknowledgment:
+ *    "This product includes software developed by Paul Mackerras
+ *     <paulus@samba.org>".
+ *
+ * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY
+ * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * $Id: ppp_mod.c,v 1.4 2002/12/06 09:49:16 paulus Exp $
+ */
+
+/*
+ * This file is used under Solaris 2.
+ */
+
+#include <sys/types.h>
+#include <sys/param.h>
+#include <sys/stat.h>
+#include <sys/conf.h>
+#include <sys/modctl.h>
+#include <sys/sunddi.h>
+#include <sys/ksynch.h>
+
+#ifdef __STDC__
+#define __P(x)	x
+#else
+#define __P(x)	()
+#endif
+
+static int ppp_identify __P((dev_info_t *));
+static int ppp_attach __P((dev_info_t *, ddi_attach_cmd_t));
+static int ppp_detach __P((dev_info_t *, ddi_detach_cmd_t));
+static int ppp_devinfo __P((dev_info_t *, ddi_info_cmd_t, void *, void **));
+
+extern struct streamtab pppinfo;
+extern krwlock_t ppp_lower_lock;
+
+static dev_info_t *ppp_dip;
+
+static struct cb_ops cb_ppp_ops = {
+    nulldev, nulldev, nodev, nodev,	/* cb_open, ... */
+    nodev, nodev, nodev, nodev,		/* cb_dump, ... */
+    nodev, nodev, nodev, nochpoll,	/* cb_devmap, ... */
+    ddi_prop_op,			/* cb_prop_op */
+    &pppinfo,				/* cb_stream */
+    D_NEW|D_MP|D_MTQPAIR|D_MTOUTPERIM|D_MTOCEXCL	/* cb_flag */
+};
+
+static struct dev_ops ppp_ops = {
+    DEVO_REV,				/* devo_rev */
+    0,					/* devo_refcnt */
+    ppp_devinfo,			/* devo_getinfo */
+    ppp_identify,			/* devo_identify */
+    nulldev,				/* devo_probe */
+    ppp_attach,				/* devo_attach */
+    ppp_detach,				/* devo_detach */
+    nodev,				/* devo_reset */
+    &cb_ppp_ops,			/* devo_cb_ops */
+    NULL				/* devo_bus_ops */
+};
+
+/*
+ * Module linkage information
+ */
+
+static struct modldrv modldrv = {
+    &mod_driverops,			/* says this is a pseudo driver */
+    "PPP-2.3 multiplexing driver",
+    &ppp_ops				/* driver ops */
+};
+
+static struct modlinkage modlinkage = {
+    MODREV_1,
+    (void *) &modldrv,
+    NULL
+};
+
+int
+_init(void)
+{
+    return mod_install(&modlinkage);
+}
+
+int
+_fini(void)
+{
+    return mod_remove(&modlinkage);
+}
+
+int
+_info(mip)
+    struct modinfo *mip;
+{
+    return mod_info(&modlinkage, mip);
+}
+
+static int
+ppp_identify(dip)
+    dev_info_t *dip;
+{
+    return strcmp(ddi_get_name(dip), "ppp") == 0? DDI_IDENTIFIED:
+	DDI_NOT_IDENTIFIED;
+}
+
+static int
+ppp_attach(dip, cmd)
+    dev_info_t *dip;
+    ddi_attach_cmd_t cmd;
+{
+
+    if (cmd != DDI_ATTACH)
+	return DDI_FAILURE;
+    if (ddi_create_minor_node(dip, "ppp", S_IFCHR, 0, DDI_PSEUDO, CLONE_DEV)
+	== DDI_FAILURE) {
+	ddi_remove_minor_node(dip, NULL);
+	return DDI_FAILURE;
+    }
+    rw_init(&ppp_lower_lock, NULL, RW_DRIVER, NULL);
+    return DDI_SUCCESS;
+}
+
+static int
+ppp_detach(dip, cmd)
+    dev_info_t *dip;
+    ddi_detach_cmd_t cmd;
+{
+    rw_destroy(&ppp_lower_lock);
+    ddi_remove_minor_node(dip, NULL);
+    return DDI_SUCCESS;
+}
+
+static int
+ppp_devinfo(dip, cmd, arg, result)
+    dev_info_t *dip;
+    ddi_info_cmd_t cmd;
+    void *arg;
+    void **result;
+{
+    int error;
+
+    error = DDI_SUCCESS;
+    switch (cmd) {
+    case DDI_INFO_DEVT2DEVINFO:
+	if (ppp_dip == NULL)
+	    error = DDI_FAILURE;
+	else
+	    *result = (void *) ppp_dip;
+	break;
+    case DDI_INFO_DEVT2INSTANCE:
+	*result = NULL;
+	break;
+    default:
+	error = DDI_FAILURE;
+    }
+    return error;
+}