From owner-freebsd-ports Sat Aug 4 12: 0:43 2001 Delivered-To: freebsd-ports@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id C1C0C37B40E for ; Sat, 4 Aug 2001 12:00:17 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f74J0HR67798; Sat, 4 Aug 2001 12:00:17 -0700 (PDT) (envelope-from gnats) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) by hub.freebsd.org (Postfix) with ESMTP id EA17D37B403 for ; Sat, 4 Aug 2001 11:55:18 -0700 (PDT) (envelope-from marck@woozle.rinet.ru) Received: (from marck@localhost) by woozle.rinet.ru (8.11.3/8.11.3) id f74ItFJ99955; Sat, 4 Aug 2001 22:55:15 +0400 (MSD) (envelope-from marck) Message-Id: <200108041855.f74ItFJ99955@woozle.rinet.ru> Date: Sat, 4 Aug 2001 22:55:15 +0400 (MSD) From: Dmitry Morozovsky Reply-To: marck@woozle.rinet.ru To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: ports/29459: new port: ehnt 0.2.3 (extreme happy netflow tool) Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 29459 >Category: ports >Synopsis: new port: ehnt 0.2.3 (extreme happy netflow tool) >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Aug 04 12:00:16 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Dmitry Morozovsky >Release: FreeBSD 4.3-STABLE i386 >Organization: Cronyx Plus LLC >Environment: System: FreeBSD 4.3-STABLE >Description: new port submission: ehnt (http://ehntsourceforge.net/) >How-To-Repeat: >Fix: # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # /usr/ports/net/ehnt # /usr/ports/net/ehnt/Makefile # /usr/ports/net/ehnt/pkg-comment # /usr/ports/net/ehnt/pkg-descr # /usr/ports/net/ehnt/distinfo # /usr/ports/net/ehnt/files # /usr/ports/net/ehnt/files/patch-ehnt-lookup # /usr/ports/net/ehnt/files/patch-Makefile # /usr/ports/net/ehnt/files/patch-ProcessASN # /usr/ports/net/ehnt/files/patch-config-h # /usr/ports/net/ehnt/files/ehnt.1 # /usr/ports/net/ehnt/files/ehntserv.8 # /usr/ports/net/ehnt/pkg-plist # echo c - /usr/ports/net/ehnt mkdir -p /usr/ports/net/ehnt > /dev/null 2>&1 echo x - /usr/ports/net/ehnt/Makefile sed 's/^X//' >/usr/ports/net/ehnt/Makefile << 'END-of-/usr/ports/net/ehnt/Makefile' X# New ports collection makefile for: ehnt X# Date created: 2 August 2001 X# Whom: marck X# X# $FreeBSD$ X# X XPORTNAME= ehnt XPORTVERSION= 0.2.3 XCATEGORIES= net XMASTER_SITES= ${MASTER_SITE_SOURCEFORGE} XMASTER_SITE_SUBDIR=ehnt XDISTFILES= ${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX} \ X ${PORTNAME}_data-${PORTVERSION}${EXTRACT_SUFX} X XMAINTAINER= marck@rinet.ru X XMAN1= ehnt.1 XMAN8= ehntserv.8 X Xpost-extract: X ${TOUCH} -r ${WRKSRC}/ripe.db.an ${WRKSRC}/ripe.db.an.gz X ${TOUCH} -r ${WRKSRC}/apnic.an ${WRKSRC}/apnic.an.gz X ${CP} ${FILESDIR}/ehnt.1 ${WRKSRC}/ X ${CP} ${FILESDIR}/ehntserv.8 ${WRKSRC}/ X X.include END-of-/usr/ports/net/ehnt/Makefile echo x - /usr/ports/net/ehnt/pkg-comment sed 's/^X//' >/usr/ports/net/ehnt/pkg-comment << 'END-of-/usr/ports/net/ehnt/pkg-comment' XExtreme Happy NetFlow Tool - Simple Cisco NetFlow collector END-of-/usr/ports/net/ehnt/pkg-comment echo x - /usr/ports/net/ehnt/pkg-descr sed 's/^X//' >/usr/ports/net/ehnt/pkg-descr << 'END-of-/usr/ports/net/ehnt/pkg-descr' XThis is lightweight but well-featured tool for collecting XNetFlow version 5 packets from Cisco routers. X XImplementation includes simple UDP-to-TCP convering server Xwhich is used to replicate NetFlow to clients (may be many). X XWWW: http://ehnt.sourceforge.net/ X X- Dmitry Xmarck@rinet.ru END-of-/usr/ports/net/ehnt/pkg-descr echo x - /usr/ports/net/ehnt/distinfo sed 's/^X//' >/usr/ports/net/ehnt/distinfo << 'END-of-/usr/ports/net/ehnt/distinfo' XMD5 (ehnt-0.2.3.tar.gz) = 4fb3af5046fb9943ea6bb93a56cb89cb XMD5 (ehnt_data-0.2.3.tar.gz) = ddba92084c78138bdd9af23ac25f5ee9 END-of-/usr/ports/net/ehnt/distinfo echo c - /usr/ports/net/ehnt/files mkdir -p /usr/ports/net/ehnt/files > /dev/null 2>&1 echo x - /usr/ports/net/ehnt/files/patch-ehnt-lookup sed 's/^X//' >/usr/ports/net/ehnt/files/patch-ehnt-lookup << 'END-of-/usr/ports/net/ehnt/files/patch-ehnt-lookup' X--- ehnt_lookup.c.orig Wed Jul 18 00:47:37 2001 X+++ ehnt_lookup.c Fri Aug 3 19:54:34 2001 X@@ -36,7 +36,7 @@ X X memset(ASNs,0,sizeof(ASNs)); X X- if ( ! (f=fopen ("asnc.txt","r")) ) { X+ if ( ! (f=fopen (ASNCDIR "/asnc.txt","r")) ) { X perror("fopen"); X } else { X for ( ; ; ) { END-of-/usr/ports/net/ehnt/files/patch-ehnt-lookup echo x - /usr/ports/net/ehnt/files/patch-Makefile sed 's/^X//' >/usr/ports/net/ehnt/files/patch-Makefile << 'END-of-/usr/ports/net/ehnt/files/patch-Makefile' X--- Makefile.orig Wed Jul 18 00:47:37 2001 X+++ Makefile Sat Aug 4 20:51:55 2001 X@@ -1,20 +1,19 @@ X-PLATFORM = LINUX X+#PLATFORM = LINUX X #PLATFORM = SOLARIS X-#PLATFORM = FreeBSD X-CC = gcc X+PLATFORM = FreeBSD X+#CC = gcc X #DEBUG = yes X #CFLAGS = -g X #CFLAGS = -O6 X LIBS = -lm X X-ifeq ($(PLATFORM),SOLARIS) X- LIBS += -lsocket -lnsl -lresolv X-endif X+PREFIX?= /usr/local X X-ifeq ($(DEBUG),yes) X+.if defined(DEBUG) X CFLAGS += -g X-endif X+.endif X X+CFLAGS+= -DASNCDIR=\"${PREFIX}/etc\" X X all: ehntserv ehnt asnc.txt X @echo X@@ -37,11 +36,6 @@ X X ehnt : ehnt_client.o ehnt_lookup.o ehnt_display.o ehnt_processflow.o ehnt_main.o X $(CC) -o ehnt ehnt_client.o ehnt_lookup.o ehnt_display.o ehnt_processflow.o ehnt_main.o $(LIBS) $(CFLAGS) X-ifeq ($(DEBUG),yes) X- @echo Debug mode - ehnt not stripped X-else X- strip ehnt X-endif X X X ehntserv.o : ehntserv.c ehnt.h netflowv5.h config.h X@@ -49,18 +43,35 @@ X X ehntserv : ehntserv.o X $(CC) $(CFLAGS) -o ehntserv ehntserv.o $(LIBS) $(CFLAGS) X-ifeq ($(DEBUG),yes) X- @echo Debug mode - ehnt not stripped X-else X- strip ehntserv X-endif X X-asnc.txt : X+asnc.txt : asn.txt apnic.an ripe.db.an X perl ./ProcessASN.pl X X-asn-refresh : X- rm -f asn.txt apnic.an apnic.an.gz ripe.db.an ripe.db.an.gz X- perl ./ProcessASN.pl X+asn.txt : X+ fetch ftp://ftp.arin.net/netinfo/asn.txt X+ X+apnic.an.gz : X+ fetch ftp://ftp.apnic.net/pub/apnic/dbase/data/apnic.an.gz X+ X+apnic.an : apnic.an.gz X+ zcat apnic.an.gz >apnic.an X+ X+ripe.db.an.gz : X+ fetch ftp://ftp.ripe.net/ripe/dbase/split/ripe.db.an.gz X+ X+ripe.db.an : ripe.db.an.gz X+ zcat ripe.db.an.gz >ripe.db.an X X clean : X- rm -f ehntserv.o ehnt_client.o ehnt.o ehnt_display.o ehnt_processflow.o ehnt_lookup.o ehnt_main.o ehntserv ehnt asnc.txt core X+ rm -f *.o ehntserv ehnt core asnc.txt X+ X+asclean : X+ rm -f asn.txt apnic.an ripe.db.an X+ X+install : all X+ install -c -s ehnt ${PREFIX}/bin X+ install -c -s ehntserv ${PREFIX}/sbin X+ install -c asnc.txt ${PREFIX}/etc X+ install -c ehnt.1 ${PREFIX}/man/man1 X+ install -c ehntserv.8 ${PREFIX}/man/man8 X+ END-of-/usr/ports/net/ehnt/files/patch-Makefile echo x - /usr/ports/net/ehnt/files/patch-ProcessASN sed 's/^X//' >/usr/ports/net/ehnt/files/patch-ProcessASN << 'END-of-/usr/ports/net/ehnt/files/patch-ProcessASN' X--- ProcessASN.pl.orig Fri Aug 3 19:14:45 2001 X+++ ProcessASN.pl Fri Aug 3 19:19:46 2001 X@@ -1,5 +1,7 @@ X #!/usr/bin/perl X X+# Modified for FreeBSD by Dmitry Morozovsky (marck@rinet.ru) X+ X #retrieve (if we can) and process the following files X X #ftp://ftp.arin.net/netinfo/asn.txt X@@ -13,73 +15,23 @@ X X undef $MissingFile; X if (! -f "asn.txt" ) { X- print "Cannot find asn.txt. Attempting to retrieve.\n"; X- if (! RetrieveFile("ftp://ftp.arin.net/netinfo/asn.txt","asn.txt")) { X- print "---> Cannot retrieve asn.txt\n"; X- print "---> Please download it from\n"; X- print "---> ftp://ftp.arin.net/netinfo/asn.txt\n"; X- $MissingFile=1; X- } X+ print "Cannot find asn.txt\n"; X+ print "---> Please download it from\n"; X+ print "---> ftp://ftp.arin.net/netinfo/asn.txt\n"; X+ exit(1); X } X X-$gzip="gzip"; X- X if (! -f "apnic.an" ) { X- if (-f "apnic.an.gz") { X- system "$gzip -d apnic.an.gz"; X- $r=$?; X- if ($r > 0) { X- print "---> Retrieved apnic.an.gz, but could not run $gzip!\n"; X- print "---> Please get $gzip and try again\n"; X- exit(1); X- } X- } else { X- if ( RetrieveFile("ftp://ftp.apnic.net/pub/apnic/dbase/data/apnic.an.gz","apnic.an.gz")) { X- system "$gzip -d apnic.an.gz"; X- $r=$?; X- if ($r > 0) { X- print "---> Retrieved apnic.an.gz, but could not run $gzip!\n"; X- print "---> Please get $gzip and try again\n"; X- exit(1); X- } X- } else { X- print "---> Cannot retrieve apnic.an.gz\n"; X- print "---> Please download it from\n"; X- print "---> ftp://ftp.apnic.net/pub/apnic/dbase/data/apnic.an.gz\n"; X- $MissingFile=1; X- } X- } X+ print "---> Cannot find apnic.an\n"; X+ print "---> Please download it from\n"; X+ print "---> ftp://ftp.apnic.net/pub/apnic/dbase/data/apnic.an.gz\n"; X+ exit(1); X } X X if (! -f "ripe.db.an" ) { X- if (-f "ripe.db.an.gz") { X- system "$gzip -d ripe.db.an.gz"; X- $r=$?; X- if ($r > 0) { X- print "---> Retrieved ripe.db.an.gz, but could not run $gzip!\n"; X- print "---> Please get $gzip and try again\n"; X- exit(1); X- } X- } else { X- if ( RetrieveFile("ftp://ftp.ripe.net/ripe/dbase/split/ripe.db.an.gz","ripe.db.an.gz")) { X- system "$gzip -d ripe.db.an.gz"; X- $r=$?; X- if ($r > 0) { X- print "---> Retrieved ripe.db.an.gz, but could not run $gzip!\n"; X- print "---> Please get $gzip and try again\n"; X- exit(1); X- } X- } else { X- print "---> Cannot retrieve ripe.db.an.gz\n"; X- print "---> Please download it from\n"; X- print "---> ftp://ftp.ripe.net/ripe/dbase/split/ripe.db.an.gz\n"; X- $MissingFile=1; X- } X- } X-} X- X-if ($MissingFile) { X- print "\n---> Please get the file(s) listed above and rerun ProcessASN.pl or Make.\n"; X+ print "---> Cannot find ripe.db.an\n"; X+ print "---> Please download it from\n"; X+ print "---> ftp://ftp.ripe.net/ripe/dbase/split/ripe.db.an.gz\n"; X exit(1); X } X END-of-/usr/ports/net/ehnt/files/patch-ProcessASN echo x - /usr/ports/net/ehnt/files/patch-config-h sed 's/^X//' >/usr/ports/net/ehnt/files/patch-config-h << 'END-of-/usr/ports/net/ehnt/files/patch-config-h' X--- config.h~ Wed Jul 18 00:47:37 2001 X+++ config.h Fri Aug 3 19:57:51 2001 X@@ -27,3 +27,8 @@ X #define DEFAULT_UDP_PORT 4444 X /* The default mode of the client. Can be either EM_REPORT or EM_DUMP.*/ X #define EM_DEFAULT EM_REPORT X+ X+#ifndef ASNCDIR X+#define ASNCDIR "." X+#endif X+ END-of-/usr/ports/net/ehnt/files/patch-config-h echo x - /usr/ports/net/ehnt/files/ehnt.1 sed 's/^X//' >/usr/ports/net/ehnt/files/ehnt.1 << 'END-of-/usr/ports/net/ehnt/files/ehnt.1' X.\" Copyright (c) 2000-2001 Nik Weidenbacher nikw@martnet.com X.\" Portions Copyright (c) 2001 Dmitry Morozovsky marck@rinet.ru X.\" X.\" X.\" Redistribution and use in source and binary forms, with or without X.\" modification, are permitted provided that the following conditions X.\" are met: X.\" 1. Redistributions of source code must retain the above copyright X.\" notice, this list of conditions and the following disclaimer. X.\" 2. Redistributions in binary form must reproduce the above copyright X.\" notice, this list of conditions and the following disclaimer in the X.\" documentation and/or other materials provided with the distribution. X.\" 3. All advertising materials mentioning features or use of this software X.\" must display the following acknowledgement: X.\" This product includes software developed by the University of X.\" California, Berkeley and its contributors. X.\" 4. Neither the name of the University nor the names of its contributors X.\" may be used to endorse or promote products derived from this software X.\" without specific prior written permission. X.\" X.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND X.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE X.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE X.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE X.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL X.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS X.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) X.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT X.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY X.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF X.\" SUCH DAMAGE. X.\" X.\" $Id$ X.\" X.Dd Aug 04, 2001 X.Dt EHNT 1 X.\" .Os BSD 4.4 X.Sh NAME X.Nm ehnt X.Nd Extreme Happy Netflow Tool. Client part X.Sh SYNOPSIS X.Nm X.Op Fl 0 Ar ASN X.Op Fl a Ar ASN X.Op Fl b X.Op Fl c Ar count X.Op Fl i Ar mins X.Op Fl m Ar mode X.Op Fl n Ar intidx X.Op Fl p Ar port X.Op Fl P Ar proto X.Op Fl r Ar addr X.Op Fl s Ar server:port X.Op Fl x Ar prefix X.Sh DESCRIPTION XThe X.Nm Xcommand starts X.Xr ehnt 1 Xclient which connects to X.Xr ehntserv 8 Xserver and converts raw flow of NetFlow version 5 packets into Xsomewhat human-readable (or machine-readable) form. X.Pp XThe options are as follows: X.Bl -tag -width Fl X.It Fl 0 Ar ASN XReplace AS number 0 occurences with this AS number X.It Fl a Ar ASN XOnly display flows to/from this AS number X.It Fl b XDisplay big flows (only shows flows with the most bytes Xor packets received so far) X.It Fl c Ar count XExit after flows are received X.It Fl i Ar mins XHow long to wait between report generations (in minutes) X.It Fl m Ar mode XThe name of the mode of operation to use: X.Cm dump Xdisplays flow detail; X.Cm shortdump Xshows flow details in a more compact fashion; X.Cm top Xgenerates reports of top average utilization X.It Fl n Ar intidx XSpecify the interface by SNMP ifIndex number X.It Fl p Ar port XOnly display flows to/from this tcp or udp port number X.It Fl P Ar proto XOnly display flows using this IP protocol number X.It Fl r Ar addr XOnly display flows reported by this router IP address X.It Fl s Ar server:port XThe hostname or IP address and port number of the X.Xr ehntserv 8 X.It Fl x Ar prefix XOnly display flows to/from this IP prefix. The format for Xis 'address/length', for example 1.2.3.4/30 or 127.0.0.0/8. X.El X.Sh FILES X.Bl -tag -width /var/cron/allow -compact X.It Pa /usr/local/etc/asnc.txt XAutonomous Systems Number-to-Name Convertion config X.El X.Sh SEE ALSO X.Xr ehntserv 8 X.Sh AUTHORS X.An Nik Weidenbacher Aq nikw@martnet.com X.An Dmitry Morozovsky Aq marck@rinet.ru X END-of-/usr/ports/net/ehnt/files/ehnt.1 echo x - /usr/ports/net/ehnt/files/ehntserv.8 sed 's/^X//' >/usr/ports/net/ehnt/files/ehntserv.8 << 'END-of-/usr/ports/net/ehnt/files/ehntserv.8' X.\" Copyright (c) 2000-2001 Nik Weidenbacher nikw@martnet.com X.\" Portions Copyright (c) 2001 Dmitry Morozovsky marck@rinet.ru X.\" X.\" X.\" Redistribution and use in source and binary forms, with or without X.\" modification, are permitted provided that the following conditions X.\" are met: X.\" 1. Redistributions of source code must retain the above copyright X.\" notice, this list of conditions and the following disclaimer. X.\" 2. Redistributions in binary form must reproduce the above copyright X.\" notice, this list of conditions and the following disclaimer in the X.\" documentation and/or other materials provided with the distribution. X.\" 3. All advertising materials mentioning features or use of this software X.\" must display the following acknowledgement: X.\" This product includes software developed by the University of X.\" California, Berkeley and its contributors. X.\" 4. Neither the name of the University nor the names of its contributors X.\" may be used to endorse or promote products derived from this software X.\" without specific prior written permission. X.\" X.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND X.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE X.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE X.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE X.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL X.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS X.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) X.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT X.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY X.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF X.\" SUCH DAMAGE. X.\" X.\" $Id$ X.\" X.Dd Aug 04, 2001 X.Dt EHNTSERV 8 X.\" .Os BSD 4.4 X.Sh NAME X.Nm ehntserv X.Nd Extreme Happy Netflow Tool. Server part X.Sh SYNOPSIS X.Nm X.Op Fl u Ar udp-port X.Op Fl t Ar tcp-port X.Op Fl m Ar maxdata X.Op Fl d X.Sh DESCRIPTION XThe X.Nm Xcommand starts X.Xr ehnt 1 Xserver (udp to tcp translator) which listens to NetFlow version 5 Xpackets from Routers and translates them into TCP stream for X.Xr ehnt 1 Xclients. X.Pp XThe options are as follows: X.Bl -tag -width Fl X.It Fl d XDebug. Don't become a daemon, displays all messages on stdout, Xdisplays lots of extra information X.It Fl t Ar tcp-port XListen on given TCP port (client connections) instead of the default 4444. X.It Fl u Ar udp-port XListen on given UDP port (NetFlow packets from routers) instead of the default 4444. X.El X.Sh SEE ALSO X.Xr ehnt 1 X.Sh AUTHORS X.An Nik Weidenbacher Aq nikw@martnet.com X.An Dmitry Morozovsky Aq marck@rinet.ru X END-of-/usr/ports/net/ehnt/files/ehntserv.8 echo x - /usr/ports/net/ehnt/pkg-plist sed 's/^X//' >/usr/ports/net/ehnt/pkg-plist << 'END-of-/usr/ports/net/ehnt/pkg-plist' Xbin/ehnt Xetc/asnc.txt Xsbin/ehntserv END-of-/usr/ports/net/ehnt/pkg-plist exit >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message