Index: npl/internetserver/ntop/no_zc.patch
===================================================================
--- npl/internetserver/ntop/no_zc.patch	(revision cc2b9e22de2d5831ab7a56730412e73e7ed9123a)
+++ npl/internetserver/ntop/no_zc.patch	(revision cc2b9e22de2d5831ab7a56730412e73e7ed9123a)
@@ -0,0 +1,226 @@
+diff -r -u ntopng-dev/include/ntop_includes.h ntopng-dev.new/include/ntop_includes.h
+--- ntopng-dev/include/ntop_includes.h	2017-04-24 14:19:03.000000000 +0000
++++ ntopng-dev.new/include/ntop_includes.h	2017-04-25 10:48:47.000000000 +0000
+@@ -106,7 +106,6 @@
+ #include "lualib.h"
+ #ifdef HAVE_PF_RING
+ #include "pfring.h"
+-#include "pfring_zc.h"
+ #endif
+ #ifdef HAVE_NETFILTER
+ #include <linux/types.h>
+@@ -234,7 +233,6 @@
+ #endif
+ #include "ParserInterface.h"
+ #include "CollectorInterface.h"
+-#include "ZCCollectorInterface.h"
+ #include "DummyInterface.h"
+ #include "ExportInterface.h"
+ #include "Geolocation.h"
+diff -r -u ntopng-dev/src/ZCCollectorInterface.cpp ntopng-dev.new/src/ZCCollectorInterface.cpp
+--- ntopng-dev/src/ZCCollectorInterface.cpp	2017-04-24 14:19:03.000000000 +0000
++++ ntopng-dev.new/src/ZCCollectorInterface.cpp	2017-04-25 10:45:24.000000000 +0000
+@@ -1,176 +0,0 @@
+-/*
+- *
+- * (C) 2016-17 - ntop.org
+- *
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 3 of the License, or
+- * (at your option) any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software Foundation,
+- * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+- *
+- */
+-
+-#include "ntop_includes.h"
+-
+-#if defined(HAVE_PF_RING) && (!defined(__mips)) && (!defined(__arm__)) && (!defined(__i686__))
+-
+-/* **************************************************** */
+-
+-ZCCollectorInterface::ZCCollectorInterface(const char *name) : ParserInterface(name) {
+-  char ifname[32];
+-  char *at;
+-
+-  cluster_id = queue_id = 0;
+-
+-  snprintf(ifname, sizeof(ifname), "%s", &name[7]);
+-
+-  at = strchr(ifname, '@');
+-
+-  if(at != NULL) {
+-    queue_id = atoi(&at[1]);
+-    at[0] = '\0';
+-  }
+-
+-  cluster_id = atoi(ifname);
+-
+-  zq = pfring_zc_ipc_attach_queue(cluster_id, queue_id, rx_only);
+-
+-  if(zq == NULL)
+-    throw("pfring_zc_ipc_attach_queue error");
+-
+-  zp = pfring_zc_ipc_attach_buffer_pool(cluster_id, queue_id);
+-
+-  if(zp == NULL)
+-    throw("pfring_zc_ipc_attach_buffer_pool error");
+-
+-  buffer = pfring_zc_get_packet_handle_from_pool(zp);
+-
+-  if(buffer == NULL)
+-    throw("pfring_zc_get_packet_handle_from_pool error");
+-
+-  memset(&last_pfring_zc_stat, 0, sizeof(last_pfring_zc_stat));
+-}
+-
+-/* **************************************************** */
+-
+-ZCCollectorInterface::~ZCCollectorInterface() {
+-  pfring_zc_sync_queue(zq, rx_only);
+-  pfring_zc_release_packet_handle_to_pool(zp, buffer);
+-  pfring_zc_ipc_detach_queue(zq);
+-  pfring_zc_ipc_detach_buffer_pool(zp);
+-}
+-
+-/* **************************************************** */
+-
+-void ZCCollectorInterface::collect_flows() {
+-  int rc;
+-
+-  ntop->getTrace()->traceEvent(TRACE_NORMAL, "Collecting flows from ZC queue %u@%u", cluster_id, queue_id);
+-
+-  while(isRunning()) {
+-    while(idle()) {
+-      purgeIdle(time(NULL));
+-      sleep(1);
+-      if(ntop->getGlobals()->isShutdown()) return;
+-    }
+-
+-    rc = pfring_zc_recv_pkt(zq, &buffer, 0 /* wait_for_packet */);
+-
+-    if(rc > 0) {
+-      u_char *json = pfring_zc_pkt_buff_data(buffer, zq);
+-      const char *master = "{ \"if.name\"";
+-      
+-      ntop->getTrace()->traceEvent(TRACE_INFO, "%s", json);
+-      // fprintf(stdout, "+"); fflush(stdout);
+-
+-      if(strncmp((char*)json, master, strlen(master)) == 0) {
+-	parseEvent((char*)json, buffer->len, 0, (void*)this);
+-      } else
+-	parseFlow((char*)json, buffer->len, 0, (void*)this);
+-      // fprintf(stdout, "."); fflush(stdout);
+-    } else if(rc == 0) {
+-      usleep(1);
+-      purgeIdle(time(NULL));
+-      // fprintf(stdout, "*"); fflush(stdout);
+-    } else {
+-      /* rc < 0 */
+-      break;
+-    }
+-  }
+-
+-  ntop->getTrace()->traceEvent(TRACE_NORMAL, "ZC Flow collection is over.");
+-
+-  pfring_zc_sync_queue(zq, rx_only);
+-}
+-
+-/* **************************************************** */
+-
+-static void *packetPollLoop(void *ptr) {
+-  ZCCollectorInterface *iface = (ZCCollectorInterface *) ptr;
+-
+-  /* Wait until the initialization completes */
+-  while(!iface->isRunning()) sleep(1);
+-
+-  iface->collect_flows();
+-  return(NULL);
+-}
+-
+-/* **************************************************** */
+-
+-void ZCCollectorInterface::startPacketPolling() {
+-  pthread_create(&pollLoop, NULL, packetPollLoop, (void *) this);
+-  pollLoopCreated = true;
+-  NetworkInterface::startPacketPolling();
+-}
+-
+-/* **************************************************** */
+-
+-void ZCCollectorInterface::shutdown() {
+-  if(running) {
+-    void *res;
+-
+-    NetworkInterface::shutdown();
+-    pfring_zc_queue_breakloop(zq);
+-    pthread_join(pollLoop, &res);
+-  }
+-}
+-
+-/* **************************************************** */
+-
+-bool ZCCollectorInterface::set_packet_filter(char *filter) {
+-  ntop->getTrace()->traceEvent(TRACE_ERROR,
+-			       "No filter can be set on a collector interface. Ignored %s", filter);
+-  return(false);
+-}
+-
+-/* **************************************************** */
+-
+-u_int32_t ZCCollectorInterface::getNumDroppedPackets() {
+-  pfring_zc_stat stats;
+-
+-  if(pfring_zc_stats(zq, &stats) >= 0) {
+-#if 0
+-    ntop->getTrace()->traceEvent(TRACE_NORMAL, "[%s][Sent: %llu]"
+-				 "[Rcvd: %llu][Drops: %llu][QueueLen: %d]",
+-				 ifname, stats.sent, stats.recv, stats.drop,
+-				 stats.sent-stats.recv);
+-#endif
+-    return(stats.drop);
+-  }
+-
+-  return 0;
+-}
+-
+-/* **************************************************** */
+-
+-#endif
+-
+diff -r -u ntopng-dev/src/main.cpp ntopng-dev.new/src/main.cpp
+--- ntopng-dev/src/main.cpp	2017-04-24 14:19:03.000000000 +0000
++++ ntopng-dev.new/src/main.cpp	2017-04-25 10:45:24.000000000 +0000
+@@ -161,10 +161,6 @@
+ 	  endpoint = ifName;
+ 
+ 	iface = new CollectorInterface(endpoint);
+-#if defined(HAVE_PF_RING) && (!defined(__mips)) && (!defined(__arm__)) && (!defined(__i686__))
+-      } else if(strstr(ifName, "zcflow:")) {
+-	iface = new ZCCollectorInterface(ifName);
+-#endif
+       } else {
+ 	iface = NULL;
+ 
+diff -r -u ntopng-dev/third-party/json-c/config.h.in ntopng-dev.new/third-party/json-c/config.h.in
+--- ntopng-dev/third-party/json-c/config.h.in	2017-04-24 14:19:03.000000000 +0000
++++ ntopng-dev.new/third-party/json-c/config.h.in	2017-04-25 10:46:33.000000000 +0000
+@@ -104,8 +104,7 @@
+ /* Public define for json_inttypes.h */
+ #undef JSON_C_HAVE_INTTYPES_H
+ 
+-/* Define to the sub-directory in which libtool stores uninstalled libraries.
+-   */
++/* Define to the sub-directory where libtool stores uninstalled libraries. */
+ #undef LT_OBJDIR
+ 
+ /* Name of package */
Index: npl/internetserver/ntop/ntop.SlackBuild
===================================================================
--- npl/internetserver/ntop/ntop.SlackBuild	(revision cc2b9e22de2d5831ab7a56730412e73e7ed9123a)
+++ npl/internetserver/ntop/ntop.SlackBuild	(revision cc2b9e22de2d5831ab7a56730412e73e7ed9123a)
@@ -0,0 +1,109 @@
+#!/bin/bash
+
+#NEED:git
+##DEP:ndpi
+#DEP:libpcap
+#DEP:sqlite
+#DEP:mysql56
+#DEP:glib2
+#DEP:libxml2
+#DEP:rrdtool
+#NEED:groff
+#DEP:zlib
+#DEP:curl
+##DEP:drv_pf_ring
+
+#######Essential package info.
+#Change these if autodetection fails.
+
+#Name of the Syn-3 package that we are going to create
+NAME=`basename $0|sed 's/.SlackBuild//'`
+
+#git clone http://github.com/ntop/ntopng.git || exit 1
+
+
+#Archive of the sourcefiles to unpack 
+#SRC_ARC=`ls *.tar.* *.zip 2>/dev/null`
+SRC_ARC=ntopng-dev.zip
+
+#Version of the sourcefiles
+VER=`echo $SRC_ARC| sed 's/.*-//g' | sed 's/\.tar\..*$//g' | sed 's/\.zip$//g'`
+#VER=`cd ntopng; git describe --tags|sed 's/-/_/g'`
+
+#Architecture that the created binaries run on.
+#Use noarch for scripts.
+ARCH=`uname -m`
+
+#from this point on, exit on errors:
+set -e
+
+########Build and create the pacakge.
+#Uncomment the stuff that you dont want or need
+
+#Unpack source 
+#(uncomment if not needed)
+syn3_unpack $SRC_ARC 
+
+#Directory where the sourcefiles are unpacked. 
+#(you might have to adjust this if autodetection fails)
+SRC_DIR=`ls -c|head -1`
+#SRC_DIR=ntopng
+
+#apply patches
+#patch -p1 -d $SRC_DIR < no_zc.patch || exit 1
+
+pushd $SRC_DIR 
+
+#AUTOMAKE: Configure
+#Some usefull stuff you sometimes need to set:
+#export LDFLAGS="-L/usr/X11/lib/ -L/usr/lib/mysql/"
+#export LD_LIBRARY_PATH=/usr/lib/mysql
+#export VPATH=$LD_LIBRARY_PATH
+#export CFLAGS="-std=c89"
+#export CFLAGS="-fgnu89-inline" #If "multiple definition of `foo'" Also see http://gcc.gnu.org/gcc-4.3/porting_to.html
+
+#get ndpi sources
+pushd ..
+#git clone http://github.com/ntop/nDPI.git 
+unzip nDPI-dev.zip 
+mv nDPI-dev nDPI
+#git clone -b 1.8 https://github.com/ntop/nDPI.git 
+cd nDPI
+./autogen.sh
+make $MAKE_OPTS
+popd
+
+
+MAKE_OPTS=""
+./autogen.sh
+./configure --prefix=/usr  || exit 1
+
+#AUTOMAKE: Compile
+make $MAKE_OPTS || exit 1
+
+#AUTOMAKE: Test (optional)
+if grep ^test: Makefile; then
+	make pkgconfigdir=/usr/lib/pkgconfig $MAKE_OPTS install || exit 1
+	make $MAKE_OPTS test || exit 1
+elif grep ^check: Makefile; then
+	make pkgconfigdir=/usr/lib/pkgconfig $MAKE_OPTS install || exit 1
+	make $MAKE_OPTS check || exit 1 
+fi
+
+#AUTOMAKE: Install
+mkdir -p /tmp/pkg &>/dev/null
+make pkgconfigdir=/usr/lib/pkgconfig install_prefix=/tmp/pkg DESTDIR=/tmp/pkg INSTALL_ROOT=/tmp/pkg install_root=/tmp/pkg $MAKE_OPTS install || exit 1
+popd
+
+#strip bins and other stuff
+syn3_strip /tmp/pkg || exit 1
+
+#move development stuff and create seperate development package
+syn3_move_dev /tmp/pkg /tmp/pkgdev || exit 1
+syn3_makepkg /tmp/pkgdev $NAME""_dev $VER $ARCH || exit 1
+
+#make main package
+syn3_makepkg /tmp/pkg $NAME $VER $ARCH || exit 1
+
+
+
Index: npl/internetserver/ntop/ntop.arch
===================================================================
--- npl/internetserver/ntop/ntop.arch	(revision cc2b9e22de2d5831ab7a56730412e73e7ed9123a)
+++ npl/internetserver/ntop/ntop.arch	(revision cc2b9e22de2d5831ab7a56730412e73e7ed9123a)
@@ -0,0 +1,1 @@
+i686
Index: npl/internetserver/ntop/ntop.build
===================================================================
--- npl/internetserver/ntop/ntop.build	(revision cc2b9e22de2d5831ab7a56730412e73e7ed9123a)
+++ npl/internetserver/ntop/ntop.build	(revision cc2b9e22de2d5831ab7a56730412e73e7ed9123a)
@@ -0,0 +1,1 @@
+5
Index: npl/internetserver/ntop/ntop.depver
===================================================================
--- npl/internetserver/ntop/ntop.depver	(revision cc2b9e22de2d5831ab7a56730412e73e7ed9123a)
+++ npl/internetserver/ntop/ntop.depver	(revision cc2b9e22de2d5831ab7a56730412e73e7ed9123a)
@@ -0,0 +1,8 @@
+libpcap	0107
+sqlite	2
+mysql56	1
+glib2	2
+libxml2	1
+rrdtool	0
+zlib	0
+curl	1
Index: npl/internetserver/ntop/ntop.md5
===================================================================
--- npl/internetserver/ntop/ntop.md5	(revision cc2b9e22de2d5831ab7a56730412e73e7ed9123a)
+++ npl/internetserver/ntop/ntop.md5	(revision cc2b9e22de2d5831ab7a56730412e73e7ed9123a)
@@ -0,0 +1,6 @@
+cdae3046a4f1750a8b94f1c5f8c0d533  ./nDPI-dev.zip
+1b0a9a81677926e892b364c89715220f  ./no_zc.patch
+124698b38a905aba53020b5a0566657b  ./ntopng-dev.zip
+9f2dc5ab9048d4f2cafb95d9d3df8961  ./ntop.pkg
+a6150b476ea199994fc5c24b5e5f5835  ./ntop.SlackBuild
+7592823fd4b8fefe57b2be2c9871a56f  ./ntop.SlackBuild.log.gz
Index: npl/internetserver/ntop/ntop.version
===================================================================
--- npl/internetserver/ntop/ntop.version	(revision cc2b9e22de2d5831ab7a56730412e73e7ed9123a)
+++ npl/internetserver/ntop/ntop.version	(revision cc2b9e22de2d5831ab7a56730412e73e7ed9123a)
@@ -0,0 +1,1 @@
+dev
