aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorWesley Shields <wxs@FreeBSD.org>2013-04-18 15:03:15 +0000
committerWesley Shields <wxs@FreeBSD.org>2013-04-18 15:03:15 +0000
commit4863f45fda834cb05b80ae9ab64160d5cae10486 (patch)
tree2c4e5d0f6e92b139ee5374f3cb8553ddd80079c7 /net
parent70a4193b0fb2494b1fc39e042a33e3fd49e5b0df (diff)
downloadports-4863f45fda834cb05b80ae9ab64160d5cae10486.tar.gz
ports-4863f45fda834cb05b80ae9ab64160d5cae10486.zip
Notes
Diffstat (limited to 'net')
-rw-r--r--net/Makefile1
-rw-r--r--net/vortex/Makefile35
-rw-r--r--net/vortex/distinfo2
-rw-r--r--net/vortex/files/patch-vortex.c30
-rw-r--r--net/vortex/files/patch-xpipes.c14
-rw-r--r--net/vortex/pkg-descr4
-rw-r--r--net/vortex/pkg-plist5
7 files changed, 91 insertions, 0 deletions
diff --git a/net/Makefile b/net/Makefile
index 6cc523cf4009..e2eb113b1273 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -1214,6 +1214,7 @@
SUBDIR += vnc
SUBDIR += vncreflector
SUBDIR += vnstat
+ SUBDIR += vortex
SUBDIR += vserver
SUBDIR += vtun
SUBDIR += wackamole
diff --git a/net/vortex/Makefile b/net/vortex/Makefile
new file mode 100644
index 000000000000..737ea5004c10
--- /dev/null
+++ b/net/vortex/Makefile
@@ -0,0 +1,35 @@
+# $FreeBSD$
+
+PORTNAME= vortex
+DISTVERSION= 2.9.0-59
+CATEGORIES= net ipv6
+MASTER_SITES= SF/${PORTNAME}-ids/${PORTNAME}/2.9.0/
+EXTRACT_SUFX= .tgz
+
+MAINTAINER= wxs@FreeBSD.org
+COMMENT= Network surveillance engine
+
+LICENSE= GPLv2
+
+BUILD_DEPENDS= ${LOCALBASE}/lib/libnids.a:${PORTSDIR}/net/libnids \
+ ${LIBNET_CONFIG}:${PORTSDIR}/net/libnet
+
+LIBNET_CONFIG= ${LOCALBASE}/bin/libnet11-config
+
+WRKSRC= ${WRKDIR}/${PORTNAME}-2.9.0
+USE_GNOME= glib20
+
+do-build:
+ cd ${WRKSRC} && ${CC} -c vortex.c -I${LOCALBASE}/include
+ cd ${WRKSRC} && ${CC} -o vortex vortex.o -L${LOCALBASE}/lib ${LOCALBASE}/lib/libnids.a `${LIBNET_CONFIG} --libs` -lgthread-2.0 -lpcap
+ cd ${WRKSRC} && ${CC} -o xpipes xpipes.c ${PTHREAD_LIBS}
+
+do-install:
+ ${INSTALL_DATA} ${WRKSRC}/vortex.conf ${PREFIX}/etc/vortex.conf.sample
+ if [ ! -f ${PREFIX}/etc/vortex.conf ]; then \
+ ${CP} -p ${PREFIX}/etc/vortex.conf.sample ${PREFIX}/etc/vortex.conf; \
+ fi
+ ${INSTALL_PROGRAM} ${WRKSRC}/vortex ${PREFIX}/bin
+ ${INSTALL_PROGRAM} ${WRKSRC}/xpipes ${PREFIX}/bin
+
+.include <bsd.port.mk>
diff --git a/net/vortex/distinfo b/net/vortex/distinfo
new file mode 100644
index 000000000000..6f22a2e0bdb7
--- /dev/null
+++ b/net/vortex/distinfo
@@ -0,0 +1,2 @@
+SHA256 (vortex-2.9.0-59.tgz) = c2d0ed8eaed374dc5fbbb0e37a32acad82ca224a3ff8377f94f6372837394bbc
+SIZE (vortex-2.9.0-59.tgz) = 37693
diff --git a/net/vortex/files/patch-vortex.c b/net/vortex/files/patch-vortex.c
new file mode 100644
index 000000000000..a33aedf14eff
--- /dev/null
+++ b/net/vortex/files/patch-vortex.c
@@ -0,0 +1,30 @@
+--- ./vortex.c.orig 2011-09-16 15:35:15.000000000 -0400
++++ ./vortex.c 2013-04-18 09:50:33.000000000 -0400
+@@ -38,6 +38,12 @@
+
+ #ifdef linux
+ #include <syscall.h>
++#elif defined(__FreeBSD__)
++#include <sys/param.h>
++#include <sys/cpuset.h>
++typedef cpuset_t cpu_set_t;
++#include <limits.h>
++#define SIZE_MAX SSIZE_MAX
+ #endif
+
+ #include <unistd.h>
+@@ -65,8 +71,13 @@
+ #endif
+
+ //don't ask me why this isn't in headers?
+-#define gettid() syscall(__NR_gettid)
++#ifdef linux
+ #define my_sched_setaffinity(a,b,c) sched_setaffinity(a, b, c)
++#define gettid() syscall(__NR_gettid)
++#elif defined(__FreeBSD__)
++#define my_sched_setaffinity(a,b,c) (-1)
++#define gettid() 0
++#endif
+
+ //TODO LIST:
+
diff --git a/net/vortex/files/patch-xpipes.c b/net/vortex/files/patch-xpipes.c
new file mode 100644
index 000000000000..a1ad8a3b4b02
--- /dev/null
+++ b/net/vortex/files/patch-xpipes.c
@@ -0,0 +1,14 @@
+--- ./xpipes.c.orig 2013-04-18 09:50:44.000000000 -0400
++++ ./xpipes.c 2013-04-18 09:54:21.000000000 -0400
+@@ -37,7 +37,11 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <stdlib.h>
++#ifdef linux
+ #include <linux/limits.h>
++#elif defined(__FreeBSD__)
++#include <sys/param.h>
++#endif
+ #include <pthread.h>
+ #include <unistd.h>
+
diff --git a/net/vortex/pkg-descr b/net/vortex/pkg-descr
new file mode 100644
index 000000000000..0eff5320fdf9
--- /dev/null
+++ b/net/vortex/pkg-descr
@@ -0,0 +1,4 @@
+Vortex is a near real time IDS and network surveillance engine for TCP stream
+data. Vortex decouples packet capture, stream reassembly, and real time
+constraints from analysis. Vortex is used to provide TCP stream data to a
+separate analyzer program.
diff --git a/net/vortex/pkg-plist b/net/vortex/pkg-plist
new file mode 100644
index 000000000000..e1533f4e3e11
--- /dev/null
+++ b/net/vortex/pkg-plist
@@ -0,0 +1,5 @@
+bin/vortex
+bin/xpipes
+@unexec if cmp -s %D/etc/vortex.conf.sample %D/etc/vortex.conf; then rm -f %D/etc/vortex.conf; fi
+etc/vortex.conf.sample
+@exec if [ ! -f %D/etc/vortex.conf ]; then cp -p %D/%F %B/vortex.conf; fi