summaryrefslogtreecommitdiff
path: root/package/dsniff
diff options
context:
space:
mode:
Diffstat (limited to 'package/dsniff')
-rw-r--r--package/dsniff/Makefile10
-rw-r--r--package/dsniff/patches/patch-arpspoof_c166
-rw-r--r--package/dsniff/patches/patch-dnsspoof_c149
-rw-r--r--package/dsniff/patches/patch-dsniff_services9
-rw-r--r--package/dsniff/patches/patch-filesnarf_c22
-rw-r--r--package/dsniff/patches/patch-macof_c116
-rw-r--r--package/dsniff/patches/patch-mount_c100
-rw-r--r--package/dsniff/patches/patch-mount_h154
-rw-r--r--package/dsniff/patches/patch-nfs_prot_c740
-rw-r--r--package/dsniff/patches/patch-nfs_prot_h531
-rw-r--r--package/dsniff/patches/patch-record_c12
-rw-r--r--package/dsniff/patches/patch-sshmitm_c11
-rw-r--r--package/dsniff/patches/patch-tcp_raw_c20
-rw-r--r--package/dsniff/patches/patch-tcp_raw_h11
-rw-r--r--package/dsniff/patches/patch-tcpkill_c105
-rw-r--r--package/dsniff/patches/patch-tcpnice_c196
-rw-r--r--package/dsniff/patches/patch-trigger_c29
-rw-r--r--package/dsniff/patches/patch-trigger_h16
-rw-r--r--package/dsniff/patches/patch-urlsnarf_c19
-rw-r--r--package/dsniff/patches/patch-webmitm_c20
-rw-r--r--package/dsniff/patches/patch-webspy_c20
21 files changed, 2435 insertions, 21 deletions
diff --git a/package/dsniff/Makefile b/package/dsniff/Makefile
index 276e5fc13..bd54813c5 100644
--- a/package/dsniff/Makefile
+++ b/package/dsniff/Makefile
@@ -7,7 +7,7 @@ PKG_NAME:= dsniff
PKG_VERSION:= 2.4b1
PKG_RELEASE:= 2
PKG_MD5SUM:= 2f761fa3475682a7512b0b43568ee7d6
-PKG_DESCR:= collection of tools for network auditing and penetration testing
+PKG_DESCR:= tools for network auditing and penetration testing
PKG_SECTION:= net
PKG_DEPENDS:= libnet libpcap libnids libopenssl libgdbm
PKG_URL:= http://www.monkey.org/~dugsong/dsniff
@@ -17,9 +17,9 @@ WRKDIST= ${WRKDIR}/${PKG_NAME}-2.4
include ${TOPDIR}/mk/package.mk
-$(eval $(call PKG_template,DSNIFF,dsniff,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+$(eval $(call PKG_template,DSNIFF,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
-CONFIGURE_STYLE= gnu
+CONFIGURE_STYLE:= gnu
CONFIGURE_ENV+= ac_cv_lib_nsl_gethostbyname=no
CONFIGURE_ARGS+= --without-db \
--without-x \
@@ -28,8 +28,8 @@ CONFIGURE_ARGS+= --without-db \
--with-libpcap="${STAGING_DIR}/usr" \
--with-libnet="${STAGING_DIR}/usr" \
--with-openssl="${STAGING_DIR}/usr"
-BUILD_STYLE= auto
-INSTALL_STYLE= auto
+BUILD_STYLE:= auto
+INSTALL_STYLE:= auto
FAKE_FLAGS+= install_prefix="${WRKINST}"
post-install:
diff --git a/package/dsniff/patches/patch-arpspoof_c b/package/dsniff/patches/patch-arpspoof_c
index 8f04ee1c1..6d8a6a35c 100644
--- a/package/dsniff/patches/patch-arpspoof_c
+++ b/package/dsniff/patches/patch-arpspoof_c
@@ -1,7 +1,93 @@
-$Id$
--- dsniff-2.4.orig/arpspoof.c 2001-03-15 09:32:58.000000000 +0100
-+++ dsniff-2.4/arpspoof.c 2007-01-23 00:20:48.000000000 +0100
-@@ -113,7 +113,7 @@ arp_find(in_addr_t ip, struct ether_addr
++++ 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 {
@@ -10,3 +96,77 @@ $Id$
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);
+ }
diff --git a/package/dsniff/patches/patch-dnsspoof_c b/package/dsniff/patches/patch-dnsspoof_c
new file mode 100644
index 000000000..6616431a1
--- /dev/null
+++ b/package/dsniff/patches/patch-dnsspoof_c
@@ -0,0 +1,149 @@
+--- 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);
diff --git a/package/dsniff/patches/patch-dsniff_services b/package/dsniff/patches/patch-dsniff_services
deleted file mode 100644
index 7b4827426..000000000
--- a/package/dsniff/patches/patch-dsniff_services
+++ /dev/null
@@ -1,9 +0,0 @@
-$Id$
---- dsniff-2.4.orig/dsniff.services 2000-12-15 21:10:58.000000000 +0100
-+++ dsniff-2.4/dsniff.services 2007-01-23 00:20:48.000000000 +0100
-@@ -66,5 +66,3 @@ napster 8888/tcp
- aim 9898/tcp
- pcanywhere 65301/tcp
- mountd 100005/rpc
--ypserv 100004/rpc
--yppasswd 100009/rpc
diff --git a/package/dsniff/patches/patch-filesnarf_c b/package/dsniff/patches/patch-filesnarf_c
new file mode 100644
index 000000000..fd71816e9
--- /dev/null
+++ b/package/dsniff/patches/patch-filesnarf_c
@@ -0,0 +1,22 @@
+--- 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;
diff --git a/package/dsniff/patches/patch-macof_c b/package/dsniff/patches/patch-macof_c
new file mode 100644
index 000000000..d8121b908
--- /dev/null
+++ b/package/dsniff/patches/patch-macof_c
@@ -0,0 +1,116 @@
+--- 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);
+ }
diff --git a/package/dsniff/patches/patch-mount_c b/package/dsniff/patches/patch-mount_c
new file mode 100644
index 000000000..513d906d5
--- /dev/null
+++ b/package/dsniff/patches/patch-mount_c
@@ -0,0 +1,100 @@
+--- 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;
++}
diff --git a/package/dsniff/patches/patch-mount_h b/package/dsniff/patches/patch-mount_h
new file mode 100644
index 000000000..bc8629664
--- /dev/null
+++ b/package/dsniff/patches/patch-mount_h
@@ -0,0 +1,154 @@
+--- 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 */
diff --git a/package/dsniff/patches/patch-nfs_prot_c b/package/dsniff/patches/patch-nfs_prot_c
new file mode 100644
index 000000000..4f137d921
--- /dev/null
+++ b/package/dsniff/patches/patch-nfs_prot_c
@@ -0,0 +1,740 @@
+--- 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;
++}
diff --git a/package/dsniff/patches/patch-nfs_prot_h b/package/dsniff/patches/patch-nfs_prot_h
new file mode 100644
index 000000000..95304762f
--- /dev/null
+++ b/package/dsniff/patches/patch-nfs_prot_h
@@ -0,0 +1,531 @@
+--- 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 */
diff --git a/package/dsniff/patches/patch-record_c b/package/dsniff/patches/patch-record_c
index cd63e0969..df9583d9a 100644
--- a/package/dsniff/patches/patch-record_c
+++ b/package/dsniff/patches/patch-record_c
@@ -1,6 +1,6 @@
$Id$
--- dsniff-2.4.orig/record.c 2001-03-15 09:33:04.000000000 +0100
-+++ dsniff-2.4/record.c 2007-01-23 00:20:48.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>
@@ -24,14 +24,18 @@ $Id$
static int
xdr_rec(XDR *xdrs, struct rec *rec)
-@@ -64,7 +59,6 @@ record_print(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_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);
}
diff --git a/package/dsniff/patches/patch-sshmitm_c b/package/dsniff/patches/patch-sshmitm_c
new file mode 100644
index 000000000..d4b63b378
--- /dev/null
+++ b/package/dsniff/patches/patch-sshmitm_c
@@ -0,0 +1,11 @@
+--- 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)
diff --git a/package/dsniff/patches/patch-tcp_raw_c b/package/dsniff/patches/patch-tcp_raw_c
new file mode 100644
index 000000000..c28a08bf6
--- /dev/null
+++ b/package/dsniff/patches/patch-tcp_raw_c
@@ -0,0 +1,20 @@
+--- 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);
diff --git a/package/dsniff/patches/patch-tcp_raw_h b/package/dsniff/patches/patch-tcp_raw_h
new file mode 100644
index 000000000..ece3acd19
--- /dev/null
+++ b/package/dsniff/patches/patch-tcp_raw_h
@@ -0,0 +1,11 @@
+--- 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);
diff --git a/package/dsniff/patches/patch-tcpkill_c b/package/dsniff/patches/patch-tcpkill_c
new file mode 100644
index 000000000..a49a1adf7
--- /dev/null
+++ b/package/dsniff/patches/patch-tcpkill_c
@@ -0,0 +1,105 @@
+--- 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 */
+
diff --git a/package/dsniff/patches/patch-tcpnice_c b/package/dsniff/patches/patch-tcpnice_c
new file mode 100644
index 000000000..ee95afc1a
--- /dev/null
+++ b/package/dsniff/patches/patch-tcpnice_c
@@ -0,0 +1,196 @@
+--- 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 */
+
diff --git a/package/dsniff/patches/patch-trigger_c b/package/dsniff/patches/patch-trigger_c
new file mode 100644
index 000000000..38a9869e8
--- /dev/null
+++ b/package/dsniff/patches/patch-trigger_c
@@ -0,0 +1,29 @@
+--- 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;
diff --git a/package/dsniff/patches/patch-trigger_h b/package/dsniff/patches/patch-trigger_h
new file mode 100644
index 000000000..582a8c20c
--- /dev/null
+++ b/package/dsniff/patches/patch-trigger_h
@@ -0,0 +1,16 @@
+--- 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);
+
diff --git a/package/dsniff/patches/patch-urlsnarf_c b/package/dsniff/patches/patch-urlsnarf_c
new file mode 100644
index 000000000..74ca39b4d
--- /dev/null
+++ b/package/dsniff/patches/patch-urlsnarf_c
@@ -0,0 +1,19 @@
+--- 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);
diff --git a/package/dsniff/patches/patch-webmitm_c b/package/dsniff/patches/patch-webmitm_c
new file mode 100644
index 000000000..2ff4d2331
--- /dev/null
+++ b/package/dsniff/patches/patch-webmitm_c
@@ -0,0 +1,20 @@
+--- 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();
diff --git a/package/dsniff/patches/patch-webspy_c b/package/dsniff/patches/patch-webspy_c
new file mode 100644
index 000000000..6d6886151
--- /dev/null
+++ b/package/dsniff/patches/patch-webspy_c
@@ -0,0 +1,20 @@
+--- 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)