Add cnupm 3.8, the BPF Traffic Collector (IPv4/IPv6).

PR:		ports/66275
Submitted by:	Dennis S. Davidoff <null@1system.ru>
This commit is contained in:
Sam Lawrance 2005-06-22 15:40:51 +00:00
parent 27171578eb
commit 04c2c2c20a
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=137868
7 changed files with 115 additions and 0 deletions

View file

@ -74,6 +74,7 @@
SUBDIR += clusterit
SUBDIR += cnd
SUBDIR += cnet
SUBDIR += cnupm
SUBDIR += coccinella
SUBDIR += coda5_client
SUBDIR += coda5_doc

42
net/cnupm/Makefile Normal file
View file

@ -0,0 +1,42 @@
# New ports collection makefile for: cnupm
# Date created: 29 October 2003
# Whom: Dennis S.Davidoff <null@1system.ru>
#
# $FreeBSD$
#
PORTNAME= cnupm
PORTVERSION= 3.8
CATEGORIES= net ipv6
MASTER_SITES= http://pdp-11.org.ru/~form/cnupm/files/
MAINTAINER= null@1system.ru
COMMENT= The BPF Traffic Collector (IPv4/IPv6)
USE_RC_SUBR= cnupm.sh
MAN8= cnupm.8 cnupmstat.8
MANCOMPRESSED= yes
CNUPM_OWN?= cnupm
CNUPM_GRP?= cnupm
PW= /usr/sbin/pw
PLIST_SUB+= CNUPM_OWN="${CNUPM_OWN}" CNUPM_GRP="${CNUPM_GRP}"
post-install:
${PW} groupshow ${CNUPM_GRP} 2>/dev/null || ${PW} groupadd \
-n ${CNUPM_GRP}
${PW} usershow ${CNUPM_OWN} 2>/dev/null || ${PW} useradd \
-n ${CNUPM_OWN} -c 'Cnupm traffic collector' \
-g ${CNUPM_GRP} -s /sbin/nologin
${INSTALL} -o ${CNUPM_OWN} -g ${CNUPM_GRP} -m 750 -d ${PREFIX}/var/cnupm
${PW} usermod -n ${CNUPM_OWN} -d ${PREFIX}/var/cnupm
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
@${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
.endif
@${CAT} ${PKGMESSAGE}
.include <bsd.port.mk>

2
net/cnupm/distinfo Normal file
View file

@ -0,0 +1,2 @@
MD5 (cnupm-3.8.tar.gz) = f178cc30a8b13b7c9245fda6f445a9dd
SIZE (cnupm-3.8.tar.gz) = 33512

View file

@ -0,0 +1,37 @@
#!/bin/sh
#
# $FreeBSD$
#
#
# Add the following lines to /etc/rc.conf to enable rsyncd:
#
# cnupm_enable="YES"
# cnupm_ifaces="rl0" # Change this with your interface!
# cnupm_flags="" # Set this one to override default flags
#
# See cnupm(8) for flags
#
. %%RC_SUBR%%
name=cnupm
rcvar=`set_rcvar`
command=%%PREFIX%%/sbin/cnupm
cnupm_flags="-ep -f inet -u cnupm"
load_rc_config ${name}
cnupm_enable=${cnupm_enable:-"NO"}
case ${cnupm_enable} in
[Yy][Ee][Ss])
if [ -z ${cnupm_iface} ]; then
err 1 "cnupm_iface is not set - edit /etc/rc.conf"
fi
esac
cnupm_flags="-i ${cnupm_iface} ${cnupm_flags:-""}"
pidfile=~${name}/${name}-${cnupm_iface}.pid
run_rc_command "$1"

13
net/cnupm/pkg-descr Normal file
View file

@ -0,0 +1,13 @@
The cnupm is an IP/IPv6 traffic collector daemon; it listens on a network
interface for IP/IPv6 packets that match the boolean expression (see
tcpdump(8) for more information) and collects the following statistics:
o address family (INET/INET6)
o IP/IPv6 protocol number
o source IP/IPv6 address
o source TCP/UDP port
o destination IP/IPv6 address
o destination TCP/UDP port
o total number of bytes trasferred
WWW: http://pdp-11.org.ru/~form/cnupm

11
net/cnupm/pkg-message Normal file
View file

@ -0,0 +1,11 @@
************************************************************
Add the following lines to /etc/rc.conf to enable cnupm:
cnupm_enable="YES"
cnupm_iface="rl0" # Change this with your interface!
#cnupm_flags="" # Set this one to override default flags
See cnupm(8) for flags
************************************************************

9
net/cnupm/pkg-plist Normal file
View file

@ -0,0 +1,9 @@
sbin/cnupm
sbin/cnupmstat
%%PORTDOCS%%%%DOCSDIR%%/README
%%PORTDOCS%%@dirrm %%DOCSDIR%%
@exec pw groupshow %%CNUPM_GRP%% 2>/dev/null || pw groupadd -n %%CNUPM_GRP%%
@exec pw usershow %%CNUPM_OWN%% 2>/dev/null || pw useradd -n %%CNUPM_OWN%% -c 'Cnupm traffic collector' -g %%CNUPM_GRP%% -s /sbin/nologin
@exec install -o %%CNUPM_OWN%% -g %%CNUPM_GRP%% -m 750 -d %D/var/cnupm
@exec pw usermod -n %%CNUPM_OWN%% -d %D/var/cnupm
@unexec rmdir %D/var/cnupm 2>/dev/null || true