Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Match pcap_handler. Add missing includes.

  • Loading branch information...
commit 08230487f37d9c7a097dfc71ea14fd00529c608f 1 parent 208d8b3
joerg authored
4 security/sniff/distinfo
View
@@ -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
26 security/sniff/patches/patch-readTCP.c
View
@@ -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;
21 security/sniff/patches/patch-sniff2.h
View
@@ -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 *);
Please sign in to comment.
Something went wrong with that request. Please try again.