summaryrefslogtreecommitdiff
path: root/source/n/iptraf/iptraf_3.0.0-6.diff
blob: c524e0deb075f4f7585d141f2223370fb2935375 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
--- iptraf-3.0.0.orig/Documentation/iptraf.8
+++ iptraf-3.0.0/Documentation/iptraf.8
@@ -2,22 +2,22 @@
 .SH NAME
 iptraf \- Interactive Colorful IP LAN Monitor
 .SH SYNOPSIS
-.BR iptraf " { [ " -f " ] [ " -q " ] [ { " -i 
+.BR iptraf " { [ " \-f " ] [ " \-q " ] [ " \-u " ] [ { " \-i 
 .IR iface " | " 
-.BR -g " | " -d
+.BR \-g " | " \-d
 .IR iface " | "
-.BR -s
+.BR \-s
 .IR iface " | "
-.BR -z
+.BR \-z
 .IR iface " | "
-.BR -l 
+.BR \-l 
 .IR iface " } [ " 
-.BR -t
+.BR \-t
 .IR timeout " ] [ "
-.BR -B " [ "
-.BR -L
+.BR \-B " [ "
+.BR \-L
 .IR logfile " ] ] ] | [ "
-.BR -h " ] }"
+.BR \-h " ] }"
 .br
 .SH DESCRIPTION
 .B iptraf
@@ -30,38 +30,38 @@
 .SH OPTIONS
 These options can also be supplied to the command:
 .TP
-.BI "-i " iface
+.BI "\-i " iface
 immediately start the IP traffic monitor on the specified interface, or
-all interfaces if "-i all" is specified
+all interfaces if "\-i all" is specified
 .TP
-.B "-g"
+.B "\-g"
 immediately start the general interface statistics
 .TP
-.BI "-d " iface
+.BI "\-d " iface
 allows you to immediately start the detailed on the indicated interface (iface)
 .TP
-.BI "-s " iface
+.BI "\-s " iface
 allows you to immediately monitor TCP and UDP traffic on the specified interface (iface)
 .TP
-.BI "-z " iface
+.BI "\-z " iface
 shows packet counts by size on the specified interface
 .TP
-.BI "-l " iface
+.BI "\-l " iface
 start the LAN station monitor on the specified interface, or all LAN
-interfaces if "-l all" is specified
+interfaces if "\-l all" is specified
 .TP
-.BI "-t " timeout
+.BI "\-t " timeout
 tells IPTraf to run the specified facility for only
 .I timeout
 minutes.  This option is used only with one of the above parameters.
 .TP
-.B "-B"
+.B "\-B"
 redirect standard output to /dev/null, closes standard input, and forks
 the program into the background.  Can be used only with one of the
 facility invocation parameters above.  Send the backgrounded process a
 USR2 signal to terminate.
 .TP
-.B "-L logfile"
+.B "\-L logfile"
 allows you to specify an alternate log file name.  The default log file
 name is based on either the interface selected (detailed interface
 statistics, TCP/UDP service statistics, packet size breakdown), or the
@@ -69,15 +69,19 @@
 path is not specified, the log file is placed in
 .B /var/log/iptraf
 .TP
-.B "-f"
+.B "\-f"
 clears all locks and counters, causing this instance of IPTraf to think
 it's the first one running.  This should only be used to recover from
 an abnormal termination or system crash.
 .TP
-.BI "-q"
+.B "\-u"
+allow use of unsupported interfaces as ethernet devices.  This is needed if
+you changed the name of an interface (ex: ip link set eth0 name foo0)
+.TP
+.BI "\-q"
 no longer needed, maintained only for compatibility.
 .TP
-.B "-h"
+.B "\-h"
 shows a command summary
 .SH SIGNALS
 
@@ -86,7 +90,7 @@
 
 .SH FILES
  /var/log/iptraf/*.log - log file
- /var/local/iptraf/* - important IPTraf data files
+ /var/lib/iptraf/* - important IPTraf data files
 
 .SH SEE ALSO
  Documentation/* - complete documentation written by the author
@@ -96,6 +100,6 @@
 Gerard Paul Java (riker@mozcom.com)
 
 .SH MANUAL AUTHOR
-Frederic Peters (fpeters@debian.org), using iptraf --help
+Frederic Peters (fpeters@debian.org), using iptraf \-h
 General manual page modifications by Gerard Paul Java (riker@mozcom.com)
 
--- iptraf-3.0.0.orig/Documentation/rvnamed.8
+++ iptraf-3.0.0/Documentation/rvnamed.8
@@ -11,7 +11,7 @@
 This program is only used by iptraf and, therefore, is useless alone.
 
 .SH FILES
- /var/local/iptraf/rvnamed.log - log file
+ /var/log/iptraf/rvnamed.log - log file
 
 .SH SEE ALSO
 README.rvnamed - documentation from the author
--- iptraf-3.0.0.orig/src/ifstats.c
+++ iptraf-3.0.0/src/ifstats.c
@@ -32,7 +32,7 @@
 #include <arpa/inet.h>
 #include <net/if_arp.h>
 #include <linux/if_packet.h>
-#include <net/if.h>
+#include <linux/if.h>
 #include <netinet/ip.h>
 #include <netinet/tcp.h>
 #include <netinet/udp.h>
@@ -129,7 +129,7 @@
 {
     FILE *fd;
     char buf[161];
-    char ifname[10];
+    char ifname[18];
     struct iflist *itmp = NULL;
     struct iflist *tail = NULL;
     unsigned int index = 0;
@@ -433,7 +433,7 @@
     FILE *logfile = NULL;
 
     int br;
-    char ifname[10];
+    char ifname[18];
 
     int ch;
 
@@ -760,7 +760,7 @@
     char *tpacket;
     unsigned int iphlen;
 
-    char ifname[10];
+    char ifname[18];
     struct sockaddr_ll fromaddr;
     unsigned short linktype;
 
--- iptraf-3.0.0.orig/src/iptraf.c
+++ iptraf-3.0.0/src/iptraf.c
@@ -30,6 +30,7 @@
 #include <panel.h>
 #include <signal.h>
 #include <string.h>
+#include <locale.h>
 #include <time.h>
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -410,7 +411,7 @@
 {
     printf("\nSyntax:\n");
     printf
-        ("    iptraf [ -f ] [ { -i iface | -g | -d iface | -s iface | -z iface |\n");
+        ("    iptraf [ -f ] [ -u ] [ { -i iface | -g | -d iface | -s iface | -z iface |\n");
     printf
         ("           -l iface } [ -t timeout ] [ -B ] [ -L logfile ] [-I interval] ] \n\n");
     printf
@@ -445,6 +446,8 @@
         ("-f          - clear all locks and counters.  Use with great caution.\n");
     printf
         ("              Normally used to recover from an abnormal termination.\n\n");
+    printf
+        ("-u          - allow use of unsupported interfaces as ethernet devices.\n");
     printf("IPTraf %s Copyright (c) Gerard Paul Java 1997-2004\n",
            VERSION);
 }
@@ -499,6 +502,8 @@
     }
 #endif
 
+    setlocale(LC_ALL, "");
+
     strcpy(current_logfile, "");
     strcpy(graphing_logfile, "");
     strcpy(graphing_filter, "");
@@ -616,6 +621,18 @@
     freopen("/dev/null", "r", stdin);
     freopen("/dev/null", "w", stderr);
 #endif
+    
+    /* Check whether LOCKDIR exists (/var/run is on a tmpfs in Ubuntu) */
+    if(access(LOCKDIR,F_OK) != 0) {
+	if(mkdir(LOCKDIR, 0700) == -1) {
+	    fprintf(stderr, "Cannot create %s: %s", LOCKDIR, strerror(errno));
+	    exit(1);
+        }
+	if(chown(LOCKDIR, 0, 0) == -1) {
+	    fprintf(stderr, "Cannot change owner of %s: %s", LOCKDIR, strerror(errno));
+	    exit(1);
+	}
+    }
 
     initscr();
 
--- iptraf-3.0.0.orig/src/itrafmon.c
+++ iptraf-3.0.0/src/itrafmon.c
@@ -604,7 +604,7 @@
     int curwin = 0;
 
     int readlen;
-    char ifname[10];
+    char ifname[18];
 
     unsigned long long total_pkts = 0;
 
--- iptraf-3.0.0.orig/src/othptab.c
+++ iptraf-3.0.0/src/othptab.c
@@ -16,14 +16,28 @@
 
 ***/
 
+/* ARP protocol opcodes. */
+#define ARPOP_REQUEST   1               /* ARP request.  */
+#define ARPOP_REPLY     2               /* ARP reply.  */
+#define ARPOP_RREQUEST  3               /* RARP request.  */
+#define ARPOP_RREPLY    4               /* RARP reply.  */
+#define ARPOP_InREQUEST 8               /* InARP request.  */
+#define ARPOP_InREPLY   9               /* InARP reply.  */
+#define ARPOP_NAK       10              /* (ATM)ARP NAK.  */
+
+
 #include <asm/types.h>
+#include "options.h"
+#include "tcptable.h"
+/*#include <linux/socket.h>*/
+#include <linux/if.h>
 #include <linux/if_ether.h>
 #include <linux/if_tr.h>
 #include <linux/if_fddi.h>
+#include <linux/if_arp.h>
+#include <netdb.h>
 #include <winops.h>
 #include "arphdr.h"
-#include "options.h"
-#include "tcptable.h"
 #include "othptab.h"
 #include "deskman.h"
 #include "attrs.h"
--- iptraf-3.0.0.orig/src/ifstats.h
+++ iptraf-3.0.0/src/ifstats.h
@@ -6,7 +6,7 @@
 ***/
 
 struct iflist {
-    char ifname[8];
+    char ifname[18];
     unsigned int encap;
     unsigned long long iptotal;
     unsigned long badtotal;
--- iptraf-3.0.0.orig/src/othptab.h
+++ iptraf-3.0.0/src/othptab.h
@@ -9,14 +9,12 @@
 #include <malloc.h>
 #include <string.h>
 #include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
+#include <linux/socket.h>
 #include <arpa/inet.h>
 #include <netinet/ip_icmp.h>
 #include <netinet/udp.h>
 #include <curses.h>
 #include <panel.h>
-#include <netdb.h>
 #include <linux/if_ether.h>
 #include "servname.h"
 #include "addproto.h"
@@ -42,7 +40,7 @@
     int s_fstat;
     int d_fstat;
     unsigned int protocol;
-    char iface[8];
+    char iface[18];
     unsigned int pkt_length;
 
     union {
--- iptraf-3.0.0.orig/src/tcptable.h
+++ iptraf-3.0.0/src/tcptable.h
@@ -12,19 +12,17 @@
 #include <fcntl.h>
 #include <curses.h>
 #include <panel.h>
-#include <netdb.h>
 #include <time.h>
 #include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <net/if_arp.h>
 #include <asm/types.h>
+#include <linux/socket.h>
+#include <sys/socket.h>
+#include <linux/net.h>
+#include <linux/if.h>
 #include <linux/if_packet.h>
 #include <linux/if_ether.h>
 #include <linux/if_fddi.h>
 #include <linux/if_tr.h>
-#include <net/if.h>
 #include <netinet/ip.h>
 #include <netinet/udp.h>
 #include "servname.h"
@@ -64,7 +62,7 @@
     unsigned long finack;
     int partial;
     int finsent;
-    char ifname[8];
+    char ifname[18];
     unsigned int index;
     int reused;
     int timedout;
--- iptraf-3.0.0.orig/src/Makefile
+++ iptraf-3.0.0/src/Makefile
@@ -31,11 +31,12 @@
 # options to be passed to the compiler.  I don't believe they need to be
 # modified (except for -m486 on non-Intel x86 platforms).
 
-CFLAGS		= -Wall #-O2 #-m486
+CFLAGS		= -Wall -g #-O2 #-m486
 DIRS		= -DWORKDIR=\"$(WORKDIR)\" \
 		  -DLOGDIR=\"$(LOGDIR)\" -DEXECDIR=\"$(TARGET)\"
 LDOPTS		= #-static
 
+
 # you may want to change this to point to your ncurses include directory
 # if the ncurses include files are not in the default location.
 
@@ -139,13 +140,11 @@
 
 cleano:
 	rm -f *.o *~
-	strip iptraf
-	strip rvnamed
 
 # installation rule
 
 install:
-	@./install.sh $(TARGET) $(WORKDIR) $(LOGDIR) $(LOCKDIR)
+	@./install.sh $(TARGET) $(WORKDIR) $(LOGDIR) $(LOCKDIR) $(DESTDIR)
 
 # Upgrade rule
 #
@@ -170,7 +169,6 @@
 	/bin/cp -pR ../Documentation $(BINDIR)
 	mkdir $(BINDIR)/src
 	/bin/cp -p $(BINS) Makefile install.sh version $(BINDIR)/src
-	strip $(BINDIR)/src/iptraf $(BINDIR)/src/rvnamed $(BINDIR)/src/rawtime
 
 #$(BINDIR)/src/updatefilters
 
--- iptraf-3.0.0.orig/src/promisc.c
+++ iptraf-3.0.0/src/promisc.c
@@ -32,7 +32,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <netinet/in.h>
-#include <net/if.h>
+#include <linux/if.h>
 #include <linux/if_ether.h>
 #include "ifstats.h"
 #include "ifaces.h"
@@ -49,7 +49,7 @@
 {
     FILE *fd;
     int ifd;
-    char buf[8];
+    char buf[18];
     struct promisc_states *ptmp;
     struct promisc_states *tail = NULL;
     struct ifreq ifr;
@@ -81,6 +81,7 @@
              */
 
             if ((strncmp(buf, "eth", 3) == 0) ||
+	        (strncmp(buf, "ath", 3) == 0) ||
                 (strncmp(buf, "fddi", 4) == 0) ||
                 (strncmp(buf, "tr", 2) == 0) ||
                 (strncmp(ptmp->params.ifname, "wvlan", 4) == 0) ||
--- iptraf-3.0.0.orig/src/hostmon.c
+++ iptraf-3.0.0/src/hostmon.c
@@ -711,7 +711,7 @@
     int is_ip;
     int ch;
 
-    char ifname[10];
+    char ifname[18];
 
     struct timeval tv;
     unsigned long starttime;
--- iptraf-3.0.0.orig/src/serv.c
+++ iptraf-3.0.0/src/serv.c
@@ -739,7 +739,7 @@
     unsigned short linktype;
     int br;
 
-    char iface[8];
+    char iface[18];
     unsigned int idx = 1;
 
     unsigned int sport = 0;
--- iptraf-3.0.0.orig/src/packet.c
+++ iptraf-3.0.0/src/packet.c
@@ -31,13 +31,12 @@
 #include <netinet/tcp.h>
 #include <sys/time.h>
 #include <net/if_arp.h>
-#include <net/if.h>
+#include <linux/if.h>
 #include <sys/ioctl.h>
 #include <linux/if_packet.h>
 #include <linux/if_ether.h>
 #include <linux/if_fddi.h>
 #include <linux/if_tr.h>
-#include <linux/isdn.h>
 #include <linux/sockios.h>
 #include <msgboxes.h>
 #include "deskman.h"
@@ -79,6 +78,8 @@
     case ARPHRD_ETHER:
         if (strncmp(ifname, "eth", 3) == 0)
             result = LINK_ETHERNET;
+	else if (strncmp(ifname, "ath", 3) == 0)
+	    result = LINK_ETHERNET;
         else if (strncmp(ifname, "plip", 4) == 0)
             result = LINK_PLIP;
         else if (strncmp(ifname, "fddi", 4) == 0)       /* For some Ethernet- */
@@ -101,6 +102,8 @@
             result = LINK_ETHERNET;
         else if (strncmp(ifname, "tun", 3) == 0)
             result = LINK_ETHERNET;
+        else if (strncmp(ifname, "ra", 2) == 0)
+            result = LINK_ETHERNET;
         else if (strncmp(ifname, "vlan", 3) == 0)
             result = LINK_VLAN;
         else if (strncmp(ifname, "brg", 3) == 0)
--- iptraf-3.0.0.orig/src/rvnamed.c
+++ iptraf-3.0.0/src/rvnamed.c
@@ -219,6 +219,9 @@
     signal(SIGCHLD, childreap);
 
     logfile = fopen(RVNDLOGFILE, "a");
+    if ( logfile == NULL ) { /* unable to open file -> /dev/null */
+	logfile = fopen("/dev/null", "a");
+    }
 
     if (logfile == NULL)
         logfile = fopen("/dev/null", "a");
--- iptraf-3.0.0.orig/src/rvnamed.h
+++ iptraf-3.0.0/src/rvnamed.h
@@ -1,9 +1,9 @@
 #include <netinet/in.h>
 #include <arpa/inet.h>
 
-#define CHILDSOCKNAME "/dev/rvndcldcomsk"
-#define PARENTSOCKNAME "/dev/rvndpntcomsk"
-#define IPTSOCKNAME "/dev/rvndiptcomsk"
+#define CHILDSOCKNAME "/var/run/rvndcldcomsk"
+#define PARENTSOCKNAME "/var/run/rvndpntcomsk"
+#define IPTSOCKNAME "/var/run/rvndiptcomsk"
 
 #define SOCKET_PREFIX	"isock"
 
--- iptraf-3.0.0.orig/src/ifaces.c
+++ iptraf-3.0.0/src/ifaces.c
@@ -24,7 +24,7 @@
 #include <sys/ioctl.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
-#include <net/if.h>
+#include <linux/if.h>
 #include <fcntl.h>
 #include <string.h>
 #include <linux/if_packet.h>
@@ -32,14 +32,15 @@
 #include "error.h"
 
 extern int accept_unsupported_interfaces;
-#define NUM_SUPPORTED_IFACES 26
+#define NUM_SUPPORTED_IFACES 28
 
 extern int daemonized;
 
 char ifaces[][6] =
     { "lo", "eth", "sl", "ppp", "ippp", "plip", "fddi", "isdn", "dvb",
     "pvc", "hdlc", "ipsec", "sbni", "tr", "wvlan", "wlan", "sm2", "sm3",
-    "pent", "lec", "brg", "tun", "tap", "cipcb", "tunl", "vlan"
+    "pent", "lec", "brg", "tun", "tap", "cipcb", "tunl", "vlan", "ath",
+    "ra"
 };
 
 char *ltrim(char *buf)
@@ -102,7 +103,7 @@
 int iface_supported(char *iface)
 {
     int i;
-
+    
     if (accept_unsupported_interfaces)
         return 1;
 
--- iptraf-3.0.0.orig/src/isdntab.h
+++ iptraf-3.0.0/src/isdntab.h
@@ -1,3 +1,87 @@
+/* copied from Linux ISDN subsystem for inclusion in iptraf */
+
+/* Linux ISDN subsystem, main header
+ *
+ * Copyright 1994,95,96 by Fritz Elfert (fritz@isdn4linux.de)
+ * Copyright 1995,96    by Thinking Objects Software GmbH Wuerzburg
+ * Copyright 1995,96    by Michael Hipp (Michael.Hipp@student.uni-tuebingen.de)
+ * Copyright 2000-2002  by Kai Germaschewski (kai@germaschewski.name)
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
+ *
+ */
+
+/* Packet encapsulations for net-interfaces */
+#define ISDN_NET_ENCAP_ETHER      0
+#define ISDN_NET_ENCAP_RAWIP      1
+#define ISDN_NET_ENCAP_IPTYP      2
+#define ISDN_NET_ENCAP_CISCOHDLC  3 /* Without SLARP and keepalive */
+#define ISDN_NET_ENCAP_SYNCPPP    4
+#define ISDN_NET_ENCAP_UIHDLC     5
+#define ISDN_NET_ENCAP_CISCOHDLCK 6 /* With SLARP and keepalive    */
+#define ISDN_NET_ENCAP_X25IFACE   7 /* Documentation/networking/x25-iface.txt*/
+#define ISDN_NET_ENCAP_NR         8
+
+/* New ioctl-codes */
+#define IIOCNETAIF  _IO('I',1)
+#define IIOCNETDIF  _IO('I',2)
+#define IIOCNETSCF  _IO('I',3)
+#define IIOCNETGCF  _IO('I',4)
+#define IIOCNETANM  _IO('I',5)
+#define IIOCNETDNM  _IO('I',6)
+#define IIOCNETGNM  _IO('I',7)
+#define IIOCGETSET  _IO('I',8) /* no longer supported */
+#define IIOCSETSET  _IO('I',9) /* no longer supported */
+#define IIOCSETVER  _IO('I',10)
+#define IIOCNETHUP  _IO('I',11)
+#define IIOCSETGST  _IO('I',12)
+#define IIOCSETBRJ  _IO('I',13)
+#define IIOCSIGPRF  _IO('I',14)
+#define IIOCGETPRF  _IO('I',15)
+#define IIOCSETPRF  _IO('I',16)
+#define IIOCGETMAP  _IO('I',17)
+#define IIOCSETMAP  _IO('I',18)
+#define IIOCNETASL  _IO('I',19)
+#define IIOCNETDIL  _IO('I',20)
+#define IIOCGETCPS  _IO('I',21)
+#define IIOCGETDVR  _IO('I',22)
+
+
+typedef struct {
+	char	name[10];	/* Name of interface                     */
+	char	master[10];	/* Name of Master for Bundling           */
+	char	slave[10];	/* Name of Slave for Bundling            */
+	char	eaz[256];	/* EAZ/MSN                               */
+	char	drvid[25];	/* DriverId for Bindings                 */
+	int	onhtime;	/* Hangup-Timeout                        */
+	int	charge;		/* Charge-Units                          */
+	int	l2_proto;	/* Layer-2 protocol                      */
+	int	l3_proto;	/* Layer-3 protocol                      */
+	int	p_encap;	/* Encapsulation                         */
+	int	exclusive;	/* Channel, if bound exclusive           */
+	int	dialmax;	/* Dial Retry-Counter                    */
+	int	slavedelay;	/* Delay until slave starts up           */
+	int	cbdelay;	/* Delay before Callback                 */
+	int	chargehup;	/* Flag: Charge-Hangup                   */
+	int	ihup;		/* Flag: Hangup-Timeout on incoming line */
+	int	secure;		/* Flag: Secure                          */
+	int	callback;	/* Flag: Callback                        */
+	int	cbhup;		/* Flag: Reject Call before Callback     */
+	int	pppbind;	/* ippp device for bindings              */
+	int	chargeint;	/* Use fixed charge interval length      */
+	int	triggercps;	/* BogoCPS needed for triggering slave   */
+	int	dialtimeout;	/* Dial-Timeout                          */
+	int	dialwait;	/* Time to wait after failed dial        */
+	int	dialmode;	/* Flag: off / on / auto                 */
+} isdn_net_ioctl_cfg;
+
+
+
+
+/* end of copied part */
+
+
 struct isdntabent {
     char ifname[10];
     unsigned int encap;
--- iptraf-3.0.0.orig/src/isdntab.c
+++ iptraf-3.0.0/src/isdntab.c
@@ -20,7 +20,6 @@
 #include <stdlib.h>
 #include <string.h>
 #include <sys/ioctl.h>
-#include <linux/isdn.h>
 #include "isdntab.h"
 
 
--- iptraf-3.0.0.orig/src/pktsize.c
+++ iptraf-3.0.0/src/pktsize.c
@@ -25,7 +25,7 @@
 #include <sys/time.h>
 #include <sys/ioctl.h>
 #include <sys/socket.h>
-#include <net/if.h>
+#include <linux/if.h>
 #include <netinet/in.h>
 #include <linux/if_ether.h>
 #include <linux/if_packet.h>
--- iptraf-3.0.0.orig/src/promisc.h
+++ iptraf-3.0.0/src/promisc.h
@@ -9,7 +9,7 @@
  */
 
 struct promisc_params {
-    char ifname[8];
+    char ifname[18];
     int saved_state;
     int state_valid;
 };
--- iptraf-3.0.0.orig/src/install.sh
+++ iptraf-3.0.0/src/install.sh
@@ -18,37 +18,38 @@
 WORKDIR=$2
 LOGDIR=$3
 LOCKDIR=$4
+DESTDIR=$5
 
 echo
 echo "*** Installing executable programs and preparing work directories"
 echo
 echo ">>> Installing iptraf in $TARGET"
-$INSTALL -m 0700 -o root -g root -s iptraf $TARGET
+$INSTALL -m 0700 -o root -g root iptraf $DESTDIR/$TARGET
 echo ">>> Installing rvnamed in $TARGET"
-$INSTALL -m 0700 -o root -g root -s rvnamed $TARGET
+$INSTALL -m 0700 -o root -g root rvnamed $DESTDIR/$TARGET
 
-if [ ! -d $WORKDIR ]; then
+if [ ! -d $DESTDIR/$WORKDIR ]; then
     echo ">>> Creating IPTraf work directory $WORKDIR"
 else
     echo ">>> IPTraf work directory $WORKDIR already exists"
-    rm -f $WORKDIR/othfilter.dat
+    rm -f $DESTDIR/$WORKDIR/othfilter.dat
 fi
 
-$INSTALL -m 0700 -o root -g root -d $WORKDIR
+$INSTALL -m 0700 -o root -g root -d $DESTDIR/$WORKDIR
 
-if [ ! -d $LOGDIR ]; then
+if [ ! -d $DESTDIR/$LOGDIR ]; then
     echo ">>> Creating IPTraf log directory $LOGDIR"
 else
     echo ">>> IPTraf log directory $LOGDIR already exists"
 fi
-$INSTALL -m 0700 -o root -g root -d $LOGDIR
+$INSTALL -m 0700 -o root -g root -d $DESTDIR/$LOGDIR
 
-if [ ! -d $LOCKDIR ]; then
+if [ ! -d $DESTDIR/$LOCKDIR ]; then
     echo ">>> Creating IPTraf lockfile directory $LOCKDIR"
 else
     echo ">>> IPTraf lockfile directory $LOCKDIR already exists"
 fi
-$INSTALL -m 0700 -o root -g root -d $LOCKDIR
+$INSTALL -m 0700 -o root -g root -d $DESTDIR/$LOCKDIR
 echo
 echo
 echo "*** iptraf, and rvnamed executables are in $TARGET"
@@ -56,25 +57,27 @@
 
 ################# Filter clearing for 3.0 ##########################
 
-if [ ! -f $WORKDIR/version ]; then
+if [ ! -f $DESTDIR/$WORKDIR/version ]; then
     echo ">>> Clearing old filter list"
-    if [ -f $WORKDIR/tcpfilters.dat ]; then
-        mv -f $WORKDIR/tcpfilters.dat $WORKDIR/tcpfilters.dat~
+    if [ -f $DESTDIR/$WORKDIR/tcpfilters.dat ]; then
+        mv -f $DESTDIR/$WORKDIR/tcpfilters.dat $DESTDIR/$WORKDIR/tcpfilters.dat~
     fi
     
-    if [ -f $WORKDIR/udpfilters.dat ]; then
-        mv -f $WORKDIR/udpfilters.dat $WORKDIR/udpfilters.dat~
+    if [ -f $DESTDIR/$WORKDIR/udpfilters.dat ]; then
+        mv -f $DESTDIR/$WORKDIR/udpfilters.dat $DESTDIR/$WORKDIR/udpfilters.dat~
     fi
 
-    if [ -f $WORKDIR/othipfilters.dat ]; then
-        mv -f $WORKDIR/othipfilters.dat $WORKDIR/othipfilters.dat~
+    if [ -f $DESTDIR/$WORKDIR/othipfilters.dat ]; then
+        mv -f $DESTDIR/$WORKDIR/othipfilters.dat $DESTDIR/$WORKDIR/othipfilters.dat~
     fi
 
-    rm -f $WORKDIR/savedfilters.dat
+    rm -f $DESTDIR/$WORKDIR/savedfilters.dat
 fi
 ####################################################################
 
-cat version > $WORKDIR/version
+cat version > $DESTDIR/$WORKDIR/version
+
+exit 0
 
 echo 
 echo
--- iptraf-3.0.0.orig/src/tr.c
+++ iptraf-3.0.0/src/tr.c
@@ -7,7 +7,7 @@
  */
 
 #include <asm/types.h>
-#include <linux/if_tr.h>
+#include <netinet/if_tr.h>
 #include <netinet/in.h>
 
 unsigned int get_tr_ip_offset(unsigned char *pkt)
--- iptraf-3.0.0.orig/debian/manpages
+++ iptraf-3.0.0/debian/manpages
@@ -0,0 +1,2 @@
+Documentation/iptraf.8
+Documentation/rvnamed.8
--- iptraf-3.0.0.orig/debian/dirs
+++ iptraf-3.0.0/debian/dirs
@@ -0,0 +1,7 @@
+etc/logrotate.d 
+usr/sbin 
+usr/lib/iptraf 
+usr/share/doc-base/ 
+var/lib/iptraf/ 
+var/run/iptraf/
+
--- iptraf-3.0.0.orig/debian/README.debian
+++ iptraf-3.0.0/debian/README.debian
@@ -0,0 +1,16 @@
+iptraf for Debian
+-----------------
+
+Since 2.1.1, old config files (versions below 1.4.0) won't be updated to the
+new format. Binary config files are a pain; let's suffer :( (old tools don't
+compile anymore)
+
+IPTraf does _not_ work with IPv6. you've been warned.
+
+IPTraf for Debian supports wvlan and lec interfaces that upstream doesn't
+support by lack of thorough testing. This support is here since users
+requested it but no tests have been done !
+
+-- 
+Frederic Peters <fpeters@debian.org>, Wed, 19 Dec 2001 10:27:54 +0100
+
--- iptraf-3.0.0.orig/debian/changelog
+++ iptraf-3.0.0/debian/changelog
@@ -0,0 +1,424 @@
+iptraf (3.0.0-6) unstable; urgency=low
+
+  * src/ifaces.c: added support for raX interfaces (closes: #281315)
+  * debian/menu: updated to new menu policy (froms Apps/Net to Applications /
+    Network / Monitoring)
+  * src/iptraf.c: added call to setlocale() (closes: #328186, #327147)  (that
+    I couldn't reproduce anyway)
+
+ -- Frederic Peters <fpeters@debian.org>  Sat, 29 Sep 2007 12:42:56 +0200
+
+iptraf (3.0.0-5) unstable; urgency=low
+
+  * src/Makefile, src/install.sh: always use -g, and don't strip binaries
+    (closes: #437229)
+
+ -- Frederic Peters <fpeters@debian.org>  Wed, 15 Aug 2007 15:36:49 +0200
+
+iptraf (3.0.0-4) unstable; urgency=low
+
+  * src/ifaces.c: incremented NUM_SUPPORTED_IFACES so that ath devices are
+    recognised correctly. (closes: #413212)
+
+ -- Frederic Peters <fpeters@debian.org>  Sat,  3 Mar 2007 13:35:58 +0100
+
+iptraf (3.0.0-3) unstable; urgency=low
+
+  * Sync with Ubuntu fixes (by Oliver Grawert and Michael Vogt)
+    * added fix for /var/run detection (since it is a tmpfs by default on
+      Ubuntu) [and fixed ubuntu fix]
+    * added support for ath devices
+    * fixed FTBFS by changing linux/if_tr.h to netinet/if_tr.h
+
+ -- Frederic Peters <fpeters@debian.org>  Sun, 15 Oct 2006 13:34:14 +0200
+
+iptraf (3.0.0-2) unstable; urgency=low
+
+  * src/ifaces.c: remove duplicated patch, it had been applied upstream and I
+    missed it. (closes: #379539)
+
+ -- Frederic Peters <fpeters@debian.org>  Mon, 24 Jul 2006 11:02:29 +0200
+
+iptraf (3.0.0-1) unstable; urgency=low
+
+  * New upstream release. (closes: #370577)
+    * Oops, I missed it, thansk for the bug report.
+    * Updated patches to work against this version.
+    * Supports vlan interfaces (closes: #168202, #226577)
+    * Supports bridged interfaces (closes: #215535)
+  * debian/copyright: updated copyright & license information.
+  * debian/rules: partly updated to newer debhelper helpers.
+
+ -- Frederic Peters <fpeters@debian.org>  Tue,  6 Jun 2006 07:36:49 +0200
+
+iptraf (2.7.0-8) unstable; urgency=low
+
+  * src/*.[ch]: shaked up headers so it compiles with current libc and linux
+    headers (closes: #323319)
+
+ -- Frederic Peters <fpeters@debian.org>  Tue, 16 Aug 2005 10:24:50 +0200
+
+iptraf (2.7.0-7) unstable; urgency=low
+
+  * Documentation/iptraf.8: use \- to denote the dash signs before options.
+
+ -- Frederic Peters <fpeters@debian.org>  Sat, 26 Feb 2005 10:37:01 +0100
+
+iptraf (2.7.0-6) unstable; urgency=low
+
+  * Creates rvnamed sockets in /var/run/ (closes: #272958)
+  * debian/menu: quote needs and section.
+
+ -- Frederic Peters <fpeters@debian.org>  Thu, 23 Sep 2004 10:05:55 +0200
+
+iptraf (2.7.0-5) unstable; urgency=low
+
+  * Include bits from <linux/isdn.h> to get iptraf working without inclusion
+    of this kernel header (closes: #219757)
+  * Do not test for TERM if running daemonized (closes: #222525)
+  * Document -u in the manpage (closes: #147447, #199888)
+
+ -- Frederic Peters <fpeters@debian.org>  Thu, 11 Dec 2003 13:45:00 +0100
+
+iptraf (2.7.0-4) unstable; urgency=low
+
+  * debian/menu: fixed su-to-root in menu item (closes: #188078)
+  * debian/control: removed note about Linux kernel >= 2.2
+  * debian/control: updated policy to 3.6.1.0, no changes needed.
+
+ -- Frederic Peters <fpeters@debian.org>  Sat, 30 Aug 2003 23:16:41 +0200
+
+iptraf (2.7.0-3) unstable; urgency=low
+
+  * Added support for vlan interfaces. (patch by Ard van Breemen)
+
+ -- Frederic Peters <fpeters@debian.org>  Mon, 11 Nov 2002 17:52:22 +0100
+
+iptraf (2.7.0-2) unstable; urgency=low
+
+  * debian/iptraf-manual: there is no longer a plain text manual.
+    (closes: #149648)
+
+ -- Frederic Peters <fpeters@debian.org>  Tue, 11 Jun 2002 11:40:45 +0200
+
+iptraf (2.7.0-1) unstable; urgency=low
+
+  * New upstream release.
+  * Upstream fixes detailed interface statitistics screen. (closes: #146851)
+  * Upstream has support for renamed interfaces. (closes: #128175)
+    but no documentation for it (doesn't close: 147447...)
+
+ -- Frederic Peters <fpeters@debian.org>  Wed, 22 May 2002 09:31:32 +0200
+
+iptraf (2.6.0-1) unstable; urgency=low
+
+  * New upstream release.
+  * Upstream added percentage broadcast packet. (closes: #119915)
+  * Upstream applied my patch for renamed interfaces. (closes: #128175)
+
+ -- Frederic Peters <fpeters@debian.org>  Wed,  1 May 2002 11:46:31 +0200
+
+iptraf (2.5.0-4) unstable; urgency=low
+
+  * debian/logrotate: s/USR/USR1/ (closes: #131106)
+  * No longer hangs with resolver daemon (closes: #83522)
+  * debian/postrm: remove /var/run/iptraf on purge (closes: #129907)
+
+ -- Frederic Peters <fpeters@debian.org>  Sun, 27 Jan 2002 13:51:48 +0100
+
+iptraf (2.5.0-3) unstable; urgency=low
+
+  * debian/postinst: fixed spelling mistake itpraf -> iptraf. Caused old
+    script to rotate logs not to be renamed. (closes: #129744)
+
+ -- Frederic Peters <fpeters@debian.org>  Fri, 18 Jan 2002 12:33:38 +0100
+
+iptraf (2.5.0-2) unstable; urgency=low
+
+  * debian/menu: use su-to-root to launch iptraf from menu. (closes: #128144)
+  * debian/doc: removed README.Documentation since it talks about installing
+    documentation and this is already done by the package. (closes: #126932)
+
+ -- Frederic Peters <fpeters@debian.org>  Mon,  7 Jan 2002 21:31:09 +0100
+
+iptraf (2.5.0-1) unstable; urgency=low
+
+  * New upstream release. (closes: #125726)
+  * Upstream source tarball no longer contains compiled binaries.
+    (closes: #122677)
+
+ -- Frederic Peters <fpeters@debian.org>  Wed, 19 Dec 2001 10:10:07 +0100
+
+iptraf (2.4.0-4) unstable; urgency=low
+
+  * debian/logrotate: don't fail if iptraf is not running. (closes: #122692)
+  * debian/copyright: corrected licences -> licenses
+
+ -- Frederic Peters <fpeters@debian.org>  Thu,  6 Dec 2001 19:17:39 +0100
+
+iptraf (2.4.0-3) unstable; urgency=low
+
+  * debian/logrotate: added USR1 signal sending after logrotate rotated the
+    logfiles. (notification by Sebastian Henschel <shensche@defcom.de>)
+  * debian/changelog: removed emacs cruft from the end of the file.
+  * src/Makefile: removed -g from gcc flags.
+  * debian/rules, src/Makefile: added support for DEB_BUILD_OPTIONS
+  * debian/control: updated Standard-Versions to 3.5.6.0
+
+ -- Frederic Peters <fpeters@debian.org>  Tue, 27 Nov 2001 13:36:37 +0100
+
+iptraf (2.4.0-2) unstable; urgency=low
+
+  * Fixed logfile directory location in rvnamed manpage (Closes: #99455)
+  * Added support for lec interfaces.
+
+ -- Frederic Peters <fpeters@debian.org>  Mon,  2 Jul 2001 11:34:39 +0200
+
+iptraf (2.4.0-1) unstable; urgency=low
+
+  * New upstream release.
+  * Upstream includes /etc/ethers patch.
+
+ -- Frederic Peters <fpeters@debian.org>  Wed, 11 Apr 2001 11:19:26 +0200
+
+iptraf (2.3.1-2) unstable; urgency=low
+
+  * Patched so it can use /etc/ethers like tcpdump (Closes: #32134)
+  * debian/postinst: as a consequence it no longer creates ethernet.desc
+    from an existing /etc/ethers
+
+ -- Frederic Peters <fpeters@debian.org>  Tue, 19 Dec 2000 20:35:25 +0100
+
+iptraf (2.3.1-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Frederic Peters <fpeters@debian.org>  Sat,  9 Dec 2000 16:42:35 +0100
+
+iptraf (2.2.2-3) unstable; urgency=high
+
+  * applied patch to support wvlan interfaces (patch by eichin@thok.org)
+    (closes: #70875)
+  * fixed rvnamed so it doesn't segfault (and makes iptraf locking up)
+    when /var/log/iptraf doesn't exist. (closes: #71487)
+
+ -- Frederic Peters <fpeters@debian.org>  Mon, 27 Nov 2000 18:21:21 +0100
+
+iptraf (2.2.2-2) unstable; urgency=high
+
+  * debian/rules: rename old /etc/cron.daily/iptraf to /e/c.d/iptraf.obsolete
+    since we now use logrotate (and dpkg won't remove it automatically)
+    (closes: #72998)
+  * debian/logrotate: added notifempty statemente
+
+ -- Frederic Peters <fpeters@debian.org>  Mon, 16 Oct 2000 22:37:54 +0200
+
+iptraf (2.2.2-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Frederic Peters <fpeters@debian.org>  Thu, 24 Aug 2000 19:22:07 +0200
+
+iptraf (2.1.1-5) unstable; urgency=low
+
+  * create log directory in postinst since it will only be removed by purge
+    (ie not remove) (closes: #58961)
+
+ -- Frederic Peters <fpeters@debian.org>  Wed,  1 Mar 2000 15:08:34 +0100
+
+iptraf (2.1.1-4) frozen unstable; urgency=high
+
+  * recompiled against libncurses5
+  * debian/control: fixed Build-Depends line (libncurses4-dev has been
+    replaced by libncurses-dev)/ (closes: #56376)
+
+ -- Frederic Peters <fpeters@debian.org>  Sat, 29 Jan 2000 01:50:53 +0100
+
+iptraf (2.1.1-3) frozen unstable; urgency=low
+
+  * debian/postinst: iptraf wouldn't install because of /var/state/iptraf
+    no longer existing. (closes: #56147)
+
+ -- Frederic Peters <fpeters@debian.org>  Tue, 25 Jan 2000 23:14:25 +0100
+
+iptraf (2.1.1-2) unstable; urgency=low
+
+  * /var/lib/iptraf was not created
+
+ -- Frederic Peters <fpeters@debian.org>  Tue, 21 Dec 1999 17:10:40 +0100
+ 
+iptraf (2.1.1-1) unstable; urgency=high
+
+  * Maintainer upload :)
+  * Closes: #52341 and #52837 (rvnamed not working)
+  * Closes: #52548 (/usr/doc/iptraf not existing)
+  * Closes: #51801 (make building in live fs)
+
+ -- Frederic Peters <fpeters@debian.org>  Fri, 17 Dec 1999 17:45:57 +0100
+ 
+iptraf (2.1.1-0.2) unstable; urgency=low
+
+  * Another NMU requested by Frederic.
+  * debian/postinst: Fixed move from /var/lib/iptraf to /var/state/iptraf 
+    to work in all cases (closes: #51712).
+  * debian/postinst: Commented out the config file conversion tools.
+    I can't get them to compile anymore :(
+
+ -- Torsten Landschoff <torsten@debian.org>  Sat,  4 Dec 1999 12:04:51 +0100
+
+iptraf (2.1.1-0.1) unstable; urgency=low
+
+  * Debian QA Upload as requested by Frederic.
+  * New upstream release (closes: #50804).
+  * New features:
+    - New filter for non-IP packages (closes: #44420).
+    - Ctrl-L does redraw the screen now (closes: #43848).
+  * debian/control: Added Build-Depends, updated Standards-Version.
+  * debian/rules: Updated to adjust for changes in upstream source:
+  * Removed the old configfile conversion tools. I don't think they 
+    are worth the effort.
+
+ -- Torsten Landschoff <torsten@debian.org>  Tue, 23 Nov 1999 17:49:23 +0100
+
+iptraf (2.0.2-5) unstable; urgency=low
+
+  * Added 'missingok' to logrotate.d/iptraf . (bug#44794)
+
+ -- Frederic Peters <fpeters@debian.org>  Fri, 10 Sep 1999 20:14:56 +0200
+
+iptraf (2.0.2-4) unstable; urgency=low
+
+  * Updated debian/rules to build with newer debhelper
+
+ -- Frederic Peters <fpeters@debian.org>  Thu,  9 Sep 1999 18:32:00 +0200
+
+iptraf (2.0.2-3) unstable; urgency=low
+
+  * Moved to logrotate (it should now be compliant with policy 3.0.1)
+
+ -- Frederic Peters <fpeters@debian.org>  Sun,  5 Sep 1999 19:56:59 +0200
+
+iptraf (2.0.2-2) unstable; urgency=low
+
+  * Fixed postinst removal of /etc/iptraf.cfg (Bug#43625)
+
+ -- Frederic Peters <fpeters@debian.org>  Sun, 29 Aug 1999 02:32:41 +0200
+
+iptraf (2.0.2-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Frederic Peters <fpeters@debian.org>  Thu, 29 Jul 1999 22:48:35 +0200
+
+iptraf (1.4.2-2) unstable; urgency=low
+
+  * debian/rules : fixed a few errors (Fixes Bug#32265)
+  * debian/postinst : improved handling of converting format from
+    older releases
+  * Converting /etc/ethers (from tcpdump) to iptraf's ethernet.desc
+    (Fixes Bug#32134)
+
+ -- Frederic Peters <fpeters@debian.org>  Sat, 30 Jan 1999 17:52:27 +0100
+ 
+iptraf (1.4.2-1) unstable; urgency=low
+
+  * New upstream release (Fixes Bug#31805)
+  * Switched to debhelper
+
+ -- Frederic Peters <fpeters@debian.org>  Mon, 18 Jan 1999 16:47:38 +0100
+ 
+iptraf (1.4.1-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Frederic Peters <fpeters@debian.org>  Mon,  4 Jan 1999 19:59:53 +0100
+
+iptraf (1.3.0-5) frozen unstable; urgency=low
+
+  * Fixed a typo in postrm (Bug#30559)
+
+ -- Frederic Peters <fpeters@debian.org>  Sun, 13 Dec 1998 18:45:31 +0100
+
+iptraf (1.3.0-4.1) unstable; urgency=low
+
+  * non-maintainer (binary-only) upload for Alpha
+  * make 3.77-2 apparently doesn't like `*.h' as target
+
+ -- Paul Slootman <paul@debian.org>  Mon, 12 Oct 1998 20:41:28 +0200
+
+iptraf (1.3.0-4) unstable; urgency=low
+
+  * (Re) Added daily maintenance of log file.
+
+ -- Frederic Peters <fpeters@debian.org>  Mon,  5 Oct 1998 21:40:04 +0200
+
+iptraf (1.3.0-3) unstable; urgency=low
+
+  * New versions aren't just for Alpha people :)
+
+ -- Frederic Peters <fpeters@debian.org>  Thu, 24 Sep 1998 23:04:33 +0200
+
+iptraf (1.3.0-2.1) unstable; urgency=low
+
+  * non-maintainer (binary-only) upload for Alpha
+  * fixed creation of /var/log/iptraf (should be $DESTDIR/var/log/iptraf)
+
+ -- Paul Slootman <paul@debian.org>  Thu, 24 Sep 1998 00:31:19 +0200
+
+iptraf (1.3.0-2) unstable; urgency=low
+
+  * Made it upgrade right from both 1.1 and 1.2 releases.
+  * Version 1.3.0 brings a warning message at startup when IP Masquerading is enabled in the kernel. This can be boring so I add a new switch (-q).
+
+ -- Frederic Peters <fpeters@debian.org>  Mon, 21 Sep 1998 08:11:33 +0200
+
+iptraf (1.3.0-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Frederic Peters <fpeters@debian.org>  Sun, 20 Sep 1998 22:57:54 +0200
+
+iptraf (1.2.0-2) unstable; urgency=low
+
+  * Added PLIP to included interfaces (fixes #26376)
+
+ -- Frederic Peters <fpeters@debian.org>  Sat, 19 Sep 1998 11:08:24 +0200
+
+iptraf (1.2.0-1) unstable; urgency=low
+
+  * New maintainer.
+  * New upstream release.
+  * Moved configuration files from /var/lib/iptraf/ to /etc/iptraf/.
+  * Moved log files from /var/lib/iptraf/ to /var/log/.
+  * Removed '-m486' flag in Makefile (fixes #20989).
+  * Created man pages.
+  * Added doc-base support.
+
+ -- Frederic Peters <fpeters@debian.org>  Sat, 27 Jun 1998 15:30:28 +0200
+
+iptraf (1.1.0-3) unstable; urgency=low
+
+  * New maintainer.
+  * Many new improvements to package design.
+
+ -- Robert S. Edmonds <edmonds@freewwweb.com>  Mon,  6 Apr 1998 18:16:04 -0400
+
+iptraf (1.1.0-2) unstable; urgency=low
+
+  * path to rvnamed was wrong and thus rvnamed was not loaded when needed.
+  * Clean up *.rej files. Sigh.
+
+ -- Christoph Lameter <chris@waterf.org>  Sat, 28 Feb 1998 09:13:59 -0800
+
+iptraf (1.1.0-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Christoph Lameter <chris@waterf.org>  Sat, 28 Feb 1998 07:53:14 -0800
+
+iptraf (1.0-1) unstable; urgency=low
+
+  * Initial Release.
+
+ -- Christoph Lameter <chris@waterf.org>  Sat,  3 Jan 1998 21:59:02 -0800
+
--- iptraf-3.0.0.orig/debian/control
+++ iptraf-3.0.0/debian/control
@@ -0,0 +1,15 @@
+Source: iptraf
+Section: net
+Priority: optional
+Maintainer: Frederic Peters <fpeters@debian.org>
+Build-Depends: debhelper (>= 5.0.0-1), libncurses-dev
+Standards-Version: 3.7.2.0
+
+Package: iptraf
+Architecture: any
+Depends: ${shlibs:Depends}
+Description: Interactive Colorful IP LAN Monitor
+ IPTraf is an ncurses-based IP LAN monitor that generates
+ various network statistics including TCP info, UDP counts,
+ ICMP and OSPF information, Ethernet load info, node stats,
+ IP checksum errors, and others.
--- iptraf-3.0.0.orig/debian/copyright
+++ iptraf-3.0.0/debian/copyright
@@ -0,0 +1,29 @@
+This package is maintained by Frederic Peters <fpeters@debian.org>.
+
+It was downloaded from:
+  ftp://iptraf.seul.org/pub/iptraf/iptraf-3.0.0.tar.gz
+
+
+Copyright (c) Gerard Paul Java 1997-2005
+
+IPTraf is open-source software, distributed under the terms of the GNU
+General Public License, Version 2, or (at your option) any later version.
+
+This program is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 2 of the License, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 51
+Franklin St, Fifth Floor, Boston, MA  02110-1301,  USA.
+
+
+On Debian GNU/Linux systems, the complete text of the GNU General Public
+License can be found in `/usr/share/common-licenses/GPL'.
+
--- iptraf-3.0.0.orig/debian/docs
+++ iptraf-3.0.0/debian/docs
@@ -0,0 +1,8 @@
+README
+README.interfaces
+README.platforms
+README.rvnamed
+README.contact
+FAQ
+RELEASE-NOTES
+
--- iptraf-3.0.0.orig/debian/postinst
+++ iptraf-3.0.0/debian/postinst
@@ -0,0 +1,66 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+    configure)
+	if [ -e /etc/iptraf.cfg ]
+	then
+		# old, incompatible, binary config file - I won't miss you :)
+		rm -f /etc/iptraf.cfg
+	fi
+
+	if command -v install-docs >/dev/null 2>&1; then
+		install-docs -i /usr/share/doc-base/iptraf
+	fi
+
+	if [ ! -d /var/lib/iptraf ]; then
+		mkdir /var/lib/iptraf
+	fi
+
+	if [ -e /var/state/iptraf ]; then
+		find /var/state/iptraf -mindepth 1 -maxdepth 1 	\
+					-exec mv \{\} /var/lib/iptraf/ \;
+		rmdir /var/state/iptraf || true
+	fi
+
+	# log files may have sensitive data
+	test -d /var/log/iptraf || mkdir /var/log/iptraf
+	chmod 0700 /var/log/iptraf
+
+	# renaming old logfile rotator since it is marked as conffile and dpkg won't
+	# remove it (reported as Bug#72998 by Josip Rodin <joy@cibalia.gkvk.hr>
+	test -e /etc/cron.daily/iptraf && \
+		mv /etc/cron.daily/iptraf /etc/cron.daily/iptraf.obsolete
+
+	# filters changed in 3.0, move them away (copied from in src/install.sh)
+	WORKDIR=/var/lib/iptraf/
+	if [ -z "$2" ] || dpkg --compare-versions "$2" lt 3.0.0-1 ; then
+		if [ -f $WORKDIR/tcpfilters.dat ]; then
+			mv -f $WORKDIR/tcpfilters.dat $WORKDIR/tcpfilters.dat~
+		fi
+
+		if [ -f $WORKDIR/udpfilters.dat ]; then
+			mv -f $WORKDIR/udpfilters.dat $WORKDIR/udpfilters.dat~
+		fi
+
+		if [ -f $WORKDIR/othipfilters.dat ]; then
+			mv -f $WORKDIR/othipfilters.dat $WORKDIR/othipfilters.dat~
+		fi
+
+		rm -f $WORKDIR/savedfilters.dat
+	fi
+	;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+        ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+        ;;
+esac
+
+
+#DEBHELPER#
+
--- iptraf-3.0.0.orig/debian/menu
+++ iptraf-3.0.0/debian/menu
@@ -0,0 +1,4 @@
+?package(iptraf):needs="text" \
+	section="Applications/Network/Monitoring" \
+	title="IPTraf" hints="Monitoring" \
+	command="/usr/bin/su-to-root -c /usr/sbin/iptraf"
--- iptraf-3.0.0.orig/debian/iptraf-manual
+++ iptraf-3.0.0/debian/iptraf-manual
@@ -0,0 +1,11 @@
+Document: iptraf
+Title: IPTraf User's Manual
+Author: Gerard Paul Java
+Abstract: This document is the User's Manual for IPTraf 2.7.0.
+ Documented here are the features of the program and instructions on its use.
+Section: Apps/Net
+
+Format: HTML
+Index: /usr/share/doc/iptraf/html/manual.html
+Files: /usr/share/doc/iptraf/html/manual.html
+
--- iptraf-3.0.0.orig/debian/rules
+++ iptraf-3.0.0/debian/rules
@@ -0,0 +1,78 @@
+#!/usr/bin/make -f
+# Made with the aid of dh_make, by Craig Small
+# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
+# Some lines taken from debmake, by Cristoph Lameter.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+makeopts      := \
+		 WORKDIR=/var/lib/iptraf			\
+		 LOGDIR=/var/log/iptraf				\
+		 TARGET=/usr/sbin				\
+		 DESTDIR=$(shell pwd)/debian/iptraf
+
+build: build-stamp
+build-stamp:
+	dh_testdir
+
+	# Add here commands to compile the package.
+	cd src; make $(makeopts)
+	
+	cp Documentation/README README.Documentation
+
+	touch build-stamp
+
+clean:
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp
+	rm -f README.Documentation
+
+	# Add here commands to clean up after the build process.
+	-cd src; make clean
+	dh_clean
+
+# Build architecture-independent files here.
+binary-indep: build
+
+# Build architecture-dependent files here.
+binary-arch: build
+#	dh_testversion
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs
+
+	# commands to install the files into debian/iptraf
+	cp debian/iptraf-manual debian/iptraf/usr/share/doc-base/iptraf
+
+	cd src; $(MAKE) install $(makeopts)
+
+	dh_installdocs
+	dh_installmenu
+	dh_installlogrotate
+	dh_installman -A
+	dh_installchangelogs	CHANGES
+
+	mkdir debian/iptraf/usr/share/doc/iptraf/html
+	mkdir debian/iptraf/usr/share/doc/iptraf/html/stylesheet-images/
+	cp Documentation/*.html debian/iptraf/usr/share/doc/iptraf/html/
+	cp Documentation/stylesheet-images/*.gif debian/iptraf/usr/share/doc/iptraf/html/stylesheet-images/
+	dh_strip
+	dh_compress
+	dh_fixperms
+	chmod 0750 debian/iptraf/var/log/iptraf
+
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+source diff:                                                                  
+	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary
+
--- iptraf-3.0.0.orig/debian/postrm
+++ iptraf-3.0.0/debian/postrm
@@ -0,0 +1,18 @@
+#! /bin/sh
+
+set -e
+
+if [ $1 = purge ]; then
+	if [ -e /etc/iptraf.cfg ]; then
+		rm --force /etc/iptraf.cfg
+	fi
+	if [ -d /var/log/iptraf ]; then
+		rm -rf /var/log/iptraf
+	fi
+	if [ -d /var/lib/iptraf ]; then
+		rm -rf /var/lib/iptraf
+	fi
+fi
+
+#DEBHELPER#
+
--- iptraf-3.0.0.orig/debian/prerm
+++ iptraf-3.0.0/debian/prerm
@@ -0,0 +1,8 @@
+#! /bin/sh
+
+if command -v install-docs >/dev/null 2>&1; then
+	install-docs -r iptraf
+fi
+
+#DEBHELPER#
+
--- iptraf-3.0.0.orig/debian/compat
+++ iptraf-3.0.0/debian/compat
@@ -0,0 +1 @@
+5
--- iptraf-3.0.0.orig/debian/iptraf.logrotate
+++ iptraf-3.0.0/debian/iptraf.logrotate
@@ -0,0 +1,12 @@
+
+/var/log/iptraf/*.log {
+	rotate 7
+	daily
+	compress
+	missingok
+	notifempty
+	postrotate
+		/usr/bin/killall -USR1 iptraf 2> /dev/null || :
+	endscript
+}
+