Hi All,
For those that haven't seen my earlier email. I have adapted Luca
Deri's wapPlugin to format output for my compaq iPaq pda (should work
with almost all other pda's). I am attaching pdaPlugin.c and a modified
Makefile.in.
To compile the plugin, simply copy pdaPlugin.c to the ntop/plugins/ in
your ntop source tree and then replace the Makefile.in in the plugins
directory with the one attached here. then run configure and make from
the ntop directory as usual and the plugin will be compiled in (It
worked with the April 1 snapshot just fine).
I would really like some feedback from anyone who gives it a try as to
how well it works and any other suggestions or comments anyone may have.
Thanks and Good Luck!
Wally
/*
* This PDA Plugin was adapted by Walter Brock <[EMAIL PROTECTED]> from
* Luca Deri's original WAP Plugin, March 14, 2002
*
* Copyright (C) 2001 Luca Deri <[EMAIL PROTECTED]>
*
* http://www.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 2 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.h"
#include "globals-report.h"
#ifndef MICRO_NTOP
static int pdaColumnSort = 0;
/* ****************************** */
void printPDAHTMLheader(void) {
sendHTTPHeader(HTTP_TYPE_NONE, HTTP_FLAG_NO_CACHE_CONTROL | HTTP_FLAG_MORE_FIELDS);
sendString("Content-Type: text/html;charset=UTF-8\n\n");
}
/* ********************** */
static void printHtmlNotFoundError(void) {
}
/* ********************** */
static void printHtmlNoDataYet(void) {
}
/* ********************** */
static int cmpPdaFctn(const void *_a, const void *_b) {
HostTraffic **a = (HostTraffic **)_a;
HostTraffic **b = (HostTraffic **)_b;
TrafficCounter a_, b_;
if((a == NULL) && (b != NULL)) {
traceEvent(TRACE_WARNING, "WARNING (1)\n");
return(1);
} else if((a != NULL) && (b == NULL)) {
traceEvent(TRACE_WARNING, "WARNING (2)\n");
return(-1);
} else if((a == NULL) && (b == NULL)) {
traceEvent(TRACE_WARNING, "WARNING (3)\n");
return(0);
}
if(pdaColumnSort == 0) {
/* Data Sent */
a_ = (*a)->bytesSent;
b_ = (*b)->bytesSent;
} else {
/* Data Rcvd */
a_ = (*a)->bytesRcvd;
b_ = (*b)->bytesRcvd;
}
if(a_ < b_)
return(1);
else if (a_ > b_)
return(-1);
else
return(0);
}
/* ********************** */
static void printHtmlIndex(void) {
int i;
char linkName[256];
int diff;
/* int deviceId, actualDeviceId; */
int actualDeviceId;
u_int idx, numEntries=0;
HostTraffic *el;
HostTraffic* tmpTable[HASHNAMESIZE];
char *tmpName, buf[BUF_SIZE];
TrafficCounter unicastPkts=0;
/* #ifdef WIN32
deviceId = 0;
#else
deviceId = (int)_deviceId;
#endif
actualDeviceId = getActualInterface(deviceId); */
printPDAHTMLheader();
for(idx=1; idx<myGlobals.device[actualDeviceId].actualHashSize; idx++)
if(((el = myGlobals.device[actualDeviceId].hash_hostTraffic[idx]) != NULL)
&& (!broadcastHost(el)))
tmpTable[numEntries++]=el;
if(numEntries == 0) {
printHtmlNoDataYet();
return;
}
sendString("<html>\n");
sendString("<head>\n");
sendString("<title>ntop for PDAa</title>\n");
sendString("<meta http-equiv=REFRESH content=\"240\">\n");
sendString("</head>\n");
sendString("<body>\n");
sendString("   <B>ntop for PDAs</B>\n");
sendString(" <BR><BR>\n");
sendString(" <table columns=\"1\" align=\"left\">\n");
sendString(" <TR><TD>\n");
sendString(" <table columns=\"2\" align=\"left\">\n");
sendString(" <tr><td><b><u>Top Sending
Hosts</b></u></td><td><b><u>Total</u></b></td></tr>\n");
/* Data Sent */
pdaColumnSort = 0;
quicksort(tmpTable, numEntries, sizeof(HostTraffic*), cmpPdaFctn);
for(idx=0; idx<numEntries; idx++) {
if(idx == 5) break;
el = tmpTable[idx];
tmpName = getHostName(el, 0);
tmpName = el->hostNumIpAddress;
strncpy(linkName, el->hostNumIpAddress, sizeof(linkName));
if((strcmp(tmpName, "0.0.0.0") == 0) || (tmpName[0] == '\0')){
tmpName = el->ethAddressString;
strncpy(linkName, el->ethAddressString, sizeof(linkName));
for(i=0; linkName[i] != '\0'; i++)
if(linkName[i] == ':')
linkName[i] = '_';
}
if(snprintf(buf, sizeof(buf),
"<tr><td><a href=\"/%s.html\">%s</a></td>"
"<td>%s</td></tr>\n",
linkName, tmpName,
formatBytes(el->bytesSent, 1)) < 0)
traceEvent(TRACE_ERROR, "Buffer overflow!");
sendString(buf);
}
sendString("</table>\n");
sendString("<BR><BR>\n");
sendString("</TR></TD>\n");
sendString(" <TR><TD>\n");
sendString(" <table columns=\"2\" align=\"left\">\n");
sendString(" <tr><td><b><u>Top Receiving
Hosts</u></b></td><td><b><u>Total</u></b></td></tr>\n");
/* Data Rcvd */
pdaColumnSort = 1;
quicksort(tmpTable, numEntries, sizeof(HostTraffic*), cmpFctn);
for(idx=0; idx<numEntries; idx++) {
if(idx == 5) break;
el = tmpTable[idx];
tmpName = getHostName(el, 0);
tmpName = el->hostNumIpAddress;
strncpy(linkName, el->hostNumIpAddress, sizeof(linkName));
if((strcmp(tmpName, "0.0.0.0") == 0) || (tmpName[0] == '\0')){
tmpName = el->ethAddressString;
strncpy(linkName, el->ethAddressString, sizeof(linkName));
for(i=0; linkName[i] != '\0'; i++)
if(linkName[i] == ':')
linkName[i] = '_';
}
if(snprintf(buf, sizeof(buf),
"<tr><td><a href=\"/%s.html\">%s</a></td>"
"<td>%s</td></tr>\n",
linkName, tmpName,
formatBytes(el->bytesRcvd, 1)) < 0)
traceEvent(TRACE_ERROR, "Buffer overflow!");
sendString(buf);
}
sendString("</table>\n");
sendString("<BR><BR>\n");
/* ************************* */
sendString(" </TR></TD>\n");
sendString(" <TR><TD>\n");
sendString(" <table columns=\"2\" align=\"left\">\n");
sendString(" <tr><td><B><U>Stats</U></B></td><td><B><U>Total</U></B></td></tr>\n");
/** **/
if(snprintf(buf, sizeof(buf),"<tr><td>Sampling Time</td>"
"<td>%s</td></tr>\n",
formatSeconds(myGlobals.actTime-myGlobals.initialSniffTime)) < 0)
traceEvent(TRACE_ERROR, "Buffer overflow!");
sendString(buf);
/** **/
diff = (int)(myGlobals.device[actualDeviceId].ethernetPkts -
myGlobals.device[actualDeviceId].broadcastPkts -
myGlobals.device[actualDeviceId].multicastPkts);
if(diff > 0)
unicastPkts = 0; /* It shouldn't happen */
else
unicastPkts = (TrafficCounter)diff;
if(myGlobals.device[actualDeviceId].ethernetPkts <= 0)
myGlobals.device[actualDeviceId].ethernetPkts = 1;
if(snprintf(buf, sizeof(buf),"<tr><td>Total</td><td>%s</td></tr>\n",
formatPkts(myGlobals.device[actualDeviceId].ethernetPkts)) < 0)
traceEvent(TRACE_ERROR, "Buffer overflow!");
sendString(buf);
if(snprintf(buf, sizeof(buf),"<tr><td>Unicast</td>"
"<td>%s [%.1f%%]</td></tr>\n",
formatPkts(unicastPkts),
(float)(100*unicastPkts)/(float)myGlobals.device[actualDeviceId].ethernetPkts) <
0)
traceEvent(TRACE_ERROR, "Buffer overflow!");
sendString(buf);
if(snprintf(buf, sizeof(buf),"<tr><td>Broadcast</td>"
"<td>%s [%.1f%%]</td></tr>\n",
formatPkts(myGlobals.device[actualDeviceId].broadcastPkts),
(float)(100*myGlobals.device[actualDeviceId].broadcastPkts)
/(float)myGlobals.device[actualDeviceId].ethernetPkts) < 0)
traceEvent(TRACE_ERROR, "Buffer overflow!");
sendString(buf);
if(myGlobals.device[actualDeviceId].multicastPkts > 0) {
if(snprintf(buf, sizeof(buf),"<tr><td>Multicast</td>"
"<td>%s [%.1f%%]</td></tr>\n",
formatPkts(myGlobals.device[actualDeviceId].multicastPkts),
(float)(100*myGlobals.device[actualDeviceId].multicastPkts)
/(float)myGlobals.device[actualDeviceId].ethernetPkts) < 0)
traceEvent(TRACE_ERROR, "Buffer overflow!");
sendString(buf);
}
/** **/
sendString("</table>\n");
sendString("</TR></TD>\n");
sendString("</table>\n");
/* ************************* */
sendString("</body>\n");
sendString("</html>\n");
}
/* ********************** */
static void printHtmlHostInfo(char *host _UNUSED_) {
}
/* ********************** */
static void handlePDArequest(char* url) {
if((url == NULL)
|| (url[0] == 0)
|| (strncmp(url, "index.html",
strlen("index.html")) == 0)) {
printHtmlIndex();
} else if(strncmp(url, "host.html", strlen("host.html")) == 0)
printHtmlHostInfo(&url[strlen("host.html")+1]);
else
printHtmlNotFoundError();
}
/* ****************************** */
static void termPdaFunct(void) {
traceEvent(TRACE_INFO, "Thanks for using PDAWatch...\n");
traceEvent(TRACE_INFO, "Done.\n");
}
#endif /* MICRO_NTOP */
/* ****************************** */
static PluginInfo PDAPluginInfo[] = {
{ "PDAPlugin",
"ntop PDA Interface",
"1.0", /* version */
"<A HREF=mailto:[EMAIL PROTECTED]>Walter Brock</A>",
"PDAPlugin", /* http://<host>:<port>/plugins/PDAPlugin */
0, /* Not Active */
NULL, /* no special startup after init */
termPdaFunct, /* TermFunc */
NULL, /* PluginFunc */
handlePDArequest,
NULL /* BPF Filter */
}
};
/* Plugin entry fctn */
#ifdef STATIC_PLUGIN
PluginInfo* wapPluginEntryFctn(void) {
#else
PluginInfo* PluginEntryFctn(void) {
#endif
traceEvent(TRACE_INFO, "Welcome to %s. (C) 2000 by Luca Deri.\n",
PDAPluginInfo->pluginName);
return(PDAPluginInfo);
}
# Makefile.in generated automatically by automake 1.4 from Makefile.am
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
#
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# auto makefile for the ntop plugins.
# (this file is processed with 'automake' to produce Makefile.in)
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
#
# Luca Deri <[EMAIL PROTECTED]>
# Rocco Carbone <[EMAIL PROTECTED]>
#
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
#
# 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 2 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.
#
SHELL = @SHELL@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
DESTDIR =
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_alias = @build_alias@
build_triplet = @build@
host_alias = @host_alias@
host_triplet = @host@
target_alias = @target_alias@
target_triplet = @target@
AS = @AS@
CC = @CC@
CCLD = @CCLD@
CFLAGS = @CFLAGS@
CONFIGFILE_DIR = @CONFIGFILE_DIR@
CORELIBS = @CORELIBS@
CPP = @CPP@
DATAFILE_DIR = @DATAFILE_DIR@
DBFILE_DIR = @DBFILE_DIR@
DLLTOOL = @DLLTOOL@
DYN_FLAGS = @DYN_FLAGS@
INCS = @INCS@
INTOP = @INTOP@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBCURSES = @LIBCURSES@
LIBREADLINE = @LIBREADLINE@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
MAKEINFO = @MAKEINFO@
MORELIBS = @MORELIBS@
MOREOBJECTS = @MOREOBJECTS@
MORESOURCES = @MORESOURCES@
NM = @NM@
NTOP_RELEASE = @NTOP_RELEASE@
NTOP_VERSION_INFO = @NTOP_VERSION_INFO@
OBJDUMP = @OBJDUMP@
PACKAGE = @PACKAGE@
PLUGINS = @PLUGINS@
PLUGIN_DIR = @PLUGIN_DIR@
RANLIB = @RANLIB@
RUN_DIR = @RUN_DIR@
SNMPLIBS = @SNMPLIBS@
SO_VERSION_PATCH = @SO_VERSION_PATCH@
VERSION = @VERSION@
SUBDIRS = . #pep
DIST_COMMON = Makefile.am Makefile.in
CLEANFILES =
EXTRA_DIST =
SUFFIXES = .so
#
# Where to install the plugin
#
plugindir = $(libdir)/ntop/plugins
INCLUDES = -I.. @INCS@
#
# The meat for ntop
#
noinst_PROGRAMS = icmpPlugin.so lastSeenPlugin.so netflowPlugin.so
nfsPlugin.so sflowPlugin.so pdaPlugin.so
# rrdPlugin.so
# rmonPlugin.so wapPlugin.so
lib_LTLIBRARIES = libicmpPlugin.la liblastSeenPlugin.la
libnetflowPlugin.la libnfsPlugin.la libsflowPlugin.la libpdaPlugin.la
# librrdPlugin.la
# librmonPlugin.la libwapPlugin.la
libicmpPlugin_la_SOURCES = icmpPlugin.c
libicmpPlugin_la_LDFLAGS = -shared -version-info @NTOP_VERSION_INFO@ @DYN_FLAGS@
#librrdPlugin_la_SOURCES = rrdPlugin.c
#librrdPlugin_la_LDFLAGS = -shared -version-info @NTOP_VERSION_INFO@ @DYN_FLAGS@
libsflowPlugin_la_SOURCES = sflowPlugin.c
libsflowPlugin_la_LDFLAGS = -shared -version-info @NTOP_VERSION_INFO@ @DYN_FLAGS@
liblastSeenPlugin_la_SOURCES = lastSeenPlugin.c
liblastSeenPlugin_la_LDFLAGS = -shared -version-info @NTOP_VERSION_INFO@ @DYN_FLAGS@
libnetflowPlugin_la_SOURCES = netflowPlugin.c
libnetflowPlugin_la_LDFLAGS = -shared -version-info @NTOP_VERSION_INFO@ @DYN_FLAGS@
libpdaPlugin_la_SOURCES = pdaPlugin.c
libpdaPlugin_la_LDFLAGS = -shared -version-info @NTOP_VERSION_INFO@ @DYN_FLAGS@
libnfsPlugin_la_SOURCES = nfsPlugin.c
libnfsPlugin_la_LDFLAGS = -shared -version-info @NTOP_VERSION_INFO@ @DYN_FLAGS@
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../config.h
CONFIG_CLEAN_FILES =
LTLIBRARIES = $(lib_LTLIBRARIES)
DEFS = @DEFS@ -I. -I$(srcdir) -I..
CPPFLAGS = @CPPFLAGS@
libicmpPlugin_la_LIBADD =
libicmpPlugin_la_OBJECTS = icmpPlugin.lo
liblastSeenPlugin_la_LIBADD =
liblastSeenPlugin_la_OBJECTS = lastSeenPlugin.lo
libnetflowPlugin_la_LIBADD =
libnetflowPlugin_la_OBJECTS = netflowPlugin.lo
libnfsPlugin_la_LIBADD =
libnfsPlugin_la_OBJECTS = nfsPlugin.lo
libpdaPlugin_la_LIBADD =
libpdaPlugin_la_OBJECTS = pdaPlugin.lo
libsflowPlugin_la_LIBADD =
libsflowPlugin_la_OBJECTS = sflowPlugin.lo
PROGRAMS = $(noinst_PROGRAMS)
icmpPlugin_so_SOURCES = icmpPlugin.so.c
icmpPlugin_so_OBJECTS = icmpPlugin.so.o
icmpPlugin_so_LDADD = $(LDADD)
icmpPlugin_so_DEPENDENCIES =
icmpPlugin_so_LDFLAGS =
lastSeenPlugin_so_SOURCES = lastSeenPlugin.so.c
lastSeenPlugin_so_OBJECTS = lastSeenPlugin.so.o
lastSeenPlugin_so_LDADD = $(LDADD)
lastSeenPlugin_so_DEPENDENCIES =
lastSeenPlugin_so_LDFLAGS =
netflowPlugin_so_SOURCES = netflowPlugin.so.c
netflowPlugin_so_OBJECTS = netflowPlugin.so.o
netflowPlugin_so_LDADD = $(LDADD)
netflowPlugin_so_DEPENDENCIES =
netflowPlugin_so_LDFLAGS =
nfsPlugin_so_SOURCES = nfsPlugin.so.c
nfsPlugin_so_OBJECTS = nfsPlugin.so.o
nfsPlugin_so_LDADD = $(LDADD)
nfsPlugin_so_DEPENDENCIES =
nfsPlugin_so_LDFLAGS =
pdaPlugin_so_SOURCES = pdaPlugin.so.c
pdaPlugin_so_OBJECTS = pdaPlugin.so.o
pdaPlugin_so_LDADD = $(LDADD)
pdaPlugin_so_DEPENDENCIES =
pdaPlugin_so_LDFLAGS =
sflowPlugin_so_SOURCES = sflowPlugin.so.c
sflowPlugin_so_OBJECTS = sflowPlugin.so.o
sflowPlugin_so_LDADD = $(LDADD)
sflowPlugin_so_DEPENDENCIES =
sflowPlugin_so_LDFLAGS =
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS)
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
GZIP_ENV = --best
DEP_FILES = .deps/icmpPlugin.P .deps/icmpPlugin.so.P \
.deps/lastSeenPlugin.P .deps/lastSeenPlugin.so.P .deps/netflowPlugin.P \
.deps/netflowPlugin.so.P .deps/nfsPlugin.P .deps/nfsPlugin.so.P \
.deps/sflowPlugin.P .deps/sflowPlugin.so.P .deps/pdaPlugin.P .deps/pdaPlugin.so.P
SOURCES = $(libicmpPlugin_la_SOURCES) $(liblastSeenPlugin_la_SOURCES)
$(libnetflowPlugin_la_SOURCES) $(libnfsPlugin_la_SOURCES) $(libsflowPlugin_la_SOURCES)
$(libpdaPlugin_la_SOURCES) icmpPlugin.so.c lastSeenPlugin.so.c netflowPlugin.so.c
nfsPlugin.so.c sflowPlugin.so.c pdaPlugin.so.c
OBJECTS = $(libicmpPlugin_la_OBJECTS) $(liblastSeenPlugin_la_OBJECTS)
$(libnetflowPlugin_la_OBJECTS) $(libnfsPlugin_la_OBJECTS) $(libsflowPlugin_la_OBJECTS)
$(libpdaPlugin_la_OBJECTS) icmpPlugin.so.o lastSeenPlugin.so.o netflowPlugin.so.o
nfsPlugin.so.o sflowPlugin.so.o pdaPlugin.so.o
all: all-redirect
.SUFFIXES:
.SUFFIXES: .S .c .lo .o .s .so
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
mostlyclean-libLTLIBRARIES:
clean-libLTLIBRARIES:
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
distclean-libLTLIBRARIES:
maintainer-clean-libLTLIBRARIES:
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(libdir)
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
if test -f $$p; then \
echo "$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p"; \
$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p; \
else :; fi; \
done
uninstall-libLTLIBRARIES:
@$(NORMAL_UNINSTALL)
list='$(lib_LTLIBRARIES)'; for p in $$list; do \
$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \
done
.s.o:
$(COMPILE) -c $<
.S.o:
$(COMPILE) -c $<
mostlyclean-compile:
-rm -f *.o core *.core
clean-compile:
distclean-compile:
-rm -f *.tab.c
maintainer-clean-compile:
.s.lo:
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
.S.lo:
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
maintainer-clean-libtool:
libicmpPlugin.la: $(libicmpPlugin_la_OBJECTS) $(libicmpPlugin_la_DEPENDENCIES)
$(LINK) -rpath $(libdir) $(libicmpPlugin_la_LDFLAGS) $(libicmpPlugin_la_OBJECTS)
$(libicmpPlugin_la_LIBADD) $(LIBS)
liblastSeenPlugin.la: $(liblastSeenPlugin_la_OBJECTS)
$(liblastSeenPlugin_la_DEPENDENCIES)
$(LINK) -rpath $(libdir) $(liblastSeenPlugin_la_LDFLAGS)
$(liblastSeenPlugin_la_OBJECTS) $(liblastSeenPlugin_la_LIBADD) $(LIBS)
libnetflowPlugin.la: $(libnetflowPlugin_la_OBJECTS) $(libnetflowPlugin_la_DEPENDENCIES)
$(LINK) -rpath $(libdir) $(libnetflowPlugin_la_LDFLAGS)
$(libnetflowPlugin_la_OBJECTS) $(libnetflowPlugin_la_LIBADD) $(LIBS)
libnfsPlugin.la: $(libnfsPlugin_la_OBJECTS) $(libnfsPlugin_la_DEPENDENCIES)
$(LINK) -rpath $(libdir) $(libnfsPlugin_la_LDFLAGS) $(libnfsPlugin_la_OBJECTS)
$(libnfsPlugin_la_LIBADD) $(LIBS)
libpdaPlugin.la: $(libpdaPlugin_la_OBJECTS) $(libpdaPlugin_la_DEPENDENCIES)
$(LINK) -rpath $(libdir) $(libpdaPlugin_la_LDFLAGS) $(libpdaPlugin_la_OBJECTS)
$(libpdaPlugin_la_LIBADD) $(LIBS)
libsflowPlugin.la: $(libsflowPlugin_la_OBJECTS) $(libsflowPlugin_la_DEPENDENCIES)
$(LINK) -rpath $(libdir) $(libsflowPlugin_la_LDFLAGS) $(libsflowPlugin_la_OBJECTS)
$(libsflowPlugin_la_LIBADD) $(LIBS)
mostlyclean-noinstPROGRAMS:
clean-noinstPROGRAMS:
-test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
distclean-noinstPROGRAMS:
maintainer-clean-noinstPROGRAMS:
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
@SET_MAKE@
all-recursive install-data-recursive install-exec-recursive \
installdirs-recursive install-recursive uninstall-recursive \
check-recursive installcheck-recursive info-recursive dvi-recursive:
@set fnord $(MAKEFLAGS); amf=$$2; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
@set fnord $(MAKEFLAGS); amf=$$2; \
dot_seen=no; \
rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
rev="$$subdir $$rev"; \
test "$$subdir" = "." && dot_seen=yes; \
done; \
test "$$dot_seen" = "no" && rev=". $$rev"; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP)
list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \
awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
here=`pwd` && cd $(srcdir) \
&& mkid -f$$here/ID $$unique $(LISP)
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \
awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
mostlyclean-tags:
clean-tags:
distclean-tags:
-rm -f TAGS ID
maintainer-clean-tags:
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
subdir = plugins
distdir: $(DISTFILES)
here=`cd $(top_builddir) && pwd`; \
top_distdir=`cd $(top_distdir) && pwd`; \
distdir=`cd $(distdir) && pwd`; \
cd $(top_srcdir) \
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir)
--output-dir=$$top_distdir --gnu plugins/Makefile
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
cp -pr $$/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file || :; \
fi; \
done
for subdir in $(SUBDIRS); do \
if test "$$subdir" = .; then :; else \
test -d $(distdir)/$$subdir \
|| mkdir $(distdir)/$$subdir \
|| exit 1; \
chmod 777 $(distdir)/$$subdir; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(top_distdir)
distdir=../$(distdir)/$$subdir distdir) \
|| exit 1; \
fi; \
done
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
-include $(DEP_FILES)
mostlyclean-depend:
clean-depend:
distclean-depend:
-rm -rf .deps
maintainer-clean-depend:
%.o: %.c
@echo '$(COMPILE) -c $<'; \
$(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
@-cp .deps/$(*F).pp .deps/$(*F).P; \
tr ' ' '\012' < .deps/$(*F).pp \
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
>> .deps/$(*F).P; \
rm .deps/$(*F).pp
%.lo: %.c
@echo '$(LTCOMPILE) -c $<'; \
$(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
@-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
< .deps/$(*F).pp > .deps/$(*F).P; \
tr ' ' '\012' < .deps/$(*F).pp \
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
>> .deps/$(*F).P; \
rm -f .deps/$(*F).pp
info-am:
info: info-recursive
dvi-am:
dvi: dvi-recursive
check-am: all-am
check: check-recursive
installcheck-am:
installcheck: installcheck-recursive
install-exec-am: install-libLTLIBRARIES
install-exec: install-exec-recursive
install-data-am: install-data-local
install-data: install-data-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-recursive
uninstall-am: uninstall-libLTLIBRARIES
uninstall: uninstall-recursive
all-am: Makefile $(LTLIBRARIES) $(PROGRAMS)
all-redirect: all-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
installdirs: installdirs-recursive
installdirs-am:
$(mkinstalldirs) $(DESTDIR)$(libdir)
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic:
mostlyclean-am: mostlyclean-libLTLIBRARIES mostlyclean-compile \
mostlyclean-libtool mostlyclean-noinstPROGRAMS \
mostlyclean-tags mostlyclean-depend mostlyclean-generic
mostlyclean: mostlyclean-recursive
clean-am: clean-libLTLIBRARIES clean-compile clean-libtool \
clean-noinstPROGRAMS clean-tags clean-depend \
clean-generic mostlyclean-am
clean: clean-recursive
distclean-am: distclean-libLTLIBRARIES distclean-compile \
distclean-libtool distclean-noinstPROGRAMS \
distclean-tags distclean-depend distclean-generic \
clean-am
-rm -f libtool
distclean: distclean-recursive
maintainer-clean-am: maintainer-clean-libLTLIBRARIES \
maintainer-clean-compile maintainer-clean-libtool \
maintainer-clean-noinstPROGRAMS maintainer-clean-tags \
maintainer-clean-depend maintainer-clean-generic \
distclean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
maintainer-clean: maintainer-clean-recursive
.PHONY: mostlyclean-libLTLIBRARIES distclean-libLTLIBRARIES \
clean-libLTLIBRARIES maintainer-clean-libLTLIBRARIES \
uninstall-libLTLIBRARIES install-libLTLIBRARIES mostlyclean-compile \
distclean-compile clean-compile maintainer-clean-compile \
mostlyclean-libtool distclean-libtool clean-libtool \
maintainer-clean-libtool mostlyclean-noinstPROGRAMS \
distclean-noinstPROGRAMS clean-noinstPROGRAMS \
maintainer-clean-noinstPROGRAMS install-data-recursive \
uninstall-data-recursive install-exec-recursive \
uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
all-recursive check-recursive installcheck-recursive info-recursive \
dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
distclean-tags clean-tags maintainer-clean-tags distdir \
mostlyclean-depend distclean-depend clean-depend \
maintainer-clean-depend info-am info dvi-am dvi check check-am \
installcheck-am installcheck install-exec-am install-exec \
install-data-local install-data-am install-data install-am install \
uninstall-am uninstall all-redirect all-am all installdirs-am \
installdirs mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
#librmonPlugin_la_SOURCES = rmonPlugin.c rmon.h
#librmonPlugin_la_LDFLAGS = @SNMPLIBS@ -shared -version-info @NTOP_VERSION_INFO@
@DYN_FLAGS@
#libwapPlugin_la_SOURCES = wapPlugin.c
#libwapPlugin_la_LDFLAGS = -shared -version-info @NTOP_VERSION_INFO@ @DYN_FLAGS@
#
# Dependencies to allow ntop loading plugins on-place
# by default ntop looks for plugins in the plugins/ subdirectory
#
.libs/libicmpPlugin.so@SO_VERSION_PATCH@:
cc -bundle -flat_namespace -undefined suppress -o
.libs/libicmpPlugin.so@SO_VERSION_PATCH@ icmpPlugin.o
icmpPlugin.so: .libs/libicmpPlugin.so@SO_VERSION_PATCH@
@ln -s .libs/libicmpPlugin.so icmpPlugin.so
#.libs/librrdPlugin.so@SO_VERSION_PATCH@:
# cc -bundle -flat_namespace -undefined suppress -o
.libs/librrdPlugin.so@SO_VERSION_PATCH@ rrdPlugin.o
#rrdPlugin.so: .libs/librrdPlugin.so@SO_VERSION_PATCH@
# @ln -s .libs/librrdPlugin.so rrdPlugin.so
.libs/libsflowPlugin.so@SO_VERSION_PATCH@:
cc -bundle -flat_namespace -undefined suppress -o
.libs/libsflowPlugin.so@SO_VERSION_PATCH@ sflowPlugin.o
sflowPlugin.so: .libs/libsflowPlugin.so@SO_VERSION_PATCH@
@ln -s .libs/libsflowPlugin.so sflowPlugin.so
.libs/liblastSeenPlugin.so@SO_VERSION_PATCH@:
cc -bundle -flat_namespace -undefined suppress -o
.libs/liblastSeenPlugin.so@SO_VERSION_PATCH@ lastSeenPlugin.o
lastSeenPlugin.so: .libs/liblastSeenPlugin.so@SO_VERSION_PATCH@
@ln -s .libs/liblastSeenPlugin.so lastSeenPlugin.so
.libs/libnfsPlugin.so@SO_VERSION_PATCH@:
cc -bundle -flat_namespace -undefined suppress -o
.libs/libnfsPlugin.so@SO_VERSION_PATCH@ nfsPlugin.o
.libs/libpdaPlugin.so@SO_VERSION_PATCH@:
cc -bundle -flat_namespace -undefined suppress -o
.libs/libpdaPlugin.so@SO_VERSION_PATCH@ pdaPlugin.o
netflowPlugin.so: .libs/libnetflowPlugin.so@SO_VERSION_PATCH@
@ln -s .libs/libnetflowPlugin.so netflowPlugin.so
.libs/libnetflowPlugin.so@SO_VERSION_PATCH@:
cc -bundle -flat_namespace -undefined suppress -o
.libs/libnetflowPlugin.so@SO_VERSION_PATCH@ netflowPlugin.o
nfsPlugin.so: .libs/libnfsPlugin.so@SO_VERSION_PATCH@
@ln -s .libs/libnfsPlugin.so nfsPlugin.so
pdaPlugin.so: .libs/libpdaPlugin.so@SO_VERSION_PATCH@
@ln -s .libs/libpdaPlugin.so pdaPlugin.so
#.libs/librmonPlugin.so@SO_VERSION_PATCH@:
# cc -bundle -flat_namespace -undefined suppress -o
.libs/librmonPlugin.so@SO_VERSION_PATCH@ rmonPlugin.o
#rmonPlugin.so: .libs/librmonPlugin.so@SO_VERSION_PATCH@
# @ln -s .libs/librmonPlugin.so rmonPlugin.so
#.libs/libwapPlugin.so@SO_VERSION_PATCH@:
# cc -bundle -flat_namespace -undefined suppress -o
.libs/libwapPlugin.so@SO_VERSION_PATCH@ wapPlugin.o
#wapPlugin.so: .libs/libwapPlugin.so@SO_VERSION_PATCH@
# @ln -s .libs/libwapPlugin.so wapPlugin.so
install-data-local:
@$(top_srcdir)/mkinstalldirs $(DESTDIR)$(plugindir);
@for file in $(noinst_PROGRAMS); do \
cp -p $$file $(DESTDIR)$(plugindir)/$$file; \
done
# remove installed libraries
@for file in $(lib_LTLIBRARIES); do \
rm -f $(DESTDIR)$(libdir)/$$file; \
done
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT: