ports/54510: [New port] ports/net/ipaudit

Ying-Chieh Chen yinjieh at csie.nctu.edu.tw
Tue Jul 15 18:10:12 UTC 2003


>Number:         54510
>Category:       ports
>Synopsis:       [New port] ports/net/ipaudit
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jul 15 11:10:10 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Ying-Chieh Chen
>Release:        FreeBSD 4.8-RELEASE i386
>Organization:
yinjieh's own lab
>Environment:
System: FreeBSD stable.yinjieh.com 4.8-RELEASE FreeBSD 4.8-RELEASE #0: Thu Apr 3 10:53:38 GMT 2003 root at freebsd-stable.sentex.ca:/usr/obj/usr/src/sys/GENERIC i386


	
>Description:

	Submit new port: ports/net/ipaudit
	ipaudit is an IP traffic summarizer, which can listens to a network
	device in promiscuous mode, and records of every
	'connection', each conversation between two ip addresses.

	Both tested on 4.8-RELEASE and 5.1-RELEASE.

	Please commit it, thanks.

>How-To-Repeat:

	1. Save the following .shar file.
	2. sh ipaudit.shar
	3. cd ipaudit && make install

>Fix:

	

--- ipaudit.shar begins here ---
# 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:
#
#	ipaudit
#	ipaudit/distinfo
#	ipaudit/Makefile
#	ipaudit/files
#	ipaudit/files/patch-Makefile
#	ipaudit/files/patch-src::Makefile
#	ipaudit/files/patch-src::hash.h
#	ipaudit/pkg-message
#	ipaudit/pkg-descr
#	ipaudit/pkg-plist
#
echo c - ipaudit
mkdir -p ipaudit > /dev/null 2>&1
echo x - ipaudit/distinfo
sed 's/^X//' >ipaudit/distinfo << 'END-of-ipaudit/distinfo'
XMD5 (ipaudit-0.95.tgz) = 8581ea00ebb854806b19a3759764f536
END-of-ipaudit/distinfo
echo x - ipaudit/Makefile
sed 's/^X//' >ipaudit/Makefile << 'END-of-ipaudit/Makefile'
X# New ports collection makefile for:	ipaudit
X# Date created:		15 July 2003
X# Whom:			Ying-Chieh Chen <yinjieh at csie.nctu.edu.tw>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	ipaudit
XPORTVERSION=	0.95
XCATEGORIES=	net sysutils
XMASTER_SITES=	http://ipaudit.sourceforge.net/download/
XEXTRACT_SUFX=	.tgz
X
XMAINTAINER=	yinjieh at csie.nctu.edu.tw
XCOMMENT=	IP traffic summarizer
X
XMAN1=		ipaudit.1 ipstrings.1 total.1
X
XBIN=		ipaudit ipstrings total
X
XMSG_FILE=	${PKGDIR}/pkg-message
XPKGMESSAGE=	${WRKDIR}/pkg-message
X
Xdo-install:
X.for b in ${BIN}
X	cd ${WRKSRC}/src && ${INSTALL_PROGRAM} $b ${PREFIX}/bin
X.endfor
X.for m in ${MAN1}
X	cd ${WRKSRC}/man/man1 && ${INSTALL_MAN} $m ${PREFIX}/man/man1
X.endfor
X	cd ${WRKSRC}/src && ${INSTALL_DATA} ipaudit.conf.sample ${PREFIX}/etc
X
Xpost-install:
X.if !defined(NOPORTDOCS)
X	${MKDIR} ${PREFIX}/share/doc/ipaudit
X	${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/ipaudit
X.endif
X	@${SED} 's|%%PREFIX%%|${PREFIX}|g' ${MSG_FILE} > ${PKGMESSAGE}
X	@${CAT} ${PKGMESSAGE}
X
X.include <bsd.port.mk>
END-of-ipaudit/Makefile
echo c - ipaudit/files
mkdir -p ipaudit/files > /dev/null 2>&1
echo x - ipaudit/files/patch-Makefile
sed 's/^X//' >ipaudit/files/patch-Makefile << 'END-of-ipaudit/files/patch-Makefile'
X--- Makefile.orig	Wed Oct 18 01:38:27 2000
X+++ Makefile	Tue Jul 15 18:20:49 2003
X@@ -8,10 +8,10 @@
X BIN=ipaudit ipstrings total pdate
X 
X MAKE=make
X-CIDIR=-I/usr/include/pcap
X+#CIDIR=-I/usr/include/pcap
X 
X all:
X-	$(MAKE) -C src all
X+	cd src && $(MAKE) all
X 
X clean:
X 	$(MAKE) -C src clean
END-of-ipaudit/files/patch-Makefile
echo x - ipaudit/files/patch-src::Makefile
sed 's/^X//' >ipaudit/files/patch-src::Makefile << 'END-of-ipaudit/files/patch-src::Makefile'
X--- src/Makefile.orig	Mon Jan  8 05:56:59 2001
X+++ src/Makefile	Tue Jul 15 18:19:58 2003
X@@ -1,36 +1,36 @@
X-CIDIR=-I/usr/include/pcap
X+#CIDIR=-I/usr/include/pcap
X 
X #LIB=../../libpcap-0.5/libpcap.a
X LIB=-lpcap
X 
X-all: ipaudit total ipstrings beta-dir
X+all: ipaudit total ipstrings
X 
X ipaudit: ipaudit.o hash.o
X-	$(CC) -o ipaudit ipaudit.o hash.o $(LIB)
X+	$(CC) $(CFLAGS) -o ipaudit ipaudit.o hash.o $(LIB)
X 
X total: total.o hash.o
X-	$(CC) -o total total.o hash.o -lm
X+	$(CC) $(CFLAGS) -o total total.o hash.o -lm
X 
X ipstrings: ipstrings.o
X-	$(CC) -o ipstrings ipstrings.o $(LIB)
X+	$(CC) $(CFLAGS) -o ipstrings ipstrings.o $(LIB)
X 
X ipaudit.o: ipaudit.c hash.h
X-	$(CC) -c ipaudit.c $(CIDIR) $(DFLAGS)
X+	$(CC) $(CFLAGS) -c ipaudit.c $(CIDIR) $(DFLAGS)
X 
X hash.o: hash.c hash.h
X-	$(CC) -c hash.c
X+	$(CC) $(CFLAGS) -c hash.c
X 
X total.o: total.c hash.c hash.h
X-	$(CC) -c total.c
X+	$(CC) $(CFLAGS) -c total.c
X 
X ipstrings.o: ipstrings.c
X-	$(CC) -c ipstrings.c $(CIDIR) $(DFLAGS)
X+	$(CC) $(CFLAGS) -c ipstrings.c $(CIDIR) $(DFLAGS)
X 
X iprange: iprange.c
X 	$(CC) -g -o iprange iprange.c
X 
X-beta-dir:
X-	$(MAKE) -C beta
X+#beta-dir:
X+#	$(MAKE) -C beta
X 
X clean:
X 	rm -f *.o
END-of-ipaudit/files/patch-src::Makefile
echo x - ipaudit/files/patch-src::hash.h
sed 's/^X//' >ipaudit/files/patch-src::hash.h << 'END-of-ipaudit/files/patch-src::hash.h'
X--- src/hash.h.orig	Tue Jul 15 16:53:16 2003
X+++ src/hash.h	Tue Jul 15 16:53:49 2003
X@@ -1,6 +1,8 @@
X #ifndef _HASH_H
X #define _HASH_H
X 
X+#include <sys/types.h>
X+
X /*
X ------------------------------------------------------------------------
X Type Definitions
END-of-ipaudit/files/patch-src::hash.h
echo x - ipaudit/pkg-message
sed 's/^X//' >ipaudit/pkg-message << 'END-of-ipaudit/pkg-message'
X***********************************************************
X 
X	Please copy %%PREFIX%%/etc/ipaudit.conf.sample to
X	%%PREFIX%%/ipaudit.conf by yourself and modify it,
X	then start ipaudit with
X
X	'ipaudit -g /usr/local/etc/ipaudit.conf' command.
X
X	Thanks.
X
X***********************************************************
END-of-ipaudit/pkg-message
echo x - ipaudit/pkg-descr
sed 's/^X//' >ipaudit/pkg-descr << 'END-of-ipaudit/pkg-descr'
XWould you like to summarize and/or log network activity down to the ip address
Xand port level of detail, but not record every packet?
X
XIpaudit provides that ability.
X
XIpaudit listens to a network device in promiscuous mode, and records of every
X'connection', each conversation between two ip addresses. A unique connection
Xis determined by the ip addresses of the two machines, the protocol used
Xbetween them and the port numbers (if they are communicating via udp or tcp).
X
XIt uses a hash table to keep track of the number of bytes and packets in both
Xdirections. When ipaudit receives a signal SIGTERM (kill) or SIGINT (kill -2,
Xusually the same as a Control-C), it stops collecting data and writes the
Xtabulated results.
X
XIpaudit is built using the pcap packet capture library to read the network port
Xfrom LBNL Network Research Group.
X
XWWW: http://ipaudit.sourceforge.net/
X
XMaintainer: "Ying-Chieh Chen" <yinjieh at csie.nctu.edu.tw>
END-of-ipaudit/pkg-descr
echo x - ipaudit/pkg-plist
sed 's/^X//' >ipaudit/pkg-plist << 'END-of-ipaudit/pkg-plist'
Xbin/ipaudit
Xbin/ipstrings
Xbin/total
Xetc/ipaudit.conf.sample
X%%PORTDOCS%%share/doc/ipaudit/README
X%%PORTDOCS%%@dirrm share/doc/ipaudit
END-of-ipaudit/pkg-plist
exit
--- ipaudit.shar ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list