Fri Jan 11 00:05:54 2013 UTC ()
Match pcap_handler. Add missing includes.


(joerg)
diff -r1.5 -r1.6 pkgsrc/security/sniff/distinfo
diff -r0 -r1.1 pkgsrc/security/sniff/patches/patch-readTCP.c
diff -r0 -r1.1 pkgsrc/security/sniff/patches/patch-sniff2.h

cvs diff -r1.5 -r1.6 pkgsrc/security/sniff/distinfo (expand / switch to unified diff)

--- pkgsrc/security/sniff/distinfo 2009/02/16 18:49:58 1.5
+++ pkgsrc/security/sniff/distinfo 2013/01/11 00:05:53 1.6
@@ -1,6 +1,8 @@ @@ -1,6 +1,8 @@
1$NetBSD: distinfo,v 1.5 2009/02/16 18:49:58 joerg Exp $ 1$NetBSD: distinfo,v 1.6 2013/01/11 00:05:53 joerg Exp $
2 2
3SHA1 (sniff-2.0.tar.gz) = 9e9ef76eaccaa6cbb3c23054a29a08dd9faed328 3SHA1 (sniff-2.0.tar.gz) = 9e9ef76eaccaa6cbb3c23054a29a08dd9faed328
4RMD160 (sniff-2.0.tar.gz) = 8879f5ffcfc3f59fcde7cbc5c103d7c7f4947c4b 4RMD160 (sniff-2.0.tar.gz) = 8879f5ffcfc3f59fcde7cbc5c103d7c7f4947c4b
5Size (sniff-2.0.tar.gz) = 10720 bytes 5Size (sniff-2.0.tar.gz) = 10720 bytes
6SHA1 (patch-aa) = 52fa7e4382fa4abe5357af3ad0cbded00939b1e0 6SHA1 (patch-aa) = 52fa7e4382fa4abe5357af3ad0cbded00939b1e0
 7SHA1 (patch-readTCP.c) = 45e6701bb04507dc5f5dc4df3dc03c8441d25e66
 8SHA1 (patch-sniff2.h) = 488b7770520c0ebf5abbd64cb1dd7e9d1a65b9a6

File Added: pkgsrc/security/sniff/patches/patch-readTCP.c
$NetBSD: patch-readTCP.c,v 1.1 2013/01/11 00:05:54 joerg Exp $

--- readTCP.c.orig	2001-02-15 12:20:31.000000000 +0000
+++ readTCP.c
@@ -4,17 +4,17 @@ extern struct etherpacket ep;
 extern struct victim vittima;
 extern struct iphdr  *ip;
 
-int readTCP(u_char *u, struct pcap_pkthdr *p, u_char *packet)
+void readTCP(u_char *u, const struct pcap_pkthdr *p, const u_char *packet)
 {
    int i;
-	memcpy(&ep,(unsigned char *)packet,p->caplen);
+	memcpy(&ep,(const unsigned char *)packet,p->caplen);
 	i=p->caplen;
       if (i <= 0)
-        return -1;
+        return;
       if(i > 1) 
       {
 	if(!sniffData()) 
-	  return 0;
+	  return;
 	i=i-54;
 	if(i < 1) 
 	  return;

File Added: pkgsrc/security/sniff/patches/patch-sniff2.h
$NetBSD: patch-sniff2.h,v 1.1 2013/01/11 00:05:54 joerg Exp $

--- sniff2.h.orig	2001-02-15 12:18:33.000000000 +0000
+++ sniff2.h
@@ -1,4 +1,6 @@
-
+#include <ctype.h>
+#include <stdlib.h>
+#include <unistd.h>
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <sys/time.h>
@@ -48,7 +50,7 @@ struct victim
 
 
 void ifOpen(void);
-int readTCP(u_char *u, struct pcap_pkthdr *p, u_char *packet);
+void readTCP(u_char *u, const struct pcap_pkthdr *p, const u_char *packet);
 int sniffData(void);
 int printHeader(void);
 int printData(int, char *);