2
* Copyright (C) 1998-2004 Luca Deri <deri@ntop.org>
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2 of the License, or
9
* (at your option) any later version.
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24
/* ***************************** */
26
static void handlePacket(const struct pcap_pkthdr *h,
29
Put here the code for handling packets
30
that match the specified BPF filter
34
/* ****************************** */
36
static void initFunct() {
38
Put here all the code that should be called when
39
this plugin is started up
41
traceEvent(CONST_TRACE_ALWAYSDISPLAY, "XXXXXXXX: Welcome to ntop xxxxxxxx");
44
/* ****************************** */
46
static void termFunct() {
48
Put here all the code that should be called when
49
this plugin is terminated
51
traceEvent(CONST_TRACE_INFO, "XXXXXXXX: Thanks for using ntop xxxxxxxx");
52
traceEvent(CONST_TRACE_ALWAYSDISPLAY, "XXXXXXXX: Done");
55
/* ****************************** */
57
static void handlePluginHTTPrequest(char* url) {
58
/* handle HTTP requests here */
61
/* ****************************** */
63
static PluginInfo pluginInfo[] = {
64
{ "put here the plugin name as it will appere",
65
"describe what this plugin does",
66
"1.0", /* plugin version */
67
"Put here the author name",
68
"shortPluginName", /* http://<host>:<port>/plugins/shortPluginName */
69
0, /* Active by default */
70
1, /* Inactive setup */
71
initFunction, /* InitFunc */
72
termFunction, /* TermFunc */
73
handlePacket, /* PluginFunc */
74
handlePluginHTTPrequest,
75
"<BPF filter>", /* BPF filter */
80
/* Plugin entry fctn */
82
PluginInfo* myPluginEntryFctn() {
84
PluginInfo* PluginEntryFctn() {
87
/* Put here the initialization functions */