mirror of
https://github.com/pentoo/pentoo-overlay
synced 2026-04-21 22:30:59 +02:00
xplico: 1.2.2 requires nDPI, WIP
This commit is contained in:
parent
094f4bce27
commit
de6abbd058
10 changed files with 299 additions and 3 deletions
|
|
@ -1,2 +1,3 @@
|
|||
DIST xplico-1.1.2.tgz 3133277 SHA256 08cc8bbae705e5ea3643d876e93b0dd14dd593595de0ae6ecf6a1089a056af25 SHA512 aaa205dfd3b601bd3ab510c5e0060521c85075d46754ce6d00d04e5536d957589ce7d41a27a30001273f50e653af6b8a15f0db3954cddd0ffb698c2d73934d44 WHIRLPOOL 558d2773afed001306bddf94542be372492bb808c6eeeeb8f2f36bbbc3997f215dd148c7148c97f662993bd54de259e736cb451d260a66e165bec346adb5794f
|
||||
DIST xplico-1.2.1.tar.gz 2454243 SHA256 7510e6c2a9861a822cddedb96e0ce4374f49aabf698fb3b9f21abcc60c76d951 SHA512 aaecbf5e56e9d9b228df295b8e09c1dd335e289f1ec695b360f5b69c5d076b811b79fb646c8a51481ff73016f35789a595e23cfd9d7d5669b7bd6de0e1518fd4 WHIRLPOOL cd28b00db13c3fa926f01321390d7bc259610062f45cfb4885b27ef4880701b7952378fab084ede7d3849fc4f33be6df1728ebf880b69fd14ed3b087c3eee768
|
||||
DIST xplico-1.1.2.tgz 3133277 BLAKE2B e1ab8f3e63e602d332a2bc9a5f1dce38c3b40523759b24c4df154111fddeee1801f41994d63d4d9d6f5d4c632328048575b5607cb75dec8c9ebcc9ed9ab8fd96 SHA512 aaa205dfd3b601bd3ab510c5e0060521c85075d46754ce6d00d04e5536d957589ce7d41a27a30001273f50e653af6b8a15f0db3954cddd0ffb698c2d73934d44
|
||||
DIST xplico-1.2.1.tar.gz 2454243 BLAKE2B 381766629c1f9362ab75d5e8d8790228536e3ca2e1ed7a690a02fe0b505fe3600e2ceea55c3c4d0eb2b9e87c1ef99d738d5545ce92fc23ef569178d7b07e1896 SHA512 aaecbf5e56e9d9b228df295b8e09c1dd335e289f1ec695b360f5b69c5d076b811b79fb646c8a51481ff73016f35789a595e23cfd9d7d5669b7bd6de0e1518fd4
|
||||
DIST xplico-1.2.2.tar.gz 2469910 BLAKE2B d0bafa0b7a2263b7513f58466e7d3d467c6079c889f9434cfd6bbd567c54b042a3c49d5d0c72e19f6a6bb1fa30a4dd2a394837f485c3feb30fff2c5ff520476d SHA512 e189e39e1d76af691c4bc86ad7db3493f6341fec9aba951cf02558e06c4963b73806df06303b6ba9b6352e4a204aac5920690d61338d4d1f680257211d62a6d3
|
||||
|
|
|
|||
70
net-analyzer/xplico/files/xplico-1.2.2-include.patch
Normal file
70
net-analyzer/xplico/files/xplico-1.2.2-include.patch
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
diff -urN xplico-v.1.2.2.orig/dissectors/tcp_ca/tcp_analysis.c xplico-v.1.2.2/dissectors/tcp_ca/tcp_analysis.c
|
||||
--- xplico-v.1.2.2.orig/dissectors/tcp_ca/tcp_analysis.c 2019-04-25 20:24:33.000000000 +0800
|
||||
+++ xplico-v.1.2.2/dissectors/tcp_ca/tcp_analysis.c 2019-04-25 22:21:28.811087439 +0800
|
||||
@@ -48,7 +48,7 @@
|
||||
#include "png.h"
|
||||
|
||||
/* nDPI library */
|
||||
-#include <libndpi/ndpi_main.h>
|
||||
+#include <ndpi/ndpi_main.h>
|
||||
|
||||
|
||||
#define CA_CHECK_LOST 0 /* check lost data */
|
||||
diff -urN xplico-v.1.2.2.orig/dissectors/tcp_ca/tcp_analysis.h xplico-v.1.2.2/dissectors/tcp_ca/tcp_analysis.h
|
||||
--- xplico-v.1.2.2.orig/dissectors/tcp_ca/tcp_analysis.h 2019-04-25 20:24:33.000000000 +0800
|
||||
+++ xplico-v.1.2.2/dissectors/tcp_ca/tcp_analysis.h 2019-04-25 22:21:25.168087171 +0800
|
||||
@@ -29,7 +29,7 @@
|
||||
#define __TCP_ANALYSIS_H__
|
||||
|
||||
#include "pei.h"
|
||||
-#include <libndpi/ndpi_api.h>
|
||||
+#include <ndpi/ndpi_api.h>
|
||||
|
||||
/* path & buffer size */
|
||||
#define TCP_CA_FILENAME_PATH_SIZE 512
|
||||
diff -urN xplico-v.1.2.2.orig/dissectors/tcp_grbg/tcp_garbage.c xplico-v.1.2.2/dissectors/tcp_grbg/tcp_garbage.c
|
||||
--- xplico-v.1.2.2.orig/dissectors/tcp_grbg/tcp_garbage.c 2019-04-25 20:24:33.000000000 +0800
|
||||
+++ xplico-v.1.2.2/dissectors/tcp_grbg/tcp_garbage.c 2019-04-25 22:21:34.705087872 +0800
|
||||
@@ -48,9 +48,9 @@
|
||||
#include "pcap_gfile.h"
|
||||
|
||||
/* nDPI library */
|
||||
-#include <libndpi/ndpi_main.h>
|
||||
-#include <libndpi/ndpi_api.h>
|
||||
-#include <libndpi/ndpi_typedefs.h>
|
||||
+#include <ndpi/ndpi_main.h>
|
||||
+#include <ndpi/ndpi_api.h>
|
||||
+#include <ndpi/ndpi_typedefs.h>
|
||||
|
||||
|
||||
#define GRB_FILE 0 /* to put (or not) data in to a pcap file */
|
||||
diff -urN xplico-v.1.2.2.orig/dissectors/udp_ca/udp_analysis.c xplico-v.1.2.2/dissectors/udp_ca/udp_analysis.c
|
||||
--- xplico-v.1.2.2.orig/dissectors/udp_ca/udp_analysis.c 2019-04-25 20:24:33.000000000 +0800
|
||||
+++ xplico-v.1.2.2/dissectors/udp_ca/udp_analysis.c 2019-04-25 22:21:51.525089109 +0800
|
||||
@@ -46,8 +46,8 @@
|
||||
#include "geoiploc.h"
|
||||
|
||||
/* nDPI library */
|
||||
-#include <libndpi/ndpi_main.h>
|
||||
-#include <libndpi/ndpi_api.h>
|
||||
+#include <ndpi/ndpi_main.h>
|
||||
+#include <ndpi/ndpi_api.h>
|
||||
|
||||
#define UDP_CA_TMP_DIR "udp_ca"
|
||||
#define NDPI_TICK_RES 1000 /* Hz */
|
||||
diff -urN xplico-v.1.2.2.orig/dissectors/udp_grbg/udp_garbage.c xplico-v.1.2.2/dissectors/udp_grbg/udp_garbage.c
|
||||
--- xplico-v.1.2.2.orig/dissectors/udp_grbg/udp_garbage.c 2019-04-25 20:24:33.000000000 +0800
|
||||
+++ xplico-v.1.2.2/dissectors/udp_grbg/udp_garbage.c 2019-04-25 22:21:43.912088549 +0800
|
||||
@@ -47,9 +47,9 @@
|
||||
#include "pcap_gfile.h"
|
||||
|
||||
/* nDPI library */
|
||||
-#include <libndpi/ndpi_main.h>
|
||||
-#include <libndpi/ndpi_api.h>
|
||||
-#include <libndpi/ndpi_typedefs.h>
|
||||
+#include <ndpi/ndpi_main.h>
|
||||
+#include <ndpi/ndpi_api.h>
|
||||
+#include <ndpi/ndpi_typedefs.h>
|
||||
|
||||
#define GRB_FILE 0 /* to put (or not) data in to a file */
|
||||
#define UDP_GRB_TMP_DIR "udp_grb"
|
||||
66
net-analyzer/xplico/files/xplico-1.2.2-ndpi2.patch
Normal file
66
net-analyzer/xplico/files/xplico-1.2.2-ndpi2.patch
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
diff -urN xplico-1.2.0.orig/dissectors/tcp_ca/tcp_analysis.c xplico-1.2.0/dissectors/tcp_ca/tcp_analysis.c
|
||||
--- xplico-1.2.0.orig/dissectors/tcp_ca/tcp_analysis.c 2017-01-15 19:11:07.000000000 +0800
|
||||
+++ xplico-1.2.0/dissectors/tcp_ca/tcp_analysis.c 2017-10-10 00:50:47.065666338 +0800
|
||||
@@ -524,7 +524,7 @@
|
||||
else {
|
||||
ifw->l7prot_id = nDPIPacket(pkt, ifw->l7flow, ifw->l7dst, ifw->l7src, ifw->priv.ipv6);
|
||||
}
|
||||
- if (ifw->l7prot_id.protocol != NDPI_PROTOCOL_UNKNOWN) {
|
||||
+ if (ifw->l7prot_id.app_protocol != NDPI_PROTOCOL_UNKNOWN) {
|
||||
ifw->stage++;
|
||||
ifw->l7prot_type = ndpi_protocol2name(ndpi, ifw->l7prot_id, ifw->buff, TCP_CA_LINE_MAX_SIZE);
|
||||
}
|
||||
@@ -618,7 +618,7 @@
|
||||
else
|
||||
ifw->l7prot_id = ndpi_guess_undetected_protocol(ndpi, IPPROTO_TCP, ifw->priv.ip_s.uint32, ifw->priv.ip_d.uint32, ifw->priv.port_s, ifw->priv.port_d);
|
||||
|
||||
- if (ifw->l7prot_id.protocol != NDPI_PROTOCOL_UNKNOWN) {
|
||||
+ if (ifw->l7prot_id.master_protocol != NDPI_PROTOCOL_UNKNOWN) {
|
||||
ifw->l7prot_type = ndpi_protocol2name(ndpi, ifw->l7prot_id, ifw->buff, TCP_CA_LINE_MAX_SIZE);
|
||||
}
|
||||
else {
|
||||
diff -urN xplico-1.2.0.orig/dissectors/tcp_grbg/tcp_garbage.c xplico-1.2.0/dissectors/tcp_grbg/tcp_garbage.c
|
||||
--- xplico-1.2.0.orig/dissectors/tcp_grbg/tcp_garbage.c 2017-01-15 19:11:07.000000000 +0800
|
||||
+++ xplico-1.2.0/dissectors/tcp_grbg/tcp_garbage.c 2017-10-10 00:48:34.837657461 +0800
|
||||
@@ -675,7 +675,7 @@
|
||||
else {
|
||||
l7prot_id = nDPIPacket(pkt, l7flow, l7dst, l7src, ipv4);
|
||||
}
|
||||
- if (l7prot_id.protocol != NDPI_PROTOCOL_UNKNOWN) {
|
||||
+ if (l7prot_id.app_protocol != NDPI_PROTOCOL_UNKNOWN) {
|
||||
stage++;
|
||||
l7prot_type = ndpi_protocol2name(ndpi, l7prot_id, buff, TCP_CFG_LINE_MAX_SIZE);
|
||||
}
|
||||
diff -urN xplico-1.2.0.orig/dissectors/udp_ca/udp_analysis.c xplico-1.2.0/dissectors/udp_ca/udp_analysis.c
|
||||
--- xplico-1.2.0.orig/dissectors/udp_ca/udp_analysis.c 2017-01-15 19:11:07.000000000 +0800
|
||||
+++ xplico-1.2.0/dissectors/udp_ca/udp_analysis.c 2017-10-10 00:51:14.197668160 +0800
|
||||
@@ -431,7 +431,7 @@
|
||||
else {
|
||||
l7prot_id = nDPIPacket(pkt, l7flow, l7dst, l7src, ipv4);
|
||||
}
|
||||
- if (l7prot_id.protocol != NDPI_PROTOCOL_UNKNOWN) {
|
||||
+ if (l7prot_id.master_protocol != NDPI_PROTOCOL_UNKNOWN) {
|
||||
l7prot_type = ndpi_protocol2name(ndpi, l7prot_id, buff, UDP_CA_LINE_MAX_SIZE);
|
||||
}
|
||||
}
|
||||
@@ -451,7 +451,7 @@
|
||||
else
|
||||
l7prot_id = ndpi_guess_undetected_protocol(ndpi, IPPROTO_UDP, priv.ip_s.uint32, priv.ip_d.uint32, priv.port_s, priv.port_d);
|
||||
|
||||
- if (l7prot_id.protocol != NDPI_PROTOCOL_UNKNOWN) {
|
||||
+ if (l7prot_id.master_protocol != NDPI_PROTOCOL_UNKNOWN) {
|
||||
l7prot_type = ndpi_protocol2name(ndpi, l7prot_id, buff, UDP_CA_LINE_MAX_SIZE);
|
||||
}
|
||||
else {
|
||||
diff -urN xplico-1.2.0.orig/dissectors/udp_grbg/udp_garbage.c xplico-1.2.0/dissectors/udp_grbg/udp_garbage.c
|
||||
--- xplico-1.2.0.orig/dissectors/udp_grbg/udp_garbage.c 2017-01-15 19:11:07.000000000 +0800
|
||||
+++ xplico-1.2.0/dissectors/udp_grbg/udp_garbage.c 2017-10-10 00:49:00.111659158 +0800
|
||||
@@ -373,7 +373,7 @@
|
||||
else {
|
||||
l7prot_id = nDPIPacket(pkt, l7flow, l7dst, l7src, ipv4);
|
||||
}
|
||||
- if (l7prot_id.protocol != NDPI_PROTOCOL_UNKNOWN) {
|
||||
+ if (l7prot_id.master_protocol != NDPI_PROTOCOL_UNKNOWN) {
|
||||
l7prot_type = ndpi_protocol2name(ndpi, l7prot_id, buff, UDP_CFG_LINE_MAX_SIZE);
|
||||
}
|
||||
}
|
||||
64
net-analyzer/xplico/xplico-1.2.2.ebuild
Normal file
64
net-analyzer/xplico/xplico-1.2.2.ebuild
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit multilib eutils webapp
|
||||
|
||||
WEBAPP_MANUAL_SLOT="yes"
|
||||
|
||||
DESCRIPTION="Extract data from TCP/IP traffic"
|
||||
HOMEPAGE="http://www.xplico.org"
|
||||
SRC_URI="https://github.com/xplico/xplico/archive/v.${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
#KEYWORDS="~amd64 ~x86"
|
||||
IUSE="+geoip mysql"
|
||||
SLOT="0"
|
||||
|
||||
WEBAPP_OPTIONAL=yes
|
||||
|
||||
DEPEND="net-libs/libpcap
|
||||
>=net-libs/nDPI-2.8"
|
||||
RDEPEND="mysql? ( dev-db/mysql )
|
||||
media-sound/sox
|
||||
media-sound/lame
|
||||
dev-lang/php
|
||||
virtual/httpd-cgi
|
||||
dev-db/sqlite:3
|
||||
geoip? ( dev-libs/geoip )"
|
||||
|
||||
# cups? ( app-text/ghostscript-gpl ) "
|
||||
|
||||
S="${WORKDIR}/${PN}-v.${PV}"
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}"/"${P}"-include.patch
|
||||
|
||||
# fix CFLAGS
|
||||
sed -i "s|CFLAGS = -rdynamic|CFLAGS += -rdynamic|g" Makefile
|
||||
# sed -i "s|CFLAGS = -rdynamic|CFLAGS += -rdynamic|g" system/dema/Makefile
|
||||
|
||||
sed -i '/json_object_private.h/d' manipulators/mwebymsg/analyse.c
|
||||
|
||||
# if use geoip; then
|
||||
# sed -i -e "s|GEOIP_LIB =.*|GEOIP_LIB = /usr/$(get_libdir)/libGeoIP.a|g" Makefile
|
||||
# sed -i "s|GeoLiteCity.dat|/usr/share/GeoIP/GeoIP.dat|" common/geoiploc.c
|
||||
# sed -i "s|-lpthread|-lpthread -lGeoIP|g" manipulators/www/Makefile\
|
||||
# manipulators/mfbc/Makefile manipulators/mwmail/Makefile\
|
||||
# manipulators/mfile/Makefile
|
||||
# fi
|
||||
|
||||
eapply_user
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
DISABLE_GEOIP=1 emake -j1
|
||||
}
|
||||
|
||||
src_install() {
|
||||
webapp_src_preinst
|
||||
# mv xi "${D}"/${MY_HTDOCSDIR}/xplico
|
||||
DESTDIR="${D}" emake -j1 install
|
||||
webapp_src_install
|
||||
}
|
||||
1
net-libs/nDPI/Manifest
Normal file
1
net-libs/nDPI/Manifest
Normal file
|
|
@ -0,0 +1 @@
|
|||
DIST nDPI-2.8.tar.gz 19754226 BLAKE2B c112ae2d9fff872f116a23bbffe7bca39a5c876346b4e41ef503934301f39413517fce169a37a766ffae16b0cb1ee81d96573ffa1ee2519d295dfb32cc1f115e SHA512 aae757047810bbc32700ecf7ac2e5df4b93528021a50da4a0b83865a5248dfca8b1643c75aa7eeb6eac4f155638d45666db487318b2be9adb2f3412cb8ec8497
|
||||
32
net-libs/nDPI/files/nDPI-2.8-libcache-include.patch
Normal file
32
net-libs/nDPI/files/nDPI-2.8-libcache-include.patch
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
--- a/src/include/Makefile.am
|
||||
+++ b/src/include/Makefile.am
|
||||
@@ -7,4 +7,5 @@
|
||||
ndpi_protocol_ids.h \
|
||||
ndpi_protocols.h \
|
||||
ndpi_win32.h \
|
||||
- ndpi_includes.h
|
||||
+ ndpi_includes.h \
|
||||
+ libcache.h
|
||||
--- a/src/include/ndpi_typedefs.h
|
||||
+++ b/src/include/ndpi_typedefs.h
|
||||
@@ -25,7 +25,7 @@
|
||||
#define __NDPI_TYPEDEFS_H__
|
||||
|
||||
#include "ndpi_define.h"
|
||||
-#include "../lib/third_party/include/libcache.h"
|
||||
+#include "libcache.h"
|
||||
|
||||
#define BT_ANNOUNCE
|
||||
#define SNAP_EXT
|
||||
--- a/src/lib/Makefile.am
|
||||
+++ b/src/lib/Makefile.am
|
||||
@@ -12,7 +12,8 @@
|
||||
../include/ndpi_includes.h \
|
||||
../include/ndpi_protocol_ids.h \
|
||||
../include/ndpi_protocols.h \
|
||||
- ../include/ndpi_typedefs.h
|
||||
+ ../include/ndpi_typedefs.h \
|
||||
+ ../include/libcache.h
|
||||
|
||||
libndpi_la_SOURCES = ndpi_content_match.c.inc \
|
||||
ndpi_main.c \
|
||||
10
net-libs/nDPI/files/nDPI-symlink.patch
Normal file
10
net-libs/nDPI/files/nDPI-symlink.patch
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
--- src/lib/Makefile.in.orig 2018-10-08 16:03:43.859000536 -0600
|
||||
+++ src/lib/Makefile.in 2018-10-08 16:12:43.250000380 -0600
|
||||
@@ -49,6 +49,6 @@
|
||||
install: $(NDPI_LIBS)
|
||||
mkdir -p $(DESTDIR)$(libdir)
|
||||
cp $(NDPI_LIBS) $(DESTDIR)$(libdir)/
|
||||
- ln -Fs $(DESTDIR)$(libdir)/$(NDPI_LIB_SHARED) $(DESTDIR)$(libdir)/$(NDPI_LIB_SHARED_BASE)
|
||||
+ ln -Fs $(NDPI_LIB_SHARED) $(DESTDIR)$(libdir)/$(NDPI_LIB_SHARED_BASE)
|
||||
mkdir -p $(DESTDIR)$(includedir)
|
||||
cp ../include/*.h $(DESTDIR)$(includedir)
|
||||
10
net-libs/nDPI/metadata.xml
Normal file
10
net-libs/nDPI/metadata.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>slis@gentoo.org</email>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<remote-id type="github">ntop/nDPI</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
42
net-libs/nDPI/nDPI-2.8.ebuild
Normal file
42
net-libs/nDPI/nDPI-2.8.ebuild
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
inherit autotools eutils multilib versionator
|
||||
|
||||
DESCRIPTION="Open Source Deep Packet Inspection Software Toolkit"
|
||||
HOMEPAGE="https://www.ntop.org/"
|
||||
SRC_URI="https://github.com/ntop/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="static-libs"
|
||||
|
||||
DEPEND="dev-libs/json-c:=
|
||||
net-libs/libpcap"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
src_prepare() {
|
||||
sed -e "s/@NDPI_MAJOR@/$(get_version_component_range 1)/g;s/@NDPI_MINOR@/$(get_version_component_range 2)/g;s/@NDPI_PATCH@/$(get_version_component_range 3)/g;s/@NDPI_VERSION_SHORT@/${PV}/g" < "${S}/configure.seed" > "${S}/configure.ac" || die
|
||||
|
||||
sed -e "s/\${prefix}\/lib/\${prefix}\/$(get_libdir)/g" -i src/lib/Makefile.in || die
|
||||
|
||||
sed -e "s|\$(DESTDIR)\$(libdir)\/\$(NDPI_LIB_SHARED)|\$(NDPI_LIB_SHARED)|g" -i src/lib/Makefile.in || die
|
||||
|
||||
sed -e "s/libdata/$(get_libdir)/g" -i Makefile.am || die
|
||||
|
||||
cp "${S}/src/lib/third_party/include/libcache.h" "${S}/src/include"
|
||||
|
||||
|
||||
default
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
if ! use static-libs; then
|
||||
rm "${D}"/usr/$(get_libdir)/lib${PN,,}.a || die
|
||||
fi
|
||||
prune_libtool_files
|
||||
}
|
||||
|
|
@ -20,7 +20,7 @@ net-libs/libhackrf
|
|||
net-libs/cppzmq
|
||||
|
||||
#xplico, ntopnp
|
||||
~net-libs/nDPI-2.0
|
||||
~net-libs/nDPI-2.8
|
||||
|
||||
#requried by zarp
|
||||
~net-libs/nfqueue-bindings-0.5
|
||||
|
|
|
|||
Loading…
Reference in a new issue