Browse Source

remove old package

Waldemar Brodkorb 10 years ago
parent
commit
689c389d22
31 changed files with 0 additions and 3705 deletions
  1. 0 43
      package/dsniff/Makefile
  2. 0 32
      package/dsniff/patches/patch-Makefile_in
  3. 0 30
      package/dsniff/patches/patch-arp_c
  4. 0 11
      package/dsniff/patches/patch-arp_h
  5. 0 172
      package/dsniff/patches/patch-arpspoof_c
  6. 0 26
      package/dsniff/patches/patch-confdefs_h
  7. 0 137
      package/dsniff/patches/patch-configure
  8. 0 21
      package/dsniff/patches/patch-decode_c
  9. 0 681
      package/dsniff/patches/patch-dns_c
  10. 0 149
      package/dsniff/patches/patch-dnsspoof_c
  11. 0 22
      package/dsniff/patches/patch-filesnarf_c
  12. 0 116
      package/dsniff/patches/patch-macof_c
  13. 0 100
      package/dsniff/patches/patch-mount_c
  14. 0 154
      package/dsniff/patches/patch-mount_h
  15. 0 11
      package/dsniff/patches/patch-msgsnarf_c
  16. 0 740
      package/dsniff/patches/patch-nfs_prot_c
  17. 0 531
      package/dsniff/patches/patch-nfs_prot_h
  18. 0 155
      package/dsniff/patches/patch-record_c
  19. 0 46
      package/dsniff/patches/patch-ssh_c
  20. 0 43
      package/dsniff/patches/patch-sshcrypto_c
  21. 0 11
      package/dsniff/patches/patch-sshmitm_c
  22. 0 38
      package/dsniff/patches/patch-sshow_c
  23. 0 20
      package/dsniff/patches/patch-tcp_raw_c
  24. 0 11
      package/dsniff/patches/patch-tcp_raw_h
  25. 0 105
      package/dsniff/patches/patch-tcpkill_c
  26. 0 196
      package/dsniff/patches/patch-tcpnice_c
  27. 0 29
      package/dsniff/patches/patch-trigger_c
  28. 0 16
      package/dsniff/patches/patch-trigger_h
  29. 0 19
      package/dsniff/patches/patch-urlsnarf_c
  30. 0 20
      package/dsniff/patches/patch-webmitm_c
  31. 0 20
      package/dsniff/patches/patch-webspy_c

+ 0 - 43
package/dsniff/Makefile

@@ -1,43 +0,0 @@
-# This file is part of the OpenADK project. OpenADK is copyrighted
-# material, please see the LICENCE file in the top-level directory.
-
-include ${ADK_TOPDIR}/rules.mk
-
-PKG_NAME:=		dsniff
-PKG_VERSION:=		2.4b1
-PKG_RELEASE:=		2
-PKG_HASH:=		a9803a7a02ddfe5fb9704ce86f0ffc48453c321e88db85810db411ba0841152a
-PKG_DESCR:=		tools for network auditing and penetration testing
-PKG_SECTION:=		net/security
-PKG_DEPENDS:=		libnet libpcap libnids libopenssl libgdbm
-PKG_BUILDDEP:=		libnids openssl gdbm libpcap libnet
-PKG_URL:=		http://www.monkey.org/~dugsong/dsniff/
-PKG_SITES:=		http://www.monkey.org/~dugsong/dsniff/beta/
-
-# rpc problem
-PKG_CFLINE_DSNIFF:=	depends on ADK_BROKEN
-PKG_ARCH_DEPENDS:=	!arm
-PKG_LIBC_DEPENDS:=	uclibc glibc
-
-WRKDIST=		${WRKDIR}/${PKG_NAME}-2.4
-DISTFILES:=		${PKG_NAME}-${PKG_VERSION}.tar.gz
-
-include ${ADK_TOPDIR}/mk/package.mk
-
-$(eval $(call PKG_template,DSNIFF,dsniff,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
-
-CONFIGURE_ARGS+=	--without-db \
-			--without-x \
-			--with-gdbm="${STAGING_TARGET_DIR}/usr" \
-			--with-libnids="${STAGING_TARGET_DIR}/usr" \
-			--with-libpcap="${STAGING_TARGET_DIR}/usr" \
-			--with-libnet="${STAGING_TARGET_DIR}/usr" \
-			--with-openssl="${STAGING_TARGET_DIR}/usr"
-FAKE_FLAGS+=		install_prefix="${WRKINST}"
-
-dsniff-install:
-	${INSTALL_DIR} ${IDIR_DSNIFF}/usr/lib ${IDIR_DSNIFF}/usr/sbin
-	${CP} ${WRKINST}/usr/sbin/* ${IDIR_DSNIFF}/usr/sbin
-	${CP} ${WRKINST}/usr/lib/* ${IDIR_DSNIFF}/usr/lib
-
-include ${ADK_TOPDIR}/mk/pkg-bottom.mk

+ 0 - 32
package/dsniff/patches/patch-Makefile_in

@@ -1,32 +0,0 @@
-$Id$
---- dsniff-2.4.orig/Makefile.in	2001-03-15 09:34:42.000000000 +0100
-+++ dsniff-2.4/Makefile.in	2007-01-23 00:20:48.000000000 +0100
-@@ -51,7 +51,7 @@ HDRS	= asn1.h base64.h buf.h decode.h he
- 	  pathnames.h pcaputil.h record.h rpc.h tcp_raw.h trigger.h \
- 	  version.h vroot.h
- 
--SRCS	= asn1.c base64.c buf.c hex.c magic.c mount.c pcaputil.c rpc.c \
-+SRCS	= asn1.c base64.c buf.c dns.c hex.c magic.c mount.c pcaputil.c rpc.c \
- 	  tcp_raw.c trigger.c record.c dsniff.c decode.c decode_aim.c \
- 	  decode_citrix.c decode_cvs.c decode_ftp.c decode_hex.c \
- 	  decode_http.c decode_icq.c decode_imap.c decode_irc.c \
-@@ -60,7 +60,7 @@ SRCS	= asn1.c base64.c buf.c hex.c magic
- 	  decode_pop.c decode_portmap.c decode_postgresql.c decode_pptp.c \
- 	  decode_rip.c decode_rlogin.c decode_smb.c decode_smtp.c \
- 	  decode_sniffer.c decode_snmp.c decode_socks.c decode_tds.c \
--	  decode_telnet.c decode_vrrp.c decode_yp.c decode_x11.c
-+	  decode_telnet.c decode_vrrp.c decode_x11.c
- 
- GEN	= mount.h mount.c nfs_prot.h nfs_prot.c
- 
-@@ -99,8 +99,8 @@ dsniff: $(HDRS) $(SRCS) $(OBJS)
- arpspoof: arpspoof.o arp.o
- 	$(CC) $(LDFLAGS) -o $@ arpspoof.o arp.o $(LIBS) $(PCAPLIB) $(LNETLIB)
- 
--dnsspoof: dnsspoof.o pcaputil.o
--	$(CC) $(LDFLAGS) -o $@ dnsspoof.o pcaputil.o $(LIBS) $(PCAPLIB) $(LNETLIB)
-+dnsspoof: dnsspoof.o pcaputil.o dns.o
-+	$(CC) $(LDFLAGS) -o $@ dnsspoof.o pcaputil.o dns.o $(LIBS) $(PCAPLIB) $(LNETLIB)
- 
- filesnarf: nfs_prot.o filesnarf.o pcaputil.o rpc.o
- 	$(CC) $(LDFLAGS) -o $@ filesnarf.o nfs_prot.o pcaputil.o rpc.o $(LIBS) $(NIDSLIB) $(PCAPLIB) $(LNETLIB)

+ 0 - 30
package/dsniff/patches/patch-arp_c

@@ -1,30 +0,0 @@
-$Id$
---- dsniff-2.4.orig/arp.c	2001-03-15 09:32:58.000000000 +0100
-+++ dsniff-2.4/arp.c	2007-01-23 00:20:48.000000000 +0100
-@@ -39,7 +39,7 @@
- 
- #ifdef BSD
- int
--arp_cache_lookup(in_addr_t ip, struct ether_addr *ether)
-+arp_cache_lookup(in_addr_t ip, struct ether_addr *ether, const char *lif)
- {
- 	int mib[6];
- 	size_t len;
-@@ -91,7 +91,7 @@ arp_cache_lookup(in_addr_t ip, struct et
- #endif
- 
- int
--arp_cache_lookup(in_addr_t ip, struct ether_addr *ether)
-+arp_cache_lookup(in_addr_t ip, struct ether_addr *ether, const char *lif)
- {
- 	int sock;
- 	struct arpreq ar;
-@@ -99,7 +99,7 @@ arp_cache_lookup(in_addr_t ip, struct et
- 	
- 	memset((char *)&ar, 0, sizeof(ar));
- #ifdef __linux__
--	strncpy(ar.arp_dev, "eth0", sizeof(ar.arp_dev));   /* XXX - *sigh* */
-+	strncpy(ar.arp_dev, lif, strlen(lif));
- #endif
- 	sin = (struct sockaddr_in *)&ar.arp_pa;
- 	sin->sin_family = AF_INET;

+ 0 - 11
package/dsniff/patches/patch-arp_h

@@ -1,11 +0,0 @@
-$Id$
---- dsniff-2.4.orig/arp.h	2001-03-15 09:27:08.000000000 +0100
-+++ dsniff-2.4/arp.h	2007-01-23 00:20:48.000000000 +0100
-@@ -11,6 +11,6 @@
- #ifndef _ARP_H_
- #define _ARP_H_
- 
--int	arp_cache_lookup(in_addr_t ip, struct ether_addr *ether);
-+int	arp_cache_lookup(in_addr_t ip, struct ether_addr *ether, const char *lif);
- 
- #endif /* _ARP_H_ */

+ 0 - 172
package/dsniff/patches/patch-arpspoof_c

@@ -1,172 +0,0 @@
---- dsniff-2.4.orig/arpspoof.c	2001-03-15 09:32:58.000000000 +0100
-+++ dsniff-2.4/arpspoof.c	2009-12-11 13:14:45.000000000 +0100
-@@ -14,6 +14,7 @@
- #include <sys/types.h>
- #include <sys/param.h>
- #include <netinet/in.h>
-+#include <netinet/if_ether.h>
- 
- #include <stdio.h>
- #include <string.h>
-@@ -25,9 +26,9 @@
- #include "arp.h"
- #include "version.h"
- 
--extern char *ether_ntoa(struct ether_addr *);
-+//extern char *ether_ntoa(struct ether_addr *);
- 
--static struct libnet_link_int *llif;
-+static libnet_t *l;
- static struct ether_addr spoof_mac, target_mac;
- static in_addr_t spoof_ip, target_ip;
- static char *intf;
-@@ -41,47 +42,49 @@ usage(void)
- }
- 
- static int
--arp_send(struct libnet_link_int *llif, char *dev,
--	 int op, u_char *sha, in_addr_t spa, u_char *tha, in_addr_t tpa)
-+arp_send(libnet_t *l, int op, u_int8_t *sha,
-+	 in_addr_t spa, u_int8_t *tha, in_addr_t tpa)
- {
--	char ebuf[128];
--	u_char pkt[60];
--	
-+	int retval;
-+
- 	if (sha == NULL &&
--	    (sha = (u_char *)libnet_get_hwaddr(llif, dev, ebuf)) == NULL) {
-+	    (sha = (u_int8_t *)libnet_get_hwaddr(l)) == NULL) {
- 		return (-1);
- 	}
- 	if (spa == 0) {
--		if ((spa = libnet_get_ipaddr(llif, dev, ebuf)) == 0)
-+		if ((spa = libnet_get_ipaddr4(l)) == -1)
- 			return (-1);
--		spa = htonl(spa); /* XXX */
- 	}
- 	if (tha == NULL)
- 		tha = "\xff\xff\xff\xff\xff\xff";
- 	
--	libnet_build_ethernet(tha, sha, ETHERTYPE_ARP, NULL, 0, pkt);
-+	libnet_autobuild_arp(op, sha, (u_int8_t *)&spa,
-+			     tha, (u_int8_t *)&tpa, l);
-+	libnet_build_ethernet(tha, sha, ETHERTYPE_ARP, NULL, 0, l, 0);
- 	
--	libnet_build_arp(ARPHRD_ETHER, ETHERTYPE_IP, ETHER_ADDR_LEN, 4,
--			 op, sha, (u_char *)&spa, tha, (u_char *)&tpa,
--			 NULL, 0, pkt + ETH_H);
--
- 	fprintf(stderr, "%s ",
- 		ether_ntoa((struct ether_addr *)sha));
- 
- 	if (op == ARPOP_REQUEST) {
- 		fprintf(stderr, "%s 0806 42: arp who-has %s tell %s\n",
- 			ether_ntoa((struct ether_addr *)tha),
--			libnet_host_lookup(tpa, 0),
--			libnet_host_lookup(spa, 0));
-+			libnet_addr2name4(tpa, LIBNET_DONT_RESOLVE),
-+			libnet_addr2name4(spa, LIBNET_DONT_RESOLVE));
- 	}
- 	else {
- 		fprintf(stderr, "%s 0806 42: arp reply %s is-at ",
- 			ether_ntoa((struct ether_addr *)tha),
--			libnet_host_lookup(spa, 0));
-+			libnet_addr2name4(spa, LIBNET_DONT_RESOLVE));
- 		fprintf(stderr, "%s\n",
- 			ether_ntoa((struct ether_addr *)sha));
- 	}
--	return (libnet_write_link_layer(llif, dev, pkt, sizeof(pkt)) == sizeof(pkt));
-+	retval = libnet_write(l);
-+	if (retval)
-+		fprintf(stderr, "%s", libnet_geterror(l));
-+
-+	libnet_clear_packet(l);
-+
-+	return retval;
- }
- 
- #ifdef __linux__
-@@ -113,13 +116,13 @@ arp_find(in_addr_t ip, struct ether_addr
- 	int i = 0;
- 
- 	do {
--		if (arp_cache_lookup(ip, mac) == 0)
-+		if (arp_cache_lookup(ip, mac, intf) == 0)
- 			return (1);
- #ifdef __linux__
- 		/* XXX - force the kernel to arp. feh. */
- 		arp_force(ip);
- #else
--		arp_send(llif, intf, ARPOP_REQUEST, NULL, 0, NULL, ip);
-+		arp_send(l, ARPOP_REQUEST, NULL, 0, NULL, ip);
- #endif
- 		sleep(1);
- 	}
-@@ -136,9 +139,9 @@ cleanup(int sig)
- 	if (arp_find(spoof_ip, &spoof_mac)) {
- 		for (i = 0; i < 3; i++) {
- 			/* XXX - on BSD, requires ETHERSPOOF kernel. */
--			arp_send(llif, intf, ARPOP_REPLY,
--				 (u_char *)&spoof_mac, spoof_ip,
--				 (target_ip ? (u_char *)&target_mac : NULL),
-+			arp_send(l, ARPOP_REPLY,
-+				 (u_int8_t *)&spoof_mac, spoof_ip,
-+				 (target_ip ? (u_int8_t *)&target_mac : NULL),
- 				 target_ip);
- 			sleep(1);
- 		}
-@@ -151,7 +154,8 @@ main(int argc, char *argv[])
- {
- 	extern char *optarg;
- 	extern int optind;
--	char ebuf[PCAP_ERRBUF_SIZE];
-+	char pcap_ebuf[PCAP_ERRBUF_SIZE];
-+	char libnet_ebuf[LIBNET_ERRBUF_SIZE];
- 	int c;
- 	
- 	intf = NULL;
-@@ -163,7 +167,7 @@ main(int argc, char *argv[])
- 			intf = optarg;
- 			break;
- 		case 't':
--			if ((target_ip = libnet_name_resolve(optarg, 1)) == -1)
-+			if ((target_ip = libnet_name2addr4(l, optarg, LIBNET_RESOLVE)) == -1)
- 				usage();
- 			break;
- 		default:
-@@ -176,26 +180,26 @@ main(int argc, char *argv[])
- 	if (argc != 1)
- 		usage();
- 	
--	if ((spoof_ip = libnet_name_resolve(argv[0], 1)) == -1)
-+	if ((spoof_ip = libnet_name2addr4(l, argv[0], LIBNET_RESOLVE)) == -1)
- 		usage();
- 	
--	if (intf == NULL && (intf = pcap_lookupdev(ebuf)) == NULL)
--		errx(1, "%s", ebuf);
-+	if (intf == NULL && (intf = pcap_lookupdev(pcap_ebuf)) == NULL)
-+		errx(1, "%s", pcap_ebuf);
- 	
--	if ((llif = libnet_open_link_interface(intf, ebuf)) == 0)
--		errx(1, "%s", ebuf);
-+	if ((l = libnet_init(LIBNET_LINK, intf, libnet_ebuf)) == NULL)
-+		errx(1, "%s", libnet_ebuf);
- 	
- 	if (target_ip != 0 && !arp_find(target_ip, &target_mac))
- 		errx(1, "couldn't arp for host %s",
--		     libnet_host_lookup(target_ip, 0));
-+		     libnet_addr2name4(target_ip, LIBNET_DONT_RESOLVE));
- 	
- 	signal(SIGHUP, cleanup);
- 	signal(SIGINT, cleanup);
- 	signal(SIGTERM, cleanup);
- 	
- 	for (;;) {
--		arp_send(llif, intf, ARPOP_REPLY, NULL, spoof_ip,
--			 (target_ip ? (u_char *)&target_mac : NULL),
-+		arp_send(l, ARPOP_REPLY, NULL, spoof_ip,
-+			 (target_ip ? (u_int8_t *)&target_mac : NULL),
- 			 target_ip);
- 		sleep(2);
- 	}

+ 0 - 26
package/dsniff/patches/patch-confdefs_h

@@ -1,26 +0,0 @@
-$Id$
---- dsniff-2.4.orig/confdefs.h	1970-01-01 00:00:00.000000000 +0100
-+++ dsniff-2.4/confdefs.h	2011-03-11 21:17:49.000000000 +0100
-@@ -0,0 +1,22 @@
-+
-+#define X_DISPLAY_MISSING 1
-+#define STDC_HEADERS 1
-+#define HAVE_ERR_H 1
-+#define HAVE_FCNTL_H 1
-+#define HAVE_SYS_IOCTL_H 1
-+#define HAVE_SYS_QUEUE_H 1
-+#define HAVE_UNISTD_H 1
-+#define HAVE_LIBGEN_H 1
-+#define HAVE_MINMAX 1
-+#define in_addr_t u_int32_t
-+#define RETSIGTYPE void
-+#define HAVE_STRFTIME 1
-+#define HAVE_GETHOSTNAME 1
-+#define HAVE_SOCKET 1
-+#define HAVE_STRDUP 1
-+#define HAVE_STRSTR 1
-+#define HAVE_LIBRESOLV 1
-+#define HAVE_DIRNAME 1
-+#define HAVE_STRSEP 1
-+#define HAVE_WARNX 1
-+#define HAVE_ETHER_NTOA 1

+ 0 - 137
package/dsniff/patches/patch-configure

@@ -1,137 +0,0 @@
-$Id$
---- dsniff-2.4.orig/configure	2001-03-19 07:52:37.000000000 +0100
-+++ dsniff-2.4/configure	2011-03-11 21:41:08.000000000 +0100
-@@ -16,6 +16,8 @@ ac_help="$ac_help
- ac_help="$ac_help
-   --with-db=DIR           use Berkeley DB (with --enable-compat185) in DIR"
- ac_help="$ac_help
-+  --with-gdbm=DIR         use GNU DBM in DIR"
-+ac_help="$ac_help
-   --with-libpcap=DIR      use libpcap in DIR"
- ac_help="$ac_help
-   --with-libnet=DIR       use libnet in DIR"
-@@ -3025,13 +3027,13 @@ if test "${with_libpcap+set}" = set; the
-      ;;
-   *)
-      echo "$ac_t""$withval" 1>&6
--     if test -f $withval/pcap.h -a -f $withval/libpcap.a; then
-+     if test -f $withval/include/pcap.h -a -f $withval/lib/libpcap.so; then
-         owd=`pwd`
-         if cd $withval; then withval=`pwd`; cd $owd; fi
--	PCAPINC="-I$withval -I$withval/bpf"
--	PCAPLIB="-L$withval -lpcap"
-+	PCAPINC="-I$withval/include -I$withval/include/bpf"
-+	PCAPLIB="-L$withval/lib -lpcap"
-      elif test -f $withval/include/pcap.h -a \
--	       -f $withval/include/net/bpf.h -a \
-+	       -f $withval/include/pcap-bpf.h -a \
- 	       -f $withval/lib/libpcap.a; then
- 	owd=`pwd`
- 	if cd $withval; then withval=`pwd`; cd $owd; fi
-@@ -3059,7 +3061,40 @@ else
- 
- fi
- 
-+echo $ac_n "checking for libgdbm""... $ac_c" 1>&6
-+echo "configure:3059: checking for libgdbm" >&5
-+# Check whether --with-gdbm or --without-gdbm was given.
-+if test "${with_gdbm+set}" = set; then
-+  withval="$with_gdbm"
-+   case "$withval" in
-+  yes|no)
-+     echo "$ac_t""no" 1>&6
-+     ;;
-+  *)
-+     echo "$ac_t""$withval" 1>&6
-+     if test -f $withval/include/gdbm.h -a -f $withval/lib/libgdbm.so; then
-+        owd=`pwd`
-+        if cd $withval; then withval=`pwd`; cd $owd; fi
-+	DBINC="-I$withval/include"
-+	DBLIB="-L$withval/lib -lgdbm"
-+     else
-+        { echo "configure: error: gdbm.h or libgdbm.so not found in $withval" 1>&2; exit 1; }
-+     fi
-+     ;;
-+  esac 
-+else
-+   if test -f ${prefix}/include/gdbm.h; then
-+     LNETINC="-I${prefix}/include"
-+     LNETLIB="-L${prefix}/lib -lgdbm"
-+  elif test -f /usr/include/gdbm.h; then
-+     LNETLIB="-lgdbm"
-+  else
-+     echo "$ac_t""no" 1>&6
-+     { echo "configure: error: libgdbm not found" 1>&2; exit 1; }
-+  fi
-+  echo "$ac_t""yes" 1>&6 
- 
-+fi
- 
- 
- echo $ac_n "checking for libnet""... $ac_c" 1>&6
-@@ -3073,7 +3108,7 @@ if test "${with_libnet+set}" = set; then
-      ;;
-   *)
-      echo "$ac_t""$withval" 1>&6
--     if test -f $withval/include/libnet.h -a -f $withval/lib/libnet.a; then
-+     if test -f $withval/include/libnet.h -a -f $withval/lib/libnet.so; then
-         owd=`pwd`
-         if cd $withval; then withval=`pwd`; cd $owd; fi
- 	if test -f $withval/bin/libnet-config; then
-@@ -3086,7 +3121,7 @@ if test "${with_libnet+set}" = set; then
- 	LNETINC="-I$withval/include"
- 	LNETLIB="-L$withval/lib -lnet"
-      else
--        { echo "configure: error: libnet.h or libnet.a not found in $withval" 1>&2; exit 1; }
-+        { echo "configure: error: libnet.h or libnet.so not found in $withval" 1>&2; exit 1; }
-      fi
-      ;;
-   esac 
-@@ -3120,18 +3155,18 @@ if test "${with_libnids+set}" = set; the
-      ;;
-   *)
-      echo "$ac_t""$withval" 1>&6
--     if test -f $withval/src/nids.h -a -f $withval/src/libnids.a; then
-+     if test -f $withval/include/nids.h -a -f $withval/lib/libnids.so; then
-         owd=`pwd`
-         if cd $withval; then withval=`pwd`; cd $owd; fi
--	NIDSINC="-I$withval/src"
--	NIDSLIB="-L$withval/src -lnids"
--     elif test -f $withval/include/nids.h -a -f $withval/lib/libnids.a; then
-+	NIDSINC="-I$withval/include"
-+	NIDSLIB="-L$withval/lib -lnids"
-+     elif test -f $withval/include/nids.h -a -f $withval/lib/libnids.so; then
- 	owd=`pwd`
- 	if cd $withval; then withval=`pwd`; cd $owd; fi
- 	NIDSINC="-I$withval/include"
- 	NIDSLIB="-L$withval/lib -lnids"
-      else
--        { echo "configure: error: nids.h or libnids.a not found in $withval" 1>&2; exit 1; }
-+        { echo "configure: error: nids.h or libnids.so not found in $withval" 1>&2; exit 1; }
-      fi
-      ;;
-   esac 
-@@ -3183,19 +3218,19 @@ if test "${with_openssl+set}" = set; the
-      ;;
-   *)
-      echo "$ac_t""$withval" 1>&6
--     if test -f $withval/include/openssl/ssl.h -a -f $withval/libssl.a; then
-+     if test -f $withval/include/openssl/ssl.h -a -f $withval/lib/libssl.so; then
-         owd=`pwd`
-         if cd $withval; then withval=`pwd`; cd $owd; fi
- 	SSLINC="-I$withval/include"
--	SSLLIB="-L$withval -lssl -lcrypto"
-+	SSLLIB="-L$withval/lib -lssl -lcrypto"
-      elif test -f $withval/include/openssl/ssl.h -a \
--	       -f $withval/lib/libssl.a; then
-+	       -f $withval/lib/libssl.so; then
- 	owd=`pwd`
- 	if cd $withval; then withval=`pwd`; cd $owd; fi
- 	SSLINC="-I$withval/include"
- 	SSLLIB="-L$withval/lib -lssl -lcrypto"
-      else
--        { echo "configure: error: ssl.h or libssl.a not found in $withval" 1>&2; exit 1; }
-+        { echo "configure: error: ssl.h or libssl.so not found in $withval" 1>&2; exit 1; }
-      fi
-      WEBMITM="webmitm"
-      ;;

+ 0 - 21
package/dsniff/patches/patch-decode_c

@@ -1,21 +0,0 @@
-$Id$
---- dsniff-2.4.orig/decode.c	2001-03-15 09:32:59.000000000 +0100
-+++ dsniff-2.4/decode.c	2007-01-23 00:20:48.000000000 +0100
-@@ -51,8 +51,6 @@ extern int decode_irc(u_char *, int, u_c
- extern int decode_portmap(u_char *, int, u_char *, int);
- extern int decode_mountd(u_char *, int, u_char *, int);
- extern int decode_vrrp(u_char *, int, u_char *, int);
--extern int decode_ypserv(u_char *, int, u_char *, int);
--extern int decode_yppasswd(u_char *, int, u_char *, int);
- 
- static struct decode decodes[] = {
- 	{ "hex",	decode_hex },
-@@ -88,8 +86,6 @@ static struct decode decodes[] = {
- 	{ "irc",	decode_irc },
- 	{ "portmap",	decode_portmap },
- 	{ "mountd",	decode_mountd },
--	{ "ypserv",	decode_ypserv },
--	{ "yppasswd",	decode_yppasswd },
- 	{ NULL }
- };
- 

+ 0 - 681
package/dsniff/patches/patch-dns_c

@@ -1,681 +0,0 @@
-$Id$
---- dsniff-2.4.orig/dns.c	1970-01-01 00:00:00.000000000 +0100
-+++ dsniff-2.4/dns.c	2007-01-23 00:20:48.000000000 +0100
-@@ -0,0 +1,677 @@
-+/*
-+ * Copyright (c) 1985, 1993
-+ *    The Regents of the University of California.  All rights reserved.
-+ * 
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions
-+ * are met:
-+ * 1. Redistributions of source code must retain the above copyright
-+ *    notice, this list of conditions and the following disclaimer.
-+ * 2. Redistributions in binary form must reproduce the above copyright
-+ *    notice, this list of conditions and the following disclaimer in the
-+ *    documentation and/or other materials provided with the distribution.
-+ * 4. Neither the name of the University nor the names of its contributors
-+ *    may be used to endorse or promote products derived from this software
-+ *    without specific prior written permission.
-+ * 
-+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-+ * SUCH DAMAGE.
-+ */
-+
-+/*
-+ * Portions Copyright (c) 1993 by Digital Equipment Corporation.
-+ * 
-+ * Permission to use, copy, modify, and distribute this software for any
-+ * purpose with or without fee is hereby granted, provided that the above
-+ * copyright notice and this permission notice appear in all copies, and that
-+ * the name of Digital Equipment Corporation not be used in advertising or
-+ * publicity pertaining to distribution of the document or software without
-+ * specific, written prior permission.
-+ * 
-+ * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
-+ * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
-+ * OF MERCHANTABILITY AND FITNESS.   IN NO EVENT SHALL DIGITAL EQUIPMENT
-+ * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
-+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
-+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
-+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-+ * SOFTWARE.
-+ */
-+
-+/*
-+ * Portions Copyright (c) 1996-1999 by Internet Software Consortium.
-+ *
-+ * Permission to use, copy, modify, and distribute this software for any
-+ * purpose with or without fee is hereby granted, provided that the above
-+ * copyright notice and this permission notice appear in all copies.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
-+ * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
-+ * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
-+ * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
-+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
-+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
-+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-+ * SOFTWARE.
-+ */
-+
-+/*
-+ * Copyright (c) 1996,1999 by Internet Software Consortium.
-+ *
-+ * Permission to use, copy, modify, and distribute this software for any
-+ * purpose with or without fee is hereby granted, provided that the above
-+ * copyright notice and this permission notice appear in all copies.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
-+ * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
-+ * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
-+ * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
-+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
-+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
-+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-+ * SOFTWARE.
-+ */
-+
-+/*
-+ *
-+ * DNS helper functions not implemented in uclibc
-+ *
-+ */
-+
-+
-+#include <sys/types.h>
-+#include <sys/param.h>
-+#include <netinet/in.h>
-+#include <arpa/nameser.h>
-+#include <ctype.h>
-+#include <resolv.h>
-+#include <stdio.h>
-+#include <string.h>
-+#include <unistd.h>
-+
-+static const char	digits[] = "0123456789";
-+
-+/* Forward. */
-+
-+static int		special(int);
-+static int		printable(int);
-+static int		dn_find(const u_char *, const u_char *,
-+				const u_char * const *,
-+				const u_char * const *);
-+
-+
-+/*
-+ * ns_name_ntop(src, dst, dstsiz)
-+ *	Convert an encoded domain name to printable ascii as per RFC1035.
-+ * return:
-+ *	Number of bytes written to buffer, or -1 (with errno set)
-+ * notes:
-+ *	The root is returned as "."
-+ *	All other domains are returned in non absolute form
-+ */
-+int
-+ns_name_ntop(const u_char *src, char *dst, size_t dstsiz) {
-+	const u_char *cp;
-+	char *dn, *eom;
-+	u_char c;
-+	u_int n;
-+
-+	cp = src;
-+	dn = dst;
-+	eom = dst + dstsiz;
-+
-+	while ((n = *cp++) != 0) {
-+		if ((n & NS_CMPRSFLGS) != 0) {
-+			/* Some kind of compression pointer. */
-+			return (-1);
-+		}
-+		if (dn != dst) {
-+			if (dn >= eom) {
-+				return (-1);
-+			}
-+			*dn++ = '.';
-+		}
-+		if (dn + n >= eom) {
-+			return (-1);
-+		}
-+		for ((void)NULL; n > 0; n--) {
-+			c = *cp++;
-+			if (special(c)) {
-+				if (dn + 1 >= eom) {
-+					return (-1);
-+				}
-+				*dn++ = '\\';
-+				*dn++ = (char)c;
-+			} else if (!printable(c)) {
-+				if (dn + 3 >= eom) {
-+					return (-1);
-+				}
-+				*dn++ = '\\';
-+				*dn++ = digits[c / 100];
-+				*dn++ = digits[(c % 100) / 10];
-+				*dn++ = digits[c % 10];
-+			} else {
-+				if (dn >= eom) {
-+					return (-1);
-+				}
-+				*dn++ = (char)c;
-+			}
-+		}
-+	}
-+	if (dn == dst) {
-+		if (dn >= eom) {
-+			return (-1);
-+		}
-+		*dn++ = '.';
-+	}
-+	if (dn >= eom) {
-+		return (-1);
-+	}
-+	*dn++ = '\0';
-+	return (dn - dst);
-+}
-+
-+/*
-+ * ns_name_pton(src, dst, dstsiz)
-+ *	Convert a ascii string into an encoded domain name as per RFC1035.
-+ * return:
-+ *	-1 if it fails
-+ *	1 if string was fully qualified
-+ *	0 is string was not fully qualified
-+ * notes:
-+ *	Enforces label and domain length limits.
-+ */
-+
-+int
-+ns_name_pton(const char *src, u_char *dst, size_t dstsiz) {
-+	u_char *label, *bp, *eom;
-+	int c, n, escaped;
-+	char *cp;
-+
-+	escaped = 0;
-+	bp = dst;
-+	eom = dst + dstsiz;
-+	label = bp++;
-+
-+	while ((c = *src++) != 0) {
-+		if (escaped) {
-+			if ((cp = strchr(digits, c)) != NULL) {
-+				n = (cp - digits) * 100;
-+				if ((c = *src++) == 0 ||
-+				    (cp = strchr(digits, c)) == NULL) {
-+					return (-1);
-+				}
-+				n += (cp - digits) * 10;
-+				if ((c = *src++) == 0 ||
-+				    (cp = strchr(digits, c)) == NULL) {
-+					return (-1);
-+				}
-+				n += (cp - digits);
-+				if (n > 255) {
-+					return (-1);
-+				}
-+				c = n;
-+			}
-+			escaped = 0;
-+		} else if (c == '\\') {
-+			escaped = 1;
-+			continue;
-+		} else if (c == '.') {
-+			c = (bp - label - 1);
-+			if ((c & NS_CMPRSFLGS) != 0) {	/* Label too big. */
-+				return (-1);
-+			}
-+			if (label >= eom) {
-+				return (-1);
-+			}
-+			*label = c;
-+			/* Fully qualified ? */
-+			if (*src == '\0') {
-+				if (c != 0) {
-+					if (bp >= eom) {
-+						return (-1);
-+					}
-+					*bp++ = '\0';
-+				}
-+				if ((bp - dst) > MAXCDNAME) {
-+					return (-1);
-+				}
-+				return (1);
-+			}
-+			if (c == 0 || *src == '.') {
-+				return (-1);
-+			}
-+			label = bp++;
-+			continue;
-+		}
-+		if (bp >= eom) {
-+			return (-1);
-+		}
-+		*bp++ = (u_char)c;
-+	}
-+	c = (bp - label - 1);
-+	if ((c & NS_CMPRSFLGS) != 0) {		/* Label too big. */
-+		return (-1);
-+	}
-+	if (label >= eom) {
-+		return (-1);
-+	}
-+	*label = c;
-+	if (c != 0) {
-+		if (bp >= eom) {
-+			return (-1);
-+		}
-+		*bp++ = 0;
-+	}
-+	if ((bp - dst) > MAXCDNAME) {	/* src too big */
-+		return (-1);
-+	}
-+	return (0);
-+}
-+
-+/*
-+ * ns_name_ntol(src, dst, dstsiz)
-+ *	Convert a network strings labels into all lowercase.
-+ * return:
-+ *	Number of bytes written to buffer, or -1 (with errno set)
-+ * notes:
-+ *	Enforces label and domain length limits.
-+ */
-+
-+int
-+ns_name_ntol(const u_char *src, u_char *dst, size_t dstsiz) {
-+	const u_char *cp;
-+	u_char *dn, *eom;
-+	u_char c;
-+	u_int n;
-+
-+	cp = src;
-+	dn = dst;
-+	eom = dst + dstsiz;
-+
-+	while ((n = *cp++) != 0) {
-+		if ((n & NS_CMPRSFLGS) != 0) {
-+			/* Some kind of compression pointer. */
-+			return (-1);
-+		}
-+		*dn++ = n;
-+		if (dn + n >= eom) {
-+			return (-1);
-+		}
-+		for ((void)NULL; n > 0; n--) {
-+			c = *cp++;
-+			if (isupper(c))
-+				*dn++ = tolower(c);
-+			else
-+				*dn++ = c;
-+		}
-+	}
-+	*dn++ = '\0';
-+	return (dn - dst);
-+}
-+
-+/*
-+ * ns_name_unpack(msg, eom, src, dst, dstsiz)
-+ *	Unpack a domain name from a message, source may be compressed.
-+ * return:
-+ *	-1 if it fails, or consumed octets if it succeeds.
-+ */
-+int
-+ns_name_unpack(const u_char *msg, const u_char *eom, const u_char *src,
-+	       u_char *dst, size_t dstsiz)
-+{
-+	const u_char *srcp, *dstlim;
-+	u_char *dstp;
-+	int n, len, checked;
-+
-+	len = -1;
-+	checked = 0;
-+	dstp = dst;
-+	srcp = src;
-+	dstlim = dst + dstsiz;
-+	if (srcp < msg || srcp >= eom) {
-+		return (-1);
-+	}
-+	/* Fetch next label in domain name. */
-+	while ((n = *srcp++) != 0) {
-+		/* Check for indirection. */
-+		switch (n & NS_CMPRSFLGS) {
-+		case 0:
-+			/* Limit checks. */
-+			if (dstp + n + 1 >= dstlim || srcp + n >= eom) {
-+				return (-1);
-+			}
-+			checked += n + 1;
-+			*dstp++ = n;
-+			memcpy(dstp, srcp, n);
-+			dstp += n;
-+			srcp += n;
-+			break;
-+
-+		case NS_CMPRSFLGS:
-+			if (srcp >= eom) {
-+				return (-1);
-+			}
-+			if (len < 0)
-+				len = srcp - src + 1;
-+			srcp = msg + (((n & 0x3f) << 8) | (*srcp & 0xff));
-+			if (srcp < msg || srcp >= eom) {  /* Out of range. */
-+				return (-1);
-+			}
-+			checked += 2;
-+			/*
-+			 * Check for loops in the compressed name;
-+			 * if we've looked at the whole message,
-+			 * there must be a loop.
-+			 */
-+			if (checked >= eom - msg) {
-+				return (-1);
-+			}
-+			break;
-+
-+		default:
-+			return (-1);			/* flag error */
-+		}
-+	}
-+	*dstp = '\0';
-+	if (len < 0)
-+		len = srcp - src;
-+	return (len);
-+}
-+
-+/*
-+ * ns_name_pack(src, dst, dstsiz, dnptrs, lastdnptr)
-+ *	Pack domain name 'domain' into 'comp_dn'.
-+ * return:
-+ *	Size of the compressed name, or -1.
-+ * notes:
-+ *	'dnptrs' is an array of pointers to previous compressed names.
-+ *	dnptrs[0] is a pointer to the beginning of the message. The array
-+ *	ends with NULL.
-+ *	'lastdnptr' is a pointer to the end of the array pointed to
-+ *	by 'dnptrs'.
-+ * Side effects:
-+ *	The list of pointers in dnptrs is updated for labels inserted into
-+ *	the message as we compress the name.  If 'dnptr' is NULL, we don't
-+ *	try to compress names. If 'lastdnptr' is NULL, we don't update the
-+ *	list.
-+ */
-+int
-+ns_name_pack(const u_char *src, u_char *dst, int dstsiz,
-+	     const u_char **dnptrs, const u_char **lastdnptr)
-+{
-+	u_char *dstp;
-+	const u_char **cpp, **lpp, *eob, *msg;
-+	const u_char *srcp;
-+	int n, l, first = 1;
-+
-+	srcp = src;
-+	dstp = dst;
-+	eob = dstp + dstsiz;
-+	lpp = cpp = NULL;
-+	if (dnptrs != NULL) {
-+		if ((msg = *dnptrs++) != NULL) {
-+			for (cpp = dnptrs; *cpp != NULL; cpp++)
-+				(void)NULL;
-+			lpp = cpp;	/* end of list to search */
-+		}
-+	} else
-+		msg = NULL;
-+
-+	/* make sure the domain we are about to add is legal */
-+	l = 0;
-+	do {
-+		n = *srcp;
-+		if ((n & NS_CMPRSFLGS) != 0) {
-+			return (-1);
-+		}
-+		l += n + 1;
-+		if (l > MAXCDNAME) {
-+			return (-1);
-+		}
-+		srcp += n + 1;
-+	} while (n != 0);
-+
-+	/* from here on we need to reset compression pointer array on error */
-+	srcp = src;
-+	do {
-+		/* Look to see if we can use pointers. */
-+		n = *srcp;
-+		if (n != 0 && msg != NULL) {
-+			l = dn_find(srcp, msg, (const u_char * const *)dnptrs,
-+				    (const u_char * const *)lpp);
-+			if (l >= 0) {
-+				if (dstp + 1 >= eob) {
-+					goto cleanup;
-+				}
-+				*dstp++ = (l >> 8) | NS_CMPRSFLGS;
-+				*dstp++ = l % 256;
-+				return (dstp - dst);
-+			}
-+			/* Not found, save it. */
-+			if (lastdnptr != NULL && cpp < lastdnptr - 1 &&
-+			    (dstp - msg) < 0x4000 && first) {
-+				*cpp++ = dstp;
-+				*cpp = NULL;
-+				first = 0;
-+			}
-+		}
-+		/* copy label to buffer */
-+		if (n & NS_CMPRSFLGS) {		/* Should not happen. */
-+			goto cleanup;
-+		}
-+		if (dstp + 1 + n >= eob) {
-+			goto cleanup;
-+		}
-+		memcpy(dstp, srcp, n + 1);
-+		srcp += n + 1;
-+		dstp += n + 1;
-+	} while (n != 0);
-+
-+	if (dstp > eob) {
-+cleanup:
-+		if (msg != NULL)
-+			*lpp = NULL;
-+		return (-1);
-+	} 
-+	return (dstp - dst);
-+}
-+
-+/*
-+ * ns_name_uncompress(msg, eom, src, dst, dstsiz)
-+ *	Expand compressed domain name to presentation format.
-+ * return:
-+ *	Number of bytes read out of `src', or -1 (with errno set).
-+ * note:
-+ *	Root domain returns as "." not "".
-+ */
-+int
-+ns_name_uncompress(const u_char *msg, const u_char *eom, const u_char *src,
-+		   char *dst, size_t dstsiz)
-+{
-+	u_char tmp[NS_MAXCDNAME];
-+	int n;
-+	
-+	if ((n = ns_name_unpack(msg, eom, src, tmp, sizeof tmp)) == -1)
-+		return (-1);
-+	if (ns_name_ntop(tmp, dst, dstsiz) == -1)
-+		return (-1);
-+	return (n);
-+}
-+
-+/*
-+ * ns_name_compress(src, dst, dstsiz, dnptrs, lastdnptr)
-+ *	Compress a domain name into wire format, using compression pointers.
-+ * return:
-+ *	Number of bytes consumed in `dst' or -1 (with errno set).
-+ * notes:
-+ *	'dnptrs' is an array of pointers to previous compressed names.
-+ *	dnptrs[0] is a pointer to the beginning of the message.
-+ *	The list ends with NULL.  'lastdnptr' is a pointer to the end of the
-+ *	array pointed to by 'dnptrs'. Side effect is to update the list of
-+ *	pointers for labels inserted into the message as we compress the name.
-+ *	If 'dnptr' is NULL, we don't try to compress names. If 'lastdnptr'
-+ *	is NULL, we don't update the list.
-+ */
-+int
-+ns_name_compress(const char *src, u_char *dst, size_t dstsiz,
-+		 const u_char **dnptrs, const u_char **lastdnptr)
-+{
-+	u_char tmp[NS_MAXCDNAME];
-+
-+	if (ns_name_pton(src, tmp, sizeof tmp) == -1)
-+		return (-1);
-+	return (ns_name_pack(tmp, dst, dstsiz, dnptrs, lastdnptr));
-+}
-+
-+/*
-+ * special(ch)
-+ *	Thinking in noninternationalized USASCII (per the DNS spec),
-+ *	is this characted special ("in need of quoting") ?
-+ * return:
-+ *	boolean.
-+ */
-+static int
-+special(int ch) {
-+	switch (ch) {
-+	case 0x22: /* '"' */
-+	case 0x2E: /* '.' */
-+	case 0x3B: /* ';' */
-+	case 0x5C: /* '\\' */
-+	/* Special modifiers in zone files. */
-+	case 0x40: /* '@' */
-+	case 0x24: /* '$' */
-+		return (1);
-+	default:
-+		return (0);
-+	}
-+}
-+
-+/*
-+ * printable(ch)
-+ *	Thinking in noninternationalized USASCII (per the DNS spec),
-+ *	is this character visible and not a space when printed ?
-+ * return:
-+ *	boolean.
-+ */
-+static int
-+printable(int ch) {
-+	return (ch > 0x20 && ch < 0x7f);
-+}
-+
-+/*
-+ *	Thinking in noninternationalized USASCII (per the DNS spec),
-+ *	convert this character to lower case if it's upper case.
-+ */
-+static int
-+mklower(int ch) {
-+	if (ch >= 0x41 && ch <= 0x5A)
-+		return (ch + 0x20);
-+	return (ch);
-+}
-+
-+/*
-+ * dn_find(domain, msg, dnptrs, lastdnptr)
-+ *	Search for the counted-label name in an array of compressed names.
-+ * return:
-+ *	offset from msg if found, or -1.
-+ * notes:
-+ *	dnptrs is the pointer to the first name on the list,
-+ *	not the pointer to the start of the message.
-+ */
-+static int
-+dn_find(const u_char *domain, const u_char *msg,
-+	const u_char * const *dnptrs,
-+	const u_char * const *lastdnptr)
-+{
-+	const u_char *dn, *cp, *sp;
-+	const u_char * const *cpp;
-+	u_int n;
-+
-+	for (cpp = dnptrs; cpp < lastdnptr; cpp++) {
-+		sp = *cpp;
-+		/*
-+		 * terminate search on:
-+		 * root label
-+		 * compression pointer
-+		 * unusable offset
-+		 */
-+		while (*sp != 0 && (*sp & NS_CMPRSFLGS) == 0 &&
-+		       (sp - msg) < 0x4000) {
-+			dn = domain;
-+			cp = sp;
-+			while ((n = *cp++) != 0) {
-+				/*
-+				 * check for indirection
-+				 */
-+				switch (n & NS_CMPRSFLGS) {
-+				case 0:		/* normal case, n == len */
-+					if (n != *dn++)
-+						goto next;
-+					for ((void)NULL; n > 0; n--)
-+						if (mklower(*dn++) !=
-+						    mklower(*cp++))
-+							goto next;
-+					/* Is next root for both ? */
-+					if (*dn == '\0' && *cp == '\0')
-+						return (sp - msg);
-+					if (*dn)
-+						continue;
-+					goto next;
-+
-+				case NS_CMPRSFLGS:	/* indirection */
-+					cp = msg + (((n & 0x3f) << 8) | *cp);
-+					break;
-+
-+				default:	/* illegal type */
-+					return (-1);
-+				}
-+			}
-+ next:
-+			sp += *sp + 1;
-+		}
-+	}
-+	return (-1);
-+}
-+
-+/*
-+ * Expand compressed domain name 'comp_dn' to full domain name.
-+ * 'msg' is a pointer to the begining of the message,
-+ * 'eomorig' points to the first location after the message,
-+ * 'exp_dn' is a pointer to a buffer of size 'length' for the result.
-+ * Return size of compressed name or -1 if there was an error.
-+ */
-+int
-+dn_expand(const u_char *msg, const u_char *eom, const u_char *src,
-+	  char *dst, int dstsiz)
-+{
-+	int n = ns_name_uncompress(msg, eom, src, dst, (size_t)dstsiz);
-+
-+	if (n > 0 && dst[0] == '.')
-+		dst[0] = '\0';
-+	return (n);
-+}
-+
-+/*
-+ * Pack domain name 'exp_dn' in presentation form into 'comp_dn'.
-+ * Return the size of the compressed name or -1.
-+ * 'length' is the size of the array pointed to by 'comp_dn'.
-+ */
-+int
-+dn_comp(const char *src, u_char *dst, int dstsiz,
-+	u_char **dnptrs, u_char **lastdnptr)
-+{
-+	return (ns_name_compress(src, dst, (size_t)dstsiz,
-+				 (const u_char **)dnptrs,
-+				 (const u_char **)lastdnptr));
-+}
-+

+ 0 - 149
package/dsniff/patches/patch-dnsspoof_c

@@ -1,149 +0,0 @@
---- dsniff-2.4.orig/dnsspoof.c	2001-03-15 09:33:03.000000000 +0100
-+++ dsniff-2.4/dnsspoof.c	2009-12-11 12:41:53.000000000 +0100
-@@ -38,7 +38,7 @@ SLIST_HEAD(, dnsent) dns_entries;
- 
- pcap_t		*pcap_pd = NULL;
- int		 pcap_off = -1;
--int		 lnet_sock = -1;
-+libnet_t	*l;
- u_long		 lnet_ip = -1;
- 
- static void
-@@ -90,19 +90,18 @@ static void
- dns_init(char *dev, char *filename)
- {
- 	FILE *f;
--	struct libnet_link_int *llif;
-+	libnet_t *l;
-+	char libnet_ebuf[LIBNET_ERRBUF_SIZE];
- 	struct dnsent *de;
- 	char *ip, *name, buf[1024];
- 
--	if ((llif = libnet_open_link_interface(dev, buf)) == NULL)
--		errx(1, "%s", buf);
-+	if ((l = libnet_init(LIBNET_LINK, dev, libnet_ebuf)) == NULL)
-+		errx(1, "%s", libnet_ebuf);
- 	
--	if ((lnet_ip = libnet_get_ipaddr(llif, dev, buf)) == -1)
--		errx(1, "%s", buf);
-+	if ((lnet_ip = libnet_get_ipaddr4(l)) == -1)
-+		errx(1, "%s", libnet_geterror(l));
- 
--	lnet_ip = htonl(lnet_ip);
--	
--	libnet_close_link_interface(llif);
-+	libnet_destroy(l);
- 
- 	SLIST_INIT(&dns_entries);
- 	
-@@ -180,7 +179,7 @@ dns_lookup_ptr(const char *name)
- static void
- dns_spoof(u_char *u, const struct pcap_pkthdr *pkthdr, const u_char *pkt)
- {
--	struct libnet_ip_hdr *ip;
-+	struct libnet_ipv4_hdr *ip;
- 	struct libnet_udp_hdr *udp;
- 	HEADER *dns;
- 	char name[MAXHOSTNAMELEN];
-@@ -189,7 +188,7 @@ dns_spoof(u_char *u, const struct pcap_p
- 	in_addr_t dst;
- 	u_short type, class;
- 
--	ip = (struct libnet_ip_hdr *)(pkt + pcap_off);
-+	ip = (struct libnet_ipv4_hdr *)(pkt + pcap_off);
- 	udp = (struct libnet_udp_hdr *)(pkt + pcap_off + (ip->ip_hl * 4));
- 	dns = (HEADER *)(udp + 1);
- 	p = (u_char *)(dns + 1);
-@@ -212,7 +211,7 @@ dns_spoof(u_char *u, const struct pcap_p
- 	if (class != C_IN)
- 		return;
- 
--	p = buf + IP_H + UDP_H + dnslen;
-+	p = buf + dnslen;
- 	
- 	if (type == T_A) {
- 		if ((dst = dns_lookup_a(name)) == -1)
-@@ -234,38 +233,38 @@ dns_spoof(u_char *u, const struct pcap_p
- 		anslen += 12;
- 	}
- 	else return;
--	
--	libnet_build_ip(UDP_H + dnslen + anslen, 0, libnet_get_prand(PRu16),
--			0, 64, IPPROTO_UDP, ip->ip_dst.s_addr,
--			ip->ip_src.s_addr, NULL, 0, buf);
--	
--	libnet_build_udp(ntohs(udp->uh_dport), ntohs(udp->uh_sport),
--			 NULL, dnslen + anslen, buf + IP_H);
- 
--	memcpy(buf + IP_H + UDP_H, (u_char *)dns, dnslen);
-+	memcpy(buf, (u_char *)dns, dnslen);
- 
--	dns = (HEADER *)(buf + IP_H + UDP_H);
-+	dns = (HEADER *)buf;
- 	dns->qr = dns->ra = 1;
- 	if (type == T_PTR) dns->aa = 1;
- 	dns->ancount = htons(1);
- 
- 	dnslen += anslen;
-+
-+	libnet_clear_packet(l);
-+	libnet_build_udp(ntohs(udp->uh_dport), ntohs(udp->uh_sport),
-+			 LIBNET_UDP_H + dnslen, 0,
-+			 (u_int8_t *)buf, dnslen, l, 0);
-+
-+	libnet_build_ipv4(LIBNET_IPV4_H + LIBNET_UDP_H + dnslen, 0,
-+			  libnet_get_prand(LIBNET_PRu16), 0, 64, IPPROTO_UDP, 0,
-+			  ip->ip_dst.s_addr, ip->ip_src.s_addr, NULL, 0, l, 0);
- 	
--	libnet_do_checksum(buf, IPPROTO_UDP, UDP_H + dnslen);
--	
--	if (libnet_write_ip(lnet_sock, buf, IP_H + UDP_H + dnslen) < 0)
-+	if (libnet_write(l) < 0)
- 		warn("write");
- 
- 	fprintf(stderr, "%s.%d > %s.%d:  %d+ %s? %s\n",
--	      libnet_host_lookup(ip->ip_src.s_addr, 0), ntohs(udp->uh_sport),
--	      libnet_host_lookup(ip->ip_dst.s_addr, 0), ntohs(udp->uh_dport),
-+	      libnet_addr2name4(ip->ip_src.s_addr, 0), ntohs(udp->uh_sport),
-+	      libnet_addr2name4(ip->ip_dst.s_addr, 0), ntohs(udp->uh_dport),
- 	      ntohs(dns->id), type == T_A ? "A" : "PTR", name);
- }
- 
- static void
- cleanup(int sig)
- {
--	libnet_close_raw_sock(lnet_sock);
-+	libnet_destroy(l);
- 	pcap_close(pcap_pd);
- 	exit(0);
- }
-@@ -276,6 +275,7 @@ main(int argc, char *argv[])
- 	extern char *optarg;
- 	extern int optind;
- 	char *p, *dev, *hosts, buf[1024];
-+	char ebuf[LIBNET_ERRBUF_SIZE];
- 	int i;
- 
- 	dev = hosts = NULL;
-@@ -306,7 +306,7 @@ main(int argc, char *argv[])
- 		strlcpy(buf, p, sizeof(buf));
- 	}
- 	else snprintf(buf, sizeof(buf), "udp dst port 53 and not src %s",
--		      libnet_host_lookup(lnet_ip, 0));
-+		      libnet_addr2name4(lnet_ip, LIBNET_DONT_RESOLVE));
- 	
- 	if ((pcap_pd = pcap_init(dev, buf, 128)) == NULL)
- 		errx(1, "couldn't initialize sniffing");
-@@ -314,10 +314,10 @@ main(int argc, char *argv[])
- 	if ((pcap_off = pcap_dloff(pcap_pd)) < 0)
- 		errx(1, "couldn't determine link layer offset");
- 	
--	if ((lnet_sock = libnet_open_raw_sock(IPPROTO_RAW)) == -1)
-+	if ((l = libnet_init(LIBNET_RAW4, dev, ebuf)) == NULL)
- 		errx(1, "couldn't initialize sending");
- 	
--	libnet_seed_prand();
-+	libnet_seed_prand(l);
- 	
- 	signal(SIGHUP, cleanup);
- 	signal(SIGINT, cleanup);

+ 0 - 22
package/dsniff/patches/patch-filesnarf_c

@@ -1,22 +0,0 @@
---- dsniff-2.4.orig/filesnarf.c	2001-03-15 09:33:03.000000000 +0100
-+++ dsniff-2.4/filesnarf.c	2009-12-11 12:54:55.000000000 +0100
-@@ -134,8 +134,8 @@ nfs_save(struct tuple4 *addr, struct myr
- 	int fd;
- 
- 	warnx("%s.%d > %s.%d: %s (%d@%d)",
--	      libnet_host_lookup(addr->daddr, 0), addr->dest,
--	      libnet_host_lookup(addr->saddr, 0), addr->source,
-+	      libnet_addr2name4(addr->daddr, LIBNET_DONT_RESOLVE), addr->dest,
-+	      libnet_addr2name4(addr->saddr, LIBNET_DONT_RESOLVE), addr->source,
- 	      ma->filename, len, ma->offset);
- 	
- 	if ((fd = open(ma->filename, O_WRONLY|O_CREAT, 0644)) >= 0) {
-@@ -353,7 +353,7 @@ decode_nfs(struct tuple4 *addr, u_char *
- }
- 
- static void
--decode_udp_nfs(struct libnet_ip_hdr *ip)
-+decode_udp_nfs(struct libnet_ipv4_hdr *ip)
- {
- 	static struct tuple4 addr;
- 	struct libnet_udp_hdr *udp;

+ 0 - 116
package/dsniff/patches/patch-macof_c

@@ -1,116 +0,0 @@
---- dsniff-2.4.orig/macof.c	2001-03-15 09:33:04.000000000 +0100
-+++ dsniff-2.4/macof.c	2009-12-11 12:56:13.000000000 +0100
-@@ -48,8 +48,8 @@ usage(void)
- static void
- gen_mac(u_char *mac)
- {
--	*((in_addr_t *)mac) = libnet_get_prand(PRu32);
--	*((u_short *)(mac + 4)) = libnet_get_prand(PRu16);
-+	*((in_addr_t *)mac) = libnet_get_prand(LIBNET_PRu32);
-+	*((u_short *)(mac + 4)) = libnet_get_prand(LIBNET_PRu16);
- }
- 
- int
-@@ -59,22 +59,23 @@ main(int argc, char *argv[])
- 	extern int optind;
- 	int c, i;
- 	struct libnet_link_int *llif;
--	char ebuf[PCAP_ERRBUF_SIZE];
-+	char pcap_ebuf[PCAP_ERRBUF_SIZE];
-+	char libnet_ebuf[LIBNET_ERRBUF_SIZE];
- 	u_char sha[ETHER_ADDR_LEN], tha[ETHER_ADDR_LEN];
- 	in_addr_t src, dst;
- 	u_short sport, dport;
- 	u_int32_t seq;
--	u_char pkt[ETH_H + IP_H + TCP_H];
-+	libnet_t *l;
- 	
- 	while ((c = getopt(argc, argv, "vs:d:e:x:y:i:n:h?V")) != -1) {
- 		switch (c) {
- 		case 'v':
- 			break;
- 		case 's':
--			Src = libnet_name_resolve(optarg, 0);
-+			Src = libnet_name2addr4(l, optarg, 0);
- 			break;
- 		case 'd':
--			Dst = libnet_name_resolve(optarg, 0);
-+			Dst = libnet_name2addr4(l, optarg, 0);
- 			break;
- 		case 'e':
- 			Tha = (u_char *)ether_aton(optarg);
-@@ -101,13 +102,13 @@ main(int argc, char *argv[])
- 	if (argc != 0)
- 		usage();
- 	
--	if (!Intf && (Intf = pcap_lookupdev(ebuf)) == NULL)
--		errx(1, "%s", ebuf);
-+	if (!Intf && (Intf = pcap_lookupdev(pcap_ebuf)) == NULL)
-+		errx(1, "%s", pcap_ebuf);
- 	
--	if ((llif = libnet_open_link_interface(Intf, ebuf)) == 0)
--		errx(1, "%s", ebuf);
-+	if ((l = libnet_init(LIBNET_LINK, Intf, libnet_ebuf)) == NULL)
-+		errx(1, "%s", libnet_ebuf);
- 	
--	libnet_seed_prand();
-+	libnet_seed_prand(l);
- 	
- 	for (i = 0; i != Repeat; i++) {
- 		
-@@ -117,39 +118,39 @@ main(int argc, char *argv[])
- 		else memcpy(tha, Tha, sizeof(tha));
- 		
- 		if (Src != 0) src = Src;
--		else src = libnet_get_prand(PRu32);
-+		else src = libnet_get_prand(LIBNET_PRu32);
- 		
- 		if (Dst != 0) dst = Dst;
--		else dst = libnet_get_prand(PRu32);
-+		else dst = libnet_get_prand(LIBNET_PRu32);
- 		
- 		if (Sport != 0) sport = Sport;
--		else sport = libnet_get_prand(PRu16);
-+		else sport = libnet_get_prand(LIBNET_PRu16);
- 		
- 		if (Dport != 0) dport = Dport;
--		else dport = libnet_get_prand(PRu16);
-+		else dport = libnet_get_prand(LIBNET_PRu16);
- 
--		seq = libnet_get_prand(PRu32);
--		
--		libnet_build_ethernet(tha, sha, ETHERTYPE_IP, NULL, 0, pkt);
--		
--		libnet_build_ip(TCP_H, 0, libnet_get_prand(PRu16), 0, 64,
--				IPPROTO_TCP, src, dst, NULL, 0, pkt + ETH_H);
-+		seq = libnet_get_prand(LIBNET_PRu32);
- 		
- 		libnet_build_tcp(sport, dport, seq, 0, TH_SYN, 512,
--				 0, NULL, 0, pkt + ETH_H + IP_H);
-+				 0, 0, LIBNET_TCP_H, NULL, 0, l, 0);
- 		
--		libnet_do_checksum(pkt + ETH_H, IPPROTO_IP, IP_H);
--		libnet_do_checksum(pkt + ETH_H, IPPROTO_TCP, TCP_H);
-+		libnet_build_ipv4(LIBNET_TCP_H, 0,
-+				  libnet_get_prand(LIBNET_PRu16), 0, 64,
-+				  IPPROTO_TCP, 0, src, dst, NULL, 0, l, 0);
- 		
--		if (libnet_write_link_layer(llif, Intf, pkt, sizeof(pkt)) < 0)
-+		libnet_build_ethernet(tha, sha, ETHERTYPE_IP, NULL, 0, l, 0);
-+		
-+		if (libnet_write(l) < 0)
- 			errx(1, "write");
- 
-+		libnet_clear_packet(l);
-+
- 		fprintf(stderr, "%s ",
- 			ether_ntoa((struct ether_addr *)sha));
- 		fprintf(stderr, "%s %s.%d > %s.%d: S %u:%u(0) win 512\n",
- 			ether_ntoa((struct ether_addr *)tha),
--			libnet_host_lookup(Src, 0), sport,
--			libnet_host_lookup(Dst, 0), dport, seq, seq);
-+			libnet_addr2name4(Src, 0), sport,
-+			libnet_addr2name4(Dst, 0), dport, seq, seq);
- 	}
- 	exit(0);
- }

+ 0 - 100
package/dsniff/patches/patch-mount_c

@@ -1,100 +0,0 @@
---- dsniff-2.4.orig/mount.c	1970-01-01 00:00:00.000000000 +0100
-+++ dsniff-2.4/mount.c	2009-12-11 12:42:08.000000000 +0100
-@@ -0,0 +1,97 @@
-+/*
-+ * Please do not edit this file.
-+ * It was generated using rpcgen.
-+ */
-+
-+#include "mount.h"
-+
-+bool_t
-+xdr_fhandle (XDR *xdrs, fhandle objp)
-+{
-+	register int32_t *buf;
-+
-+	 if (!xdr_opaque (xdrs, objp, FHSIZE))
-+		 return FALSE;
-+	return TRUE;
-+}
-+
-+bool_t
-+xdr_fhandle3 (XDR *xdrs, fhandle3 *objp)
-+{
-+	register int32_t *buf;
-+
-+	 if (!xdr_bytes (xdrs, (char **)&objp->fhandle3_val, (u_int *) &objp->fhandle3_len, FHSIZE3))
-+		 return FALSE;
-+	return TRUE;
-+}
-+
-+bool_t
-+xdr_fhstatus (XDR *xdrs, fhstatus *objp)
-+{
-+	register int32_t *buf;
-+
-+	 if (!xdr_u_int (xdrs, &objp->fhs_status))
-+		 return FALSE;
-+	switch (objp->fhs_status) {
-+	case 0:
-+		 if (!xdr_fhandle (xdrs, objp->fhstatus_u.fhs_fhandle))
-+			 return FALSE;
-+		break;
-+	default:
-+		break;
-+	}
-+	return TRUE;
-+}
-+
-+#define fhs_fh fhstatus_u.fhs_fhandle
-+
-+bool_t
-+xdr_mountstat3 (XDR *xdrs, mountstat3 *objp)
-+{
-+	register int32_t *buf;
-+
-+	 if (!xdr_enum (xdrs, (enum_t *) objp))
-+		 return FALSE;
-+	return TRUE;
-+}
-+
-+bool_t
-+xdr_mountres3_ok (XDR *xdrs, mountres3_ok *objp)
-+{
-+	register int32_t *buf;
-+
-+	 if (!xdr_fhandle3 (xdrs, &objp->fhandle))
-+		 return FALSE;
-+	 if (!xdr_array (xdrs, (char **)&objp->auth_flavors.auth_flavors_val, (u_int *) &objp->auth_flavors.auth_flavors_len, ~0,
-+		sizeof (int), (xdrproc_t) xdr_int))
-+		 return FALSE;
-+	return TRUE;
-+}
-+
-+bool_t
-+xdr_mountres3 (XDR *xdrs, mountres3 *objp)
-+{
-+	register int32_t *buf;
-+
-+	 if (!xdr_mountstat3 (xdrs, &objp->fhs_status))
-+		 return FALSE;
-+	switch (objp->fhs_status) {
-+	case MNT_OK:
-+		 if (!xdr_mountres3_ok (xdrs, &objp->mountres3_u.mountinfo))
-+			 return FALSE;
-+		break;
-+	default:
-+		break;
-+	}
-+	return TRUE;
-+}
-+
-+bool_t
-+xdr_dirpath (XDR *xdrs, dirpath *objp)
-+{
-+	register int32_t *buf;
-+
-+	 if (!xdr_string (xdrs, objp, MNTPATHLEN))
-+		 return FALSE;
-+	return TRUE;
-+}

+ 0 - 154
package/dsniff/patches/patch-mount_h

@@ -1,154 +0,0 @@
---- dsniff-2.4.orig/mount.h	1970-01-01 00:00:00.000000000 +0100
-+++ dsniff-2.4/mount.h	2009-12-11 12:42:08.000000000 +0100
-@@ -0,0 +1,151 @@
-+/*
-+ * Please do not edit this file.
-+ * It was generated using rpcgen.
-+ */
-+
-+#ifndef _MOUNT_H_RPCGEN
-+#define _MOUNT_H_RPCGEN
-+
-+#include <rpc/rpc.h>
-+
-+
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
-+#define MNTPATHLEN 1024
-+#define MNTNAMLEN 255
-+#define FHSIZE 32
-+#define FHSIZE3 64
-+
-+typedef char fhandle[FHSIZE];
-+
-+typedef struct {
-+	u_int fhandle3_len;
-+	char *fhandle3_val;
-+} fhandle3;
-+
-+struct fhstatus {
-+	u_int fhs_status;
-+	union {
-+		fhandle fhs_fhandle;
-+	} fhstatus_u;
-+};
-+typedef struct fhstatus fhstatus;
-+
-+#define fhs_fh fhstatus_u.fhs_fhandle
-+
-+enum mountstat3 {
-+	MNT_OK = 0,
-+	MNT3ERR_PERM = 1,
-+	MNT3ERR_NOENT = 2,
-+	MNT3ERR_IO = 5,
-+	MNT3ERR_ACCES = 13,
-+	MNT3ERR_NOTDIR = 20,
-+	MNT3ERR_INVAL = 22,
-+	MNT3ERR_NAMETOOLONG = 63,
-+	MNT3ERR_NOTSUPP = 10004,
-+	MNT3ERR_SERVERFAULT = 10006,
-+};
-+typedef enum mountstat3 mountstat3;
-+
-+struct mountres3_ok {
-+	fhandle3 fhandle;
-+	struct {
-+		u_int auth_flavors_len;
-+		int *auth_flavors_val;
-+	} auth_flavors;
-+};
-+typedef struct mountres3_ok mountres3_ok;
-+
-+struct mountres3 {
-+	mountstat3 fhs_status;
-+	union {
-+		mountres3_ok mountinfo;
-+	} mountres3_u;
-+};
-+typedef struct mountres3 mountres3;
-+
-+typedef char *dirpath;
-+
-+#define MOUNTPROG 100005
-+#define MOUNTVERS 1
-+
-+#if defined(__STDC__) || defined(__cplusplus)
-+#define MOUNTPROC_NULL 0
-+extern  void * mountproc_null_1(void *, CLIENT *);
-+extern  void * mountproc_null_1_svc(void *, struct svc_req *);
-+#define MOUNTPROC_MNT 1
-+extern  fhstatus * mountproc_mnt_1(dirpath *, CLIENT *);
-+extern  fhstatus * mountproc_mnt_1_svc(dirpath *, struct svc_req *);
-+extern int mountprog_1_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
-+
-+#else /* K&R C */
-+#define MOUNTPROC_NULL 0
-+extern  void * mountproc_null_1();
-+extern  void * mountproc_null_1_svc();
-+#define MOUNTPROC_MNT 1
-+extern  fhstatus * mountproc_mnt_1();
-+extern  fhstatus * mountproc_mnt_1_svc();
-+extern int mountprog_1_freeresult ();
-+#endif /* K&R C */
-+#define MOUNTVERS_POSIX 2
-+
-+#if defined(__STDC__) || defined(__cplusplus)
-+extern  void * mountproc_null_2(void *, CLIENT *);
-+extern  void * mountproc_null_2_svc(void *, struct svc_req *);
-+extern  fhstatus * mountproc_mnt_2(dirpath *, CLIENT *);
-+extern  fhstatus * mountproc_mnt_2_svc(dirpath *, struct svc_req *);
-+extern int mountprog_2_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
-+
-+#else /* K&R C */
-+extern  void * mountproc_null_2();
-+extern  void * mountproc_null_2_svc();
-+extern  fhstatus * mountproc_mnt_2();
-+extern  fhstatus * mountproc_mnt_2_svc();
-+extern int mountprog_2_freeresult ();
-+#endif /* K&R C */
-+#define MOUNTVERS3 3
-+
-+#if defined(__STDC__) || defined(__cplusplus)
-+extern  void * mountproc_null_3(void *, CLIENT *);
-+extern  void * mountproc_null_3_svc(void *, struct svc_req *);
-+extern  mountres3 * mountproc_mnt_3(dirpath *, CLIENT *);
-+extern  mountres3 * mountproc_mnt_3_svc(dirpath *, struct svc_req *);
-+extern int mountprog_3_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
-+
-+#else /* K&R C */
-+extern  void * mountproc_null_3();
-+extern  void * mountproc_null_3_svc();
-+extern  mountres3 * mountproc_mnt_3();
-+extern  mountres3 * mountproc_mnt_3_svc();
-+extern int mountprog_3_freeresult ();
-+#endif /* K&R C */
-+
-+/* the xdr functions */
-+
-+#if defined(__STDC__) || defined(__cplusplus)
-+extern  bool_t xdr_fhandle (XDR *, fhandle);
-+extern  bool_t xdr_fhandle3 (XDR *, fhandle3*);
-+extern  bool_t xdr_fhstatus (XDR *, fhstatus*);
-+extern  bool_t xdr_mountstat3 (XDR *, mountstat3*);
-+extern  bool_t xdr_mountres3_ok (XDR *, mountres3_ok*);
-+extern  bool_t xdr_mountres3 (XDR *, mountres3*);
-+extern  bool_t xdr_dirpath (XDR *, dirpath*);
-+
-+#else /* K&R C */
-+extern bool_t xdr_fhandle ();
-+extern bool_t xdr_fhandle3 ();
-+extern bool_t xdr_fhstatus ();
-+extern bool_t xdr_mountstat3 ();
-+extern bool_t xdr_mountres3_ok ();
-+extern bool_t xdr_mountres3 ();
-+extern bool_t xdr_dirpath ();
-+
-+#endif /* K&R C */
-+
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+#endif /* !_MOUNT_H_RPCGEN */

+ 0 - 11
package/dsniff/patches/patch-msgsnarf_c

@@ -1,11 +0,0 @@
-$Id$
---- dsniff-2.4.orig/msgsnarf.c	2001-03-15 09:33:04.000000000 +0100
-+++ dsniff-2.4/msgsnarf.c	2007-01-23 00:20:48.000000000 +0100
-@@ -23,6 +23,7 @@
- #include <nids.h>
- #include <pcap.h>
- #include <pcaputil.h>
-+#include <time.h>
- 
- #include "buf.h"
- #include "decode.h"

+ 0 - 740
package/dsniff/patches/patch-nfs_prot_c

@@ -1,740 +0,0 @@
---- dsniff-2.4.orig/nfs_prot.c	1970-01-01 00:00:00.000000000 +0100
-+++ dsniff-2.4/nfs_prot.c	2009-12-11 12:53:10.000000000 +0100
-@@ -0,0 +1,737 @@
-+/*
-+ * Please do not edit this file.
-+ * It was generated using rpcgen.
-+ */
-+
-+#include "nfs_prot.h"
-+#include "config.h"
-+
-+bool_t
-+xdr_nfsstat (XDR *xdrs, nfsstat *objp)
-+{
-+	register int32_t *buf;
-+
-+	 if (!xdr_enum (xdrs, (enum_t *) objp))
-+		 return FALSE;
-+	return TRUE;
-+}
-+
-+bool_t
-+xdr_ftype (XDR *xdrs, ftype *objp)
-+{
-+	register int32_t *buf;
-+
-+	 if (!xdr_enum (xdrs, (enum_t *) objp))
-+		 return FALSE;
-+	return TRUE;
-+}
-+
-+bool_t
-+xdr_nfs_fh (XDR *xdrs, nfs_fh *objp)
-+{
-+	register int32_t *buf;
-+
-+	int i;
-+	 if (!xdr_opaque (xdrs, objp->data, NFS_FHSIZE))
-+		 return FALSE;
-+	return TRUE;
-+}
-+
-+bool_t
-+xdr_nfstime (XDR *xdrs, nfstime *objp)
-+{
-+	register int32_t *buf;
-+
-+	 if (!xdr_u_int (xdrs, &objp->seconds))
-+		 return FALSE;
-+	 if (!xdr_u_int (xdrs, &objp->useconds))
-+		 return FALSE;
-+	return TRUE;
-+}
-+
-+bool_t
-+xdr_fattr (XDR *xdrs, fattr *objp)
-+{
-+	register int32_t *buf;
-+
-+
-+	if (xdrs->x_op == XDR_ENCODE) {
-+		 if (!xdr_ftype (xdrs, &objp->type))
-+			 return FALSE;
-+		buf = XDR_INLINE (xdrs, 10 * BYTES_PER_XDR_UNIT);
-+		if (buf == NULL) {
-+			 if (!xdr_u_int (xdrs, &objp->mode))
-+				 return FALSE;
-+			 if (!xdr_u_int (xdrs, &objp->nlink))
-+				 return FALSE;
-+			 if (!xdr_u_int (xdrs, &objp->uid))
-+				 return FALSE;
-+			 if (!xdr_u_int (xdrs, &objp->gid))
-+				 return FALSE;
-+			 if (!xdr_u_int (xdrs, &objp->size))
-+				 return FALSE;
-+			 if (!xdr_u_int (xdrs, &objp->blocksize))
-+				 return FALSE;
-+			 if (!xdr_u_int (xdrs, &objp->rdev))
-+				 return FALSE;
-+			 if (!xdr_u_int (xdrs, &objp->blocks))
-+				 return FALSE;
-+			 if (!xdr_u_int (xdrs, &objp->fsid))
-+				 return FALSE;
-+			 if (!xdr_u_int (xdrs, &objp->fileid))
-+				 return FALSE;
-+
-+		} else {
-+		IXDR_PUT_U_LONG(buf, objp->mode);
-+		IXDR_PUT_U_LONG(buf, objp->nlink);
-+		IXDR_PUT_U_LONG(buf, objp->uid);
-+		IXDR_PUT_U_LONG(buf, objp->gid);
-+		IXDR_PUT_U_LONG(buf, objp->size);
-+		IXDR_PUT_U_LONG(buf, objp->blocksize);
-+		IXDR_PUT_U_LONG(buf, objp->rdev);
-+		IXDR_PUT_U_LONG(buf, objp->blocks);
-+		IXDR_PUT_U_LONG(buf, objp->fsid);
-+		IXDR_PUT_U_LONG(buf, objp->fileid);
-+		}
-+		 if (!xdr_nfstime (xdrs, &objp->atime))
-+			 return FALSE;
-+		 if (!xdr_nfstime (xdrs, &objp->mtime))
-+			 return FALSE;
-+		 if (!xdr_nfstime (xdrs, &objp->ctime))
-+			 return FALSE;
-+		return TRUE;
-+	} else if (xdrs->x_op == XDR_DECODE) {
-+		 if (!xdr_ftype (xdrs, &objp->type))
-+			 return FALSE;
-+		buf = XDR_INLINE (xdrs, 10 * BYTES_PER_XDR_UNIT);
-+		if (buf == NULL) {
-+			 if (!xdr_u_int (xdrs, &objp->mode))
-+				 return FALSE;
-+			 if (!xdr_u_int (xdrs, &objp->nlink))
-+				 return FALSE;
-+			 if (!xdr_u_int (xdrs, &objp->uid))
-+				 return FALSE;
-+			 if (!xdr_u_int (xdrs, &objp->gid))
-+				 return FALSE;
-+			 if (!xdr_u_int (xdrs, &objp->size))
-+				 return FALSE;
-+			 if (!xdr_u_int (xdrs, &objp->blocksize))
-+				 return FALSE;
-+			 if (!xdr_u_int (xdrs, &objp->rdev))
-+				 return FALSE;
-+			 if (!xdr_u_int (xdrs, &objp->blocks))
-+				 return FALSE;
-+			 if (!xdr_u_int (xdrs, &objp->fsid))
-+				 return FALSE;
-+			 if (!xdr_u_int (xdrs, &objp->fileid))
-+				 return FALSE;
-+
-+		} else {
-+		objp->mode = IXDR_GET_U_LONG(buf);
-+		objp->nlink = IXDR_GET_U_LONG(buf);
-+		objp->uid = IXDR_GET_U_LONG(buf);
-+		objp->gid = IXDR_GET_U_LONG(buf);
-+		objp->size = IXDR_GET_U_LONG(buf);
-+		objp->blocksize = IXDR_GET_U_LONG(buf);
-+		objp->rdev = IXDR_GET_U_LONG(buf);
-+		objp->blocks = IXDR_GET_U_LONG(buf);
-+		objp->fsid = IXDR_GET_U_LONG(buf);
-+		objp->fileid = IXDR_GET_U_LONG(buf);
-+		}
-+		 if (!xdr_nfstime (xdrs, &objp->atime))
-+			 return FALSE;
-+		 if (!xdr_nfstime (xdrs, &objp->mtime))
-+			 return FALSE;
-+		 if (!xdr_nfstime (xdrs, &objp->ctime))
-+			 return FALSE;
-+	 return TRUE;
-+	}
-+
-+	 if (!xdr_ftype (xdrs, &objp->type))
-+		 return FALSE;
-+	 if (!xdr_u_int (xdrs, &objp->mode))
-+		 return FALSE;
-+	 if (!xdr_u_int (xdrs, &objp->nlink))
-+		 return FALSE;
-+	 if (!xdr_u_int (xdrs, &objp->uid))
-+		 return FALSE;
-+	 if (!xdr_u_int (xdrs, &objp->gid))
-+		 return FALSE;
-+	 if (!xdr_u_int (xdrs, &objp->size))
-+		 return FALSE;
-+	 if (!xdr_u_int (xdrs, &objp->blocksize))
-+		 return FALSE;
-+	 if (!xdr_u_int (xdrs, &objp->rdev))
-+		 return FALSE;
-+	 if (!xdr_u_int (xdrs, &objp->blocks))
-+		 return FALSE;
-+	 if (!xdr_u_int (xdrs, &objp->fsid))
-+		 return FALSE;
-+	 if (!xdr_u_int (xdrs, &objp->fileid))
-+		 return FALSE;
-+	 if (!xdr_nfstime (xdrs, &objp->atime))
-+		 return FALSE;
-+	 if (!xdr_nfstime (xdrs, &objp->mtime))
-+		 return FALSE;
-+	 if (!xdr_nfstime (xdrs, &objp->ctime))
-+		 return FALSE;
-+	return TRUE;
-+}
-+
-+bool_t
-+xdr_filename (XDR *xdrs, filename *objp)
-+{
-+	register int32_t *buf;
-+
-+	 if (!xdr_string (xdrs, objp, NFS_MAXNAMLEN))
-+		 return FALSE;
-+	return TRUE;
-+}
-+
-+bool_t
-+xdr_nfspath (XDR *xdrs, nfspath *objp)
-+{
-+	register int32_t *buf;
-+
-+	 if (!xdr_string (xdrs, objp, NFS_MAXPATHLEN))
-+		 return FALSE;
-+	return TRUE;
-+}
-+
-+bool_t
-+xdr_diropargs (XDR *xdrs, diropargs *objp)
-+{
-+	register int32_t *buf;
-+
-+	 if (!xdr_nfs_fh (xdrs, &objp->dir))
-+		 return FALSE;
-+	 if (!xdr_filename (xdrs, &objp->name))
-+		 return FALSE;
-+	return TRUE;
-+}
-+
-+bool_t
-+xdr_diropokres (XDR *xdrs, diropokres *objp)
-+{
-+	register int32_t *buf;
-+
-+	 if (!xdr_nfs_fh (xdrs, &objp->file))
-+		 return FALSE;
-+	 if (!xdr_fattr (xdrs, &objp->attributes))
-+		 return FALSE;
-+	return TRUE;
-+}
-+
-+bool_t
-+xdr_diropres (XDR *xdrs, diropres *objp)
-+{
-+	register int32_t *buf;
-+
-+	 if (!xdr_nfsstat (xdrs, &objp->status))
-+		 return FALSE;
-+	switch (objp->status) {
-+	case NFS_OK:
-+		 if (!xdr_diropokres (xdrs, &objp->diropres_u.diropres))
-+			 return FALSE;
-+		break;
-+	default:
-+		break;
-+	}
-+	return TRUE;
-+}
-+
-+bool_t
-+xdr_readargs (XDR *xdrs, readargs *objp)
-+{
-+	register int32_t *buf;
-+
-+	 if (!xdr_nfs_fh (xdrs, &objp->file))
-+		 return FALSE;
-+	 if (!xdr_u_int (xdrs, &objp->offset))
-+		 return FALSE;
-+	 if (!xdr_u_int (xdrs, &objp->count))
-+		 return FALSE;
-+	 if (!xdr_u_int (xdrs, &objp->totalcount))
-+		 return FALSE;
-+	return TRUE;
-+}
-+
-+bool_t
-+xdr_readokres (XDR *xdrs, readokres *objp)
-+{
-+	register int32_t *buf;
-+
-+	 if (!xdr_fattr (xdrs, &objp->attributes))
-+		 return FALSE;
-+	 if (!xdr_bytes (xdrs, (char **)&objp->data.data_val, (u_int *) &objp->data.data_len, NFS_MAXDATA))
-+		 return FALSE;
-+	return TRUE;
-+}
-+
-+bool_t
-+xdr_readres (XDR *xdrs, readres *objp)
-+{
-+	register int32_t *buf;
-+
-+	 if (!xdr_nfsstat (xdrs, &objp->status))
-+		 return FALSE;
-+	switch (objp->status) {
-+	case NFS_OK:
-+		 if (!xdr_readokres (xdrs, &objp->readres_u.reply))
-+			 return FALSE;
-+		break;
-+	default:
-+		break;
-+	}
-+	return TRUE;
-+}
-+
-+bool_t
-+xdr_uint64 (XDR *xdrs, uint64 *objp)
-+{
-+	register int32_t *buf;
-+
-+	 if (!xdr_u_int64_t (xdrs, objp))
-+		 return FALSE;
-+	return TRUE;
-+}
-+
-+bool_t
-+xdr_int64 (XDR *xdrs, int64 *objp)
-+{
-+	register int32_t *buf;
-+
-+	 if (!xdr_int64_t (xdrs, objp))
-+		 return FALSE;
-+	return TRUE;
-+}
-+
-+bool_t
-+xdr_uint32 (XDR *xdrs, uint32 *objp)
-+{
-+	register int32_t *buf;
-+
-+	 if (!xdr_u_int (xdrs, objp))
-+		 return FALSE;
-+	return TRUE;
-+}
-+
-+bool_t
-+xdr_int32 (XDR *xdrs, int32 *objp)
-+{
-+	register int32_t *buf;
-+
-+	 if (!xdr_int (xdrs, objp))
-+		 return FALSE;
-+	return TRUE;
-+}
-+
-+bool_t
-+xdr_filename3 (XDR *xdrs, filename3 *objp)
-+{
-+	register int32_t *buf;
-+
-+	 if (!xdr_string (xdrs, objp, ~0))
-+		 return FALSE;
-+	return TRUE;
-+}
-+
-+bool_t
-+xdr_nfspath3 (XDR *xdrs, nfspath3 *objp)
-+{
-+	register int32_t *buf;
-+
-+	 if (!xdr_string (xdrs, objp, ~0))
-+		 return FALSE;
-+	return TRUE;
-+}
-+
-+bool_t
-+xdr_fileid3 (XDR *xdrs, fileid3 *objp)
-+{
-+	register int32_t *buf;
-+
-+	 if (!xdr_uint64 (xdrs, objp))
-+		 return FALSE;
-+	return TRUE;
-+}
-+
-+bool_t
-+xdr_cookie3 (XDR *xdrs, cookie3 *objp)
-+{
-+	register int32_t *buf;
-+
-+	 if (!xdr_uint64 (xdrs, objp))
-+		 return FALSE;
-+	return TRUE;
-+}
-+
-+bool_t
-+xdr_cookieverf3 (XDR *xdrs, cookieverf3 objp)
-+{
-+	register int32_t *buf;
-+
-+	 if (!xdr_opaque (xdrs, objp, NFS3_COOKIEVERFSIZE))
-+		 return FALSE;
-+	return TRUE;
-+}
-+
-+bool_t
-+xdr_createverf3 (XDR *xdrs, createverf3 objp)
-+{
-+	register int32_t *buf;
-+
-+	 if (!xdr_opaque (xdrs, objp, NFS3_CREATEVERFSIZE))
-+		 return FALSE;
-+	return TRUE;
-+}
-+
-+bool_t
-+xdr_writeverf3 (XDR *xdrs, writeverf3 objp)
-+{
-+	register int32_t *buf;
-+
-+	 if (!xdr_opaque (xdrs, objp, NFS3_WRITEVERFSIZE))
-+		 return FALSE;
-+	return TRUE;
-+}
-+
-+bool_t
-+xdr_uid3 (XDR *xdrs, uid3 *objp)
-+{
-+	register int32_t *buf;
-+
-+	 if (!xdr_uint32 (xdrs, objp))
-+		 return FALSE;
-+	return TRUE;
-+}
-+
-+bool_t
-+xdr_gid3 (XDR *xdrs, gid3 *objp)
-+{
-+	register int32_t *buf;
-+
-+	 if (!xdr_uint32 (xdrs, objp))
-+		 return FALSE;
-+	return TRUE;
-+}
-+
-+bool_t
-+xdr_size3 (XDR *xdrs, size3 *objp)
-+{
-+	register int32_t *buf;
-+
-+	 if (!xdr_uint64 (xdrs, objp))
-+		 return FALSE;
-+	return TRUE;
-+}
-+
-+bool_t
-+xdr_offset3 (XDR *xdrs, offset3 *objp)
-+{
-+	register int32_t *buf;
-+
-+	 if (!xdr_uint64 (xdrs, objp))
-+		 return FALSE;
-+	return TRUE;
-+}
-+
-+bool_t
-+xdr_mode3 (XDR *xdrs, mode3 *objp)
-+{
-+	register int32_t *buf;
-+
-+	 if (!xdr_uint32 (xdrs, objp))
-+		 return FALSE;
-+	return TRUE;
-+}
-+
-+bool_t
-+xdr_count3 (XDR *xdrs, count3 *objp)
-+{
-+	register int32_t *buf;
-+
-+	 if (!xdr_uint32 (xdrs, objp))
-+		 return FALSE;
-+	return TRUE;
-+}
-+
-+bool_t
-+xdr_nfsstat3 (XDR *xdrs, nfsstat3 *objp)
-+{
-+	register int32_t *buf;
-+
-+	 if (!xdr_enum (xdrs, (enum_t *) objp))
-+		 return FALSE;
-+	return TRUE;
-+}
-+
-+bool_t
-+xdr_ftype3 (XDR *xdrs, ftype3 *objp)
-+{
-+	register int32_t *buf;
-+
-+	 if (!xdr_enum (xdrs, (enum_t *) objp))
-+		 return FALSE;
-+	return TRUE;
-+}
-+
-+bool_t
-+xdr_specdata3 (XDR *xdrs, specdata3 *objp)
-+{
-+	register int32_t *buf;
-+
-+	 if (!xdr_uint32 (xdrs, &objp->specdata1))
-+		 return FALSE;
-+	 if (!xdr_uint32 (xdrs, &objp->specdata2))
-+		 return FALSE;
-+	return TRUE;
-+}
-+
-+bool_t
-+xdr_nfs_fh3 (XDR *xdrs, nfs_fh3 *objp)
-+{
-+	register int32_t *buf;
-+
-+	 if (!xdr_bytes (xdrs, (char **)&objp->data.data_val, (u_int *) &objp->data.data_len, NFS3_FHSIZE))
-+		 return FALSE;
-+	return TRUE;
-+}
-+
-+bool_t
-+xdr_nfstime3 (XDR *xdrs, nfstime3 *objp)
-+{
-+	register int32_t *buf;
-+
-+	 if (!xdr_uint32 (xdrs, &objp->seconds))
-+		 return FALSE;
-+	 if (!xdr_uint32 (xdrs, &objp->nseconds))
-+		 return FALSE;
-+	return TRUE;
-+}
-+
-+bool_t
-+xdr_fattr3 (XDR *xdrs, fattr3 *objp)
-+{
-+	register int32_t *buf;
-+
-+	 if (!xdr_ftype3 (xdrs, &objp->type))
-+		 return FALSE;
-+	 if (!xdr_mode3 (xdrs, &objp->mode))
-+		 return FALSE;
-+	 if (!xdr_uint32 (xdrs, &objp->nlink))
-+		 return FALSE;
-+	 if (!xdr_uid3 (xdrs, &objp->uid))
-+		 return FALSE;
-+	 if (!xdr_gid3 (xdrs, &objp->gid))
-+		 return FALSE;
-+	 if (!xdr_size3 (xdrs, &objp->size))
-+		 return FALSE;
-+	 if (!xdr_size3 (xdrs, &objp->used))
-+		 return FALSE;
-+	 if (!xdr_specdata3 (xdrs, &objp->rdev))
-+		 return FALSE;
-+	 if (!xdr_uint64 (xdrs, &objp->fsid))
-+		 return FALSE;
-+	 if (!xdr_fileid3 (xdrs, &objp->fileid))
-+		 return FALSE;
-+	 if (!xdr_nfstime3 (xdrs, &objp->atime))
-+		 return FALSE;
-+	 if (!xdr_nfstime3 (xdrs, &objp->mtime))
-+		 return FALSE;
-+	 if (!xdr_nfstime3 (xdrs, &objp->ctime))
-+		 return FALSE;
-+	return TRUE;
-+}
-+
-+bool_t
-+xdr_post_op_attr (XDR *xdrs, post_op_attr *objp)
-+{
-+	register int32_t *buf;
-+
-+	 if (!xdr_bool (xdrs, &objp->attributes_follow))
-+		 return FALSE;
-+	switch (objp->attributes_follow) {
-+	case TRUE:
-+		 if (!xdr_fattr3 (xdrs, &objp->post_op_attr_u.attributes))
-+			 return FALSE;
-+		break;
-+	case FALSE:
-+		break;
-+	default:
-+		return FALSE;
-+	}
-+	return TRUE;
-+}
-+
-+bool_t
-+xdr_wcc_attr (XDR *xdrs, wcc_attr *objp)
-+{
-+	register int32_t *buf;
-+
-+	 if (!xdr_size3 (xdrs, &objp->size))
-+		 return FALSE;
-+	 if (!xdr_nfstime3 (xdrs, &objp->mtime))
-+		 return FALSE;
-+	 if (!xdr_nfstime3 (xdrs, &objp->ctime))
-+		 return FALSE;
-+	return TRUE;
-+}
-+
-+bool_t
-+xdr_pre_op_attr (XDR *xdrs, pre_op_attr *objp)
-+{
-+	register int32_t *buf;
-+
-+	 if (!xdr_bool (xdrs, &objp->attributes_follow))
-+		 return FALSE;
-+	switch (objp->attributes_follow) {
-+	case TRUE:
-+		 if (!xdr_wcc_attr (xdrs, &objp->pre_op_attr_u.attributes))
-+			 return FALSE;
-+		break;
-+	case FALSE:
-+		break;
-+	default:
-+		return FALSE;
-+	}
-+	return TRUE;
-+}
-+
-+bool_t
-+xdr_wcc_data (XDR *xdrs, wcc_data *objp)
-+{
-+	register int32_t *buf;
-+
-+	 if (!xdr_pre_op_attr (xdrs, &objp->before))
-+		 return FALSE;
-+	 if (!xdr_post_op_attr (xdrs, &objp->after))
-+		 return FALSE;
-+	return TRUE;
-+}
-+
-+bool_t
-+xdr_diropargs3 (XDR *xdrs, diropargs3 *objp)
-+{
-+	register int32_t *buf;
-+
-+	 if (!xdr_nfs_fh3 (xdrs, &objp->dir))
-+		 return FALSE;
-+	 if (!xdr_filename3 (xdrs, &objp->name))
-+		 return FALSE;
-+	return TRUE;
-+}
-+
-+bool_t
-+xdr_LOOKUP3args (XDR *xdrs, LOOKUP3args *objp)
-+{
-+	register int32_t *buf;
-+
-+	 if (!xdr_diropargs3 (xdrs, &objp->what))
-+		 return FALSE;
-+	return TRUE;
-+}
-+
-+bool_t
-+xdr_LOOKUP3resok (XDR *xdrs, LOOKUP3resok *objp)
-+{
-+	register int32_t *buf;
-+
-+	 if (!xdr_nfs_fh3 (xdrs, &objp->object))
-+		 return FALSE;
-+	 if (!xdr_post_op_attr (xdrs, &objp->obj_attributes))
-+		 return FALSE;
-+	 if (!xdr_post_op_attr (xdrs, &objp->dir_attributes))
-+		 return FALSE;
-+	return TRUE;
-+}
-+
-+bool_t
-+xdr_LOOKUP3resfail (XDR *xdrs, LOOKUP3resfail *objp)
-+{
-+	register int32_t *buf;
-+
-+	 if (!xdr_post_op_attr (xdrs, &objp->dir_attributes))
-+		 return FALSE;
-+	return TRUE;
-+}
-+
-+bool_t
-+xdr_LOOKUP3res (XDR *xdrs, LOOKUP3res *objp)
-+{
-+	register int32_t *buf;
-+
-+	 if (!xdr_nfsstat3 (xdrs, &objp->status))
-+		 return FALSE;
-+	switch (objp->status) {
-+	case NFS3_OK:
-+		 if (!xdr_LOOKUP3resok (xdrs, &objp->LOOKUP3res_u.resok))
-+			 return FALSE;
-+		break;
-+	default:
-+		 if (!xdr_LOOKUP3resfail (xdrs, &objp->LOOKUP3res_u.resfail))
-+			 return FALSE;
-+		break;
-+	}
-+	return TRUE;
-+}
-+
-+bool_t
-+xdr_READ3args (XDR *xdrs, READ3args *objp)
-+{
-+	register int32_t *buf;
-+
-+	 if (!xdr_nfs_fh3 (xdrs, &objp->file))
-+		 return FALSE;
-+	 if (!xdr_offset3 (xdrs, &objp->offset))
-+		 return FALSE;
-+	 if (!xdr_count3 (xdrs, &objp->count))
-+		 return FALSE;
-+	return TRUE;
-+}
-+
-+bool_t
-+xdr_READ3resok (XDR *xdrs, READ3resok *objp)
-+{
-+	register int32_t *buf;
-+
-+	 if (!xdr_post_op_attr (xdrs, &objp->file_attributes))
-+		 return FALSE;
-+	 if (!xdr_count3 (xdrs, &objp->count))
-+		 return FALSE;
-+	 if (!xdr_bool (xdrs, &objp->eof))
-+		 return FALSE;
-+	 if (!xdr_bytes (xdrs, (char **)&objp->data.data_val, (u_int *) &objp->data.data_len, ~0))
-+		 return FALSE;
-+	return TRUE;
-+}
-+
-+bool_t
-+xdr_READ3resfail (XDR *xdrs, READ3resfail *objp)
-+{
-+	register int32_t *buf;
-+
-+	 if (!xdr_post_op_attr (xdrs, &objp->file_attributes))
-+		 return FALSE;
-+	return TRUE;
-+}
-+
-+bool_t
-+xdr_READ3res (XDR *xdrs, READ3res *objp)
-+{
-+	register int32_t *buf;
-+
-+	 if (!xdr_nfsstat (xdrs, &objp->status))
-+		 return FALSE;
-+	switch (objp->status) {
-+	case NFS3_OK:
-+		 if (!xdr_READ3resok (xdrs, &objp->READ3res_u.resok))
-+			 return FALSE;
-+		break;
-+	default:
-+		 if (!xdr_READ3resfail (xdrs, &objp->READ3res_u.resfail))
-+			 return FALSE;
-+		break;
-+	}
-+	return TRUE;
-+}

+ 0 - 531
package/dsniff/patches/patch-nfs_prot_h

@@ -1,531 +0,0 @@
---- dsniff-2.4.orig/nfs_prot.h	1970-01-01 00:00:00.000000000 +0100
-+++ dsniff-2.4/nfs_prot.h	2009-12-11 12:53:10.000000000 +0100
-@@ -0,0 +1,528 @@
-+/*
-+ * Please do not edit this file.
-+ * It was generated using rpcgen.
-+ */
-+
-+#ifndef _NFS_PROT_H_RPCGEN
-+#define _NFS_PROT_H_RPCGEN
-+
-+#include <rpc/rpc.h>
-+
-+
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
-+#include "config.h"
-+#define NFS_PORT 2049
-+#define NFS_MAXDATA 8192
-+#define NFS_MAXPATHLEN 1024
-+#define NFS_MAXNAMLEN 255
-+#define NFS_FHSIZE 32
-+#define NFS_COOKIESIZE 4
-+#define NFS_FIFO_DEV -1
-+#define NFSMODE_FMT 0170000
-+#define NFSMODE_DIR 0040000
-+#define NFSMODE_CHR 0020000
-+#define NFSMODE_BLK 0060000
-+#define NFSMODE_REG 0100000
-+#define NFSMODE_LNK 0120000
-+#define NFSMODE_SOCK 0140000
-+#define NFSMODE_FIFO 0010000
-+
-+enum nfsstat {
-+	NFS_OK = 0,
-+	NFSERR_PERM = 1,
-+	NFSERR_NOENT = 2,
-+	NFSERR_IO = 5,
-+	NFSERR_NXIO = 6,
-+	NFSERR_ACCES = 13,
-+	NFSERR_EXIST = 17,
-+	NFSERR_XDEV = 18,
-+	NFSERR_NODEV = 19,
-+	NFSERR_NOTDIR = 20,
-+	NFSERR_ISDIR = 21,
-+	NFSERR_INVAL = 22,
-+	NFSERR_FBIG = 27,
-+	NFSERR_NOSPC = 28,
-+	NFSERR_ROFS = 30,
-+	NFSERR_OPNOTSUPP = 45,
-+	NFSERR_NAMETOOLONG = 63,
-+	NFSERR_NOTEMPTY = 66,
-+	NFSERR_DQUOT = 69,
-+	NFSERR_STALE = 70,
-+	NFSERR_REMOTE = 71,
-+	NFSERR_WFLUSH = 72,
-+};
-+typedef enum nfsstat nfsstat;
-+
-+enum ftype {
-+	NFNON = 0,
-+	NFREG = 1,
-+	NFDIR = 2,
-+	NFBLK = 3,
-+	NFCHR = 4,
-+	NFLNK = 5,
-+	NFSOCK = 6,
-+	NFBAD = 7,
-+	NFFIFO = 8,
-+};
-+typedef enum ftype ftype;
-+
-+struct nfs_fh {
-+	char data[NFS_FHSIZE];
-+};
-+typedef struct nfs_fh nfs_fh;
-+
-+struct nfstime {
-+	u_int seconds;
-+	u_int useconds;
-+};
-+typedef struct nfstime nfstime;
-+
-+struct fattr {
-+	ftype type;
-+	u_int mode;
-+	u_int nlink;
-+	u_int uid;
-+	u_int gid;
-+	u_int size;
-+	u_int blocksize;
-+	u_int rdev;
-+	u_int blocks;
-+	u_int fsid;
-+	u_int fileid;
-+	nfstime atime;
-+	nfstime mtime;
-+	nfstime ctime;
-+};
-+typedef struct fattr fattr;
-+
-+typedef char *filename;
-+
-+typedef char *nfspath;
-+
-+struct diropargs {
-+	nfs_fh dir;
-+	filename name;
-+};
-+typedef struct diropargs diropargs;
-+
-+struct diropokres {
-+	nfs_fh file;
-+	fattr attributes;
-+};
-+typedef struct diropokres diropokres;
-+
-+struct diropres {
-+	nfsstat status;
-+	union {
-+		diropokres diropres;
-+	} diropres_u;
-+};
-+typedef struct diropres diropres;
-+
-+struct readargs {
-+	nfs_fh file;
-+	u_int offset;
-+	u_int count;
-+	u_int totalcount;
-+};
-+typedef struct readargs readargs;
-+
-+struct readokres {
-+	fattr attributes;
-+	struct {
-+		u_int data_len;
-+		char *data_val;
-+	} data;
-+};
-+typedef struct readokres readokres;
-+
-+struct readres {
-+	nfsstat status;
-+	union {
-+		readokres reply;
-+	} readres_u;
-+};
-+typedef struct readres readres;
-+#define NFS3_FHSIZE 64
-+#define NFS3_COOKIEVERFSIZE 8
-+#define NFS3_CREATEVERFSIZE 8
-+#define NFS3_WRITEVERFSIZE 8
-+
-+typedef u_int64_t uint64;
-+
-+typedef int64_t int64;
-+
-+typedef u_int uint32;
-+
-+typedef int int32;
-+
-+typedef char *filename3;
-+
-+typedef char *nfspath3;
-+
-+typedef uint64 fileid3;
-+
-+typedef uint64 cookie3;
-+
-+typedef char cookieverf3[NFS3_COOKIEVERFSIZE];
-+
-+typedef char createverf3[NFS3_CREATEVERFSIZE];
-+
-+typedef char writeverf3[NFS3_WRITEVERFSIZE];
-+
-+typedef uint32 uid3;
-+
-+typedef uint32 gid3;
-+
-+typedef uint64 size3;
-+
-+typedef uint64 offset3;
-+
-+typedef uint32 mode3;
-+
-+typedef uint32 count3;
-+
-+enum nfsstat3 {
-+	NFS3_OK = 0,
-+	NFS3ERR_PERM = 1,
-+	NFS3ERR_NOENT = 2,
-+	NFS3ERR_IO = 5,
-+	NFS3ERR_NXIO = 6,
-+	NFS3ERR_ACCES = 13,
-+	NFS3ERR_EXIST = 17,
-+	NFS3ERR_XDEV = 18,
-+	NFS3ERR_NODEV = 19,
-+	NFS3ERR_NOTDIR = 20,
-+	NFS3ERR_ISDIR = 21,
-+	NFS3ERR_INVAL = 22,
-+	NFS3ERR_FBIG = 27,
-+	NFS3ERR_NOSPC = 28,
-+	NFS3ERR_ROFS = 30,
-+	NFS3ERR_MLINK = 31,
-+	NFS3ERR_NAMETOOLONG = 63,
-+	NFS3ERR_NOTEMPTY = 66,
-+	NFS3ERR_DQUOT = 69,
-+	NFS3ERR_STALE = 70,
-+	NFS3ERR_REMOTE = 71,
-+	NFS3ERR_BADHANDLE = 10001,
-+	NFS3ERR_NOT_SYNC = 10002,
-+	NFS3ERR_BAD_COOKIE = 10003,
-+	NFS3ERR_NOTSUPP = 10004,
-+	NFS3ERR_TOOSMALL = 10005,
-+	NFS3ERR_SERVERFAULT = 10006,
-+	NFS3ERR_BADTYPE = 10007,
-+	NFS3ERR_JUKEBOX = 10008,
-+};
-+typedef enum nfsstat3 nfsstat3;
-+
-+enum ftype3 {
-+	NF3REG = 1,
-+	NF3DIR = 2,
-+	NF3BLK = 3,
-+	NF3CHR = 4,
-+	NF3LNK = 5,
-+	NF3SOCK = 6,
-+	NF3FIFO = 7,
-+};
-+typedef enum ftype3 ftype3;
-+
-+struct specdata3 {
-+	uint32 specdata1;
-+	uint32 specdata2;
-+};
-+typedef struct specdata3 specdata3;
-+
-+struct nfs_fh3 {
-+	struct {
-+		u_int data_len;
-+		char *data_val;
-+	} data;
-+};
-+typedef struct nfs_fh3 nfs_fh3;
-+
-+struct nfstime3 {
-+	uint32 seconds;
-+	uint32 nseconds;
-+};
-+typedef struct nfstime3 nfstime3;
-+
-+struct fattr3 {
-+	ftype3 type;
-+	mode3 mode;
-+	uint32 nlink;
-+	uid3 uid;
-+	gid3 gid;
-+	size3 size;
-+	size3 used;
-+	specdata3 rdev;
-+	uint64 fsid;
-+	fileid3 fileid;
-+	nfstime3 atime;
-+	nfstime3 mtime;
-+	nfstime3 ctime;
-+};
-+typedef struct fattr3 fattr3;
-+
-+struct post_op_attr {
-+	bool_t attributes_follow;
-+	union {
-+		fattr3 attributes;
-+	} post_op_attr_u;
-+};
-+typedef struct post_op_attr post_op_attr;
-+
-+struct wcc_attr {
-+	size3 size;
-+	nfstime3 mtime;
-+	nfstime3 ctime;
-+};
-+typedef struct wcc_attr wcc_attr;
-+
-+struct pre_op_attr {
-+	bool_t attributes_follow;
-+	union {
-+		wcc_attr attributes;
-+	} pre_op_attr_u;
-+};
-+typedef struct pre_op_attr pre_op_attr;
-+
-+struct wcc_data {
-+	pre_op_attr before;
-+	post_op_attr after;
-+};
-+typedef struct wcc_data wcc_data;
-+
-+struct diropargs3 {
-+	nfs_fh3 dir;
-+	filename3 name;
-+};
-+typedef struct diropargs3 diropargs3;
-+
-+struct LOOKUP3args {
-+	diropargs3 what;
-+};
-+typedef struct LOOKUP3args LOOKUP3args;
-+
-+struct LOOKUP3resok {
-+	nfs_fh3 object;
-+	post_op_attr obj_attributes;
-+	post_op_attr dir_attributes;
-+};
-+typedef struct LOOKUP3resok LOOKUP3resok;
-+
-+struct LOOKUP3resfail {
-+	post_op_attr dir_attributes;
-+};
-+typedef struct LOOKUP3resfail LOOKUP3resfail;
-+
-+struct LOOKUP3res {
-+	nfsstat3 status;
-+	union {
-+		LOOKUP3resok resok;
-+		LOOKUP3resfail resfail;
-+	} LOOKUP3res_u;
-+};
-+typedef struct LOOKUP3res LOOKUP3res;
-+
-+struct READ3args {
-+	nfs_fh3 file;
-+	offset3 offset;
-+	count3 count;
-+};
-+typedef struct READ3args READ3args;
-+
-+struct READ3resok {
-+	post_op_attr file_attributes;
-+	count3 count;
-+	bool_t eof;
-+	struct {
-+		u_int data_len;
-+		char *data_val;
-+	} data;
-+};
-+typedef struct READ3resok READ3resok;
-+
-+struct READ3resfail {
-+	post_op_attr file_attributes;
-+};
-+typedef struct READ3resfail READ3resfail;
-+
-+struct READ3res {
-+	nfsstat status;
-+	union {
-+		READ3resok resok;
-+		READ3resfail resfail;
-+	} READ3res_u;
-+};
-+typedef struct READ3res READ3res;
-+
-+#define NFS_PROGRAM 100003
-+#define NFS_VERSION 2
-+
-+#if defined(__STDC__) || defined(__cplusplus)
-+#define NFSPROC_NULL 0
-+extern  void * nfsproc_null_2(void *, CLIENT *);
-+extern  void * nfsproc_null_2_svc(void *, struct svc_req *);
-+#define NFSPROC_LOOKUP 4
-+extern  diropres * nfsproc_lookup_2(diropargs *, CLIENT *);
-+extern  diropres * nfsproc_lookup_2_svc(diropargs *, struct svc_req *);
-+#define NFSPROC_READ 6
-+extern  readres * nfsproc_read_2(readargs *, CLIENT *);
-+extern  readres * nfsproc_read_2_svc(readargs *, struct svc_req *);
-+extern int nfs_program_2_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
-+
-+#else /* K&R C */
-+#define NFSPROC_NULL 0
-+extern  void * nfsproc_null_2();
-+extern  void * nfsproc_null_2_svc();
-+#define NFSPROC_LOOKUP 4
-+extern  diropres * nfsproc_lookup_2();
-+extern  diropres * nfsproc_lookup_2_svc();
-+#define NFSPROC_READ 6
-+extern  readres * nfsproc_read_2();
-+extern  readres * nfsproc_read_2_svc();
-+extern int nfs_program_2_freeresult ();
-+#endif /* K&R C */
-+
-+#define NFS3_PROGRAM 100003
-+#define NFS_V3 3
-+
-+#if defined(__STDC__) || defined(__cplusplus)
-+#define NFSPROC3_NULL 0
-+extern  void * nfsproc3_null_3(void *, CLIENT *);
-+extern  void * nfsproc3_null_3_svc(void *, struct svc_req *);
-+#define NFSPROC3_LOOKUP 3
-+extern  LOOKUP3res * nfsproc3_lookup_3(LOOKUP3args *, CLIENT *);
-+extern  LOOKUP3res * nfsproc3_lookup_3_svc(LOOKUP3args *, struct svc_req *);
-+#define NFSPROC3_READ 6
-+extern  READ3res * nfsproc3_read_3(READ3args *, CLIENT *);
-+extern  READ3res * nfsproc3_read_3_svc(READ3args *, struct svc_req *);
-+extern int nfs3_program_3_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
-+
-+#else /* K&R C */
-+#define NFSPROC3_NULL 0
-+extern  void * nfsproc3_null_3();
-+extern  void * nfsproc3_null_3_svc();
-+#define NFSPROC3_LOOKUP 3
-+extern  LOOKUP3res * nfsproc3_lookup_3();
-+extern  LOOKUP3res * nfsproc3_lookup_3_svc();
-+#define NFSPROC3_READ 6
-+extern  READ3res * nfsproc3_read_3();
-+extern  READ3res * nfsproc3_read_3_svc();
-+extern int nfs3_program_3_freeresult ();
-+#endif /* K&R C */
-+
-+/* the xdr functions */
-+
-+#if defined(__STDC__) || defined(__cplusplus)
-+extern  bool_t xdr_nfsstat (XDR *, nfsstat*);
-+extern  bool_t xdr_ftype (XDR *, ftype*);
-+extern  bool_t xdr_nfs_fh (XDR *, nfs_fh*);
-+extern  bool_t xdr_nfstime (XDR *, nfstime*);
-+extern  bool_t xdr_fattr (XDR *, fattr*);
-+extern  bool_t xdr_filename (XDR *, filename*);
-+extern  bool_t xdr_nfspath (XDR *, nfspath*);
-+extern  bool_t xdr_diropargs (XDR *, diropargs*);
-+extern  bool_t xdr_diropokres (XDR *, diropokres*);
-+extern  bool_t xdr_diropres (XDR *, diropres*);
-+extern  bool_t xdr_readargs (XDR *, readargs*);
-+extern  bool_t xdr_readokres (XDR *, readokres*);
-+extern  bool_t xdr_readres (XDR *, readres*);
-+extern  bool_t xdr_uint64 (XDR *, uint64*);
-+extern  bool_t xdr_int64 (XDR *, int64*);
-+extern  bool_t xdr_uint32 (XDR *, uint32*);
-+extern  bool_t xdr_int32 (XDR *, int32*);
-+extern  bool_t xdr_filename3 (XDR *, filename3*);
-+extern  bool_t xdr_nfspath3 (XDR *, nfspath3*);
-+extern  bool_t xdr_fileid3 (XDR *, fileid3*);
-+extern  bool_t xdr_cookie3 (XDR *, cookie3*);
-+extern  bool_t xdr_cookieverf3 (XDR *, cookieverf3);
-+extern  bool_t xdr_createverf3 (XDR *, createverf3);
-+extern  bool_t xdr_writeverf3 (XDR *, writeverf3);
-+extern  bool_t xdr_uid3 (XDR *, uid3*);
-+extern  bool_t xdr_gid3 (XDR *, gid3*);
-+extern  bool_t xdr_size3 (XDR *, size3*);
-+extern  bool_t xdr_offset3 (XDR *, offset3*);
-+extern  bool_t xdr_mode3 (XDR *, mode3*);
-+extern  bool_t xdr_count3 (XDR *, count3*);
-+extern  bool_t xdr_nfsstat3 (XDR *, nfsstat3*);
-+extern  bool_t xdr_ftype3 (XDR *, ftype3*);
-+extern  bool_t xdr_specdata3 (XDR *, specdata3*);
-+extern  bool_t xdr_nfs_fh3 (XDR *, nfs_fh3*);
-+extern  bool_t xdr_nfstime3 (XDR *, nfstime3*);
-+extern  bool_t xdr_fattr3 (XDR *, fattr3*);
-+extern  bool_t xdr_post_op_attr (XDR *, post_op_attr*);
-+extern  bool_t xdr_wcc_attr (XDR *, wcc_attr*);
-+extern  bool_t xdr_pre_op_attr (XDR *, pre_op_attr*);
-+extern  bool_t xdr_wcc_data (XDR *, wcc_data*);
-+extern  bool_t xdr_diropargs3 (XDR *, diropargs3*);
-+extern  bool_t xdr_LOOKUP3args (XDR *, LOOKUP3args*);
-+extern  bool_t xdr_LOOKUP3resok (XDR *, LOOKUP3resok*);
-+extern  bool_t xdr_LOOKUP3resfail (XDR *, LOOKUP3resfail*);
-+extern  bool_t xdr_LOOKUP3res (XDR *, LOOKUP3res*);
-+extern  bool_t xdr_READ3args (XDR *, READ3args*);
-+extern  bool_t xdr_READ3resok (XDR *, READ3resok*);
-+extern  bool_t xdr_READ3resfail (XDR *, READ3resfail*);
-+extern  bool_t xdr_READ3res (XDR *, READ3res*);
-+
-+#else /* K&R C */
-+extern bool_t xdr_nfsstat ();
-+extern bool_t xdr_ftype ();
-+extern bool_t xdr_nfs_fh ();
-+extern bool_t xdr_nfstime ();
-+extern bool_t xdr_fattr ();
-+extern bool_t xdr_filename ();
-+extern bool_t xdr_nfspath ();
-+extern bool_t xdr_diropargs ();
-+extern bool_t xdr_diropokres ();
-+extern bool_t xdr_diropres ();
-+extern bool_t xdr_readargs ();
-+extern bool_t xdr_readokres ();
-+extern bool_t xdr_readres ();
-+extern bool_t xdr_uint64 ();
-+extern bool_t xdr_int64 ();
-+extern bool_t xdr_uint32 ();
-+extern bool_t xdr_int32 ();
-+extern bool_t xdr_filename3 ();
-+extern bool_t xdr_nfspath3 ();
-+extern bool_t xdr_fileid3 ();
-+extern bool_t xdr_cookie3 ();
-+extern bool_t xdr_cookieverf3 ();
-+extern bool_t xdr_createverf3 ();
-+extern bool_t xdr_writeverf3 ();
-+extern bool_t xdr_uid3 ();
-+extern bool_t xdr_gid3 ();
-+extern bool_t xdr_size3 ();
-+extern bool_t xdr_offset3 ();
-+extern bool_t xdr_mode3 ();
-+extern bool_t xdr_count3 ();
-+extern bool_t xdr_nfsstat3 ();
-+extern bool_t xdr_ftype3 ();
-+extern bool_t xdr_specdata3 ();
-+extern bool_t xdr_nfs_fh3 ();
-+extern bool_t xdr_nfstime3 ();
-+extern bool_t xdr_fattr3 ();
-+extern bool_t xdr_post_op_attr ();
-+extern bool_t xdr_wcc_attr ();
-+extern bool_t xdr_pre_op_attr ();
-+extern bool_t xdr_wcc_data ();
-+extern bool_t xdr_diropargs3 ();
-+extern bool_t xdr_LOOKUP3args ();
-+extern bool_t xdr_LOOKUP3resok ();
-+extern bool_t xdr_LOOKUP3resfail ();
-+extern bool_t xdr_LOOKUP3res ();
-+extern bool_t xdr_READ3args ();
-+extern bool_t xdr_READ3resok ();
-+extern bool_t xdr_READ3resfail ();
-+extern bool_t xdr_READ3res ();
-+
-+#endif /* K&R C */
-+
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+#endif /* !_NFS_PROT_H_RPCGEN */

+ 0 - 155
package/dsniff/patches/patch-record_c

@@ -1,155 +0,0 @@
-$Id$
---- dsniff-2.4.orig/record.c	2001-03-15 09:33:04.000000000 +0100
-+++ dsniff-2.4/record.c	2009-12-11 12:49:32.000000000 +0100
-@@ -15,12 +15,7 @@
- #include <stdio.h>
- #include <time.h>
- #include <md5.h>
--#ifdef HAVE_DB_185_H
--#define DB_LIBRARY_COMPATIBILITY_API
--#include <db_185.h>
--#elif HAVE_DB_H
--#include <db.h>
--#endif
-+#include <gdbm.h>
- #include <libnet.h>
- 
- #include "options.h"
-@@ -37,7 +32,7 @@ struct rec {
- 	struct netobj	data;
- };
- 	
--static DB *db;
-+GDBM_FILE dbf;
- 
- static int
- xdr_rec(XDR *xdrs, struct rec *rec)
-@@ -64,9 +59,8 @@ record_print(struct rec *rec)
- 	
- 	tm = localtime(&rec->time);
- 	strftime(tstr, sizeof(tstr), "%x %X", tm);
--	
--	srcp = libnet_host_lookup(rec->src, Opt_dns);
--	dstp = libnet_host_lookup(rec->dst, Opt_dns);
-+	srcp = libnet_addr2name4(rec->src, Opt_dns);
-+	dstp = libnet_addr2name4(rec->dst, Opt_dns);
- 
- 	if ((pr = getprotobynumber(rec->proto)) == NULL)
- 		protop = "unknown";
-@@ -89,10 +83,10 @@ record_print(struct rec *rec)
- 	fflush(stdout);
- }
- 
--static DBT *
-+static datum
- record_hash(struct rec *rec)
- {
--	static DBT key;
-+	static datum key;
- 	static u_char hash[16];
- 	MD5_CTX ctx;
- 
-@@ -105,16 +99,16 @@ record_hash(struct rec *rec)
- 	MD5Update(&ctx, rec->data.n_bytes, rec->data.n_len);
- 	MD5Final(hash, &ctx);
- 
--	key.data = hash;
--	key.size = sizeof(hash);
-+	key.dptr = hash;
-+	key.dsize = sizeof(hash);
- 	
--	return (&key);
-+	return (key);
- }
- 
- static int
- record_save(struct rec *rec)
- {
--	DBT *key, data;
-+	datum key, data;
- 	XDR xdrs;
- 	u_char buf[2048];
- 	
-@@ -123,15 +117,15 @@ record_save(struct rec *rec)
- 	if (!xdr_rec(&xdrs, rec))
- 		return (0);
- 	
--	data.data = buf;
--	data.size = xdr_getpos(&xdrs);
-+	data.dptr = buf;
-+	data.dsize = xdr_getpos(&xdrs);
- 	
- 	xdr_destroy(&xdrs);
- 
- 	key = record_hash(rec);
- 	
--	if (db->put(db, key, &data, R_NOOVERWRITE) == 0)
--		db->sync(db, 0);
-+	if (gdbm_store(dbf, key, data, GDBM_INSERT) == 0)
-+		gdbm_sync(dbf);
- 	
- 	return (1);
- }
-@@ -139,18 +133,22 @@ record_save(struct rec *rec)
- void
- record_dump(void)
- {
--	DBT key, data;
-+	datum nextkey, key, content;
- 	XDR xdrs;
- 	struct rec rec;
- 	
--	while (db->seq(db, &key, &data, R_NEXT) == 0) {	
-+	key = gdbm_firstkey(dbf);
-+	while (key.dptr) {	
-+		nextkey = gdbm_nextkey(dbf, key);
-+		content = gdbm_fetch(dbf, key);
- 		memset(&rec, 0, sizeof(rec));
--		xdrmem_create(&xdrs, data.data, data.size, XDR_DECODE);
--		
-+		xdrmem_create(&xdrs, content.dptr, content.dsize, XDR_DECODE);
- 		if (xdr_rec(&xdrs, &rec)) {
- 			record_print(&rec);
- 		}
- 		xdr_destroy(&xdrs);
-+		free(key.dptr);
-+		key = nextkey;
- 	}
- }
- 
-@@ -158,16 +156,23 @@ int
- record_init(char *file)
- {
- 	int flags, mode;
--	
-+	// needed for gdbm_open, which does not have the option to create
-+	// a database in memory
-+	if(file == NULL) {
-+		char *record_file = "/tmp/.dsniff.db";
-+		file = record_file;
-+	}
-+
- 	if (Opt_read) {
--		flags = O_RDONLY;
-+		flags = GDBM_READER;
- 		mode = 0;
- 	}
- 	else {
--		flags = O_RDWR|O_CREAT;
-+		flags = GDBM_WRCREAT;
- 		mode = S_IRUSR|S_IWUSR;
- 	}
--	if ((db = dbopen(file, flags, mode, DB_BTREE, NULL)) == NULL)
-+
-+	if ((dbf = gdbm_open(file, 1024, flags, mode, NULL)) == NULL)
- 		return (0);
- 
- 	return (1);
-@@ -206,6 +211,6 @@ record(in_addr_t src, in_addr_t dst, int
- void
- record_close(void)
- {
--	db->close(db);
-+	gdbm_close(dbf);
- }
- 

+ 0 - 46
package/dsniff/patches/patch-ssh_c

@@ -1,46 +0,0 @@
-$Id: update-patches 24 2008-08-31 14:56:13Z wbx $
---- dsniff-2.4.orig/ssh.c	2001-03-15 09:33:04.000000000 +0100
-+++ dsniff-2.4/ssh.c	2009-05-09 23:17:07.000000000 +0200
-@@ -331,12 +331,14 @@ SSH_accept(SSH *ssh)
- 		ssh->encrypt = des3_encrypt;
- 		ssh->decrypt = des3_decrypt;
- 	}
-+#ifndef OPENSSL_NO_BF
- 	else if (cipher == SSH_CIPHER_BLOWFISH) {
- 		ssh->estate = blowfish_init(ssh->sesskey,sizeof(ssh->sesskey));
- 		ssh->dstate = blowfish_init(ssh->sesskey,sizeof(ssh->sesskey));
- 		ssh->encrypt = blowfish_encrypt;
- 		ssh->decrypt = blowfish_decrypt;
- 	}
-+#endif
- 	
- 	/* Send verification. */
- 	msg[0] = SSH_SMSG_SUCCESS;
-@@ -461,18 +463,20 @@ SSH_connect(SSH *ssh)
- 		return (-1);
- 	}
- 	/* Set cipher. */
--	if (cipher == SSH_CIPHER_BLOWFISH) {
--		ssh->estate = blowfish_init(ssh->sesskey,sizeof(ssh->sesskey));
--		ssh->dstate = blowfish_init(ssh->sesskey,sizeof(ssh->sesskey));
--		ssh->encrypt = blowfish_encrypt;
--		ssh->decrypt = blowfish_decrypt;
--	}
--	else if (cipher == SSH_CIPHER_3DES) {
-+	if (cipher == SSH_CIPHER_3DES) {
- 		ssh->estate = des3_init(ssh->sesskey, sizeof(ssh->sesskey));
- 		ssh->dstate = des3_init(ssh->sesskey, sizeof(ssh->sesskey));
- 		ssh->encrypt = des3_encrypt;
- 		ssh->decrypt = des3_decrypt;
- 	}
-+#ifndef OPENSSL_NO_BF
-+	else if (cipher == SSH_CIPHER_BLOWFISH) {
-+		ssh->estate = blowfish_init(ssh->sesskey,sizeof(ssh->sesskey));
-+		ssh->dstate = blowfish_init(ssh->sesskey,sizeof(ssh->sesskey));
-+		ssh->encrypt = blowfish_encrypt;
-+		ssh->decrypt = blowfish_decrypt;
-+	}
-+#endif
- 	/* Get server response. */
- 	if ((i = SSH_recv(ssh, pkt, sizeof(pkt))) <= 0) {
- 		warn("SSH_recv");

+ 0 - 43
package/dsniff/patches/patch-sshcrypto_c

@@ -1,43 +0,0 @@
-$Id$
---- dsniff-2.4.orig/sshcrypto.c	2001-03-15 09:33:04.000000000 +0100
-+++ dsniff-2.4/sshcrypto.c	2009-05-09 23:13:59.000000000 +0200
-@@ -14,6 +14,10 @@
- 
- #include <sys/types.h>
- #include <openssl/ssl.h>
-+#ifndef OPENSSL_NO_BF
-+#include <openssl/blowfish.h>
-+#endif
-+#include <openssl/des.h>
- 
- #include <err.h>
- #include <stdio.h>
-@@ -21,10 +25,12 @@
- 
- #include "sshcrypto.h"
- 
-+#ifndef OPENSSL_NO_BF
- struct blowfish_state {
- 	struct bf_key_st	key;
- 	u_char			iv[8];
- };
-+#endif
- 
- struct des3_state {
- 	des_key_schedule	k1, k2, k3;
-@@ -106,6 +112,7 @@ swap_bytes(const u_char *src, u_char *ds
- 	}
- }
- 
-+#ifndef OPENSSL_NO_BF
- void *
- blowfish_init(u_char *sesskey, int len)
- {
-@@ -143,6 +150,7 @@ blowfish_decrypt(u_char *src, u_char *ds
- 		       BF_DECRYPT);
- 	swap_bytes(dst, dst, len);
- }
-+#endif
- 
- /* XXX - SSH1's weirdo 3DES... */
- void *

+ 0 - 11
package/dsniff/patches/patch-sshmitm_c

@@ -1,11 +0,0 @@
---- dsniff-2.4.orig/sshmitm.c	2001-03-15 09:33:04.000000000 +0100
-+++ dsniff-2.4/sshmitm.c	2009-12-11 12:57:39.000000000 +0100
-@@ -389,7 +389,7 @@ main(int argc, char *argv[])
- 	if (argc < 1)
- 		usage();
- 	
--	if ((ip = libnet_name_resolve(argv[0], 1)) == -1)
-+	if ((ip = libnet_name2addr4(NULL, argv[0], LIBNET_RESOLVE)) == -1)
- 		usage();
- 
- 	if (argc == 2 && (rport = atoi(argv[1])) == 0)

+ 0 - 38
package/dsniff/patches/patch-sshow_c

@@ -1,38 +0,0 @@
-$Id$
---- dsniff-2.4.orig/sshow.c	2001-03-19 07:52:15.000000000 +0100
-+++ dsniff-2.4/sshow.c	2008-10-10 14:53:48.000000000 +0200
-@@ -15,6 +15,7 @@
- 
- #include <sys/types.h>
- #include <sys/times.h>
-+#include <time.h>
- 
- #include <netinet/in_systm.h>
- #include <netinet/in.h>
-@@ -222,7 +223,7 @@ client_to_server(struct tcp_stream *ts, 
- 	if (debug)
- 		printf("- %s -> %s: DATA (%s bytes, %.2f seconds)\n",
- 			s_saddr(ts), s_daddr(ts), s_range(plain_range),
--			(float)delay / CLK_TCK);
-+			(float)delay / CLOCKS_PER_SEC);
- 	if (debug > 1)
- 		print_data(&ts->server, cipher_size);
- 
-@@ -270,7 +271,7 @@ server_to_client(struct tcp_stream *ts, 
- 	if (debug)
- 		printf("- %s <- %s: DATA (%s bytes, %.2f seconds)\n",
- 		       s_saddr(ts), s_daddr(ts), s_range(plain_range),
--		       (float)delay / CLK_TCK);
-+		       (float)delay / CLOCKS_PER_SEC);
- 	if (debug > 1)
- 		print_data(&ts->client, cipher_size);
- 	
-@@ -299,7 +300,7 @@ server_to_client(struct tcp_stream *ts, 
- 	
- 	if (session->state == 1 &&
- #ifdef USE_TIMING
--	    now - get_history(session, 2)->timestamp >= CLK_TCK &&
-+	    now - get_history(session, 2)->timestamp >= CLOCKS_PER_SEC &&
- #endif
- 	    session->protocol == 1 &&
- 	    (session->history.directions & 7) == 5 &&

+ 0 - 20
package/dsniff/patches/patch-tcp_raw_c

@@ -1,20 +0,0 @@
---- dsniff-2.4.orig/tcp_raw.c	2001-03-15 09:33:04.000000000 +0100
-+++ dsniff-2.4/tcp_raw.c	2009-12-11 12:43:35.000000000 +0100
-@@ -119,7 +119,7 @@ tcp_raw_reassemble(struct tcp_conn *conn
- }
- 
- struct iovec *
--tcp_raw_input(struct libnet_ip_hdr *ip, struct libnet_tcp_hdr *tcp, int len)
-+tcp_raw_input(struct libnet_ipv4_hdr *ip, struct libnet_tcp_hdr *tcp, int len)
- {
- 	struct tha tha;
- 	struct tcp_conn *conn;
-@@ -131,7 +131,7 @@ tcp_raw_input(struct libnet_ip_hdr *ip, 
- 
- 	/* Verify TCP checksum. */
- 	cksum = tcp->th_sum;
--	libnet_do_checksum((u_char *) ip, IPPROTO_TCP, len);
-+	libnet_do_checksum(NULL, (u_char *) ip, IPPROTO_TCP, len);
- 
- 	if (cksum != tcp->th_sum)
- 		return (NULL);

+ 0 - 11
package/dsniff/patches/patch-tcp_raw_h

@@ -1,11 +0,0 @@
---- dsniff-2.4.orig/tcp_raw.h	2001-03-15 09:33:06.000000000 +0100
-+++ dsniff-2.4/tcp_raw.h	2009-12-11 12:44:28.000000000 +0100
-@@ -15,7 +15,7 @@ typedef void (*tcp_raw_callback_t)(in_ad
- 				   u_short sport, u_short dport,
- 				   u_char *buf, int len);
- 
--struct iovec   *tcp_raw_input(struct libnet_ip_hdr *ip,
-+struct iovec   *tcp_raw_input(struct libnet_ipv4_hdr *ip,
- 			      struct libnet_tcp_hdr *tcp, int len);
- 
- void		tcp_raw_timeout(int timeout, tcp_raw_callback_t callback);

+ 0 - 105
package/dsniff/patches/patch-tcpkill_c

@@ -1,105 +0,0 @@
---- dsniff-2.4.orig/tcpkill.c	2001-03-17 09:10:43.000000000 +0100
-+++ dsniff-2.4/tcpkill.c	2009-12-11 12:59:42.000000000 +0100
-@@ -39,17 +39,18 @@ usage(void)
- static void
- tcp_kill_cb(u_char *user, const struct pcap_pkthdr *pcap, const u_char *pkt)
- {
--	struct libnet_ip_hdr *ip;
-+	struct libnet_ipv4_hdr *ip;
- 	struct libnet_tcp_hdr *tcp;
--	u_char ctext[64], buf[IP_H + TCP_H];
-+	u_char ctext[64];
- 	u_int32_t seq, win;
--	int i, *sock, len;
-+	int i, len;
-+	libnet_t *l;
- 
--	sock = (int *)user;
-+	l = (libnet_t *)user;
- 	pkt += pcap_off;
- 	len = pcap->caplen - pcap_off;
- 
--	ip = (struct libnet_ip_hdr *)pkt;
-+	ip = (struct libnet_ipv4_hdr *)pkt;
- 	if (ip->ip_p != IPPROTO_TCP)
- 		return;
- 	
-@@ -57,34 +58,31 @@ tcp_kill_cb(u_char *user, const struct p
- 	if (tcp->th_flags & (TH_SYN|TH_FIN|TH_RST))
- 		return;
- 
--	libnet_build_ip(TCP_H, 0, 0, 0, 64, IPPROTO_TCP,
--			ip->ip_dst.s_addr, ip->ip_src.s_addr,
--			NULL, 0, buf);
--
--	libnet_build_tcp(ntohs(tcp->th_dport), ntohs(tcp->th_sport),
--			 0, 0, TH_RST, 0, 0, NULL, 0, buf + IP_H);
--	
- 	seq = ntohl(tcp->th_ack);
- 	win = ntohs(tcp->th_win);
- 	
- 	snprintf(ctext, sizeof(ctext), "%s:%d > %s:%d:",
--		 libnet_host_lookup(ip->ip_src.s_addr, 0),
-+		 libnet_addr2name4(ip->ip_src.s_addr, LIBNET_DONT_RESOLVE),
- 		 ntohs(tcp->th_sport),
--		 libnet_host_lookup(ip->ip_dst.s_addr, 0),
-+		 libnet_addr2name4(ip->ip_dst.s_addr, LIBNET_DONT_RESOLVE),
- 		 ntohs(tcp->th_dport));
- 	
--	ip = (struct libnet_ip_hdr *)buf;
--	tcp = (struct libnet_tcp_hdr *)(ip + 1);
--	
- 	for (i = 0; i < Opt_severity; i++) {
--		ip->ip_id = libnet_get_prand(PRu16);
- 		seq += (i * win);
--		tcp->th_seq = htonl(seq);
- 		
--		libnet_do_checksum(buf, IPPROTO_TCP, TCP_H);
-+		libnet_clear_packet(l);
- 		
--		if (libnet_write_ip(*sock, buf, sizeof(buf)) < 0)
--			warn("write_ip");
-+		libnet_build_tcp(ntohs(tcp->th_dport), ntohs(tcp->th_sport),
-+				 seq, 0, TH_RST, 0, 0, 0, LIBNET_TCP_H, 
-+				 NULL, 0, l, 0);
-+		
-+		libnet_build_ipv4(LIBNET_IPV4_H + LIBNET_TCP_H, 0,
-+				  libnet_get_prand(LIBNET_PRu16), 0, 64,
-+				  IPPROTO_TCP, 0, ip->ip_dst.s_addr,
-+				  ip->ip_src.s_addr, NULL, 0, l, 0);
-+		
-+		if (libnet_write(l) < 0)
-+			warn("write");
- 		
- 		fprintf(stderr, "%s R %lu:%lu(0) win 0\n", ctext, seq, seq);
- 	}
-@@ -95,8 +93,10 @@ main(int argc, char *argv[])
- {
- 	extern char *optarg;
- 	extern int optind;
--	int c, sock;
-+	int c;
- 	char *p, *intf, *filter, ebuf[PCAP_ERRBUF_SIZE];
-+	char libnet_ebuf[LIBNET_ERRBUF_SIZE];
-+	libnet_t *l;
- 	pcap_t *pd;
- 	
- 	intf = NULL;
-@@ -136,14 +136,14 @@ main(int argc, char *argv[])
- 	if ((pcap_off = pcap_dloff(pd)) < 0)
- 		errx(1, "couldn't determine link layer offset");
- 	
--	if ((sock = libnet_open_raw_sock(IPPROTO_RAW)) == -1)
-+	if ((l = libnet_init(LIBNET_RAW4, intf, libnet_ebuf)) == NULL)
- 		errx(1, "couldn't initialize sending");
- 	
--	libnet_seed_prand();
-+	libnet_seed_prand(l);
- 	
- 	warnx("listening on %s [%s]", intf, filter);
- 	
--	pcap_loop(pd, -1, tcp_kill_cb, (u_char *)&sock);
-+	pcap_loop(pd, -1, tcp_kill_cb, (u_char *)l);
-   
- 	/* NOTREACHED */
- 	

+ 0 - 196
package/dsniff/patches/patch-tcpnice_c

@@ -1,196 +0,0 @@
---- dsniff-2.4.orig/tcpnice.c	2001-03-17 08:41:51.000000000 +0100
-+++ dsniff-2.4/tcpnice.c	2009-12-11 13:01:35.000000000 +0100
-@@ -41,107 +41,106 @@ usage(void)
- }
- 
- static void
--send_tcp_window_advertisement(int sock, struct libnet_ip_hdr *ip,
-+send_tcp_window_advertisement(libnet_t *l, struct libnet_ipv4_hdr *ip,
- 			     struct libnet_tcp_hdr *tcp)
- {
- 	int len;
- 	
- 	ip->ip_hl = 5;
--	ip->ip_len = htons(IP_H + TCP_H);
--	ip->ip_id = libnet_get_prand(PRu16);
--	memcpy(buf, (u_char *)ip, IP_H);
-+	ip->ip_len = htons(LIBNET_IPV4_H + LIBNET_TCP_H);
-+	ip->ip_id = libnet_get_prand(LIBNET_PRu16);
-+	memcpy(buf, (u_char *)ip, LIBNET_IPV4_H);
- 	
- 	tcp->th_off = 5;
- 	tcp->th_win = htons(MIN_WIN);
--	memcpy(buf + IP_H, (u_char *)tcp, TCP_H);
-+	memcpy(buf + LIBNET_IPV4_H, (u_char *)tcp, LIBNET_TCP_H);
- 	
--	libnet_do_checksum(buf, IPPROTO_TCP, TCP_H);
-+	libnet_do_checksum(l, buf, IPPROTO_TCP, LIBNET_TCP_H);
- 	
--	len = IP_H + TCP_H;
-+	len = LIBNET_IPV4_H + LIBNET_TCP_H;
- 	
--	if (libnet_write_ip(sock, buf, len) != len)
-+	if (libnet_write_raw_ipv4(l, buf, len) != len)
- 		warn("write");
- 	
- 	fprintf(stderr, "%s:%d > %s:%d: . ack %lu win %d\n",
--		libnet_host_lookup(ip->ip_src.s_addr, 0), ntohs(tcp->th_sport),
--		libnet_host_lookup(ip->ip_dst.s_addr, 0), ntohs(tcp->th_dport),
-+		libnet_addr2name4(ip->ip_src.s_addr, 0), ntohs(tcp->th_sport),
-+		libnet_addr2name4(ip->ip_dst.s_addr, 0), ntohs(tcp->th_dport),
- 		ntohl(tcp->th_ack), 1);
- }
- 
- static void
--send_icmp_source_quench(int sock, struct libnet_ip_hdr *ip)
-+send_icmp_source_quench(libnet_t *l, struct libnet_ipv4_hdr *ip)
- {
--	struct libnet_icmp_hdr *icmp;
-+	struct libnet_icmpv4_hdr *icmp;
- 	int len;
- 	
- 	len = (ip->ip_hl * 4) + 8;
- 
--	libnet_build_ip(ICMP_ECHO_H + len, 0, libnet_get_prand(PRu16),
--			0, 64, IPPROTO_ICMP, ip->ip_dst.s_addr,
--			ip->ip_src.s_addr, NULL, 0, buf);
--	
--	icmp = (struct libnet_icmp_hdr *)(buf + IP_H);
-+	icmp = (struct libnet_icmpv4_hdr *)(buf + LIBNET_IPV4_H);
- 	icmp->icmp_type = ICMP_SOURCEQUENCH;
- 	icmp->icmp_code = 0;
--	memcpy((u_char *)icmp + ICMP_ECHO_H, (u_char *)ip, len);
-+	memcpy((u_char *)icmp + LIBNET_ICMPV4_ECHO_H, (u_char *)ip, len);
- 	
--	libnet_do_checksum(buf, IPPROTO_ICMP, ICMP_ECHO_H + len);
-+	len += LIBNET_ICMPV4_ECHO_H;
- 	
--	len += (IP_H + ICMP_ECHO_H);
-+	libnet_build_ipv4(LIBNET_IPV4_H + len, 0,
-+			  libnet_get_prand(LIBNET_PRu16), 0, 64, IPPROTO_ICMP,
-+			  0, ip->ip_dst.s_addr, ip->ip_src.s_addr,
-+			  (u_int8_t *) icmp, len, l, 0);
- 	
--	if (libnet_write_ip(sock, buf, len) != len)
-+	if (libnet_write(l) != len)
- 		warn("write");
- 	
- 	fprintf(stderr, "%s > %s: icmp: source quench\n",
--		libnet_host_lookup(ip->ip_dst.s_addr, 0),
--		libnet_host_lookup(ip->ip_src.s_addr, 0));
-+		libnet_addr2name4(ip->ip_dst.s_addr, 0),
-+		libnet_addr2name4(ip->ip_src.s_addr, 0));
- }
- 
- static void
--send_icmp_frag_needed(int sock, struct libnet_ip_hdr *ip)
-+send_icmp_frag_needed(libnet_t *l, struct libnet_ipv4_hdr *ip)
- {
--	struct libnet_icmp_hdr *icmp;
-+	struct libnet_icmpv4_hdr *icmp;
- 	int len;
- 
- 	len = (ip->ip_hl * 4) + 8;
- 	
--	libnet_build_ip(ICMP_MASK_H + len, 4, libnet_get_prand(PRu16),
--			0, 64, IPPROTO_ICMP, ip->ip_dst.s_addr,
--			ip->ip_src.s_addr, NULL, 0, buf);
--
--	icmp = (struct libnet_icmp_hdr *)(buf + IP_H);
-+	icmp = (struct libnet_icmpv4_hdr *)(buf + LIBNET_IPV4_H);
- 	icmp->icmp_type = ICMP_UNREACH;
- 	icmp->icmp_code = ICMP_UNREACH_NEEDFRAG;
- 	icmp->hun.frag.pad = 0;
- 	icmp->hun.frag.mtu = htons(MIN_MTU);
--	memcpy((u_char *)icmp + ICMP_MASK_H, (u_char *)ip, len);
-+	memcpy((u_char *)icmp + LIBNET_ICMPV4_MASK_H, (u_char *)ip, len);
- 
--	libnet_do_checksum(buf, IPPROTO_ICMP, ICMP_MASK_H + len);
--	
--	len += (IP_H + ICMP_MASK_H);
-+	len += LIBNET_ICMPV4_MASK_H;
-+
-+	libnet_build_ipv4(LIBNET_IPV4_H + len, 4,
-+			  libnet_get_prand(LIBNET_PRu16), 0, 64, IPPROTO_ICMP,
-+			  0, ip->ip_dst.s_addr, ip->ip_src.s_addr,
-+			  (u_int8_t *) icmp, len, l, 0);
- 	
--	if (libnet_write_ip(sock, buf, len) != len)
-+	if (libnet_write(l) != len)
- 		warn("write");
- 	
- 	fprintf(stderr, "%s > %s: icmp: ",
--		libnet_host_lookup(ip->ip_dst.s_addr, 0),
--		libnet_host_lookup(ip->ip_src.s_addr, 0));
-+		libnet_addr2name4(ip->ip_dst.s_addr, 0),
-+		libnet_addr2name4(ip->ip_src.s_addr, 0));
- 	fprintf(stderr, "%s unreachable - need to frag (mtu %d)\n",
--		libnet_host_lookup(ip->ip_src.s_addr, 0), MIN_MTU);
-+		libnet_addr2name4(ip->ip_src.s_addr, 0), MIN_MTU);
- }
- 
- static void
- tcp_nice_cb(u_char *user, const struct pcap_pkthdr *pcap, const u_char *pkt)
- {
--	struct libnet_ip_hdr *ip;
-+	struct libnet_ipv4_hdr *ip;
- 	struct libnet_tcp_hdr *tcp;
--	int *sock, len;
-+	int len;
-+	libnet_t *l;
- 
--	sock = (int *)user;
-+	l = (libnet_t *)user;
- 	pkt += pcap_off;
- 	len = pcap->caplen - pcap_off;
- 
--	ip = (struct libnet_ip_hdr *)pkt;
-+	ip = (struct libnet_ipv4_hdr *)pkt;
- 	if (ip->ip_p != IPPROTO_TCP)
- 		return;
- 	
-@@ -151,11 +150,11 @@ tcp_nice_cb(u_char *user, const struct p
- 	
- 	if (ntohs(ip->ip_len) > (ip->ip_hl << 2) + (tcp->th_off << 2)) {
- 		if (Opt_icmp)
--			send_icmp_source_quench(*sock, ip);
-+			send_icmp_source_quench(l, ip);
- 		if (Opt_win)
--			send_tcp_window_advertisement(*sock, ip, tcp);
-+			send_tcp_window_advertisement(l, ip, tcp);
- 		if (Opt_pmtu)
--			send_icmp_frag_needed(*sock, ip);
-+			send_icmp_frag_needed(l, ip);
- 	}
- }
- 
-@@ -164,8 +163,10 @@ main(int argc, char *argv[])
- {
- 	extern char *optarg;
- 	extern int optind;
--	int c, sock;
-+	int c;
- 	char *intf, *filter, ebuf[PCAP_ERRBUF_SIZE];
-+	char libnet_ebuf[LIBNET_ERRBUF_SIZE];
-+	libnet_t *l;
- 	pcap_t *pd;
- 	
- 	intf = NULL;
-@@ -209,14 +210,14 @@ main(int argc, char *argv[])
- 	if ((pcap_off = pcap_dloff(pd)) < 0)
- 		errx(1, "couldn't determine link layer offset");
- 	
--	if ((sock = libnet_open_raw_sock(IPPROTO_RAW)) == -1)
-+	if ((l = libnet_init(LIBNET_RAW4, intf, libnet_ebuf)) == NULL)
- 		errx(1, "couldn't initialize sending");
- 	
--	libnet_seed_prand();
-+	libnet_seed_prand(l);
- 	
- 	warnx("listening on %s [%s]", intf, filter);
- 	
--	pcap_loop(pd, -1, tcp_nice_cb, (u_char *)&sock);
-+	pcap_loop(pd, -1, tcp_nice_cb, (u_char *)l);
- 	
- 	/* NOTREACHED */
- 	

+ 0 - 29
package/dsniff/patches/patch-trigger_c

@@ -1,29 +0,0 @@
---- dsniff-2.4.orig/trigger.c	2001-03-15 09:33:05.000000000 +0100
-+++ dsniff-2.4/trigger.c	2009-12-11 12:48:14.000000000 +0100
-@@ -276,7 +276,7 @@ trigger_dump(void)
- }
- 	
- void
--trigger_ip(struct libnet_ip_hdr *ip)
-+trigger_ip(struct libnet_ipv4_hdr *ip)
- {
- 	struct trigger *t, tr;
- 	u_char *buf;
-@@ -305,7 +305,7 @@ trigger_ip(struct libnet_ip_hdr *ip)
- 
- /* libnids needs a nids_register_udp()... */
- void
--trigger_udp(struct libnet_ip_hdr *ip)
-+trigger_udp(struct libnet_ipv4_hdr *ip)
- {
- 	struct trigger *t, tr;
- 	struct libnet_udp_hdr *udp;
-@@ -437,7 +437,7 @@ trigger_tcp(struct tcp_stream *ts, void 
- }
- 
- void
--trigger_tcp_raw(struct libnet_ip_hdr *ip)
-+trigger_tcp_raw(struct libnet_ipv4_hdr *ip)
- {
- 	struct trigger *t, tr;
- 	struct libnet_tcp_hdr *tcp;

+ 0 - 16
package/dsniff/patches/patch-trigger_h

@@ -1,16 +0,0 @@
---- dsniff-2.4.orig/trigger.h	2001-03-15 09:33:06.000000000 +0100
-+++ dsniff-2.4/trigger.h	2009-12-11 12:47:55.000000000 +0100
-@@ -24,10 +24,10 @@ int	trigger_set_udp(int port, char *name
- int	trigger_set_tcp(int port, char *name);
- int	trigger_set_rpc(int program, char *name);
- 
--void	trigger_ip(struct libnet_ip_hdr *ip);
--void	trigger_udp(struct libnet_ip_hdr *ip);
-+void	trigger_ip(struct libnet_ipv4_hdr *ip);
-+void	trigger_udp(struct libnet_ipv4_hdr *ip);
- void	trigger_tcp(struct tcp_stream *ts, void **conn_save);
--void	trigger_tcp_raw(struct libnet_ip_hdr *ip);
-+void	trigger_tcp_raw(struct libnet_ipv4_hdr *ip);
- void	trigger_tcp_raw_timeout(int signal);
- void	trigger_rpc(int program, int proto, int port);
- 

+ 0 - 19
package/dsniff/patches/patch-urlsnarf_c

@@ -1,19 +0,0 @@
---- dsniff-2.4.orig/urlsnarf.c	2001-03-15 10:26:13.000000000 +0100
-+++ dsniff-2.4/urlsnarf.c	2009-12-11 13:03:37.000000000 +0100
-@@ -145,14 +145,14 @@ process_http_request(struct tuple4 *addr
- 		if (user == NULL)
- 			user = "-";
- 		if (vhost == NULL)
--			vhost = libnet_host_lookup(addr->daddr, Opt_dns);
-+			vhost = libnet_addr2name4(addr->daddr, Opt_dns);
- 		if (referer == NULL)
- 			referer = "-";
- 		if (agent == NULL)
- 			agent = "-";
- 		
- 		printf("%s - %s [%s] \"%s http://%s%s\" - - \"%s\" \"%s\"\n",
--		       libnet_host_lookup(addr->saddr, Opt_dns),
-+		       libnet_addr2name4(addr->saddr, Opt_dns),
- 		       user, timestamp(), req, vhost, uri, referer, agent);
- 	}
- 	fflush(stdout);

+ 0 - 20
package/dsniff/patches/patch-webmitm_c

@@ -1,20 +0,0 @@
---- dsniff-2.4.orig/webmitm.c	2001-03-17 09:35:05.000000000 +0100
-+++ dsniff-2.4/webmitm.c	2009-12-11 13:05:28.000000000 +0100
-@@ -242,7 +242,7 @@ server_init(char *buf, int size)
- 			word = buf_tok(&msg, "/", 1);
- 			vhost = buf_strdup(word);
- 		}
--		ssin.sin_addr.s_addr = libnet_name_resolve(vhost, 1);
-+		ssin.sin_addr.s_addr = libnet_name2addr4(NULL, vhost, 1);
- 		free(vhost);
- 		
- 		if (ssin.sin_addr.s_addr == ntohl(INADDR_LOOPBACK) ||
-@@ -510,7 +510,7 @@ main(int argc, char *argv[])
- 	argv += optind;
- 
- 	if (argc == 1) {
--		if ((static_host = libnet_name_resolve(argv[0], 1)) == -1)
-+		if ((static_host = libnet_name2addr4(NULL, argv[0], 1)) == -1)
- 			usage();
- 	}
- 	else if (argc != 0) usage();

+ 0 - 20
package/dsniff/patches/patch-webspy_c

@@ -1,20 +0,0 @@
---- dsniff-2.4.orig/webspy.c	2001-03-15 09:33:05.000000000 +0100
-+++ dsniff-2.4/webspy.c	2009-12-11 13:06:30.000000000 +0100
-@@ -126,7 +126,7 @@ process_http_request(struct tuple4 *addr
- 		if (auth == NULL)
- 			auth = "";
- 		if (vhost == NULL)
--			vhost = libnet_host_lookup(addr->daddr, 0);
-+			vhost = libnet_addr2name4(addr->daddr, 0);
- 		
- 		snprintf(cmd, sizeof(cmd), "openURL(http://%s%s%s%s)",
- 			 auth, *auth ? "@" : "", vhost, uri);
-@@ -202,7 +202,7 @@ main(int argc, char *argv[])
- 	cmdtab[0] = cmd;
- 	cmdtab[1] = NULL;
- 	
--	if ((host = libnet_name_resolve(argv[0], 1)) == -1)
-+	if ((host = libnet_name2addr4(NULL, argv[0], 1)) == -1)
- 		errx(1, "unknown host");
- 	
- 	if ((dpy = XOpenDisplay(NULL)) == NULL)