diff options
author | joerg <joerg@pkgsrc.org> | 2013-01-11 00:05:53 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2013-01-11 00:05:53 +0000 |
commit | 42707bef5ba9079c35c6365ca5c906bd39ca23a5 (patch) | |
tree | f81e17c04bf24154979223439b32ddb1a91d4e8b /security | |
parent | 763d88568feeb43e6430ef698205b793dc9d34f6 (diff) | |
download | pkgsrc-42707bef5ba9079c35c6365ca5c906bd39ca23a5.tar.gz |
Match pcap_handler. Add missing includes.
Diffstat (limited to 'security')
-rw-r--r-- | security/sniff/distinfo | 4 | ||||
-rw-r--r-- | security/sniff/patches/patch-readTCP.c | 26 | ||||
-rw-r--r-- | security/sniff/patches/patch-sniff2.h | 21 |
3 files changed, 50 insertions, 1 deletions
diff --git a/security/sniff/distinfo b/security/sniff/distinfo index c91c522c6f0..8387d8e4ad3 100644 --- a/security/sniff/distinfo +++ b/security/sniff/distinfo @@ -1,6 +1,8 @@ -$NetBSD: distinfo,v 1.5 2009/02/16 18:49:58 joerg Exp $ +$NetBSD: distinfo,v 1.6 2013/01/11 00:05:53 joerg Exp $ SHA1 (sniff-2.0.tar.gz) = 9e9ef76eaccaa6cbb3c23054a29a08dd9faed328 RMD160 (sniff-2.0.tar.gz) = 8879f5ffcfc3f59fcde7cbc5c103d7c7f4947c4b Size (sniff-2.0.tar.gz) = 10720 bytes SHA1 (patch-aa) = 52fa7e4382fa4abe5357af3ad0cbded00939b1e0 +SHA1 (patch-readTCP.c) = 45e6701bb04507dc5f5dc4df3dc03c8441d25e66 +SHA1 (patch-sniff2.h) = 488b7770520c0ebf5abbd64cb1dd7e9d1a65b9a6 diff --git a/security/sniff/patches/patch-readTCP.c b/security/sniff/patches/patch-readTCP.c new file mode 100644 index 00000000000..3bb663f8203 --- /dev/null +++ b/security/sniff/patches/patch-readTCP.c @@ -0,0 +1,26 @@ +$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; diff --git a/security/sniff/patches/patch-sniff2.h b/security/sniff/patches/patch-sniff2.h new file mode 100644 index 00000000000..600862f4119 --- /dev/null +++ b/security/sniff/patches/patch-sniff2.h @@ -0,0 +1,21 @@ +$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 *); |