nProbe 4.1 package

git-svn-id: svn://svn.openwrt.org/openwrt/packages@7527 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
pavlov 2007-06-07 22:25:24 +00:00
parent 6eb0560b39
commit aa1dccfd58
4 changed files with 86169 additions and 0 deletions

63
net/nprobe/Makefile Normal file
View File

@ -0,0 +1,63 @@
#
# Copyright (C) 2006 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# $Id: Makefile 6537 2007-03-07 15:46:36Z pavlov $
include $(TOPDIR)/rules.mk
PKG_NAME:=nprobe
PKG_VERSION:=4.1
PKG_RELEASE:=1
PKG_SOURCE:=nProbe-$(PKG_VERSION).tgz
PKG_SOURCE_URL:=http://downloads.openwrt.org/sources
PKG_MD5SUM:=32ed12f60eab771a79bd5f90622fa2a3
PKG_CAT:=zcat
BUILD_DEPENDS:=libwrap
PKG_BUILD_DIR:=$(BUILD_DIR)/nProbe
include $(INCLUDE_DIR)/package.mk
define Package/nprobe
SECTION:=utils
CATEGORY:=Utilities
DEPENDS:=+libpcap +libpcre +libpthread +libwrap
TITLE:=nProbe
DESCRIPTION:=\
nprobe
URL=http://invisible-island.net/dialog/
endef
define Build/Configure
# patch creates these, so we make them executable
chmod +x $(PKG_BUILD_DIR)/configure
chmod +x $(PKG_BUILD_DIR)/config.guess
$(call Build/Configure/Default, \
--with-only-ipv4 \
PCAP_ROOT="$(STAGING_DIR)/usr" \
)
endef
define Build/Compile
DESTDIR=$(PKG_INSTALL_DIR) \
LDFLAGS="$(TARGET_LDFLAGS) -ldl" \
$(MAKE) -C $(PKG_BUILD_DIR) \
all install
endef
define Package/nprobe/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nprobe \
$(1)/usr/bin/
$(CP) -a $(PKG_INSTALL_DIR)/usr/lib/* \
$(1)/usr/lib
endef
$(eval $(call BuildPackage,nprobe))

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,13 @@
--- nProbe/configure 2007-05-07 16:42:28.041884250 -0500
+++ nProbe.new/configure 2007-05-07 16:57:49.183452000 -0500
@@ -23567,8 +23567,8 @@
if test ".${PCAP_ROOT}" != .; then
if test -d $PCAP_ROOT &&
- test -r $PCAP_ROOT/libpcap.a &&
- test -r $PCAP_ROOT/pcap.h; then
+ test -r $PCAP_ROOT/lib/libpcap.a &&
+ test -r $PCAP_ROOT/include/pcap.h; then
PCAP_ROOT=`cd ${PCAP_ROOT} && pwd`
CORELIBS="${CORELIBS} -L$PCAP_ROOT -lpcap"
INCS="${INCS} -I$PCAP_ROOT"

View File

@ -0,0 +1,35 @@
--- nProbe/nprobe.c 2006-06-09 05:30:39.000000000 -0500
+++ nProbe.new/nprobe.c 2007-05-07 17:35:37.677224000 -0500
@@ -241,8 +241,10 @@
u_short eth_type, off=0, numPkts = 1;
u_int8_t flags = 0, proto = 0;
struct ip ip;
+ #ifndef IPV4_ONLY
struct ip6_hdr ipv6;
struct ip6_ext ipv6ext;
+ #endif
struct tcphdr tp;
struct udphdr up;
struct icmp icmpPkt;
@@ -362,7 +364,9 @@
isFragment = (ntohs(ip.ip_off) & 0x3fff) ? 1 : 0;
off = ntohs(ip.ip_off);
- } else if(eth_type == ETHERTYPE_IPV6) {
+ }
+ #ifndef IPV4_ONLY
+ else if(eth_type == ETHERTYPE_IPV6) {
memcpy(&ipv6, p+ehshift, sizeof(struct ip6_hdr));
if(((ipv6.ip6_vfc >> 4) & 0x0f) != 6) return; /* IP v6 only */
estimatedLen = sizeof(struct ip6_hdr)+ehshift+htons(ipv6.ip6_plen);
@@ -392,7 +396,9 @@
hlen += (ipv6ext.ip6e_len+1)*8;
proto = ipv6ext.ip6e_nxt;
}
- } else
+ }
+ #endif //IPV4_ONLY
+ else
return; /* Anything else that's not IPv4/v6 */
plen = length-ehshift;