File: manual.template

package info (click to toggle)
iptraf-ng 1:1.1.4-6
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 2,856 kB
  • ctags: 1,289
  • sloc: ansic: 11,913; makefile: 367; sh: 31; awk: 1
file content (4752 lines) | stat: -rw-r--r-- 172,249 bytes parent folder | download | duplicates (2)
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
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
]>
<book id="manual">
<bookinfo>
<title>IPTraf User's Manual</title>

<releaseinfo>
Version @@version@@
</releaseinfo>

<copyright>
<year>1997</year>
<year>2003</year>
<holder>Gerard Paul Java</holder>
</copyright>

<legalnotice id="legalinfo">
<para>
This manual is released under the terms of the GNU
Free Documentation License of March, 2000 as published by the
Free Software Foundation, reproduced in this manual as Appendix B.
</para>
<para>
IPTraf is open-source software released under the terms of the GNU General
Public License version 2 or any later version as published by the Free
Software Foundation, reproduced in the LICENSE file in the distribution's
top-level directory.
</para>
<para>
The accomanying software and the information contained in this
document are provided "AS IS" without warranty of any kind, express or
implied, including, without limitation, the implied warranties
of mercantability or fitness for any particular purpose.
</para>
<para>
In no event shall the author be liable for any indirect,
special, consequential, or incidental damages arising from the use of this
manual or the accompanying software even if the author has been advised of
the possibility of such damages.
</para>
<para>
Linux is a registered trademark of Linus Torvalds.  Pentium is a
registered trademark of Intel Corporation.  All other trademarks are
property of their respective owners.
</para>
<para>
Some structure declarations were based on code copyrighted by the Regents
of the University of California.
</para>
<para>
Token Ring parsing code based on the Token Ring packet construction code
in the Linux 2.2 kernel.
</para>
</legalnotice>
</bookinfo>
<toc></toc>
<lot></lot>
<preface id="preface">
<title>About This Document</title>
<para>
This document contains the instructions on how to use the IPTraf network
monitoring software version @@major@@. This manual details the
different statistical facilities, the user
interface, and the important features of the software.
</para>

<sect1 id="addinfo">
<title>For Additional Information</title>
<para>
See the included README file for summarized and late-breaking information.
Also read the RELEASE-NOTES file for important new information about
this new version. The CHANGES file contains a record of the changes made
to the software since 1.0.0.  README.rvnamed contains information on the
rvnamed reverse resolution program. See the other
README files for support and development information.
</para>
</sect1>

<sect1 id="conventions">
<title>Document Conventions</title>
<para>
  The following symbols and typefaces are used throughout this manual:
</para>

<variablelist>
<varlistentry>
<term><computeroutput>[ ]</computeroutput></term>
<listitem>
<para>
items in brackets are optional. Brackets also denote items that may or may
not be displayed onscreen depending on settings or conditions.
</para></listitem></varlistentry>

<varlistentry>
<term><computeroutput>{ }</computeroutput></term>
<listitem><para>
     curly braces enclose items you choose from
</para></listitem></varlistentry>

<varlistentry>
<term><computeroutput>|</computeroutput></term>
<listitem><para>
     the vertical bar separates choices in curly braces
</para></listitem></varlistentry>

<varlistentry>
<term><computeroutput>normal monospace</computeroutput></term>
<listitem><para>
     normal monospace text in syntax specifications should be typed in exactly as presented. Because UNIX and variants are case-sensitive, case must be preserved. Monospace is also used in presenting items that appear on the screen.
</para></listitem></varlistentry>

<varlistentry>
<term><computeroutput><replaceable>
  monospace italics
</replaceable></computeroutput></term>
<listitem><para>

     italics in syntax specifications indicate items that are to be
     replaced with an actual item (e.g.
     <replaceable>interface</replaceable> should be replaced with an
     actual interface name, like <computeroutput>eth0</computeroutput>).

</para></listitem></varlistentry>
</variablelist>

<para>
Additional information appears distinctively set apart from the main text.
This information includes Notes, Tips, or Technical Notes.
</para>

<para>
<emphasis>Notes</emphasis> are additional pieces of information that may be useful or may
  clarify the preceeding paragraphs of the manual.
</para>
<para>
  <emphasis>Tips</emphasis> provide shortcuts, clarify tasks that may not
  be immediately obvious, or provide references to additional sources of information.
</para>
<para>
<emphasis>Technical notes</emphasis> are explanations of a
  more technical nature and may be of more use to programmers and advanced
  users.
</para>
</sect1>
</preface>

<chapter id="gettingstarted"><title>
Getting Started
</title>
<sect1>
<title>About IPTraf</title>
<para>
IPTraf is a network monitoring utility and traffic analyzer for IP networks. It
intercepts packets and returns data about captured the network traffic
in various statistical facilities.
</para>
<para>
IPTraf comes with these major features:
</para>
<itemizedlist spacing="compact" mark="bullet">
<listitem><para>An IP traffic monitor that shows TCP
connection information (hosts, packet/byte counts, flags,
window sizes), and color-coded information about other
IP packets</para></listitem>
<listitem><para>Statistics (counts and load rates) for network interfaces
in general and detailed views</para></listitem>
<listitem><para>Statistics per TCP/UDP port</para></listitem>
<listitem><para>Statistical breakdown according to packet sizes</para></listitem>
<listitem><para>A LAN host monitor that returns counts and loads per
detected MAC address</para></listitem>
<listitem><para>A powerful filtering system for users to view
only interesting traffic</para></listitem>
<listitem><para>Logging</para></listitem>
<listitem><para>An asynchronous DNS resolver for the
IP traffic monitor</para></listitem>
<listitem><para>A text-based, full-color, menu-driven user interface
suitable for use on all Linux systems with terminals, especially Linux
consoles and color xterms</para></listitem>
<listitem><para>Easy configuration</para></listitem>
<listitem><para>Fully software-based.  No additional
hardware required</para></listitem>
</itemizedlist>
<para>
  Basic knowledge of the important TCP/IP protocols (IP, TCP, UDP, ICMP,
  etc.) is necessary for you to best understand the information generated
  by the program.
</para>

</sect1>
<sect1 id="installation">
<title>
  Installation
</title>
<para>
  IPTraf is most readily available on the Internet, but some may receive
  it on a diskette. Here are the instructions for both types
  of distributions.
</para>
<sect2>
<title>System Requirements</title>
<para>
IPTraf requires:
</para>

<sect3>
<title>Hardware Requirements</title>

<itemizedlist spacing="compact" mark="bullet">
<listitem><para>
     16 megabytes of physical RAM (more recommended, at least 64 MB for very busy networks)
</para></listitem>
<listitem><para>
     2 megabytes of free disk space for installation (more will be needed if you log high amounts of traffic over time)
</para></listitem>
<listitem><para>
     Pentium-class processor or higher (Pentium-II 200 MHz or higher recommended) or equivalent.
</para></listitem>
<listitem><para>
     One or more of the supported network interfaces.
</para></listitem>
</itemizedlist>
</sect3>
<sect3>
   <title>Operating System Requirements</title>

<itemizedlist spacing="compact" mark="bullet">
<listitem><para>
     Linux kernel 2.2.0 or higher
</para></listitem>
<listitem><para>
     GNU C Library 2.1 or later
</para></listitem>
<listitem><para>

     ncurses 4.2 or later with the complete terminfo database in
     <filename>/usr/share/terminfo</filename>. Support for
     <computeroutput>linux</computeroutput>, <computeroutput>vt100</computeroutput>,
     <computeroutput>xterm</computeroutput>,
     <computeroutput>xterm-color</computeroutput> recommended.

</para></listitem>
</itemizedlist>
</sect3>
<sect3>
   <title>Compilation Requirements</title>
<para>
The following components are required when compiling IPTraf from the
source code.
</para>
<itemizedlist spacing="compact" mark="bullet">
<listitem><para>
     gcc 2.7.2.3 or later
</para></listitem>
<listitem><para>

     GNU C (glibc) development library 2.1 or later
</para></listitem>
<listitem><para>

     ncurses development libraries 4.2 or later
</para>
</listitem>
</itemizedlist>
</sect3>
</sect2>

<sect2>
<title>Availability</title>
<para>
  IPTraf can be downloaded from the Internet from the official FTP site at
 <ulink url="ftp://iptraf.seul.org/pub/iptraf/">
ftp://iptraf.seul.org/pub/iptraf/
</ulink>.
</para>
<para>

  The software is available in source form in
  compressed
<filename>.tar.gz</filename> files named
<filename>iptraf-<replaceable>x.y.z</replaceable>.tar.gz</filename> where
<filename><replaceable>x.y.z</replaceable></filename> 
  is the version number. Precompiled ready-to-run software is available in
  the
<filename>iptraf-<replaceable>x.y.z.machinetype</replaceable>.bin.tar.gz</filename>
 files. (<filename><replaceable>machinetype</replaceable></filename> indicates
  what platform the precompiled binaries run on. The official distribution
  will only be for the Intel x86 architecture indicated as
<filename>i386</filename>.)
</para>
</sect2>

<sect2>
<title>Installing Downloaded Packages</title>

<para>
  You will need to have GNU tar and GNU zip installed. All
  modern Linux installations already have these utilities ready.
</para>
<orderedlist>
<listitem>
<para>   
  Decompress the <filename>.tar.gz</filename> file by entering
</para>
<synopsis>
tar zxvf iptraf-<replaceable>x.y.z</replaceable>.tar.gz
</synopsis>
<para>
      for the source code or
</para>
<synopsis>
tar zxvf iptraf-<replaceable>x.y.z</replaceable>.i386.bin.tar.gz
</synopsis>
<para>
for the precompiled x86 programs.
</para>
<para>
If your tar doesn't support the z option, you can separately
decompress the <filename>.tar.gz</filename> file
then extract the resulting <filename>.tar</filename> archive.
</para>
<synopsis>
gunzip iptraf-<replaceable>x.y.z</replaceable>.tar.gz
tar xvf iptraf-<replaceable>x.y.z</replaceable>.tar
</synopsis>
<para>
This will decompress the sources into a directory called
<filename>iptraf-<replaceable>x.y.z</replaceable></filename> (source code)
or
<filename>iptraf-<replaceable>x.y.z</replaceable>.bin</filename>
(precompiled).
    (<replaceable>x.y.z</replaceable> here should be the IPTraf version number
you're installing, like <filename>@@version@@</filename>).
</para>
</listitem>
<listitem>
<para>
Change to the created top level directory.
</para></listitem>
<listitem><para>
To compile and install the software, run the Setup program by entering
</para>
<synopsis>
./Setup
</synopsis>
<para>
    while you are logged in as root. The Setup script will recognize the
    source distribution and compile the software before installing. It
    will immediately install a precompiled distribution.
</para>
</listitem>
</orderedlist>

<para>
    The resulting binaries will be placed in the
<filename>/usr/local/bin</filename> directory.
    All needed directories will also be created.
</para>
<para>
  After installation, you will be asked if you want to
  read the <filename>RELEASE-NOTES</filename> file. It is recommended that you do so at
  that point, since the <filename>RELEASE-NOTES</filename> file
  contains important information about the new version.
</para>
</sect2>
<sect2>
<title>Installing a Floppy Distribution</title>
<para>
  If you received IPTraf
  on a diskette, the sources are already decompressed. The diskette is
  in Second Extended filesystem format. Perform the following steps to
  install the software. </para> <orderedlist> <listitem><para>
Insert the floppy in the drive.
</para></listitem>
<listitem><para>
Mount the floppy on an empty directory. For example, to
mount the floppy in the first floppy drive under a directory
called <filename>/mnt</filename>, enter
</para>
<synopsis>
mount -t ext2 /dev/fd0 /mnt
</synopsis>
<para>
    This assumes your floppy is in
 <filename>/dev/fd0</filename>. You can use any empty directory in place
 of <filename>/mnt</filename>. With most Linux installations, this will work fine.
</para></listitem>
<listitem<para>

After mounting, change
to the <filename>/mnt</filename> (or whatever) directory.
</para></listitem>
<listitem><para>
Enter</para>
<synopsis>
./Setup
</synopsis>
<para>
    while logged in as root. Setup will determine whether the diskette
    contains a source code distribution or
    ready-to-run precompiled software.  This will copy the binaries to
    <filename>/usr/local/bin</filename>, and
    create the necessary working directories.
</para></listitem>
<listitem>
<para>
Unmount the diskette by typing
</para>
<synopsis>
umount /mnt
</synopsis>
<para>
    (That's <emphasis>u</emphasis>mount, not <emphasis>un</emphasis>mount.)
</para>
<para>
    You can then eject the diskette. Store it in a safe place.
</para>
<para>
  You will also be asked if you want to view the
<filename>RELEASE-NOTES</filename> file. It is
  recommended that you do so at that point.
</para>
<para>
  In both cases (downloaded and floppy), the installation will store the
  program in <filename>/usr/local/bin</filename> with the binaries owned by
  user root, readable, writable, and executable by the owner,
  no permissions for the group, no permissions for all others. (700 octal,
  or <computeroutput>-rwx------</computeroutput>).
</para>

<note>
  <title>Note</title>
<para>
  You must be <filename>root</filename> to
  do the installation. The old style of installation (<command>cd src;make
  install</command>)
  is still supported.
</para>
</note>
</listitem>
</orderedlist>

<para>
  Be sure <filename>/usr/local/bin</filename> is included in
  your environment's <envar>PATH</envar> variable. You can
  edit the appropriate command in your login customization
  file (<filename>.profile</filename> for the Bourne-type shells,
  <filename>.cshrc</filename> for the C shell and its relatives).
</para>
</sect2>
</sect1>
<sect1 id="upgrading">
<title>
  Upgrading from Earlier Versions
</title>
<para>
IPTraf 3.0 is a major revision from IPTraf 2.7.  The
filter subsystem has been completely redesigned and as such, is
incompatible with previous filter formats.  Therefore old
IPTraf filters can no longer be used.  The installation procedure for
IPTraf 3.0 will rename the filter list files but not delete them.
</para>
<para>
If you install a distribution package (e.g. RPM,
dpkg), old filters may still appear in the filter selection
list but the new IPTraf version will be unable to load them.
</para>
</sect1>
<sect1 id="startstop">
<title>Starting and Stopping IPTraf</title>
<para>
  After installation, you can start the program by simply entering
</para>
<synopsis>
iptraf
</synopsis>
<para>
  at the shell prompt. You will see a copyright notice, with
  an instruction to press any key to get started. Just press any character
  key, and you will be immediately taken to the main menu. All major
  functions of the program are found there.
</para>
<para>
  Entering the IPTraf command without any command-line parameters brings
  up the program's main menu. From there, you can select the
  facilities you want.
</para>
<para>
  IPTraf determines and makes use of the maximum number
  of lines and columns on the terminal.
</para>

<note>

  <title>Note</title><para>
  IPTraf does not have a SIGWINCH handler; it does not
  adjust itself when an xterm or some other X terminal is resized.
</para></note>


<note>
  <title>Technical note</title>
  <para>
  
  IPTraf needs to refer to the terminfo database
in <filename>/usr/share/terminfo</filename>.
  If the supplied executable program fails with <computeroutput>Error
opening
  terminal</computeroutput>, your terminfo database may be located somewhere else. You can
  control the terminfo search path
by using the <envar>TERMINFO</envar> environment
  variable. For example, if you're using the <command>sh</command>
or <command>bash</command> shell, and
  your terminfo database is in <filename>/usr/lib/terminfo</filename>
  (typical for Slackware distributions), you can use the commands:

</para>
<synopsis>
TERMINFO=/usr/lib/terminfo
export TERMINFO
</synopsis>
<para>
  You can place these commands in your <filename>~/.profile</filename> or the
  systemwide <filename>/etc/profile</filename> startup files.
</para>
<para>
  You can also create a symbolic
  link named <filename>/usr/share/terminfo</filename> to let
  it point to your existing terminfo (assuming again your terminfo is in
  <filename>/usr/lib/terminfo</filename>):
</para>
<synopsis>
ln -s /usr/lib/terminfo /usr/share/terminfo
</synopsis>
<para>
  Or you can recompile your program to use your existing ncurses library
  installation. If you do this, make sure you have ncurses 4.2 or later.
</para>
</note>
</sect1>
<sect1 id="cmdline">
<title>Command-line Options</title>
<para>
  IPTraf has a few optional command-line parameters. As with most UNIX
  commands, IPTraf command-line parameters are
case-sensitive (<computeroutput>-l</computeroutput>
  is NOT the same as <computeroutput>-L</computeroutput>).
</para>
<para>
  The following command-line parameters can be supplied
to the <command>iptraf</command> command:
</para>
<variablelist>
<varlistentry>
<term><computeroutput>-i <replaceable>iface</replaceable></computeroutput></term>
<listitem><para>
     causes the IP traffic monitor to start immediately on the specified interface.
     If -i all is specified, all interfaces are monitored.
</para></listitem>
</varlistentry>
<varlistentry>
<term><computeroutput>-g</computeroutput></term>
<listitem><para>
     starts the general interface statistics
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><computeroutput>-d <replaceable>iface</replaceable></computeroutput></term>
<listitem><para>
     shows detailed statistics for the specified interface
</para></listitem>
</varlistentry>
<varlistentry>
<term><computeroutput>-s <replaceable>iface</replaceable></computeroutput></term>
<listitem><para>
     starts the TCP/UDP traffic monitor for the specified interface
</para></listitem>
</varlistentry>
<varlistentry>
<term><computeroutput>-z <replaceable>iface</replaceable></computeroutput></term>
<listitem><para>
     starts the packet size breakdown for the specified interface
</para></listitem>
</varlistentry>
<varlistentry>
<term><computeroutput>-l <replaceable>iface</replaceable></computeroutput></term>
<listitem><para>
     starts the LAN station monitor on the specified interface. If
<computeroutput>-l all</computeroutput> is specified, all LAN interfaces are monitored.
</para></listitem>
</varlistentry>
<varlistentry>
<term><computeroutput>-t <replaceable>timeout</replaceable></computeroutput></term>
<listitem><para>
     The <computeroutput>-t</computeroutput> parameter, when used with one
     of the other parameters that specify a facility to start, tells
     IPTraf to run the indicated facility for only timeout
     minutes, after which the facility
     exits. The <computeroutput>-t</computeroutput> parameter is ignored in menu
     mode.
</para>
<para>
     If this parameter is not specified, the facility runs until the
     exit keystroke is pressed.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><computeroutput>-B</computeroutput></term>
<listitem><para>
     Redirects all terminal output to the "bit bucket"
<filename>/dev/null</filename>, closes standard input, and
places the program in the background. This parameter can be used only with
one of the <computeroutput>-i</computeroutput>, <computeroutput>-g</computeroutput>,
<computeroutput>-d</computeroutput>,
<computeroutput>-s</computeroutput>, <computeroutput>-z</computeroutput>, or
<computeroutput>-l</computeroutput> parameters. See
<link linkend="backop">Background Operation</link> in Chapter 9. <computeroutput>-B</computeroutput> is ignored in menu
mode.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><computeroutput>-L <replaceable>filename</replaceable></computeroutput></term>
<listitem><para>
  Allows you to specify an alternate log file name when the
  any facility is directly started from the command line, whether in foreground or
  background mode.  If specified in foreground mode, the log filename prompt is
  bypassed, even when logging is turned on in the <emphasis>Configure...</emphasis>
  menu.  If this parameter is omitted in background mode, the default log filename
  is used.
</para>
<para>
 This parameter always turns on logging.
</para>
<para>
  If an absolute path is not specified, the log
  file will be created in the default log file directory
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><computeroutput>-I <replaceable>interval</replaceable></computeroutput></term>
<listitem><para>
  Sets the logging interval (in minutes) when the <computeroutput>-L</computeroutput> parameter is
  used. This overrides the <emphasis>Log interval...</emphasis> setting in the <emphasis>Configure...</emphasis>
  menu.  If omitted, the configured value is used.  This parameter is ignored when the
  <computeroutput>-L</computeroutput> parameter is omitted and logging is disabled.
</para>
<para>
 The value specified here will affect all facilities except for the IP traffic monitor.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><computeroutput>-q</computeroutput></term>
<listitem><para>
     Previously used to suppress the warning screen when IPTraf is run
     on kernels with IP masquerading. Since the masquerading
     code now processes packets in a way better suited to raw capture,
     this parameter is no longer needed and is retained only for
     compatibility.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><computeroutput>-f</computeroutput></term>
<listitem><para>
     Forces IPTraf to clear all lock files and reset all instance counters
     to zero before running any facilities. IPTraf will then think
     it's the first instance of itself.
</para>
<para>
     The <computeroutput>-f</computeroutput> parameter overrides the
     existing locks and counters imposed by the IPTraf process and
     by the various facilities, causing this instance to think it is the
     first and that there are no other facilities running. Use
     this parameter with great caution. A common use for this parameter is
     to recover from abrupt or abnormal terminations which may leave stale
     locks and counters still lying around.
</para>
<para>
     The <computeroutput>-f</computeroutput> parameter may be used together with the others.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><computeroutput>iptraf -h</computeroutput></term>
<listitem><para>
     displays a short help screen
</para>
</listitem>
</varlistentry>
</variablelist>

<para>
  While the command-line options are case-sensitive, interactive keystroke
  at the IPTraf full-screen interface are not.
</para>
</sect1>

<sect1 id="menus">
<title>Using the Menus</title>
<para>
  Menu items with a trailing ellipsis (<computeroutput>...</computeroutput>) either
  pop up a submenu with further items, or require additional information
  before it can complete the task and return to the menu.
  Menu items without an ellipsis execute immediately.
</para>
<para>
  Use the Up and Down arrow keys on your keyboard to move the selection
  bar. Press Enter to execute the selected item. Alternatively, you can
  also directly press the highlighted letter of the item you want. This
  will immediately execute the option.
</para>
<figure>
<title>The IPTraf Main Menu</title>
<graphic format="png" fileref="iptraf-mmenu">
</figure>
</sect1>
<sect1 id="exiting">
<title>Exiting IPTraf</title>
<para>
  You can exit IPTraf with the Exit command in the main menu.
</para>
<para>
  When started with one of the command-line options to
  directly start a statistical facility, pressing X or Q will exit the
  facility directly, without any confirmation. The
<computeroutput>-t</computeroutput>
  command-line parameter will automatically exit the
  facility after the specified length of time without any confirmation
  as well. Daemon facilities started with the <computeroutput>-B</computeroutput> parameter
  will immediately terminate after being sent a
  USR2 signal. See <link linkend="backop">background
  operation</link> in chapter 9 for more information.
</para>
</sect1>
</chapter>

<chapter id="preparingtouse">
<title>Preparing to Use IPTraf</title>
<para>
This chapter provides information applicable to all of IPTraf's statistical
monitors.
</para>
<sect1 id="numbers">
<title>Number Display Notations</title>
<para>
  IPTraf initially returns exact counts of bytes and packets. However, as they
  grow larger, IPTraf begins displaying them in increasingly higher denominations.
</para>
<para>
  A number standing alone with no suffix represents an exact count. A
  number with a K following is a kilo (thousand) figure. An M,
  G, and T suffix represents mega (million), giga (billion), and
  tera (trillion) respectively. The following table shows examples.
</para>

<table frame="all">
<title>Numeric Display Notations</title>
<tgroup cols="2" align="left" colsep="0" rowsep="0">
<tbody>
<row>
<entry>1024067</entry><entry>exactly 1024067</entry>
</row>
<row>
<entry>1024K</entry><entry>approximately 1024000</entry>
</row>
<row>
<entry>1024M</entry><entry>approximately 1024000000</entry>
</row>
<row>
<entry>1024G</entry><entry>approximately 1024000000000</entry>
</row>
<row>
<entry>1024T</entry><entry>approximately 1024000000000000</entry>
</row>
</tbody>
</tgroup>
</table>

<para>
  These notations apply to both packet and byte counts.
</para>
</sect1>
<sect1 id="instances">
<title>Instances and Logging</title>
<para>
  Since version 2.4, IPTraf allows multiple instances of the
  facilities at the same time in different processes (for example, you can
  now run two or more IP Traffic Monitors at the same time).
  However only one can listen on a specific interface or all interfaces
  at once. The only exception is the general interface
  statistics, which is still restricted to only one instance at a time.
</para>
<para>
  Because of this relaxation, each instance now generates log files with
  unique names for instances, depending on either their instance
  or the interface they're listening on. If the <emphasis>Logging</emphasis> option is turned
  on (see the <link linkend="config">Configuration</link> chapter), IPTraf
  will prompt you for a log file name while presenting a
  default. You may accept this default or change it. Press Enter
  to accept, or Ctrl+X to cancel. Canceling will turn logging off for that
  particular session.
</para>
<para>
  If you don't specify an absolute path, the log file will be placed
  in <filename>/var/log/iptraf</filename>.
</para>
<figure>
<title>The logfile prompt dialog</title>
<graphic format="png" fileref="iptraf-logprompt">
</figure>
<para>
  See the Logging section
in the <link linkend="config">Configuration</link> chapter for
detailed information on logging. See also the documentation on
each statistical facility for the default log file names.
</para>
<para>
  The default log file names will also be used
if the <computeroutput>-B</computeroutput> parameter is used
  to run IPTraf in the background. You can override the defaults with the
  <computeroutput>-L</computeroutput> parameter. See
<link linkend="backop">Background Operation</link> in Chapter 9.
</para>
</sect1>
<sect1 id="updates">
<title>Screen Update Delays</title>
<para>
  Older versions of IPTraf updated the screen as soon as a
  packet was received. However, screen update is one
  of the slowest operations the program performs. Since version 1.3, a
  configuration option has been available to control screen update speed.
</para>
<para>
  See the <emphasis>Screen update interval...</emphasis> configuration option under the
  <link linkend="config">Configuration</link> chapter of this manual.
</para>
</sect1>
<sect1 id="ifaces">
<title>Supported Network Interfaces</title>
<para>
  IPTraf currently supports the following network interface types and names.
</para>
<variablelist>
<varlistentry>
<term><filename>lo</filename></term>
<listitem><para>
     The loopback interface. Every machine has one, and has an IP address
  of 127.0.0.1. <filename>lo</filename> is also indicated if data
  is detected on the
<filename>dummy<replaceable>n</replaceable></filename> interface(s).
</para></listitem>
</varlistentry>
<varlistentry>
<term><filename>eth<replaceable>n</replaceable></filename></term>
<listitem><para>
     An Ethernet interface. <replaceable>n</replaceable> starts from 0.
  Therefore, <filename>eth0</filename> refers to the first
  Ethernet interface, <filename>eth1</filename> to the second, and
  so on. Most machines only have one.
</para></listitem>
</varlistentry>
<varlistentry>
<term><filename>fddi<replaceable>n</replaceable></filename></term>
<listitem><para>
     An FDDI interface. <replaceable>n</replaceable> starts from 0.
</para></listitem>
</varlistentry>
<varlistentry>
<term><filename>tr<replaceable>n</replaceable></filename></term>
<listitem><para>
     A Token Ring interface, where <replaceable>n</replaceable> starts from 0.
</para></listitem>
</varlistentry>
<varlistentry>
<term><filename>ppp<replaceable>n</replaceable></filename></term>
<listitem><para>
     A PPP interface. <replaceable>n</replaceable> starts from 0.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><filename>sli<replaceable>n</replaceable></filename></term>
<listitem><para>
A SLIP interface. <replaceable>n</replaceable> starts from 0.
</para></listitem>
</varlistentry>
<varlistentry>
<term><filename>plip<replaceable>n</replaceable></filename></term>
<listitem><para>
     PLIP interfaces. These are point-to-point IP connections using the PC
     parallel port.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><filename>ipsec<replaceable>n</replaceable></filename></term>
<listitem><para>
     This refers to Free s/WAN (and possibly other) logical VPN interfaces.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><filename>sbni<replaceable>n</replaceable></filename></term>
<listitem><para>
     SBNI long-range modem interfaces
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><filename>dvb<replaceable>n</replaceable></filename>,
<filename>sm200</filename>, <filename>sm300</filename></term>
<listitem><para>
     DVB satellite-receive interfaces
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><filename>wlan<replaceable>n</replaceable></filename>,
<filename>wvlan<replaceable>n</replaceable></filename></term>
<listitem><para>
    Wireless LAN interfaces
</para></listitem>
</varlistentry>
<varlistentry>
<term><filename>tun<replaceable>n</replaceable></filename></term>
<listitem><para>
general logical tunnel interfaces
</para></listitem>
</varlistentry>
<varlistentry>
<term><filename>brg<replaceable>n</replaceable></filename></term>
<listitem><para>
general logical bridge interfaces
</para></listitem>
</varlistentry>
<varlistentry>
<term><filename>hdlc<replaceable>n</replaceable></filename></term>
<listitem><para>
     Frame Relay base (FRAD) interfaces (non-PVC)
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><filename>pvc<replaceable>n</replaceable></filename></term>
<listitem><para>
     Frame Relay Permanent Virtual Circuit interfaces
</para>
</listitem>
</varlistentry>
</variablelist>
<para>
  Your system's network interfaces must be named according
  to the schemes specified above.
</para>
</sect1>
</chapter>
<chapter id="itrafmon">
<title>The IP Traffic Monitor</title>
<para>
  Executing the first menu item or specifying <computeroutput>-i</computeroutput>
  to the <command>iptraf</command> command takes you to the IP traffic monitor. The traffic
  monitor is a real-time monitoring system that intercepts all packets
  on all detected network interfaces, decodes the IP information on all IP packets and
  displays the appropriate information, most notably the
  source and destination addresses. It also
  determines the encapsulated protocol within the IP packet, and
  displays some important information about that as well.
</para>
<para>
  There are two windows in the traffic monitor, both of which can be
  scrolled with the Up and Down cursor keys. Just press W to
  move the <computeroutput>Active</computeroutput> indicator to the window you
  want to control.
</para>
<figure>
<title>The IP traffic monitor</title>
<graphic format="png" fileref="iptraf-iptm1">
</figure>

<sect1 id="upperwin">
<title>The Upper Window</title>
<para>
  The upper window of the traffic monitor displays the currently
  detected TCP
  connections. Information about TCP packets are displayed here. The
  window contains these pieces of information:
</para>

<itemizedlist spacing="compact">
<listitem><para>Source address and port</para></listitem>
<listitem><para>Packet count</para></listitem>
<listitem><para>Byte count</para></listitem>
<listitem><para>Source MAC address</para></listitem>
<listitem><para>Packet Size</para></listitem>
<listitem><para>Window Size</para></listitem>
<listitem><para>TCP flag statuses</para></listitem>
<listitem><para>Interface</para></listitem>
</itemizedlist>

<note> <title>Note</title>
<para> Previous versions of IPTraf showed
  both the source and destination addresses on each line. IPTraf 2 and
higher show
only the <computeroutput><replaceable>source
host</replaceable>:<replaceable>port</replaceable></computeroutput> combination to save
on screen real estate. TCP
  connection endpoints are still indicated with the green
  brackets (on color terminals) along the left edge of the screen.
</para>
</note>

<para>
  The Up and Down cursor keys move an indicator bar between entries in the
  TCP monitor, scrolling the window if necessary. The PgUp and PgDn keys
  display the previous and next screenfuls of entries respectively.
</para>
<para>
  The IP traffic monitor computes the data flow rate
  of the currently highlighted TCP flow and displays it on the lower-right
  corner of the screen. The flow rate is in kilobits or kilobytes per
  second depending on the <emphasis>Activity mode</emphasis> switch
in the <emphasis><link linkend="config">Configure...</link></emphasis> menu.
</para>
<para>
  Because this monitoring system relies solely on packet information, it
  does not determine which endpoint initiated the connection. In other
  words, it does not know which endpoints are the client and server.
  This is necessary because it can operate in promiscuous
  mode, and as such cannot determine the socket statuses for other
  machines on the LAN. However, a little knowledge of the well-known TCP
port numbers can give a good idea about which address is that of the server.
</para>
<para>
  The system therefore displays two entries for each connection, one for
  each direction of the TCP connection. To make it easier to determine the
  direction pairs of each connection, a bracket is used to "join" both
  together. This bracket appears at the leftmost part of each entry.
</para>
<para>
  Just because a host entry appears at the upper end of a
  connection bracket doesn't mean it was the initiator of the connection.
</para>
<para>
  Each entry in the window contains these fields:
</para>

<variablelist>
<varlistentry>
<term><emphasis role="bold">Source address and port</emphasis></term>
<listitem><para>
  The source address and port indicator is
in <replaceable>address</replaceable>:<replaceable>port</replaceable> format.
  This indicates the source machine and TCP port on that machine
  from which this data is coming.
</para>
<para>
  The destination is the host:port at the other end of the bracket.
</para></listitem>
</varlistentry>
<varlistentry>
<term><emphasis role="bold">Packet count</emphasis></term>
<listitem><para>
  The number of packets received for this direction of the TCP connection
</para></listitem>
</varlistentry>
<varlistentry>
<term><emphasis role="bold">Byte count</emphasis></term>
<listitem><para>
  The number of bytes received for this direction
  of the TCP connection. These bytes include total IP and TCP header
  information, in addition to the actual data. Data link
  header (e.g. Ethernet and FDDI) data are not included.
</para></listitem>
</varlistentry>
<varlistentry>
<term><emphasis role="bold">Source MAC address</emphasis></term>
<listitem><para>
  The address of the host on your local LAN that delivered this packet.
  This can be viewed by pressing M once if <emphasis>Source MAC
addrs</emphasis> in traffic
  monitor is enabled in the <emphasis><link linkend="config">Configure...</link></emphasis> menu.
</para></listitem>
</varlistentry>
<varlistentry>
<term><emphasis role="bold">Packet Size</emphasis></term>
<listitem><para>
  The size of the most recently received packet. This item
  is visible if you press M for more TCP information. This is the size
  of the IP datagram only, not including the data link header.
</para></listitem>
</varlistentry>
<varlistentry>
<term><emphasis role="bold">Window Size</emphasis></term>
<listitem><para>
  The advertised window size of the most recently received packet. This
  item is visible if you press M for more TCP information.
</para></listitem>
</varlistentry>
<varlistentry>
<term><emphasis role="bold">Flag statuses</emphasis></term>
<listitem><para>
  The flags of the most recently received packet. 

<variablelist>
<varlistentry>
<term><computeroutput>S</computeroutput></term>
<listitem><para>
     SYN. A synchronization is taking place in preparation for
     connection establishment. If only an <computeroutput>S</computeroutput>
     is present (<computeroutput>S---</computeroutput>) the source is trying
     to initiate a connection. If an <computeroutput>A</computeroutput> is
     also present (<computeroutput>S-A-</computeroutput>), this is an
     acknowledgment of a previous connection request, and is responding.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><computeroutput>A</computeroutput></term>
<listitem><para>
     ACK. This is an acknowledgment of a previously received packet
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><computeroutput>P</computeroutput></term>
<listitem><para>
     PSH. A request to push all data to the top of the receiving queue
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><computeroutput>U</computeroutput></term>
<listitem><para>
     URG. This packet contains urgent data
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><computeroutput>RESET</computeroutput></term>
<listitem><para>
     RST. The source machine indicated in this direction reset the entire connection. The direction entries for reset connections become available for new connections.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><computeroutput>DONE</computeroutput></term>
<listitem><para>
     The connection is done sending data in this direction, and has sent a FIN (finished) packet, but has not yet been acknowledged by the other host.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><computeroutput>CLOSED</computeroutput></term>
<listitem><para>
     The FIN has been acknowledged by the other host. When both directions of a connection are marked CLOSED, the entries they occupy become available for new connection entries.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><computeroutput>-</computeroutput></term>
<listitem><para>
     The flag is not set
</para></listitem>
</varlistentry>
</variablelist>
</para></listitem>
</varlistentry>
</variablelist>

<para>
  Some other pieces of information can be viewed as well. The M key
  displays more TCP information. Pressing M once
  displays the MAC addresses of the LAN hosts
  that delivered the packets (if the <emphasis>Source MAC addrs in traffic
monitor</emphasis>
  option is enabled in the <emphasis><link linkend="config">Configure...</link></emphasis>
menu). <computeroutput>N/A</computeroutput> is displayed if
  no packets have been received from the source yet, or if the interface
  doesn't support MAC addresses (such as PPP interfaces).
</para>
<para>
  If the <emphasis>Source MAC addrs in traffic monitor</emphasis> option is not enabled,
  pressing M simply toggles between the counts and the packet and window
  sizes.
</para>
<para>
  By default, only IP addresses are displayed, but if you have access to a
  name server or host table, you may enable reverse lookup for the
  IP addresses. Just enable reverse lookup
in the <emphasis><link linkend="config">Configure...</link></emphasis> menu.
</para>

<sidebar>
<title>The rvnamed Process</title>
<para>
  The IP traffic monitor starts a daemon called
  <command>rvnamed</command> to help speed
  up reverse lookups without sacrificing too much keyboard control and
  accuracy of the counts. While reverse lookup is being conducted in the
  background, IP addresses will be used until the resolution is complete.
</para>
<para>
  If for some reason <command>rvnamed</command> cannot start (probably due to
  improper installation or lack of memory), and you are
  on the Internet, and you enable reverse lookup, your
  keyboard control can become very slow. This is because the standard
  lookup functions do not return until they have completed their
  tasks, and it can take several seconds for a name resolution
  in the foreground to complete.
</para>
<para>
  <command>rvnamed</command> will spawn up to 200 children to process reverse DNS queries.
</para>
</sidebar>

<tip>
<title>Tip</title>
<para>If you notice unusual SYN activity (too many
initial (<computeroutput>S---</computeroutput>) but frozen SYN entries, or rapidly
increasing initial SYN packets for a single connection), you may
be under a SYN flooding attack or TCP port scan. Apply appropriate measures, or the
targeted machines may begin denying network services.
</para>
</tip>

<para>
  Entries not updated within a user-configurable amount of
  time may get replaced with new connections. The default time is 15
  minutes. This is regardless of whether the connection is closed or
  not. (Some unclosed connections may be due to extremely slow links
  or crashes at either end of the connection.) This figure can be changed
  at the <emphasis><link linkend="config">Configure...</link></emphasis> menu.
</para>
<para>
  Some early entries may have a &gt; symbol in front of its packet
  count. This means the connection was already established
  when the monitor started. In other words, the figures indicated do not
  reflect the counts since the start
  of the TCP connection, but rather, since the start of the traffic
  monitor. Eventually, these &gt; entries will close (or time out) and
  disappear. TCP entries without the >
  were initiated after the traffic monitor started, and the counts
  indicate the totals of the connection itself.  Just consider entries
  with &gt; partial.
</para>
<para>
  Some &gt entries may go idle if the traffic monitor was started
  when these connections were already half-closed (FIN sent
  by one host, but data still being sent by the other). This
  is because the traffic monitor cannot determine if a
  connection was already half-closed when it started. These entries will
  eventually time out. (To minimize these entries, an entry is not added
  by the monitor until a packet with data or a SYN packet is received.)
</para>
<para>
  Direction entries also become available for reuse if an ICMP Destination
  Unreachable message is received for the connection.
</para>
<para>
  The lower part of the screen contains a summary line showing the IP,
  TCP, UDP, ICMP, and non-IP byte counts since the start of the
  monitor. The IP, TCP, UDP, and ICMP counts include only the IP
  datagram header and data, not the data-link headers. The
  non-IP count includes the data-link headers.
</para>

<note>
<title>
  Technical note: IP Forwarding and Masquerading
</title>
<para>
  Previous versions of IPTraf issued a warning if the kernel had
  IP masquerading enabled due to the way the
  kernel masqueraded and translated the IP addresses. The new kernels no
  longer do it as before and IPTraf now gives output properly on
  masquerading machines. The <computeroutput>-q</computeroutput> parameter is no
  longer required to suppress the warning screen.
</para>
<para>
  On forwarding (non-masquerading)
  machines packets and TCP connections simply appear twice, one
  each for the incoming and outgoing interfaces if all interafaces
  are being monitored.
</para>
<para>
  On masquerading machines, packets and connections from the
  internal network to the external network also appear
  twice, one for the internal and external interface. Packets coming
  from the internal network will be indicated as coming from the internal
  IP address that sourced them, and also as coming from the IP address
  of the external interface on your masquerading machine. In much the same
  way, packets coming in from the external network will look
  like they're destined for the external interface's IP address, and again
  as destined for the final host on the internal network.
</para>
</note>

<sect2>
  <title>Closed/Idle/Timed Out Connections</title>
<para>
  A TCP connection entry that closes, gets reset, or stays idle too long
  normally gets replaced with new connections. However,
  if there are too many of these, active connections may become
  interspersed among closed, reset, or idle entries.
</para>
<para>
  IPTraf can be set to automatically remove all closed, reset, and
  idle entries with the <emphasis>TCP closed/idle
  persistence...</emphasis> configuration option. You can also press the F key to
  immediately clear them at any time.
</para>

<note>
  <title>Note</title>
<para>
The <emphasis>TCP timeout...</emphasis> option only tells
IPTraf how long it should take before a connection should be considered
idle and open to replacement by new connections. This
does not determine how long it remains on-screen. The <emphasis>TCP closed/idle
persistence...</emphasis> parameter flushes entries that have been idle for the
number of minutes defined by the <emphasis>TCP timeout...</emphasis> option.
</para> </note>
</sect2>
<sect2>
<title>Sorting TCP Entries</title>
<para>
  The TCP connection entries can be sorted by pressing the S key, then
  by selecting a sort criterion. Pressing S will display a box showing the
  available sort criteria. Press P to sort by packet count, B to sort by
  byte count. Pressing any other key cancels the sort.
</para>
<para>
  The sort operation compares the larger values in each connection entry
  pair and sorts the counts in descending order.
</para>
<para>
  Over time, the entries will go out of order as counts proceed at varying
  rates. Sorting is not done automatically so as not to degrade performance
and accuracy.
</para>
<figure>
<title>The IP traffic monitor sort criteria</title>
<graphic format="png" fileref="iptraf-iptmsort">
</figure>
</sect2>
</sect1>
<sect1 id="lowerwin">
<title>Lower Window</title>
<para>
  The lower window displays information about the other types of traffic
  on your network. The following protocols are detected internally:
</para>
<itemizedlist spacing="compact">
<listitem><para>User Datagram Protocol (UDP)</para></listitem>

<listitem><para>Internet Control Message Protocol (ICMP)</para></listitem>

<listitem><para>Open Shortest-Path First (OSPF)</para></listitem>

<listitem><para>Interior Gateway Routing Protocol (IGRP)</para></listitem>

<listitem><para>Interior Gateway Protocol (IGP)</para></listitem>

<listitem><para>Internet Group Management Protocol (IGMP)</para></listitem>

<listitem><para>General Routing Encapsulation (GRE)</para></listitem>

<listitem><para>Layer 2 Tunneling Protocol (L2TP)</para></listitem>

<listitem><para>IPSec AH and ESP protocols (IPSec AH and IPSec ESP)</para></listitem>

<listitem><para>Address Resolution Protocol (ARP)</para></listitem>

<listitem><para>Reverse Address Resolution Protocol (RARP)</para></listitem>
</itemizedlist>

<para>
  Other IP protocols are looked up from the <filename>/etc/services</filename>
  file.  If <filename>/etc/services</filename> doesn't contain information about
  that protocol, the protocol number is indicated.
</para>
<para>
 Non-IP packets are indicated as
<computeroutput>Non-IP</computeroutput> in the lower window.
</para>

<note>
<title>Note</title>
<para>The source and destination addresses for ARP and
RARP entries are MAC addresses.
</para>
<para>
  Strictly speaking, ARP and RARP packets aren't IP packets, since
  they are not encapsulated in an IP datagram. They're
  just indicated because they are integral to proper IP operation on LANs.
</para>
</note>

<para>
  For all packets in the lower window, only the first IP fragment is
  indicated (since that contains the header
  of the IP-encapsulated protocol) but with no further information
  from the encapsulated protocol.
</para>
<para>
UDP packets are also displayed
in
<computeroutput><replaceable>address</replaceable>:<replaceable>port</replaceable>
</computeroutput> format while ICMP entries also contain the
ICMP message type. For easier location, each type of protocol
is color-coded (only on color terminals such as the Linux console).
</para>

<variablelist>
<varlistentry><term>UDP</term><listitem><para>Red on White</para></listitem></varlistentry>
<varlistentry><term>ICMP</term><listitem><para>Yellow on Blue</para></listitem></varlistentry>
<varlistentry><term>OSPF</term><listitem><para>Black on Cyan</para></listitem></varlistentry>
<varlistentry><term>IGRP</term><listitem><para>Bright white on Cyan</para></listitem></varlistentry>
<varlistentry><term>IGP</term><listitem><para>Red on Cyan</para></listitem></varlistentry>
<varlistentry><term>IGMP</term><listitem><para>Bright green on Blue</para></listitem></varlistentry>
<varlistentry><term>GRE</term><listitem><para>Blue on white</para></listitem></varlistentry>
<varlistentry><term>ARP</term><listitem><para>Bright white on Red</para></listitem></varlistentry>
<varlistentry><term>RARP</term><listitem><para>Bright white on Red</para></listitem></varlistentry>
<varlistentry><term>Other IP</term><listitem><para>Yellow on red</para></listitem></varlistentry>
<varlistentry><term>Non-IP</term><listitem><para>Yellow on Red</para></listitem></varlistentry>
</variablelist>

<para>
  The lower window can hold up to 512 entries. You can
  scroll the lower window by using the W key to move the Active indicator
  to it, and by using the Up and Down cursor keys. The lower
  window automatically scrolls every time a new entry is added, and either
  the first entry or last entry is visible. Upon reaching 512 entries, old
  entries are thrown out as new entries are added.
</para>
<para>
  Some entries may be too long to completely fit in a screen line. You can
  use the Left and Right cursor keys to vertically scroll the lower window
  when it is marked <computeroutput>Active</computeroutput>. If your
terminal can be resized (e.g. xterm), you may do so before starting
IPTraf.
</para>
<para>
  Entries for packets received on LAN interfaces also include the
  source MAC address of the LAN host which delivered it. This behavior
  is enabled by turning on the Source MAC addrs in traffic monitor toggle
  in the <emphasis><link linkend="config">Configure...</link></emphasis> menu.
</para>

<sect2>
<title>Entry Details</title>
<para>
  In general, the entries in the lower window indicate the protocol, the
  IP datagram size (full frame size for non-IP, including ARP and
  RARP), the source address, the destination
  address, and the network interface the packet was detected on.
  However, some protocols have a little more information.
</para>
<sect3>
<title>ICMP</title>
<para>
  ICMP entries are displayed in this format:
</para>
<synopsis>
ICMP <replaceable>type</replaceable> [(<replaceable>subtype</replaceable>)] (<replaceable>size</replaceable> bytes) from <replaceable>source</replaceable> to <replaceable>destination</replaceable>
[(src HWaddr <replaceable>srcMACaddress</replaceable>)] on <replaceable>interface</replaceable>
</synopsis>
<para>
  where type could be any of the following:
</para>

<variablelist>
<varlistentry>
<term><computeroutput>echo req, echo rply</computeroutput></term>
<listitem><para>
     ICMP echo request and reply. Usually used by the ping program and other network monitoring and diagnostic program. 
</para></listitem></varlistentry>
<varlistentry>
<term><computeroutput>dest unrch</computeroutput></term>
<listitem><para>
     ICMP destination unreachable. Something failed to reach its target. The dest unreach type is supplemented with a further indicator of the problem. Destination unreachable messages for TCP traffic causes the corresponding TCP entry in the upper
     window to be made available for reuse by new connections. 
</para></listitem></varlistentry>
<varlistentry>
<term><computeroutput>redirct</computeroutput></term>
<listitem><para>
     ICMP redirect. Usually generated by a router to tell a host that a better gateway is available. 
</para></listitem></varlistentry>
<varlistentry>
<term><computeroutput>src qnch</computeroutput></term>
<listitem><para>
     The ICMP source quench is used to stop a host from transmitting. It's a
flow control mechanism for IP. 
</para></listitem></varlistentry>
<varlistentry>
<term><computeroutput>time excd</computeroutput></term>
<listitem><para>
     Indicates a packet's time-to-live value expired before it got
to its destination. Mostly happens if a destination is too far away.
Also used by the traceroute program.
</para></listitem></varlistentry>
<varlistentry>
<term><computeroutput>router adv</computeroutput></term>
<listitem><para>
     ICMP router advertisement 
</para></listitem></varlistentry>
<varlistentry>
<term><computeroutput>router sol</computeroutput></term>
<listitem><para>
     ICMP router solicitation 
</para></listitem></varlistentry>
<varlistentry>
<term><computeroutput>timestmp req</computeroutput></term>
<listitem><para>
     ICMP timestamp request
</para></listitem></varlistentry>
<varlistentry>
<term><computeroutput>timestmp rep</computeroutput></term>
<listitem><para>
     ICMP timestamp reply 
</para></listitem></varlistentry>
<varlistentry>
<term><computeroutput>info req</computeroutput></term>
<listitem><para>
     ICMP information request 
</para></listitem></varlistentry>
<varlistentry>
<term><computeroutput>info rep</computeroutput></term>
<listitem><para>
     ICMP information reply 
</para></listitem></varlistentry>
<varlistentry>
<term><computeroutput>addr mask req</computeroutput></term>
<listitem><para>
     ICMP address mask request 
</para></listitem></varlistentry>
<varlistentry>
<term><computeroutput>addr mask rep</computeroutput></term>
<listitem><para>
     ICMP address mask reply 
</para></listitem></varlistentry>
<varlistentry>
<term><computeroutput>param prob</computeroutput></term>
<listitem><para>
     ICMP parameter problem 
</para></listitem></varlistentry>
<varlistentry>
<term><computeroutput>bad/unknown</computeroutput></term>
<listitem><para>
     An unrecognized ICMP packet was received, or the packet is corrupted.
</para></listitem></varlistentry>
</variablelist>
<para>
  The destination unreachable message also includes information on the
  type of error encountered. Here are the destination unreachable codes:
</para>

<variablelist>
<varlistentry>
<term><computeroutput>ntwk</computeroutput></term>
<listitem><para>
     network unreachable 
</para></listitem></varlistentry>
<varlistentry>
<term><computeroutput>host</computeroutput></term>
<listitem><para>
     host unreachable 
</para></listitem></varlistentry>
<varlistentry>
<term><computeroutput>proto</computeroutput></term>
<listitem><para>
     protocol unreachable 
</para></listitem></varlistentry>
<varlistentry>
<term><computeroutput>port</computeroutput></term>
<listitem><para>
     port unreachable 
</para></listitem></varlistentry>
<varlistentry>
<term><computeroutput>pkt fltrd</computeroutput></term>
<listitem><para>
     packet filtered (normally by an access rule on a router or firewall) 
</para></listitem></varlistentry>
<varlistentry>
<term><computeroutput>DF set</computeroutput></term>
<listitem><para>
     the packet has to be fragmented somewhere, but its don't fragment
     (DF) bit is set.
</para></listitem></varlistentry>
<varlistentry>
<term><computeroutput>src rte fail</computeroutput></term>
<listitem><para>
     source route failed 
</para></listitem></varlistentry>
<varlistentry>
<term><computeroutput>src isltd</computeroutput></term>
<listitem><para>
     source isolated (obsolete) 
</para></listitem></varlistentry>
<varlistentry>
<term><computeroutput>net comm denied</computeroutput></term>
<listitem><para>
     network communication denied 
</para></listitem></varlistentry>
<varlistentry>
<term><computeroutput>host comm denied</computeroutput></term>
<listitem><para>
     host communication denied 
</para></listitem></varlistentry>
<varlistentry>
<term><computeroutput>net unrch for TOS</computeroutput></term>
<listitem><para>
     network unreachable for specified IP type-of-service 
</para></listitem></varlistentry>
<varlistentry>
<term><computeroutput>host unrch for TOS</computeroutput></term>
<listitem><para>
     host unreachable for specified IP type-of-service 
</para></listitem></varlistentry>
<varlistentry>
<term><computeroutput>prec violtn</computeroutput></term>
<listitem><para>
     precedence violation 
</para></listitem></varlistentry>
<varlistentry>
<term><computeroutput>prec cutoff</computeroutput></term>
<listitem><para>
     precedence cutoff 
</para></listitem></varlistentry>
<varlistentry>
<term><computeroutput>dest net unkn</computeroutput></term>
<listitem><para>
     destination network unknown 
</para></listitem></varlistentry>
<varlistentry>
<term><computeroutput>dest host unkn</computeroutput></term>
<listitem><para>
     destination network unknown
</para></listitem></varlistentry>
</variablelist>

<para>
  For more information on ICMP, see RFC 792.
</para>
</sect3>

<sect3>
<title>OSPF</title>

<para>
OSPF messages also include a little more information. The format of an
OSPF message in the window is:
</para>

<synopsis>
OSPF <replaceable>type</replaceable> (a=<replaceable>area</replaceable> r=<replaceable>router</replaceable>) (<replaceable>size</replaceable>bytes) from <replaceable>source</replaceable> to <replaceable>destination</replaceable>
[(src HWaddr <replaceable>srcMACaddress</replaceable>)] on <replaceable>interface</replaceable>
</synopsis>

<para>
  The type can be one of the following:
</para>

<variablelist>
<varlistentry>
<term><computeroutput>hlo</computeroutput></term>
<listitem><para>
     OSPF hello. Hello messages establish OSPF communications and keep routers informed of each other's presence. 
</para></listitem></varlistentry>
<varlistentry>
<term><computeroutput>DB desc</computeroutput></term>
<listitem><para>
     OSPF Database Description 
</para></listitem></varlistentry>
<varlistentry>
<term><computeroutput>LSR</computeroutput></term>
<listitem><para>
     OSPF Link State Request 
</para></listitem></varlistentry>
<varlistentry>
<term><computeroutput>LSU</computeroutput></term>
<listitem><para>
     OSPF Link State Update. Messages indicating the states of the OSPF network links 
</para></listitem></varlistentry>
<varlistentry>
<term><computeroutput>LSA</computeroutput></term>
<listitem><para>
     OSPF Link State Acknowledgment
</para></listitem></varlistentry>
</variablelist>
<para>
  The entries in parentheses:
</para>
<variablelist>
<varlistentry>
<term><computeroutput>a=<replaceable>area</replaceable></computeroutput></term>
<listitem><para>
     The area number of the OSPF message
</para></listitem></varlistentry>
<varlistentry>
<term><computeroutput>r=<replaceable>router</replaceable></computeroutput></term>
<listitem><para>
     The IP address of the router that generated the message. It
     is not necessarily the same as the source address
     of the encapsulating IP packet.
</para></listitem></varlistentry>
</variablelist>

<para>
  Many times, the destination addresses for OSPF packets are class D
  multicast addresses in standard dotted decimal notation or (if reverse
  lookup is enabled), hosts under the <computeroutput>MCAST.NET</computeroutput> domain. Such multicast
  addresses are defined as follows:
</para>

<variablelist>
<varlistentry>
<term><computeroutput>224.0.0.5 (OSPF-ALL.MCAST.NET)</computeroutput></term>
<listitem><para>OSPF all routers</para></listitem></varlistentry>
<varlistentry>
<term><computeroutput>224.0.0.6 (OSPF-DSIG.MCAST.NET)</computeroutput></term>
<listitem><para>OSPF all designated routers</para></listitem></varlistentry>
</variablelist>

<para>
  See RFC 1247 for details on the OSPF protocol.
</para>
</sect3>
</sect2>
</sect1>
<sect1>
<title>Additional Information</title>
<para>
  When started from the main menu and logging is enabled, the IP traffic
  monitor prompts you for a log file name. The default name is
<filename>ip_traffic-<replaceable>n</replaceable>.log (where
<replaceable>n</replaceable></filename> is what
  instance of the traffic monitor this is (1, 2, 3, and so on). (e.g. if
  this is the first instance, the default file name will
  be <filename>ip_traffic-1.log</filename>.)
</para>
<para>
  When started with the <computeroutput>-i</computeroutput> parameter,
  the log filename can be specified with the <computeroutput>-L</computeroutput>
  parameter. See the <link linkend="cmdline">Command-line Parameters</link>
  section above for more information.
</para>
<para>
On busy networks, the display may become cluttered with traffic you're not
interested in.  To control the traffic monitor's output, you can apply a
<emphasis>filter</emphasis>.  See Chapter 7, <link
linkend="filters">Filters</link> for more information on IPTraf's filters.
</para>
<para>
  At any time, you can press X or Q to return to the main menu (or back to
  the shell if the monitor was started with <command>iptraf -i</command>).
</para>
</sect1>
</chapter>

<chapter id="netstats">
<title>Network Interface Statistics</title>
<para>
There are two network interface
statistics facilities: the general interface statistics, which
displays a statistical summary of all attached interfaces, and the
detailed interface statistics, which shows  more statistical and
load information about a single selected interface.
</para>
<sect1 id="genstats">

<title>General Interface Statistics</title>
<para>
  The second menu option displays a list of
  attached network interfaces, and some general
  packet counts. Specifically, it displays counts of IP, non-IP, and bad
  IP packets (packets with IP checksum errors). It also includes an
  activity indicator, which shows the number of kilobits and packets the
  interface sees per second. All figures are for incoming and outgoing
  packets. (Again, considering promiscuous
  mode for LAN interfaces, which simply causes the machine
  to intercept all packets). This is useful for general monitoring
  of all attached interfaces. If byte counts and
  additional information are needed for a specific interface, the <emphasis>Detailed
  interface statistics</emphasis> option is also available.
</para>
<para>
  The activity indicators can be toggled between kbits/s and kbytes/s with
  the <emphasis>Activity mode</emphasis> configuration option.
</para>
<para>
  The general statistics window will dynamically add new entries
  as packets from newly-created interfaces (e.g. new PPP interfaces) are
  intercepted. Long lists can be scrolled with the Up, Down, PgUp, and
  PgDn keys.
</para>
<para>
This monitor is affected by IPTraf's <link
linkend="filters">filters</link> as described in Chapter 7.
</para>
<para>
  Copies of the statistics are written to the log file
  <filename>iface_stats_general.log</filename> at regular intervals if logging is
  enabled. See the <emphasis>Logging</emphasis>
option int the <link linkend="config">Configuration</link> chapter.
</para>
<para>
  This facility can be started directly from the command line with the
  <command>-g</command> option to the <command>iptraf</command> command.
  When started from the command line, the log filename and log interval can be
  specified with the <computeroutput>-L</computeroutput> and <computeroutput>-I</computeroutput>
  parameters respectively.  See the <link linkend="cmdline">Command-line Parameters</link>
  section above for more information.
</para>
<figure>
<title>The general interface statistics screen</title>
<graphic format="png" fileref="iptraf-gstat1">
</figure>
<para>
  You can press X or Q to return to the main menu. 
</para>
</sect1>
<sect1 id="detstats">
<title>Detailed Interface Statistics</title>
<para>
  The third menu option displays packet statistics for any
  selected interface. It provides basically the same information
  as the <emphasis>General interface statistics</emphasis>
   option, with additional details.
  This facility provides the following information:
</para>
<itemizedlist spacing="compact" mark="bullet">
<listitem><para>
   Total packet and byte counts
</para></listitem>
<listitem><para>
   IP packet and byte counts
</para></listitem>
<listitem><para>
   TCP packet and byte counts
</para></listitem>
<listitem><para>
   UDP packet and byte count
</para></listitem>
<listitem><para>
   ICMP packet and byte counts
</para></listitem>
<listitem><para>
   Other IP-type packet and byte counts
</para></listitem>
<listitem><para>
   Non-IP packet and byte counts
</para></listitem>
<listitem><para>
   Checksum error count
</para></listitem>
<listitem><para>
   Interface activity
</para></listitem>
<listitem><para>
    Broadcast packet and byte counts
</para></listitem>
</itemizedlist>
<para>
  All IP byte counts (IP, TCP, UDP, ICMP, other IP) include IP header data
  and payload. The data link header is not included. The full frame length
  (including data-link header) is included in the non-IP and Total
  byte count.  All data-link headers are also included in the Total byte
  counts.
</para>
<figure>
<title>The detailed interface statistics screen</title>
<graphic format="png" fileref="iptraf-dstat1">
</figure>
<para>
 The upper portion of the screen
  contains the packet and byte counts for all IP and
  non-IP packets intercepted on the interface. The lower portion
  contains the total, incoming, and outgoing interface data rates.
</para>
<para>
  This facility also displays incoming and outgoing counts and data rates.
  The packet size breakdown in versions prior to 2.0.0 has been moved
  to its own facility under <emphasis>Statistical breakdowns.../By packet
  size</emphasis> as described in <link linkend="pktsize">Chapter 5</link>.
</para>
<para>
  An outgoing packet is one that exits your interface, regardless
  of whether it originated from your machine or came
  from another machine and was routed through yours. An incoming packet is
  one that enters your interface, either addressed
  to you directly, broadcast, multicast, or captured promiscuously.
</para>
<para>
  The rate indicators can be set to display kbits/s or kbytes/s with the
  <emphasis>Activity mode</emphasis> configuration option.
</para>

<note>
  <title>Note</title>
  <para>
  Buffering and some other factors may affect the data rates, notably
  the outgoing rate, causing it to reflect a higher figure than the actual
  rate at which the interface is sending.
</para>
</note>
<para>
  The figures are logged at regular intervals if logging is enabled. The
  default log file name at the prompt is
  <filename>iface_stats_detailed-<replaceable>iface</replaceable>.log</filename>
  where iface is the selected interface for this session (for example,
  <filename>iface_stats_detailed-eth0.log</filename>).
</para>
<para>
  If you wish to start this facility directly
  from the command line, you can specify the
<computeroutput>-d</computeroutput> parameter and an interface
  to monitor. For example,
</para>
<synopsis>
iptraf -d eth0
</synopsis>
<para>
  starts the statistics for <filename>eth0</filename>. The interface must be specified, or
  IPTraf will not start the facility.
</para>
<para>
  When started from the command line, the log filename and log interval can be
  specified with the <computeroutput>-L</computeroutput> and <computeroutput>-I</computeroutput>
  parameters respectively.  See the <link linkend="cmdline">Command-line Parameters</link>
  section above for more information.
</para>
<note>
  <title>Note</title>
  <para>
  In both the general and detailed statistics screens, as well as
  in the IP traffic monitor, the packet counts are for
  actual network packets (layer 2), not the logical IP packets (layer 3)
  that may be reconstructed after fragmentation. That means, if a
  packet was fragmented into four pieces, and these four fragments pass
  over your interface, the packet counts will indicate four separate
  packets.
  </para>
</note>
<para>
  The figure for the IP checksum errors is a packet count only, because the
  corrupted IP header cannot be relied upon to give a correct IP
  packet length value.
</para>
<para>
 This facility's output is also affected by IPTraf's <link
linkend="filters">filters</link>.  See Chapter 7 for more information
on filters.
</para>
<para>
  Pressing X or Q takes you back to the main menu (if this
  facility was started with the command-line option, X or Q drops you back
  to the shell).
</para>
</sect1>
</chapter>

<chapter id="statbreakdowns">
<title>Statistical Breakdowns</title>
<para>
  Statistical breakdowns contain two facilities that break
  down traffic counts by either packet size or TCP/UDP port.
</para>
<sect1 id="pktsize">
<title>Packet Sizes</title>

<para>
  The packet size breakdown facility used to be incorporated
  into the detailed interface statistics. It has since been moved
  to its own facility. It is entered
  by selecting <emphasis>Statistical Breakdowns/By packet size</emphasis>.
</para>
<para>
  The packet size breakdown takes the interface's Maximum Transmission
  Unit (MTU) size and divides it into 20 brackets, each bracket
  containing a range of sizes. As a packet is captured, its size
  is determined and the appropriate bracket is incremented.
</para>
<para>
  This facility provides an idea as to the packet sizes passing over
  your network, and can aid in network (re)design decisions.
</para>
<figure>
<title>The packet size statistical breakdown</title>
<graphic format="png" fileref="iptraf-pktsize">
</figure>
<para>
  If logging is enabled, copies of the statistics are written at regular
  intervals to a log file. The default log file name
  is
  <filename>packet_size-<replaceable>iface</replaceable>.log</filename> where
  <replaceable>iface</replaceable>   
  is the selected interface for this session (for example,
  <filename>packet_size-eth0.log</filename>).
</para>
<para>
IPTraf's filters do not affect this facility.
</para>
<para>
  The packet size breakdown can also be invoked straight
  from the command line by specifying the <computeroutput>-z</computeroutput> iface
  parameter. The interface parameter is required. For example,
  this command runs the facility on interface <filename>eth0</filename>.
</para>
<synopsis>
iptraf -z eth0
</synopsis>
<para>
  When started from the command line, the log filename and log interval can be
  specified with the <computeroutput>-L</computeroutput> and <computeroutput>-I</computeroutput>
  parameters respectively.  See the <link linkend="cmdline">Command-line Parameters</link>
  section above for more information.
</para>
<para>
  To exit, press X or Ctrl+X.
</para>
</sect1>

<sect1 id="servmon">
<title>TCP and UDP Traffic Statistics</title>
<para>
  IPTraf also includes a facility that generates statistics on TCP and UDP
  traffic. This facility displays counts of all TCP and UDP packets with
  source or destination ports numbered less than 1024. Ports 1 to 1023 are
  reserved for the TCP/IP application protocols (well-known ports).
</para>
<figure>
<title>The TCP/UDP service monitor</title>
<graphic format="png" fileref="iptraf-tcpudp">
</figure>
<para>
  The statistics window indicates the protocol (TCP or UDP), the
  port number, the total packets and bytes counted for this particular
  protocol/port combination, the packets and bytes destined for that
  protocol and port, and the packets and bytes coming
  from that protocol and port.
</para>
<para>
  Byte counts include the IP header and payload only. The data link header
  is not included.
</para>
<para>
  The protocol/port indicators are color-coded for easier identification
  on color terminals. TCP indicators are in yellow, UDP in bright green.
</para>
<para>
  Some network applications or protocols may use port numbers higher
  than 1023. Examples
  of these include application proxy servers (HTTP proxy servers typically
  use values like 8000, 8080, 8888, and the like), and IRC
  (IRC servers commonly accept connections on ports 6660 to 6669). These
  ports are by default not included in the counts. If you do want
  to include a higher-numbered port in the statistics, you can add
  them yourself from the <emphasis><link linkend="config">Configure...</link>/Additional ports...</emphasis> 
  menu item. See the section below.
</para>
<para>
  If logging is enabled, The statistics are also written to a log file
  (the default name is
<filename>tcp_udp_services-<replaceable>iface</replaceable>.log</filename>, where iface
  is the selected interface (for example,
<filename>tcp_udp_services-eth0.log</filename>).
</para>
<para>
  IPTraf computes the total, incoming, outgoing, and data rates of the
  protocol currently indicated by the facility's highlight bar. The data
  rates are indicated at the bottom of the screen. If logging is
  enabled, the average data rates since the start of the facility are
  placed in the log file.
</para>
<para>
  The Up and Down cursor keys move the highlight bar. Pressing X or Ctrl+X
  exits and returns to the main menu (or the shell if it was started
  from the command line).
</para>

<sect2>
  <title>Sorting TCP/UDP Entries</title>
<para>
  Pressing the S key brings up a window which allows you to
  select the field by which the entries will be sorted. You can press R to
  sort by port, P to sort by total packets, B to sort by total bytes, T to
  sort by incoming packets (packets to), O to sort by incoming bytes
  (bytes to), F to sort by outgoing packets (packets from) and M to sort
  by outgoing bytes (bytes from). Pressing any other key cancels the sort.
</para>
<para>
  Port numbers are sorted in ascending order (least first) but
  statistics are sorted in descending order (largest counts first).
</para>
<para>
  As with the IP traffic monitor, sorting is performed only with
  this sequence. Automatic sorting is not performed so as not to
  affect performance.
</para>
<figure>
<title>The TCP/UDP monitor's sort criteria</title>
<graphic format="png" fileref="iptraf-tcpudpsort">
</figure>
</sect2>
<sect2>
<title>Additional Information</title>
<para>
IPTraf's filters affect the output of this facility.  See Chapter 7, <link
linkend="filters">Filters</link> for more information about filters.
</para>
<para> 
   If you wish to start this facility from the command line, you can
  use the <computeroutput>-s</computeroutput> option followed by an interface to monitor. For example,
</para>
<synopsis>
iptraf -s eth0
</synopsis>
<para>
  brings up this module for traffic on
  <filename>eth0</filename>. The interface must be specified, or
  IPTraf will drop back to the shell.
</para>
<para>
  When started from the command line, the log filename and log interval can be
  specified with the <computeroutput>-L</computeroutput> and <computeroutput>-I</computeroutput>
  parameters respectively.  See the <link linkend="cmdline">Command-line Parameters</link>
  section above for more information.
</para>
</sect2>
</sect1>
</chapter>

<chapter id="hostmon">
<title>LAN Station Statistics</title>
<para>
  The LAN station monitor (Ethernet station monitor on versions prior to
  1.3.0) discovers MAC addresses and displays statistics on the number
  of incoming, and outgoing packets. It also includes figures for incoming
  and outgoing kilobits per second for each discovered station.
</para>
<para>
  The entry above each line of statistics is the station's LAN
  type (Ethernet, PLIP, Token Ring, or FDDI) and the hardware MAC address.
  Each statistics line consists of the following information:
</para>

<itemizedlist spacing="compact" mark="bullet">
<listitem><para>Total packets incoming</para></listitem>

   <listitem><para>IP packets incoming</para></listitem>

   <listitem><para>Total bytes incoming</para></listitem>

   <listitem><para>Incoming rate</para></listitem>

   <listitem><para>Total packets outgoing</para></listitem>

   <listitem><para>IP packets outgoing</para></listitem>

   <listitem><para>Total bytes outgoing</para></listitem>

   <listitem><para>Outgoing rate</para></listitem>
</itemizedlist>
<para>
  The byte counts include the data link header. The activity
  indicators can be set to display kbits/s or kbytes/s with the <emphasis>Activity
  mode</emphasis> configuration option.
</para>
<para>
  This facility works only for Ethernet, PLIP, Token Ring, and
  FDDI frames. Loopback. ISDN, and SLIP/PPP networks are not monitored here.
</para>
<figure>
<title>The LAN station monitor</title>
<graphic format="png" fileref="iptraf-hw">
</figure>
<para>
  Copies of the statistics are written to a log file at regular intervals
  if logging is enabled. The default log file name
  is <filename>lan_statistics-<replaceable>n</replaceable>.log</filename>, where n is the instance number of this facility
  (for example, if this is the first instance, the generated default log
  file name is <filename>lan_statistics-1.log</filename>).
</para>
<sect1 id="sortinglan">
  <title>Sorting the LAN Station Monitor Entries</title>
<para>
  Press S to sort the entries. A box will pop up and display the
  keys you can press to select the field by which the entries will
  be sorted. Press P to sort by total incoming packets, I to sort by
  incoming IP packets, B to sort by total incoming bytes, K to sort
  by total outgoing packets, O to sort by outgoing IP packets, and Y to
  sort by total outgoing bytes. Pressing any other key cancels the sort.
</para>
<figure>
<title>The LAN station monitor's sort criteria</title>
<graphic format="png" fileref="iptraf-hwsort"
</figure>
<para>
  When started from the command line, the log filename and log interval can be
  specified with the <computeroutput>-L</computeroutput> and <computeroutput>-I</computeroutput>
  parameters respectively.  See the <link linkend="cmdline">Command-line Parameters</link>
  section above for more information.
</para>
</sect1>
<sect1 id="morelanmoninfo">
<title>Additional Information</title>
<para>
   The window can be scrolled with the Up and Down cursor keys. Press X
   or Q to return to the main menu (or the shell if this
   facility was started with the <computeroutput>-l</computeroutput> command-line option).
</para>
<para>
The output of this facility is affected by any applied IPTraf filter.
</para>
</sect1>
</chapter>

<chapter id="filters">
  <title>Filters</title>

<para>
  Filters are used to control the information displayed by all facilities.
  You may want to view statistics only on particular traffic
  so you must restrict the information displayed. The filters also apply
  to logging activity.
</para>

<para>
  The IPTraf filter management system is accessible through the
  <emphasis>Filters...</emphasis> submenu.
</para>
<figure>
<title>The Filters submenu</title>
<graphic format="png" fileref="iptraf-filtermenu">
</figure>

<sect1 id="ipfilters">
  <title>IP Filters</title>

  <para>
  The <emphasis>Filters/IP...</emphasis> menu option
  allows you to define a set of rules that determine what IP traffic
  to pass to the monitors. Selecting this option pops up another menu with
  the tasks used to define and apply custom IP filters.
</para>
<figure>
<title>The IP filter menu</title>
<graphic format="png" fileref="iptraf-ipfltmenu">
</figure>
<sect2>
  <title>Defining a New Filter</title>
<para>
  A freshly installed program will have no filters defined, so
  before anything else, you will have to define a filter. You can do this
  by selecting the <emphasis>Define new filter...</emphasis> option.
</para>
<para>
  Selecting this option displays a box asking you to enter a short
  description of the filter you are going to define. Just enter any text
  that clearly identifies the nature of the filter.
</para>
<figure>
<title>The IP filter name dialog</title>
<graphic format="png" fileref="iptraf-ipfltnamedlg">
</figure>
<para>
  Press Enter when you're done with that box. As an alternative, you can
  also press Ctrl+X to cancel the operation.
</para>
<sect3>
<title>The Filter Rule Selection Screen</title>
<para>
After you enter the filter's description, you will be taken to a blank
rule selection box.  At this screen you manage the various rules you
define for this filter.  You can opt to insert, append, edit, or delete
rules.
</para>
<figure>
<title>The filter rule selection screen.  Selecting an entry
displays that set for editing</title>
<graphic format="png" fileref="iptraf-ipfltlist">
</figure>
<para>
Any rules defined will appear here.  You will see the
source and destination
addresses, masks and ports (long addresses and masks may
be truncated) and whether this rule includes or excludes matching
packets.
</para>
<para>Between the source and destination parameters is an arrow that
indicates whether the rule matches packets (single-headed) only exactly or whether
it matches packets flowing in the opposite direction (double-headed).
</para>
<para>
At this screen, press I to insert at the current position of the selection
bar, A to append a rule to the end of the list, Enter to
edit the highlighted rule and D to delete the selected rule.  With
an empty list, A or I can be used to add the first rule.
</para>
<para>To add the first rule, press A or I.  You will then be presented with
a dialog box that allows you to enter the rule's parameters.
</para>
</sect3>
<sect3>
<title>Entering Filter Rules</title>
<para>
  You can enter addresses of individual hosts, networks,
  or a catch-all address. The nature of the address will be determined
  by the wildcard mask.
</para>
<para>
  You'll notice two sets of fields, marked <computeroutput>Source</computeroutput>
  and <computeroutput>Destination</computeroutput>. You fill these out
  with the information about your source and targets.
</para>
<para>
  Fill out the host name or IP address of the hosts or networks in
  the first field
  marked <computeroutput>Host name/IP Address</computeroutput>. Enter it in
  standard dotted-decimal notation. When done, press Tab to move to the
  <computeroutput>Wildcard mask</computeroutput> field. The wildcard mask
  is similar but not exactly identical to the standard IP subnet
  mask. The wildcard mask is used to determine which bits to ignore
  when processing the filter. In most cases, it will work very closely
  like a subnet mask. Place ones (1) under the bits you want the filter to
  recognize, and keep zeros (0) under the bits you want the filter
  to ignore. For example:
</para>
<para>
To recognize the host 207.0.115.44
</para>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="c1">
<colspec colname="c2">
<tbody>
<row><entry>IP address</entry><entry><computeroutput>207.0.115.44</computeroutput></entry></row>
<row><entry>Wildcard mask</entry><entry><computeroutput>255.255.255.255</computeroutput></entry></row>
</tbody>
</tgroup>
</informaltable>
<para>
To recognize all hosts belonging to network
202.47.132.<replaceable>x</replaceable>
</para>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="c1">
<colspec colname="c2">
<tbody>
<row><entry>IP address</entry><entry><computeroutput>202.47.132.0</computeroutput></entry></row>
<row><entry>Wildcard mask</entry><entry><computeroutput>255.255.255.0</computeroutput></entry></row>
</tbody>
</tgroup>
</informaltable>
<para>
To recognize all hosts with any address:
</para>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="c1">
<colspec colname="c2">
<tbody>
<row><entry>IP address</entry><entry><computeroutput>0.0.0.0</computeroutput></entry></row>
<row><entry>Wildcard mask</entry><entry><computeroutput>0.0.0.0</computeroutput></entry></row>
</tbody>
</tgroup>
</informaltable>

<para>
  The IP address/wildcard mask mechanism of the display filter doesn't
  recognize IP address class. It uses a simple bit- pattern matching
  algorithm.
</para>
<para>
  The wildcard mask also does not have to end on a
  byte boundary; you may mask right into a byte itself. For example,
  255.255.255.224 masks 27 bits (255 is 11111111, 224 is 11100000 in
  binary).
</para>
<para>
  IPTraf also accepts host names in place of the IP addresses. IPTraf will
  resolve the host name when the filter is loaded. When the filter
  is interpreted, the wildcard mask will also be applied. This can be
  useful in cases where a single host name may resolve to several IP
  addresses.
</para>

<tip> <title>Tip</title>
  <para> See the <emphasis>Linux Network Administrator's Guide</emphasis>
  if you need more information on IP addresses and subnet masking.
</para>
</tip>

<tip><title>Tip</title>
<para>
IPTraf allows you to specify the wildcard mask in Classless Interdomain Routing
(CIDR) format.  This  format allows you to specify the number of 1-bits that
mask the address.  CIDR notation is the form
<emphasis><computeroutput>address/bits</computeroutput></emphasis> where the
<emphasis><computeroutput>address</computeroutput></emphasis> is the IP
address or host name and
<emphasis><computeroutput>bits</computeroutput></emphasis> is the number of
1-bits in the mask.  For example, if you want to mask 10.1.1.0 with
<computeroutput>255.255.255.0</computeroutput>, note that
<computeroutput>255.255.255.0</computeroutput> has 24 1-bits, so instead
of specifying <computeroutput>255.255.255.0</computeroutput> in the wildcard
mask field, you can just enter <computeroutput>10.1.1.0/24</computeroutput>
in the address field.  IPTraf will translate the mask bits into an
appropriate wildcard mask and fill in the mask field the next time you edit
the filter rule.
</para>
<para>
If you specify the mask in CIDR notation, leave the wildcard mask fields
blank.  If you fill them up, the wildcard mask fields will take precedence.
</para>
</tip>

<para>
  The <computeroutput>Port</computeroutput> fields should contain a
  port number or range of any TCP or UDP service you may be
  interested in. If you want to match only a single port number, fill
  in the first field, while leaving the second blank or set to zero.
  Fill in the second field if you want to match a range of ports (e.g. 80 to
  90).
  Leave the first field blank or set to zero to let the filter ignore
  the ports altogether.
  You will most likely be interested in target ports rather than source ports
  (which are usually unpredictable anyway, perhaps with the exception
  of FTP data).
</para>
<para>
Non-TCP and non-UDP packets are not affected by these fields, and these
are used only when filtering TCP or UDP packets.
</para>
<para>
  Fill out the second set of fields with the parameters of the
  opposite end of the connection.
</para>
<tip>
<title>Tip</title>
<para>
Any address or mask fields left blank default to
0.0.0.0 while blank
<computeroutput>Port</computeroutput> fields default to 0.
This makes it easy to define
filter rules if you're interested only in either the source or destination,
but not the other.  For example, you may be interested
in traffic originating from network 61.9.88.0, in which case you just enter
the source address, mask and port
in the
<computeroutput>Source</computeroutput> fields, while leaving the
<computeroutput>Destination</computeroutput> fields blank.
</para>
</tip>
<para>
The next fields let you specify which IP-type protocols you want matched by
this filter rule.  Any packet whose protocol's corresponding field
is marked with a <computeroutput>Y</computeroutput> is matched against the
filter's defined IP addresses and ports, otherwise
they don't pass through this filter rule.
</para>
<para>
If you want to evaluate all IP packets just mark
with <computeroutput>Y</computeroutput> the <computeroutput>All
IP</computeroutput> field.
</para>
<para>
For example, if you want to see only all TCP traffic, mark the
<computeroutput>TCP</computeroutput> field
with <computeroutput>Y</computeroutput>.
</para>
<para>
The long field marked <computeroutput>Additional
protocols</computeroutput> allows you to specify other protocols
by their IANA number.  (You can view the common IP protocol number
in the <filename>/etc/protocols</filename> file).  You can specify a list
of protocol numbers or ranges separated by commas,
Ranges have the beginning and ending protocol numbers separated with a
hyphen.
</para>
<para>
For example, to see the RSVP (46), IP mobile (55), and protocols
(101 to 104), you use an entry that looks like this:
</para>
<synopsis>
46, 55, 101-104
</synopsis>
<para>
It's certainly possible to specify any of the protocols listed above in
this field.  Entering <computeroutput>1-255</computeroutput> is
functionally identical
to marking <computeroutput>All IP</computeroutput>
with a <computeroutput>Y</computeroutput>.
</para>
<para>
  The next field is marked <computeroutput>Include/Exclude</computeroutput>.
  This field allows you to decide whether to include or filter out matching
  packets. Setting this field to <computeroutput>I</computeroutput> causes the filter to
  pass matching packets, while setting it to <computeroutput>E</computeroutput> causes
  the filter to drop them. This field is set to
  <computeroutput>I</computeroutput> by default.
</para>
<para>
The last field in the dialog is labeled <computeroutput>Match opposite</computeroutput>.  When set
to <computeroutput>Y</computeroutput>, the filter will match packets flowing in the opposite direction.
Previous versions of IPTraf used to match TCP packets flowing in either direction, so the source
and destination address/mask/port combinations were actually interchangeable.  Starting with
IPTraf 3.0, when filters extended to more than just the IP traffic monitor, this behavior is no longer
the default throughout IPTraf except in the IP traffic monitor's TCP window.
</para>
<note>
<title>Note</title>
<para>
For TCP packets, this field is used in all facilities except the IP traffic monitor.  Because
the IP traffic monitor must capture TCP packets in both directions
to properly determine a closed connection, the filter automatically matches
packets in the opposite direction, regardless of this field's setting.  However
iin all other facilities, automatic matching of the reverse packets is not performed
unless you set this field to <computeroutput>Y</computeroutput>.
</para>
<para>
Filters for UDP and other IP protocols do not automatically match packets in the opposite direction
unless you set the field to <computeroutput>Y</computeroutput>, even in the IP traffic monitor.
</para>
</note>
<para>
  Press Enter to accept all parameters when done. The parameters will be
  accepted and you'll be taken back to the rule selection box. You can
then add more rules by pressing A or you can insert new rules at any point
by pressing I. Should you make a mistake, you can press Enter to
edit the selected filter.  You may enter
  as many sets of parameters as you wish. Press Ctrl+X when done.
</para>
<note>
<title>Note</title>
<para>
Because of the major changes in the filtering system since IPTraf 2.7,
old filters will no longer work and will have to be redefined.
</para>
</note>
<figure>
<title>The IP filter parameters dialog</title>
<graphic format="png" fileref="iptraf-ipfltdlg">
</figure>
</sect3>
<sect3>
  <title>Examples</title>
<para>
To see all traffic to/from host 202.47.132.1 from/to 207.0.115.44, regardless of TCP port
</para>
<informaltable frame="none"  pgwide="1">
<tgroup cols="3">
<colspec colname="c1">
<colspec colname="c2">
<colspec colname="c3">
<tbody>
<row><entry>Host name/IP Address</entry><entry><computeroutput>202.47.132.2</computeroutput></entry><entry><computeroutput>207.0.115.44</computeroutput></entry></row>
<row><entry>Wildcard mask</entry><entry><computeroutput>255.255.255.255</computeroutput></entry><entry><computeroutput>255.255.255.255</computeroutput></entry></row>
<row><entry>Port</entry><entry><computeroutput>0</computeroutput></entry><entry><computeroutput>0</computeroutput></entry></row>
<row><entry>Protocols</entry><entry><computeroutput>TCP: Y</computeroutput></entry></row>
<row><entry>Include/Exclude</entry><entry><computeroutput>I</computeroutput></entry></row>
<row><entry>Match opposite</entry><entry><computeroutput>Y</computeroutput></entry></row>
</tbody>
</tgroup>
</informaltable>

<para>
To see all traffic from host 207.0.115.44 to all hosts
on network 202.47.132.x
</para>
<informaltable frame="none"  pgwide="1">
<tgroup cols="3">
<colspec colname="c1">
<colspec colname="c2">
<colspec colname="c3">
<tbody>
<row><entry>Host name/IP Address</entry><entry><computeroutput>207.0.115.44</computeroutput></entry><entry><computeroutput>202.47.132.0</computeroutput></entry></row>
<row><entry>Wildcard mask</entry><entry><computeroutput>255.255.255.255</computeroutput></entry><entry><computeroutput>255.255.255.0</computeroutput></entry></row>
<row><entry>Port</entry><entry><computeroutput>0</computeroutput></entry><entry><computeroutput>0</computeroutput></entry></row>
<row><entry>Protocols</entry><entry><computeroutput>All IP: Y</computeroutput></entry></row>
<row><entry>Include/Exclude</entry><entry><computeroutput>I</computeroutput></entry></row>
<row><entry>Match opposite</entry><entry><computeroutput>N</computeroutput></entry></row>
</tbody>
</tgroup>
</informaltable>

<para>
  To see all Web traffic (to and from port 80)
  regardless of source or destination
</para>
<informaltable frame="none"  pgwide="1">
<tgroup cols="3">
<colspec colname="c1">
<colspec colname="c2">
<colspec colname="c3">
<tbody>
<row><entry>Host name/IP Address</entry><entry><computeroutput>0.0.0.0</computeroutput></entry><entry><computeroutput>0.0.0.0</computeroutput></entry></row>
<row><entry>Wildcard mask</entry><entry><computeroutput>0.0.0.0</computeroutput></entry><entry><computeroutput>0.0.0.0</computeroutput></entry></row>
<row><entry>Port</entry><entry><computeroutput>80</computeroutput></entry><entry><computeroutput>0</computeroutput></entry></row>
<row><entry>Protocols</entry><entry><computeroutput>TCP: Y</computeroutput></entry></row>
<row><entry>Include/Exclude</entry><entry><computeroutput>I</computeroutput></entry></row>
<row><entry>Match opposite</entry><entry><computeroutput>Y</computeroutput></entry></row>
</tbody>
</tgroup>
</informaltable>

<para>
  To see all IRC traffic from port 6666 to 6669
</para>
<informaltable frame="none"  pgwide="1">
<tgroup cols="3">
<colspec colname="c1">
<colspec colname="c2">
<colspec colname="c3">
<tbody>
<row><entry>Host name/IP Address</entry><entry><computeroutput>0.0.0.0</computeroutput></entry><entry><computeroutput>0.0.0.0</computeroutput></entry></row>
<row><entry>Wildcard mask</entry><entry><computeroutput>0.0.0.0</computeroutput></entry><entry><computeroutput>0.0.0.0</computeroutput></entry></row>
<row><entry>Port</entry><entry><computeroutput>0</computeroutput></entry><entry><computeroutput>6666</computeroutput>
to <computeroutput>6669</computeroutput></entry></row>
<row><entry>Protocols</entry><entry><computeroutput>TCP: Y</computeroutput></entry></row>
<row><entry>Include/Exclude</entry><entry><computeroutput>I</computeroutput></entry></row>
<row><entry>Match opposite</entry><entry><computeroutput>Y</computeroutput></entry></row>
</tbody>
</tgroup>
</informaltable>

<para>
  To see all DNS traffic, (TCP and UDP, destination port 53)
  regardless of source or destination
</para>
<informaltable frame="none"  pgwide="1">
<tgroup cols="3">
<colspec colname="c1">
<colspec colname="c2">
<colspec colname="c3">
<tbody>
<row><entry>Host name/IP Address</entry><entry><computeroutput>0.0.0.0</computeroutput></entry><entry><computeroutput>0.0.0.0</computeroutput></entry></row>
<row><entry>Wildcard
mask</entry><entry><computeroutput>0.0.0.0</computeroutput></entry><entry><computeroutput>0.0.0.0</computeroutput></entry></row>
<row><entry>Port</entry><entry><computeroutput>0</computeroutput></entry><entry><computeroutput>53</computeroutput></entry></row>
<row><entry>Protocols</entry><entry><computeroutput>TCP: Y UDP: Y</computeroutput></entry></row>
<row><entry>Include/Exclude</entry><entry><computeroutput>I</computeroutput></entry></row>
<row><entry>Match opposite</entry><entry><computeroutput>Y</computeroutput></entry></row>
</tbody>
</tgroup>
</informaltable>

<para>
  To see all mail (SMTP) traffic to a single host (202.47.132.2) from anywhere
</para>
<informaltable frame="none"  pgwide="1">
<tgroup cols="3">
<colspec colname="c1">
<colspec colname="c2">
<colspec colname="c3">
<tbody>
<row><entry>Host name/IP Address</entry><entry><computeroutput>0.0.0.0</computeroutput></entry><entry><computeroutput>202.47.132.2</computeroutput></entry></row>
<row><entry>Wildcard mask</entry><entry><computeroutput>0.0.0.0</computeroutput></entry><entry><computeroutput>255.255.255.255</computeroutput></entry></row>
<row><entry>Port</entry><entry><computeroutput>0</computeroutput></entry><entry><computeroutput>25</computeroutput></entry></row>
<row><entry>Protocols</entry><entry><computeroutput>TCP: Y</computeroutput></entry></row>
<row><entry>Include/Exclude</entry><entry><computeroutput>I</computeroutput></entry></row>
<row><entry>Match opposite</entry><entry><computeroutput>N</computeroutput></entry></row>

</tbody>
</tgroup>

</informaltable>
<para>
  To see traffic from from/to host sunsite.unc.edu to/from cebu.mozcom.com
</para>
<informaltable frame="none"  pgwide="1">
<tgroup cols="3">
<colspec colname="c1">
<colspec colname="c2">
<colspec colname="c3">
<tbody>
<row><entry>Host name/IP Address</entry><entry><computeroutput>sunsite.unc.edu</computeroutput></entry><entry><computeroutput>cebu.mozcom.com</computeroutput></entry></row>
<row><entry>Wildcard mask</entry><entry><computeroutput>255.255.255.255</computeroutput></entry><entry><computeroutput>255.255.255.255</computeroutput></entry></row>
<row><entry>Port</entry><entry><computeroutput>0</computeroutput></entry><entry><computeroutput>0</computeroutput></entry></row>
<row><entry>Protocols</entry><entry><computeroutput>All IP: Y</computeroutput></entry></row>
<row><entry>Include/Exclude</entry><entry><computeroutput>I</computeroutput></entry></row>
<row><entry>Match opposite</entry><entry><computeroutput>Y</computeroutput></entry></row>
</tbody>
</tgroup>
</informaltable>
<para>
  To omit display of traffic to/from 140.66.5.x from/to anywhere
</para>
<informaltable frame="none"  pgwide="1">
<tgroup cols="3">
<colspec colname="c1">
<colspec colname="c2">
<colspec colname="c3">
<tbody>
<row><entry>Host name/IP Address</entry><entry><computeroutput>140.66.5.0</computeroutput></entry><entry><computeroutput>0.0.0.0</computeroutput></entry></row>
<row><entry>Wildcard mask</entry><entry><computeroutput>255.255.255.0</computeroutput></entry><entry><computeroutput>0.0.0.0</computeroutput></entry></row>
<row><entry>Port</entry><entry><computeroutput>0</computeroutput></entry><entry><computeroutput>0</computeroutput></entry></row>
<row><entry>Protocols</entry><entry><computeroutput>All IP: Y</computeroutput></entry></row>
<row><entry>Include/Exclude</entry><entry><computeroutput>E</computeroutput></entry></row>
<row><entry>Match opposite</entry><entry><computeroutput>Y</computeroutput></entry></row>
</tbody>
</tgroup>
</informaltable>
<para>
  You can enter as many parameters as you wish. All of them will
  be interpreted until the first match is found.
</para>
</sect3>
<sect3>
  <title>Excluding Certain Sites</title>
<para>

  Filters follow an implicit "no-match" policy, that is, only packets
  matching defined rules will be matched, others will be filtered out.
  This is similar
  to the access-list policy "whatever is not explicitly permitted is
  denied". If you want to show all traffic to/from everywhere,
  except certain places, you can specify the sites you wish to exclude,
  mark them with <computeroutput>E</computeroutput> in the <computeroutput>Include/Exclude
field</computeroutput>, and
  define a general catch-all entry with source address
<computeroutput>0.0.0.0</computeroutput>, mask
  <computeroutput>0.0.0.0</computeroutput>, port <computeroutput>0</computeroutput>, and destination
<computeroutput>0.0.0.0</computeroutput>, mask <computeroutput>0.0.0.0</computeroutput>,
port <computeroutput>0</computeroutput>, tagged
  with an <computeroutput>I</computeroutput>
in the <computeroutput>Include/Exclude</computeroutput> field as the last entry.
</para>

<para>
  For example:
</para>
<para>
To see all traffic except all SMTP (both directions), Web (both directions), and traffic
(only) from 207.0.115.44
</para>
<informaltable frame="none" pgwide="1">
<tgroup cols="3">
<colspec colname="c1">
<colspec colname="c2">
<colspec colname="c3">
<tbody>
<row><entry>Host name/IP address</entry><entry><computeroutput>0.0.0.0</computeroutput></entry><entry><computeroutput>0.0.0.0</computeroutput></entry></row>
<row><entry>Wildcard mask</entry><entry><computeroutput>0.0.0.0</computeroutput></entry><entry><computeroutput>0.0.0.0</computeroutput></entry></row>
<row><entry>Port</entry><entry><computeroutput>25</computeroutput></entry><entry><computeroutput>0</computeroutput></entry></row>
<row><entry>Protocols</entry><entry><computeroutput>TCP: Y</computeroutput></entry></row>
<row><entry>Include/Exclude</entry><entry><computeroutput>E</computeroutput></entry></row>
<row><entry>Match opposite</entry><entry><computeroutput>Y</computeroutput></entry></row>
<row><entry></entry></row>
<row><entry>Host name/IP address</entry><entry><computeroutput>0.0.0.0</computeroutput></entry><entry><computeroutput> 0.0.0.0</computeroutput></entry></row>
<row><entry>Wildcard mask</entry><entry><computeroutput>0.0.0.0</computeroutput></entry><entry><computeroutput>0.0.0.0</computeroutput></entry></row>
<row><entry>Port</entry><entry><computeroutput>80</computeroutput></entry><entry><computeroutput>0</computeroutput></entry></row>
<row><entry>Protocols</entry><entry><computeroutput>TCP: Y</computeroutput></entry></row>
<row><entry>Include/Exclude</entry><entry><computeroutput>E</computeroutput></entry></row>
<row><entry>Match opposite</entry><entry><computeroutput>Y</computeroutput></entry></row>
<row><entry></entry></row>
<row><entry>Host name/IP address</entry><entry><computeroutput>207.0.115.44</computeroutput></entry><entry><computeroutput>0.0.0.0</computeroutput></entry></row>
<row><entry>Wildcard mask</entry><entry><computeroutput>255.255.255.255</computeroutput></entry><entry><computeroutput>0.0.0.0</computeroutput></entry></row>
<row><entry>Port</entry><entry><computeroutput>0</computeroutput></entry><entry><computeroutput>0</computeroutput></entry></row>
<row><entry>Protocols</entry><entry><computeroutput>All IP: Y</computeroutput></entry></row>
<row><entry>Include/Exclude</entry><entry><computeroutput>E</computeroutput></entry></row>
<row><entry>Match opposite</entry><entry><computeroutput>N</computeroutput></entry></row>
<row><entry></entry></row>
<row><entry>Host name/IP address</entry><entry><computeroutput>0.0.0.0</computeroutput></entry><entry><computeroutput>0.0.0.0</computeroutput></entry></row>
<row><entry>Wildcard mask</entry><entry><computeroutput>0.0.0.0</computeroutput></entry><entry><computeroutput>0.0.0.0</computeroutput></entry></row>
<row><entry>Port</entry><entry><computeroutput>0</computeroutput></entry><entry><computeroutput>0</computeroutput></entry></row>
<row><entry>Protocols</entry><entry><computeroutput>All IP: Y</computeroutput></entry></row>
<row><entry>Include/Exclude</entry><entry><computeroutput>I</computeroutput></entry></row>
<row><entry>Match opposite</entry><entry><computeroutput>N</computeroutput></entry></row>
</tbody>
</tgroup>
</informaltable>

<tip>
  <title>Tip</title>
  <para>
  To filter out all TCP, define a filter with a single entry, with a source of
  <computeroutput>0.0.0.0</computeroutput> mask
<computeroutput>0.0.0.0</computeroutput> port <computeroutput>0</computeroutput>, and a destination
  of <computeroutput>0.0.0.0</computeroutput> mask <computeroutput>0.0.0.0</computeroutput>
port <computeroutput>0</computeroutput>,
with the <computeroutput>Include/Exclude</computeroutput> field
  marked <computeroutput>E</computeroutput> (exclude). Then apply this filter.
</para>
</tip>
</sect3>
</sect2>
<sect2>

  <title>Applying a Filter</title>
<para>
  The above steps only add the filter to a defined list. To actually apply
  the filter, you must select <emphasis>Apply filter...</emphasis> from the menu. You will be
  presented with a list of filters you already defined. Select the one you
  want to apply, and press Enter.
</para>
<para>
  The applied filter stays in effect over exits and restarts of the IPTraf program until it is detached.
</para>
</sect2>
<sect2>
  <title>Editing a Defined Filter</title>
<para>
  Select <emphasis>Edit filter...</emphasis> to modify an existing filter. Once you select this
  option, you will be presented with the list of defined filters.
  Select the filter you want to edit by moving the selection bar and press
  Enter.
</para>
<para>
  Edit the description if you wish. Pressing Ctrl+X at this point
  will abort the operation, and the filter will remain unmodified. Press
  Enter to accept any changes to the filter description.
</para>
<para>
  After pressing Enter, you will see the filter's rules. To edit an
  existing filter rule, move the selection bar
  to the desired entry and press Enter. A prefilled dialog box
  will appear. Edit its contents as desired. Press Enter to accept the
  changes or Ctrl+X to discard.
</para>
<para>
  You can add a new filter rule by pressing I to insert at the selection
  bar's current position. When you press I, you will be presented with a
  dialog box asking you to enter the new rule data. Pressing A results
  in a similar operation, except the rule will be appended as the
  last entry in the rule list.
</para>
<para>
  Pressing D deletes the currently pointed entry.
</para>
<para>
  Press X or Ctrl+X to end the edit and save the changes.
</para>

<note>
  <title>Note</title>
  <para>If you're editing the currently applied filter, you will need
  to re-apply the filter for the changes to take effect.
  </para>
</note>


<note>
  <title>Note</title>
<para>
  Be aware that the filter processes the rules in order. In other
  words, if a packet matches more than one rule, only the first matching
  rule is followed.
</para>
</note>
</sect2>
<sect2>
  <title>Deleting a Defined Filter</title>
<para>
  Select <emphasis>Delete filter...</emphasis> from the menu to remove a filter
  from the list. Just move the selection bar to the filter you want to
  delete, and press Enter.
</para>
</sect2>
<sect2>
  <title>Detaching a Filter</title>
<para>
  The <emphasis>Detach filter</emphasis> option deactivates the filter currently in
  use. Selecting this option causes all TCP traffic to be passed
  to the monitors.
</para>
<para>
  When you're done with the menu, just select the Exit menu option.
</para>
</sect2>
</sect1>
<sect1 id="nonipfilters">
<title>ARP, RARP, and other Non-IP Packet Filters</title>
<para>
  The <emphasis>Non-IP</emphasis> filter option toggles the display and logging of all non-IP
  packets, except ARP and RARP, which are toggled separately.
</para>
</sect1>
</chapter>
<chapter id="config">
<title>Configuring IPTraf</title>

<para>
   IPTraf can be easily configured
with the <emphasis><link linkend="config">Configure...</link></emphasis> item in the
  main menu. The configuration is stored in the
  <filename>/var/local/iptraf/iptraf.cfg</filename> file. If the file is not found, IPTraf uses
  the default settings. Any changes to the configuration immediately get
  stored in the configuration file.
</para>
<figure>
<title>The IPTraf configuration menu</title>
<graphic format="png" fileref="iptraf-configmenu">
</figure>
<sect1 id="toggles">
  <title>Toggles</title>

<sect2> <title>Reverse DNS Lookups</title>
<para>
  Activating reverse lookup
  causes IPTraf to find out the name of the hosts with the addresses
  in the IP packets. When this option is enabled, IPTraf's
  IP traffic monitor starts the rvnamed DNS lookup server to help resolve
  IP addresses in the background while allowing IPTraf to
  continue capturing packets.
</para>
<para>
  This option is off by default.
</para>
</sect2>
<sect2>
  <title>TCP/UDP Service Names</title>
<para>

  This option, when on, causes IPTraf to display the TCP/UDP service names
  (<computeroutput>smtp</computeroutput>, <computeroutput>www</computeroutput>,
  <computeroutput>pop3</computeroutput>, etc.) instead of their numeric ports (25, 80,
  110, etc). The number-to-name mappings will depend on the systems
  services database file (usually <filename>/etc/services</filename>).
   Should there be no corresponding service name for the
  port number, the numeric form will still be displayed.

</para>
<para>
  This setting is off by default.
</para>

<note>
  <title>Note</title>
 <para>
 Reverse lookup and service name lookup take some
 time and may impact performance and increase the chances of dropped
 packets. Performance and results are best (albeit more cryptic) with both
 these settings off.
</para>
</note>
</sect2>

<sect2>
  <title>Force promiscuous</title>
<para>

  If this option is enabled, your LAN interfaces will capture all packets
  on your LAN. Using this option enables you
  to see all TCP connections and packets passing your LAN segment, even if
  they're not from or for your machine. When this option is active
  in the statistics windows, the Activity indicators will show a
  good estimate of the load on your LAN segment.
</para>
<para>
  When this option is disabled, you'll
  only receive information about packets coming from and entering your
  machine.
</para>
<para>
  The setting of this option affects all LAN (
  Ethernet, FDDI, some Token Ring) interfaces on your machine, if you have more than one.
</para>
<para>
  The interface's promiscuous flag is set only when a facility is started,
  and turned off when it exits. However, if promiscuous
  mode was already set when a facility was started, it remains set on exit.
</para>
<para>
  If multiple instances of IPTraf are started, the promiscuous setting
  is restored only upon exit of the last facility.
</para>

<note>
  <title>Note</title>
<para>
   Do not use other programs that change the interface's promiscuous flag at
  the same time you're using IPTraf. The programs can interfere with
  each other's expected operations. While IPTraf tries to obtain the
  initial setting of any promiscuous flags for restoration
  upon exit, other programs may not be as well-behaved, and they may
  turn off the promiscuous flags while IPTraf is still monitoring.
</para>
</note>
</sect2>
<sect2>
  <title>Color</title>
<para>
  Turn this on with color monitors. Turn it off with
  black-and- white monitors or non-color terminals (like xterms). Changes
  to this setting will take effect the next time the program is started.
</para>
<para>
  Color is on by default on consoles and color xterms, off on non-color terminals like xterms and VT100s.
</para>
</sect2>
<sect2>
  <title>Logging</title>
<para>
  When this option is active, IPTraf will log information to a
  disk file, which can be examined or analyzed later. Since IPTraf
  2.4.0, IPTraf prompts you for the name of the file to which to write the
  logs. It will provide a default name, which you are free to accept
  or change. The IP traffic monitor and LAN station monitor will
  generate a log file name that is based on what instance they are (first,
  second, and so on). The general interface statistics' default log file
  name is constant, because it listens to all interfaces at once, and only
  one instance can run at one time.
</para>
<para>
  The other facilities generate a log file name based
  on the interface they're listening on.
</para>
<para>
  See the descriptions on the facilities above for the default log file names.
</para>
<para>
  Press Enter to accept the log file name, or Ctrl+X to cancel. Canceling will turn logging off for that session.
</para>
<para>
  The IP traffic monitor will write the following pieces of information to its log file:
</para>
<itemizedlist spacing="compact" mark="bullet">
   <listitem><para>Start of the traffic monitor</para></listitem>

   <listitem><para>Receipt of the first TCP packet for a connection. If that packet is a
    SYN, (SYN) will be indicated in the log entry. (Of course, the traffic
    monitor may start in the middle of established connections. It
    will still count those packets. This also explains why some connection
    entries may become idle if the traffic monitor is started in the
    middle of a half-closed connection, and miss the first FIN.
    Such entries time out in a while.)</para></listitem>

   <listitem><para>Receipt of a FIN (with average flow rate)</para></listitem>

   <listitem><para>ACK of a FIN</para></listitem>

   <listitem><para>Timeouts of TCP entries (with average flow rate)</para></listitem>

   <listitem><para>Reset connections (with average flow rate)</para></listitem>

   <listitem><para>Everything that appears in the bottom window of the traffic monitor</para></listitem>

   <listitem><para>Stopping of the traffic monitor</para></listitem>
</itemizedlist>
<para>
  Each log entry includes the date and time the entry was written. Logging
  is also affected by the defined filters.
</para>
<para>
  Log files can grow very fast, so be prepared with plenty of
  free space and delete unneeded logs. Log write errors are not indicated.
</para>
<para>
  Copies of the interface statistics, TCP/UDP statistics, packet
  size statistics, and LAN host statistics are also written
  to the log files at regular intervals. See <emphasis>Log
Interval...</emphasis> in this chapter.
</para>
<para>
  IPTraf closes and reopens the active log file when it receives a
  <computeroutput>USR1</computeroutput> signal. This is useful in cases where a facility is run for
  long periods of time but the log files have to be cleared or moved.
</para>
<para>
  To clear or move an active log file, rename it first. IPTraf will
  continue to write to the file despite the new name. Then use the UNIX
  kill command to send the running IPTraf process a <computeroutput>USR1</computeroutput> signal. IPTraf
  will then close the log file and open another with the
  original name. You can then safely remove or delete the renamed file.
</para>
<para>
  Do not delete an open log file. Doing so will only result in a file just
  as large but filled with null characters (ASCII code 0).
</para>
<para>
  Logging comes disabled by default. The <computeroutput>USR1</computeroutput> signal is caught only if
  logging is enabled, it is ignored otherwise.
</para>
<para>
 A valid specification of <computeroutput>-L</computeroutput> on the command line with automatically
 enable logging for that particular session.  The saved configuration setting is not affected.
</para>
</sect2>
<sect2>
  <title>Activity mode</title>
<para>
  Toggles activity indicators in the interface and LAN statistics
  facilities between kilobits per second (kbits/s) or kilobytes per second
  (kbytes/s).
</para>
<para>
  The default setting is kilobits per second.
</para>
</sect2>
<sect2>
  <title>Source MAC addrs in traffic monitor</title>
<para>
  When enabled, the IP traffic monitor retrieves the packets' source MAC
  addresses if they came in on an Ethernet, FDDI, or PLIP interface. The
  addresses appear in the lower window for non-TCP
  packets, while for TCP connections, they can be viewed by pressing M.
</para>
<para>
  No such information is displayed
  if the network interface doesn't use MAC addresses (such
  as PPP interfaces).
</para>
<para>
  This can be used to determine the actual source of the packets on your local LAN.
</para>
<para>
  The traffic monitor also logs the MAC addresses with this option
  enabled. The default setting is off.
</para>
</sect2>
</sect1>

<sect1 id="timers">
  <title>Timers</title>
<para>
  The <emphasis>Timers...</emphasis> submenu allows you to IPTraf's
  interval and timeout functions.
</para>
<figure>
<title>The Timers configuration submenu</title>
<graphic format="png" fileref="iptraf-timermenu">
</figure>
<sect2>
  <title>TCP Timeout</title>
<para>
  This figure determines the amount of time (in minutes) a
  connection entry may remain idle before it becomes
  eligible for replacement by a new connection. The default is 15 minutes.
  You may want to reduce this on an isolated (not connected
  to the Internet) LAN or a LAN connected to the Internet with
  high-speed links. Just enter the new value and press
  Enter. You can press Ctrl+X to leave the current value unchanged.
</para>
</sect2>
<sect2>
<title>Log Interval</title>
<para>
  This figure determines the number of minutes between logging
  of interface statistics, TCP/UDP figures, and LAN host statistics. The
  default is 60 minutes. This figure is meaningless if logging is disabled.
</para>
<para>
  This configuration item can be overridden with the <computeroutput>-I</computeroutput> when
  a facility is directly invoked from the command line (not accessed via the main menu), and
  remains effective for that particular session.  The configured value is not affected.
</para>
</sect2>
<sect2>
  <title>Screen Update Interval</title>
<para>
  This value determines the rate in seconds at which the screen is
  updated. The default is 0, which means the screen is updated as fast
  as possible, giving close-to-realtime reflection
  of network activity. However, this high-speed update can cause
  incredible amounts of traffic if IPTraf is run on a remote
  terminal (e.g. a Telnet or Secure Shell session). You can set this
  to a higher value, such as 1 or 2 seconds to slow down the updates.
</para>
<para>
  This figure does not affect the rate of data capture. Only the
  screen refresh is affected. The figures are still updated as fast as
  possible, although the figure display will no longer be as close
  to realtime.
</para>
<para>
  The default setting is 0, which shouldn't be a problem on the
  console. Set it to a slightly higher value on remote terminals or slow
  links. The setting affects all monitoring facilities.
</para>
<note>
  <title>Note</title>
  <para>
   Updating the screen is one of the slowest operations in a
  program. Older versions of IPTraf had a problem once network
  activity became very high. Because each packet caused a screen update,
  IPTraf began spending more time with the screen updates, causing a loss
  of packets once network activity reached a certain point.
</para>
<para>
  However, since many users like rapid counts on their screen, a
  compromise was incorporated. Even when the screen update interval is set
  to 0, there is still a 50ms delay between screen updates (except the LAN
  station monitor, which has a 100 ms delay). This is still visually fast,
  but provides more time to the packet capture routine. Higher
  delays may result in better accuracy of counts and activity.
</para>
<para>
  In any case, this setting only affects screen updates. Capture still
  proceeds as fast as possible.
</para>
</note>
</sect2>
<sect2>
  <title>TCP closed/idle persistence</title>
  <para>
  This parameter
  determines the interval (in minutes) at which the IP Traffic Monitor
  clears from the TCP display window all closed, idle, and timed out
  entries. Enter <computeroutput>0</computeroutput> to keep such entries on the
  screen indefinitely, disappearing only when replaced by new connections.
</para>

<note> 
  <title>Note</title>
<para>
  The <emphasis>TCP timeout...</emphasis> option
  only tells IPTraf how long it should take before a connection should
  be considered idle and open to replacement by new connections. This does
  not determine how long
  it remains onscreen. The <emphasis>TCP closed/idle
  persistence...</emphasis> 
   parameter flushes entries that have been closed or reset, or idle for the number
  of minutes defined by the <emphasis>TCP timeout...</emphasis> option.
</para>
</note>
</sect2>
</sect1>

<sect1 id="customports">
  <title>Custom Information</title>
<para>
  The remaining configuration items allow you to enter information which
  IPTraf uses for its displays and logs.
</para>
<sect2>
  <title>Additional ports</title>
  <para>Select this item to enter a port
  number to be included in the TCP/UDP counts in the TCP/UDP service
  statistics main menu item described above. By default,
  port numbers above 1023 are not monitored. If you do
  have a higher-numbered port to monitor, enter it here.
</para>
<para>
  You will see two fields. If you have only one port to enter, just fill
  up the first field. To specify a range, fill both fields, the first port
  in the first field, the last port in the second field.
</para>
<para>
  You can select this option multiple times to add more values or ranges.
</para>
</sect2>
<sect2>
  <title>Delete port/range</title>
<para>
  Select this item to remove a higher-numbered port number or
  port range you entered earlier with the <emphasis>Additional
  ports...</emphasis> option. A window will come up
  containing the entered ports and ranges. Select the entry you want
  delete and press Enter.
</para>
</sect2>
<sect2>
  <title>LAN Station Identifiers</title>

<para>
 The LAN station statistics facility monitors stations based
  on their respective MAC addresses. The hexadecimal notation of these
  addresses make them even more difficult to remember than the
  dotted-decimal IP addresses, so these facilities were added to
  help you better determine which station is which.
</para>
<para>
  Selecting the <emphasis>Ethernet/PLIP host descriptions...</emphasis> or
  <emphasis>FDDI/Token Ring host descriptions...</emphasis> options brings
  up a submenu asking you to add, edit, or delete descriptions.
</para>
<para>
  To add a new description, select the <emphasis>Add
description...</emphasis> option. A dialog
  box will appear, asking you for the MAC address and an appropriate
  description. Type in the address in hexadecimal notation with no
  punctuation of any kind. The dialog box is
  case-insensitive for the address; the alphabetical digits A to F will be
  stored in lowercase.
</para>
<para>
  Use the Tab key to move between fields and Enter to accept. Press Ctrl+X
  to discard this dialog and return to the main menu.
</para>
<para>
  The description may be anything: the IP address, a fully-qualified
  domain name, or a description of your liking as long
  as the field can hold.
</para>
<para>
  Enter as many descriptions as you need. Press Ctrl+X at a blank dialog
  after you have entered the last entry
</para>
<para>
  These descriptions will be displayed alongside the MAC addresses
  in the LAN station monitor, together with the type of frame (Ethernet,
  PLIP, or FDDI).
</para>
<para>
  An existing address or description may be edited
by selecting the <emphasis>Edit
  description...</emphasis> option from the submenu. A panel will appear with a list
  of existing address descriptions. Select the one you wish to
  edit and press Enter. A dialog box identical to that
  when you add a description will appear with prefilled fields. Just
  backspace over and edit the fields. Press Enter to accept or Ctrl+X to
  cancel.
</para>
<para>
  Selecting the <emphasis>Delete description...</emphasis> submenu
  item brings up the selection panel. Select the description you want to
  delete and press Enter. You can also press Ctrl+X to cancel the operation.
</para>
<para>
  IPTraf 2.4 and later also recognizes the <filename>/etc/ethers</filename> file.
  Should a hardware address be present in the IPTraf definition files and
  in <filename>/etc/ethers</filename>, the IPTraf definition will be used.
</para>
<note>
  <title>Note</title>
<para>
  The description file for Ethernet and PLIP is
  <filename>ethernet.desc</filename>, while the FDDI and Token Ring mappings are stored
  in <filename>fddi.desc</filename> in the IPTraf working directory. These files are in
  colon-delimited text format. Database engines or custom scripts can be
  told to append data lines to those files. Each line follows this
  simple format:
</para>
<synopsis>
<replaceable>address</replaceable>:<replaceable>description</replaceable>
</synopsis>
<para> 
 For example
</para>
<synopsis>
00201e457e:Cisco 3640 gateway
</synopsis>
<para>
  Do not put colons, periods, or any invalid characters in the MAC address.
</para>
</note>
</sect2>
</sect1>
</chapter>
<chapter id="backop">
<title>Background Operation</title>

<para>
  IPTraf's facilities can be placed in the background solely for
  logging. When running in the background, it doesn't display any output
  on the screen, and doesn't receive input
  from the keyboard, and drops you back to the shell.
</para>
<para>
  Before starting a statistical facility in the background, configure
  IPTraf in the usual way (set filters, add TCP/UDP ports, etc).
</para>
<para>
  Once that's done, exit all instances of IPTraf on the system, then
  invoke IPTraf from the command line with the parameter
  to start the facility you want, the timeout (<computeroutput>-t</computeroutput>) parameter
  if you wish, and the <computeroutput>-B</computeroutput> parameter to actually daemonize the program.
   For example, to run the IP traffic monitor in the
  background for all interfaces, issue the command
</para>
<synopsis>
iptraf -i all -B
</synopsis>
<para>
  To run the detailed interface statistics
on interface <filename>eth0</filename> for 5 minutes
  in the background:
</para>
<synopsis>
iptraf -d eth0 -t 5 -B
</synopsis>
<para>
  If the timeout parameter is not specified, the facility
  will run until the process receives a USR2 signal. To stop a facility in
  the background, do a
</para>
<synopsis>
ps x
</synopsis>
<para>
  at the command line, and find the process id (pid) of the iptraf process
  you're looking for. Then send that process a USR2 signal with the kill
  command:
</para>
<synopsis>
kill -USR2 pid
</synopsis>
<para>
  Since IPTraf cannot send error messages to the terminal, all
  messages are written to the file daemon.log in the
  IPTraf logging directory.
</para>
<para>
  The <computeroutput>-B</computeroutput> parameter automatically enables logging regardless of its configured
  setting. The parameter is ignored if not used with one of the parameters
  to start a facility from the command line.
</para>
<para>
  The log file can be specified with the <computeroutput>-L</computeroutput> command-line parameter. If
  this parameter is not specified, the default log file name for the
  facility will be used (see the descriptions of the
  facilities above for the default log name patterns).
  If you don't specify an path, the log file will be placed in
  <filename>/var/log/iptraf</filename>.
</para>
<para>
  The logging interval for all facilities (except the IP traffic monitor) can also be overriden
  with the <computeroutput>-I</computeroutput> command-line parameter.
</para>
</chapter>

<appendix id="messages">
  <title>Messages</title>
<para>
IPTraf's messages are presented in two ways.  In interactive mode, messages
are displayed in a distictive message box.  In daemon (background) mode,
appropriate messages are written to the <filename>iptraf.log</filename>
file in the IPTraf log directory (normally
<filename>/var/log/iptraf</filename>.
</para>

<sect1 id="iptrafmessages">
<title>IPTraf Messages</title>
<msgset>
<simplemsgentry>
<msgtext>
<para><computeroutput>
Unable to create config file
</computeroutput></para></msgtext>
<msgexplan>
<para>
  IPTraf cannot create the configuration file. The most likely cause of
  this is that you didn't properly install the
  program, and the necessary directory
<filename>/var/local/iptraf</filename> does not
  exist. Can also be generated if you have a disk problem or if you
  have too many files open.
</para>
</msgexplan>
</simplemsgentry>

<simplemsgentry>
<msgtext>
<para><computeroutput>Unable to read config file
</computeroutput></para></msgtext>
<msgexplan>
<para>
  The configuration record cannot be read. You most likely have a disk
  problem.
</para>
</msgexplan>
</simplemsgentry>

  <simplemsgentry>
<msgtext>
<para><computeroutput>Unable to write config file
</computeroutput></para></msgtext>
<msgexplan>
<para>

  The configuration file cannot be written. You either have a disk
  problem, or (more likely), your disk is full.
</para>
</msgexplan>
</simplemsgentry>
  <simplemsgentry>
<msgtext>
<para><computeroutput>Enter an appropriate description for this filter
</computeroutput></para></msgtext>
<msgexplan>
<para>

  Enter something to clearly describe the filter you are defining.

</para>
</msgexplan>
</simplemsgentry>
  <simplemsgentry>
<msgtext>
<para><computeroutput>Error loading filter list file
</computeroutput></para></msgtext>
<msgexplan>
<para>
  IPTraf cannot access the list of defined TCP or UDP filters. Can also be
  an indicator of a bad disk.
</para>
</msgexplan>
</simplemsgentry>
  <simplemsgentry>
<msgtext>
<para><computeroutput>Error writing filter list file
</computeroutput></para></msgtext>
<msgexplan>
<para>

  The filter list file cannot be written to. You may
  have trouble accessing your filters.

</para>
</msgexplan>
</simplemsgentry>
  <simplemsgentry>
<msgtext>
<para><computeroutput>Unable to read TCP/UDP/misc IP filter file
</computeroutput></para></msgtext>
<msgexplan>
<para>

  IPTraf cannot read the filter data off the file. Could be caused
  by a bad disk.

</para>
</msgexplan>
</simplemsgentry>
  <simplemsgentry>
<msgtext>
<para><computeroutput>Error opening filter data file
</computeroutput></para></msgtext>
<msgexplan>
<para>
  IPTraf cannot open the filter file. Could be caused by a shortage of
  file descriptors or a bad disk.
</para>
</msgexplan>
</simplemsgentry>

  <simplemsgentry>
<msgtext>
<para><computeroutput>Unable to write filter data
</computeroutput></para></msgtext>
<msgexplan>
<para>
  IPTraf cannot add the newly defined filter to the filter list. This may
  be due to a bad disk.
</para>
</msgexplan>
</simplemsgentry>
  <simplemsgentry>
<msgtext>
<para><computeroutput>Cannot create filter data file
</computeroutput></para></msgtext>
<msgexplan>
<para>
  IPTraf cannot create the filter record file. The defined filter is lost.
</para>
</msgexplan>
</simplemsgentry>
  <simplemsgentry>
<msgtext>
<para><computeroutput>Unable to save filter changes
</computeroutput></para></msgtext>
<msgexplan>
<para>
  IPTraf cannot save the changes you made to the filter. You probably
  have a disk error.
</para>
</msgexplan>
</simplemsgentry>
  <simplemsgentry>
<msgtext>
<para><computeroutput>Unable to write filter state information
</computeroutput></para></msgtext>
<msgexplan>
<para>
  The current state of the filters cannot be saved. IPTraf will be unable
  to correctly reload the filters the next time it's started. This can
  be caused by a bad disk or improper installation.
</para>
</msgexplan>
</simplemsgentry>
  <simplemsgentry>
<msgtext>
<para><computeroutput>Unable to save interface flags
</computeroutput></para></msgtext>
<msgexplan>
<para>
  IPTraf was unable to save the flags of the network interfaces. This is
  probably due to a bad installation or full filesystem.
</para>
</msgexplan>
</simplemsgentry>
  <simplemsgentry>
<msgtext>
<para><computeroutput>Unable to retrieve saved interface flags
</computeroutput></para></msgtext>
<msgexplan>
<para>
  IPTraf was unable to retrieve the save interface flags.
  Probably again due to a bad installation or full filesystem.
</para>
</msgexplan>
</simplemsgentry>
  <simplemsgentry>
<msgtext>
<para><computeroutput>
<replaceable>protocol</replaceable> filter data file in use; try again later
</computeroutput></para>
<para><computeroutput>
Filter state file in use; try again later
</computeroutput></para></msgtext>
<msgexplan>
<para>
  Another IPTraf process is modifying the TCP, UDP or miscellaneous IP
  filter data or the filter state file and has locked the files
  or file. Try again once the other IPTraf process has terminated or
  completed its modifications and unlocked the files.
</para>
</msgexplan>
</simplemsgentry>
  <simplemsgentry>
<msgtext>
<para><computeroutput>Unable to resolve hostname
</computeroutput></para></msgtext>
<msgexplan>
<para>
  The indicated host name in the filter cannot be resolved into an
  IP address. Check the local hosts database <filename>/etc/hosts</filename> or
  your machine's DNS configuration or DNS server.
</para>
<para>
  The filter parameters will not be used.
</para>
</msgexplan>
</simplemsgentry>

  <simplemsgentry>
<msgtext>
<para><computeroutput>Unable to open host description file
</computeroutput></para></msgtext>
<msgexplan>
<para>

  IPTraf cannot open the file containing the descriptions for Ethernet
  or FDDI addresses. Could be due to a bad disk or a hit on the file
  descriptor limit.

</para>
</msgexplan>
</simplemsgentry>

  <simplemsgentry>
<msgtext>
<para><computeroutput>Unable to write host description
</computeroutput></para></msgtext>
<msgexplan>
<para>

  IPTraf was unable to write the description record for this Ethernet or
  FDDI address. Could be due to a bad disk or corrupted filesystem.

</para>
</msgexplan>
</simplemsgentry>
  <simplemsgentry>
<msgtext>
<para><computeroutput>No descriptions

</computeroutput></para></msgtext>
<msgexplan>
<para>

  You tried to edit or delete a description with no previous
  descriptions defined.

</para>
</msgexplan>
</simplemsgentry>

  <simplemsgentry>
<msgtext>
<para><computeroutput>Cannot open log file
</computeroutput></para></msgtext>
<msgexplan>
<para>

  There is a problem opening the log file. There is most
  likely a problem with the disk, or there are too many open files.

</para>
</msgexplan>
</simplemsgentry>

  <simplemsgentry>
<msgtext>
<para><computeroutput>Unable to obtain interface list
</computeroutput></para></msgtext>
<msgexplan>
<para>

  IPTraf was unable to retrieve the list of network interfaces
  from the <filename>/proc</filename> filesystem. This may be due
  to a badly configured kernel.  IPTraf needs <filename>/proc</filename>
  filesystem support.

</para>
</msgexplan>
</simplemsgentry>

  <simplemsgentry>
<msgtext>
<para><computeroutput>
No active interfaces. Check their status or the /proc filesystem.
</computeroutput></para>
</msgtext>
<msgexplan>
<para>

  IPTraf found no active interfaces. Either all interfaces are down or the
  <filename>/proc/net/dev</filename> file was empty or unavailable. Activate at least one
  interface or check the <filename>/proc/net/dev</filename> file.

</para>
</msgexplan>
</simplemsgentry>

  <simplemsgentry>
<msgtext>
<para><computeroutput>Unable to obtain interface parameters for interface
</computeroutput></para></msgtext>
<msgexplan>
<para>

  The system call to retrieve the interface's flags failed. Check your
  interface or kernel driver.

</para>
</msgexplan>
</simplemsgentry>

  <simplemsgentry>
<msgtext>
<para><computeroutput>Promisc change failed for interface
</computeroutput></para></msgtext>
<msgexplan>
<para>

  The system call to change the promiscuous flag failed. Check
  your interface or its kernel driver.

</para>
</msgexplan>
</simplemsgentry>

  <simplemsgentry>
<msgtext>
<para><computeroutput>Unable to open raw socket for flag change
</computeroutput></para></msgtext>
<msgexplan>
<para>

  IPTraf was unable to open the necessary socket for the promiscuous
  change operation. May be due to a shortage of file descriptors.

</para>
</msgexplan>
</simplemsgentry>

  <simplemsgentry>
<msgtext>
<para><computeroutput>Unable to open socket for MTU determination
</computeroutput></para></msgtext>
<msgexplan>
<para>

  Returned by the facility for detailed interface statistics
  if the raw socket's opening sequence failed. The facility will abort.
</para>
</msgexplan>
</simplemsgentry>


  <simplemsgentry>
<msgtext>
<para><computeroutput>Unable to open raw socket
</computeroutput></para></msgtext>
<msgexplan>
<para>
  IPTraf was unable to open the raw socket for packet capture. May be due
  to a shortage of file descriptors.
</para>

<note>
  <title>Reminder</title>
<para> IPTraf 2.x.x requires Linux kernel 2.2.x, with the Packet
  Socket option compiled in or installed as a module. IPTraf 2.x will
  return this error on a pre-2.2 kernel or on a 2.2 kernel without
  Packet Socket.
</para>
</note>
</msgexplan>
</simplemsgentry>


<simplemsgentry>
<msgtext>
<para><computeroutput>Unable to obtain interface MTU
</computeroutput></para></msgtext>
<msgexplan>
<para>

  The detailed statistics facility was unable to
  obtain the maximum transmission unit (MTU) for the selected
  interface. The facility will abort.

</para>
</msgexplan>
</simplemsgentry>

  <simplemsgentry>
<msgtext>
<para><computeroutput>Specified interface not supported
</computeroutput></para></msgtext>
<msgexplan>
<para>

  The interface specified with the <computeroutput>-i</computeroutput>,
  <computeroutput>-d</computeroutput>, <computeroutput>-s</computeroutput>, <computeroutput>-l</computeroutput>,
  or <computeroutput>-z</computeroutput> command-line parameters is not supported
  by IPTraf.
</para>
</msgexplan>
</simplemsgentry>

  <simplemsgentry>
<msgtext>
<para><computeroutput>Specified interface not active
</computeroutput></para></msgtext>
<msgexplan>
<para>

  The interface specified with the <computeroutput>-i</computeroutput>,
  <computeroutput>-d</computeroutput>,
  <computeroutput>-s</computeroutput>, <computeroutput>-l</computeroutput>, or
  <computeroutput>-z</computeroutput> command-line parameters is
  supported, but not currently activated.

</para>
</msgexplan>
</simplemsgentry>

  <simplemsgentry>
<msgtext>
<para><computeroutput>Fatal: memory allocation error
</computeroutput></para></msgtext>
<msgexplan>
<para>

  May occur if you have too little memory to allocate for windows, the
  menu system, or dialog boxes. IPTraf tries
  to prevent further allocations if memory runs out during a
  monitor. However, this could also mean a bug if you're reasonably sure
  you're not out of memory. An instructional message
  on bug reporting follows this message.
</para>
<note>
  <title>Technical note</title>
<para>This is actually a response to the
  segmentation fault error (SIGSEGV).
</para>
</note>
</msgexplan>
</simplemsgentry>

  <simplemsgentry>
<msgtext>
<para><computeroutput>This program can be run only by the system administrator
</computeroutput></para></msgtext>
<msgexplan>
<para>

  IPTraf normally does not allow anybody but uid 0 (root) to run it.
  This measure is included for safety reasons. See the section
  on recompiling the program below if you want to override this.
  This feature is built in, and not part of the configuration

</para>
</msgexplan>
</simplemsgentry>

  <simplemsgentry>
<msgtext>
<para><computeroutput>Your TERM variable is not set
</computeroutput></para></msgtext>
<msgexplan>
<para>

  The <envar>TERM</envar> (terminal type) environment variable
  must be set to a valid terminal type so that the screen management
  routines can function properly. Set it to the appropriate terminal type.
  Linux consoles typically have their <envar>TERM</envar> variables set to
<computeroutput>linux</computeroutput>.

</para>
</msgexplan>
</simplemsgentry>

  <simplemsgentry>
<msgtext>
<para><computeroutput>Received TERM signal
</computeroutput></para></msgtext>
<msgexplan>
<para>
  Not related to the previous message. The
<computeroutput>TERM</computeroutput> (terminate) signal
  is normally used to gracefully shut down a program. This message
  simply indicates that the <computeroutput>TERM</computeroutput> signal was caught and IPTraf is
  attempting to shut down as gracefully as possible.
</para>
</msgexplan>
</simplemsgentry>
<simplemsgentry>
<msgtext>
<para><computeroutput>
  Invalid option or missing parameter, use iptraf -h for help
</computeroutput></para>
</msgtext>
<msgexplan>
<para>
  The <computeroutput>-i</computeroutput>,
  <computeroutput>-d</computeroutput>,
  <computeroutput>-s</computeroutput>, <computeroutput>-l</computeroutput>, or
  <computeroutput>-z</computeroutput> options were specified but
  no interface was specified on the command line. These
  parameters require a valid interface name (or
  <computeroutput>all</computeroutput> for <computeroutput>-i</computeroutput>
or <computeroutput>-l</computeroutput>).
</para>
<para>
  This message also appears if an unknown option is passed
to the <command>iptraf</command> command.

</para>
</msgexplan>
</simplemsgentry>

<simplemsgentry>
<msgtext>
<para><computeroutput>Warning: unable to tag this process
</computeroutput></para></msgtext>
<msgexplan>
<para>

  IPTraf normally tags itself when it runs to prevent multiple instances
  of the statistical facilities from running.
  This message means the program was unable to
  create the necessary tag file. This may be due to a bad or
  improper installation. Try running the
<command>make install</command> procedure or the
<command>Setup</command> in the distribution's top-level directory.

</para>
</msgexplan>
</simplemsgentry>

  <simplemsgentry>
<msgtext>
<para><computeroutput>Warning: unable to tag facility
</computeroutput></para></msgtext>
<msgexplan>
<para>

  IPTraf was unable to create the tag file for the facility you
  started. The facility will still run, but other instances of IPTraf that
  may be running simultaneously will allow the same facility to run.
  This may cause both instances of the facility to malfunction. This could
  be due to a bad disk or bad installation.

</para>
</msgexplan>
</simplemsgentry>

<simplemsgentry>
<msgtext>
<para><computeroutput><replaceable>facility</replaceable> already running/listening on interface
</computeroutput></para></msgtext>
<msgexplan>
<para>

  The facility you tried to start is currently running
  on the indicated interface in another IPTraf process on the machine.
  This restriction is placed to prevent conflicts involving
  internal sockets or the log files.

</para>
</msgexplan>
</simplemsgentry>

  <simplemsgentry>
<msgtext>
<para><computeroutput>General interface statistics already active in another process
</computeroutput></para></msgtext>
<msgexplan>
<para>

  Only one instance of the general interface statistics can run at a time.

</para>
</msgexplan>
</simplemsgentry>

  <simplemsgentry>
<msgtext>
<para><computeroutput>Duplicate port/range entry

</computeroutput></para></msgtext>
<msgexplan>
<para>
  You entered a port number or range that was already added to the list of
  additional ports to be monitored by the TCP/UDP service monitor

</para>
</msgexplan>
</simplemsgentry>

  <simplemsgentry>
<msgtext>
<para><computeroutput>No custom ports
</computeroutput></para></msgtext>
<msgexplan>
<para>

  There are no ports or port ranges earlier added. There's nothing
  to delete.

</para>
</msgexplan>
</simplemsgentry>

  <simplemsgentry>
<msgtext>
<para><computeroutput>Can't start rvnamed; lookups will block
</computeroutput></para></msgtext>
<msgexplan>
<para>

  IPTraf cannot start the <command>rvnamed</command> daemon; probably due
  to a bad installation. IPTraf will fall back to blocking lookups.

</para>
</msgexplan>
</simplemsgentry>

  <simplemsgentry>
<msgtext>
<para><computeroutput>Can't spawn new process; lookups will block
</computeroutput></para></msgtext>
<msgexplan>
<para>

  IPTraf cannot start a new process. This may be due to memory shortage.
  IPTraf will fall back to blocking lookups.

</para>
</msgexplan>
</simplemsgentry>

  <simplemsgentry>
<msgtext>
<para><computeroutput>Fork error, IPTraf cannot run in background
</computeroutput></para></msgtext>
<msgexplan>
<para>

  IPTraf cannot start a new process, and can go into the background.
  This may be due to memory shortage. IPTraf aborts.

</para>
</msgexplan>
</simplemsgentry>

  <simplemsgentry>
<msgtext>
<para><computeroutput>No memory for new filter entry
</computeroutput></para></msgtext>
<msgexplan>
<para>

  IPTraf was unable to allocate memory for a new filter entry. Most likely
  due to memory shortage.

</para>
</msgexplan>
</simplemsgentry>

  <simplemsgentry>
<msgtext>
<para><computeroutput>Memory Low
</computeroutput></para></msgtext>
<msgexplan>
<para>

  This indicator appears if memory runs low due to a lot of entries in a
  facility. Should critical functions fail (window creation,
  internal allocation), the program could terminate with a
  segmentation violation.
</para>

<note>
  <title>Note</title>
<para>
  Any message or indicator about low memory means that your system
  does not have enough memory to handle the entries. It is
  almost certain that sooner or later, IPTraf or other applications will
  abort due to the failure of important system calls or library functions.
  Memory must be added right away.
</para>
</note>
</msgexplan>
</simplemsgentry>
  <simplemsgentry>
<msgtext>
<para><computeroutput>IPC Error
</computeroutput></para></msgtext>
<msgexplan>
<para>
  This indicator appears if an error occurs receiving data
  from the <command>rvnamed</command> program (IPC stands for Interprocess Communication).
  This indication should not occur under normal circumstances.
  Report instances of this condition and the circumstances under which
  it happens. You may also include data from the
<filename>rvnamed.log</filename> file.

</para>
</msgexplan>
</simplemsgentry>

  <simplemsgentry>
<msgtext>
<para><computeroutput>Error opening terminal: <replaceable>terminal</replaceable>
</computeroutput></para></msgtext>
<msgexplan>
<para>
  The screen management routines cannot find the
<filename>terminfo</filename> entry for your
  terminal. IPTraf expects the terminfo database located
  in <filename>/usr/share/terminfo</filename>. This error could occur when your terminfo
  database is located somewhere else.
</para>
<para>
  See the section on controlling the <filename>terminfo</filename> search path.
</para>
</msgexplan>
</simplemsgentry>

  <simplemsgentry>
<msgtext>
<para><computeroutput>This will end your IPTraf session
  </computeroutput></para></msgtext>
<msgexplan>
<para>
In interactive mode IPTraf asks you to confirm your exit
command. Press Enter to return to the shell or any other key to cancel
your command and return to the main menu.
</para>
</msgexplan>
</simplemsgentry>
</msgset>
</sect1>
<sect1 id="rvnamedmessages">
<title>
  rvnamed Messages
</title>
<para>
  As a daemon, rvnamed does not send messages to the screen. It
  writes its messages to the file <filename>rvnamed.log</filename> in the
  IPTraf log directory.
</para>
<msgset>

<simplemsgentry>
<msgtext>
<para><computeroutput>
  Unable to open child communication socket
</computeroutput></para></msgtext>
<msgexplan>
<para>

  rvnamed was unable to open the communication endpoint for data reception
  from the children it creates. This is highly unusual, and should it
  occur, report the circumstances.
</para>
</msgexplan>
</simplemsgentry>


<simplemsgentry>
<msgtext>
<para><computeroutput>
  Unable to open client communication socket
</computeroutput></para></msgtext>
<msgexplan>
<para>

  rvnamed was unable to  open the communication endpoint for data exchange
  with the IPTraf program. This is highly unusual, and should it
  occur, report the circumstances.
</para>
</msgexplan>
</simplemsgentry>


<simplemsgentry>
<msgtext>
<para><computeroutput>
  Error binding client communication socket
  Error binding child communication socket
</computeroutput></para></msgtext>
<msgexplan>
<para>

  rvnamed was unable to assign a name
  to the indicated communication socket. This may be due to a bad, full,
  or corrupted filesystem.

</para>
</msgexplan>
</simplemsgentry>


<simplemsgentry>
<msgtext>
<para><computeroutput>
  Fatal error: no memory for descriptor monitoring
</computeroutput></para></msgtext>
<msgexplan>
<para>

  rvnamed ran out of memory. IPTraf will resort to blocking, and may freeze.

</para>
</msgexplan>
</simplemsgentry>


<simplemsgentry>
<msgtext>
<para><computeroutput>
  Error on fork, returning IP address
</computeroutput></para></msgtext>
<msgexplan>
<para>

  rvnamed had a problem spawning a copy of itself to resolve the IP
  address. rvnamed will simply return the IP address in its literal,
  dotted-decimal notation. IPTraf will still function normally. This may
  be due to lack of memory or a process limit hit.
</para>
</msgexplan>
</simplemsgentry>



<simplemsgentry>
<msgtext>
<para><computeroutput>
  Maximum child process limit reached
</computeroutput></para></msgtext>
<msgexplan>
<para>

  rvnamed has reached its maximum number of child processes. This is
  intended as a "brake" to prevent too many rvnamed children
  from hogging your computer's resources and possibly crashing it.
</para>
<para>
  Unless IPTraf is monitoring an extremely busy network without filters,
  this shouldn't happen, at least, not that often. If you notice
  this message, try applying filters or check your DNS server. Many times,
  this can happen when the DNS server goes down for
  whatever reason, and you have rvnamed children taking too long to resolve.
</para>
</msgexplan>
</simplemsgentry>
</msgset>
</sect1>
</appendix>
<appendix id="gfdl">
<title>GNU Free Documentation License</title>
<!-- - GNU Project - Free Software Foundation (FSF) -->
<!-- LINK REV="made" HREF="mailto:webmasters@gnu.org" -->


  <!-- sect1>
    <title>GNU Free Documentation License</title -->

    <para>Version 1.1, March 2000</para>

    <blockquote>
      <para>Copyright (C) 2000  Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.</para>
    </blockquote>

  <sect1 id="gfdl-0">
    <title>PREAMBLE</title>

    <para>The purpose of this License is to make a manual, textbook,
    or other written document "free" in the sense of freedom: to
    assure everyone the effective freedom to copy and redistribute it,
    with or without modifying it, either commercially or
    noncommercially.  Secondarily, this License preserves for the
    author and publisher a way to get credit for their work, while not
    being considered responsible for modifications made by
    others.</para>

    <para>This License is a kind of "copyleft", which means that
    derivative works of the document must themselves be free in the
    same sense.  It complements the GNU General Public License, which
    is a copyleft license designed for free software.</para>

    <para>We have designed this License in order to use it for manuals
    for free software, because free software needs free documentation:
    a free program should come with manuals providing the same
    freedoms that the software does.  But this License is not limited
    to software manuals; it can be used for any textual work,
    regardless of subject matter or whether it is published as a
    printed book.  We recommend this License principally for works
    whose purpose is instruction or reference.</para>
  </sect1>

  <sect1 id="gfdl-1">
    <title>APPLICABILITY AND DEFINITIONS</title>

    <para>This License applies to any manual or other work that
    contains a notice placed by the copyright holder saying it can be
    distributed under the terms of this License.  The "Document",
    below, refers to any such manual or work.  Any member of the
    public is a licensee, and is addressed as "you".</para>

    <para>A "Modified Version" of the Document means any work
    containing the Document or a portion of it, either copied
    verbatim, or with modifications and/or translated into another
    language.</para>

    <para>A "Secondary Section" is a named appendix or a front-matter
    section of the Document that deals exclusively with the
    relationship of the publishers or authors of the Document to the
    Document's overall subject (or to related matters) and contains
    nothing that could fall directly within that overall subject.
    (For example, if the Document is in part a textbook of
    mathematics, a Secondary Section may not explain any mathematics.)
    The relationship could be a matter of historical connection with
    the subject or with related matters, or of legal, commercial,
    philosophical, ethical or political position regarding
    them.</para>

    <para>The "Invariant Sections" are certain Secondary Sections
    whose titles are designated, as being those of Invariant Sections,
    in the notice that says that the Document is released under this
    License.</para>

    <para>The "Cover Texts" are certain short passages of text that
    are listed, as Front-Cover Texts or Back-Cover Texts, in the
    notice that says that the Document is released under this
    License.</para>

    <para>A "Transparent" copy of the Document means a
    machine-readable copy, represented in a format whose specification
    is available to the general public, whose contents can be viewed
    and edited directly and straightforwardly with generic text
    editors or (for images composed of pixels) generic paint programs
    or (for drawings) some widely available drawing editor, and that
    is suitable for input to text formatters or for automatic
    translation to a variety of formats suitable for input to text
    formatters.  A copy made in an otherwise Transparent file format
    whose markup has been designed to thwart or discourage subsequent
    modification by readers is not Transparent.  A copy that is not
    "Transparent" is called "Opaque".</para>

    <para>Examples of suitable formats for Transparent copies include
    plain ASCII without markup, Texinfo input format, LaTeX input
    format, SGML or XML using a publicly available DTD, and
    standard-conforming simple HTML designed for human modification.
    Opaque formats include PostScript, PDF, proprietary formats that
    can be read and edited only by proprietary word processors, SGML
    or XML for which the DTD and/or processing tools are not generally
    available, and the machine-generated HTML produced by some word
    processors for output purposes only.</para>

    <para>The "Title Page" means, for a printed book, the title page
    itself, plus such following pages as are needed to hold, legibly,
    the material this License requires to appear in the title page.
    For works in formats which do not have any title page as such,
    "Title Page" means the text near the most prominent appearance of
    the work's title, preceding the beginning of the body of the
    text.</para>
  </sect1>

  <sect1 id="gfdl-2">
    <title>VERBATIM COPYING</title>

    <para>You may copy and distribute the Document in any medium,
    either commercially or noncommercially, provided that this
    License, the copyright notices, and the license notice saying this
    License applies to the Document are reproduced in all copies, and
    that you add no other conditions whatsoever to those of this
    License.  You may not use technical measures to obstruct or
    control the reading or further copying of the copies you make or
    distribute.  However, you may accept compensation in exchange for
    copies.  If you distribute a large enough number of copies you
    must also follow the conditions in section 3.</para>

    <para>You may also lend copies, under the same conditions stated
    above, and you may publicly display copies.</para>
  </sect1>

  <sect1 id="gfdl-3">
    <title>COPYING IN QUANTITY</title>

    <para>If you publish printed copies of the Document numbering more
    than 100, and the Document's license notice requires Cover Texts,
    you must enclose the copies in covers that carry, clearly and
    legibly, all these Cover Texts: Front-Cover Texts on the front
    cover, and Back-Cover Texts on the back cover.  Both covers must
    also clearly and legibly identify you as the publisher of these
    copies.  The front cover must present the full title with all
    words of the title equally prominent and visible.  You may add
    other material on the covers in addition.  Copying with changes
    limited to the covers, as long as they preserve the title of the
    Document and satisfy these conditions, can be treated as verbatim
    copying in other respects.</para>

    <para>If the required texts for either cover are too voluminous to
    fit legibly, you should put the first ones listed (as many as fit
    reasonably) on the actual cover, and continue the rest onto
    adjacent pages.</para>

    <para>If you publish or distribute Opaque copies of the Document
    numbering more than 100, you must either include a
    machine-readable Transparent copy along with each Opaque copy, or
    state in or with each Opaque copy a publicly-accessible
    computer-network location containing a complete Transparent copy
    of the Document, free of added material, which the general
    network-using public has access to download anonymously at no
    charge using public-standard network protocols.  If you use the
    latter option, you must take reasonably prudent steps, when you
    begin distribution of Opaque copies in quantity, to ensure that
    this Transparent copy will remain thus accessible at the stated
    location until at least one year after the last time you
    distribute an Opaque copy (directly or through your agents or
    retailers) of that edition to the public.</para>

    <para>It is requested, but not required, that you contact the
    authors of the Document well before redistributing any large
    number of copies, to give them a chance to provide you with an
    updated version of the Document.</para>
  </sect1>

  <sect1 id="gfdl-4">
    <title>MODIFICATIONS</title>

    <para>You may copy and distribute a Modified Version of the
    Document under the conditions of sections 2 and 3 above, provided
    that you release the Modified Version under precisely this
    License, with the Modified Version filling the role of the
    Document, thus licensing distribution and modification of the
    Modified Version to whoever possesses a copy of it.  In addition,
    you must do these things in the Modified Version:</para>

    <orderedlist numeration="upperalpha">
      <listitem><para>Use in the Title Page
      (and on the covers, if any) a title distinct from that of the
      Document, and from those of previous versions (which should, if
      there were any, be listed in the History section of the
      Document).  You may use the same title as a previous version if
      the original publisher of that version gives permission.</para>
      </listitem>

      <listitem><para>List on the Title Page,
      as authors, one or more persons or entities responsible for
      authorship of the modifications in the Modified Version,
      together with at least five of the principal authors of the
      Document (all of its principal authors, if it has less than
      five).</para>
      </listitem>

      <listitem><para>State on the Title page
      the name of the publisher of the Modified Version, as the
      publisher.</para>
      </listitem>

      <listitem><para>Preserve all the
      copyright notices of the Document.</para>
      </listitem>

      <listitem><para>Add an appropriate
      copyright notice for your modifications adjacent to the other
      copyright notices.</para>
      </listitem>

      <listitem><para>Include, immediately
      after the copyright notices, a license notice giving the public
      permission to use the Modified Version under the terms of this
      License, in the form shown in the Addendum below.</para>
      </listitem>

      <listitem><para>Preserve in that license
      notice the full lists of Invariant Sections and required Cover
      Texts given in the Document's license notice.</para>
      </listitem>

      <listitem><para>Include an unaltered
      copy of this License.</para>
      </listitem>

      <listitem><para>Preserve the section
      entitled "History", and its title, and add to it an item stating
      at least the title, year, new authors, and publisher of the
      Modified Version as given on the Title Page.  If there is no
      section entitled "History" in the Document, create one stating
      the title, year, authors, and publisher of the Document as given
      on its Title Page, then add an item describing the Modified
      Version as stated in the previous sentence.</para>
      </listitem>

      <listitem><para>Preserve the network
      location, if any, given in the Document for public access to a
      Transparent copy of the Document, and likewise the network
      locations given in the Document for previous versions it was
      based on.  These may be placed in the "History" section.  You
      may omit a network location for a work that was published at
      least four years before the Document itself, or if the original
      publisher of the version it refers to gives permission.</para>
      </listitem>

      <listitem><para>In any section entitled
      "Acknowledgements" or "Dedications", preserve the section's
      title, and preserve in the section all the substance and tone of
      each of the contributor acknowledgements and/or dedications
      given therein.</para>
      </listitem>

      <listitem><para>Preserve all the
      Invariant Sections of the Document, unaltered in their text and
      in their titles.  Section numbers or the equivalent are not
      considered part of the section titles.</para>
      </listitem>

      <listitem><para>Delete any section
      entitled "Endorsements".  Such a section may not be included in
      the Modified Version.</para>
      </listitem>

      <listitem><para>Do not retitle any
      existing section as "Endorsements" or to conflict in title with
      any Invariant Section.</para>
      </listitem>
    </orderedlist>
    
    <para>If the Modified Version includes new front-matter sections
    or appendices that qualify as Secondary Sections and contain no
    material copied from the Document, you may at your option
    designate some or all of these sections as invariant.  To do this,
    add their titles to the list of Invariant Sections in the Modified
    Version's license notice.  These titles must be distinct from any
    other section titles.</para>

    <para>You may add a section entitled "Endorsements", provided it
    contains nothing but endorsements of your Modified Version by
    various parties--for example, statements of peer review or that
    the text has been approved by an organization as the authoritative
    definition of a standard.</para>

    <para>You may add a passage of up to five words as a Front-Cover
    Text, and a passage of up to 25 words as a Back-Cover Text, to the
    end of the list of Cover Texts in the Modified Version.  Only one
    passage of Front-Cover Text and one of Back-Cover Text may be
    added by (or through arrangements made by) any one entity.  If the
    Document already includes a cover text for the same cover,
    previously added by you or by arrangement made by the same entity
    you are acting on behalf of, you may not add another; but you may
    replace the old one, on explicit permission from the previous
    publisher that added the old one.</para>

    <para>The author(s) and publisher(s) of the Document do not by
    this License give permission to use their names for publicity for
    or to assert or imply endorsement of any Modified Version.</para>
  </sect1>

  <sect1 id="gfdl-5">
    <title>COMBINING DOCUMENTS</title>

    <para>You may combine the Document with other documents released
    under this License, under the terms defined in section 4 above for
    modified versions, provided that you include in the combination
    all of the Invariant Sections of all of the original documents,
    unmodified, and list them all as Invariant Sections of your
    combined work in its license notice.</para>

    <para>The combined work need only contain one copy of this
    License, and multiple identical Invariant Sections may be replaced
    with a single copy.  If there are multiple Invariant Sections with
    the same name but different contents, make the title of each such
    section unique by adding at the end of it, in parentheses, the
    name of the original author or publisher of that section if known,
    or else a unique number.  Make the same adjustment to the section
    titles in the list of Invariant Sections in the license notice of
    the combined work.</para>

    <para>In the combination, you must combine any sections entitled
    "History" in the various original documents, forming one section
    entitled "History"; likewise combine any sections entitled
    "Acknowledgements", and any sections entitled "Dedications".  You
    must delete all sections entitled "Endorsements."</para>
  </sect1>

  <sect1 id="gfdl-6">
    <title>COLLECTIONS OF DOCUMENTS</title>

    <para>You may make a collection consisting of the Document and
    other documents released under this License, and replace the
    individual copies of this License in the various documents with a
    single copy that is included in the collection, provided that you
    follow the rules of this License for verbatim copying of each of
    the documents in all other respects.</para>

    <para>You may extract a single document from such a collection,
    and distribute it individually under this License, provided you
    insert a copy of this License into the extracted document, and
    follow this License in all other respects regarding verbatim
    copying of that document.</para>
  </sect1>

  <sect1 id="gfdl-7">
    <title>AGGREGATION WITH INDEPENDENT WORKS</title>
    
    <para>A compilation of the Document or its derivatives with other
    separate and independent documents or works, in or on a volume of
    a storage or distribution medium, does not as a whole count as a
    Modified Version of the Document, provided no compilation
    copyright is claimed for the compilation.  Such a compilation is
    called an "aggregate", and this License does not apply to the
    other self-contained works thus compiled with the Document, on
    account of their being thus compiled, if they are not themselves
    derivative works of the Document.</para>

    <para>If the Cover Text requirement of section 3 is applicable to
    these copies of the Document, then if the Document is less than
    one quarter of the entire aggregate, the Document's Cover Texts
    may be placed on covers that surround only the Document within the
    aggregate.  Otherwise they must appear on covers around the whole
    aggregate.</para>
  </sect1>

  <sect1 id="gfdl-8">
    <title>TRANSLATION</title>

    <para>Translation is considered a kind of modification, so you may
    distribute translations of the Document under the terms of section
    4.  Replacing Invariant Sections with translations requires
    special permission from their copyright holders, but you may
    include translations of some or all Invariant Sections in addition
    to the original versions of these Invariant Sections.  You may
    include a translation of this License provided that you also
    include the original English version of this License.  In case of
    a disagreement between the translation and the original English
    version of this License, the original English version will
    prevail.</para>
  </sect1>

  <sect1 id="gfdl-9">
    <title>TERMINATION</title>
    
    <para>You may not copy, modify, sublicense, or distribute the
    Document except as expressly provided for under this License.  Any
    other attempt to copy, modify, sublicense or distribute the
    Document is void, and will automatically terminate your rights
    under this License.  However, parties who have received copies, or
    rights, from you under this License will not have their licenses
    terminated so long as such parties remain in full
    compliance.</para>
  </sect1>

  <sect1 id="gfdl-10">
    <title>FUTURE REVISIONS OF THIS LICENSE</title>

    <para>The Free Software Foundation may publish new, revised
    versions of the GNU Free Documentation License from time to time.
    Such new versions will be similar in spirit to the present
    version, but may differ in detail to address new problems or
    concerns.  See <ulink
    url="http://www.gnu.org/copyleft/">http://www.gnu.org/copyleft/</ulink>.</para>

    <para>Each version of the License is given a distinguishing
    version number.  If the Document specifies that a particular
    numbered version of this License "or any later version" applies to
    it, you have the option of following the terms and conditions
    either of that specified version or of any later version that has
    been published (not as a draft) by the Free Software Foundation.
    If the Document does not specify a version number of this License,
    you may choose any version ever published (not as a draft) by the
    Free Software Foundation.</para>
  </sect1>

  <sect1 id="gfdl-11">
    <title>How to use this License for your documents</title>

    <para>To use this License in a document you have written, include
    a copy of the License in the document and put the following
    copyright and license notices just after the title page:</para>

<blockquote><para>
      Copyright (c)  YEAR  YOUR NAME.
      Permission is granted to copy, distribute and/or modify this document
      under the terms of the GNU Free Documentation License, Version 1.1
      or any later version published by the Free Software Foundation;
      with the Invariant Sections being LIST THEIR TITLES, with the
      Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
      A copy of the license is included in the section entitled "GNU
      Free Documentation License".
</para></blockquote>

    <para>If you have no Invariant Sections, write "with no Invariant
    Sections" instead of saying which ones are invariant.  If you have
    no Front-Cover Texts, write "no Front-Cover Texts" instead of
    "Front-Cover Texts being LIST"; likewise for Back-Cover
    Texts.</para>

    <para>If your document contains nontrivial examples of program
    code, we recommend releasing these examples in parallel under your
    choice of free software license, such as the GNU General Public
    License, to permit their use in free software.</para>
  </sect1>

</appendix>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:nil
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:2
sgml-parent-document: ("referenz.sgml" "appendix")
sgml-exposed-tags:nil
sgml-local-ecat-files:nil
sgml-local-catalogs: CATALOG
sgml-validate-command: "nsgmls -s referenz.sgml"
ispell-skip-sgml: t
End:
-->
</book>