summaryrefslogtreecommitdiff
path: root/plugins/stats_tree
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2005-07-24 10:32:22 +0000
committerGuy Harris <guy@alum.mit.edu>2005-07-24 10:32:22 +0000
commite4f089af5857cab4f2983cf20915b6a5168ebf07 (patch)
tree72c531309effb12e977d9c66a736348f56bf20d7 /plugins/stats_tree
parent699e51ccdd4e3dbae670ba0fa2e783d874b1a687 (diff)
downloadwireshark-e4f089af5857cab4f2983cf20915b6a5168ebf07.tar.gz
Add "pinfo_stats_tree.h" to declare "register_pinfo_stat_trees()", and
include it in "pinfo_stats_tree.c" (which defines it) and "stats_tree_plugin.c" (which refers to it). Make all the other routines defined in "pinfo_stats_tree.c" static, as they're not used outside "pinfo_stats_tree.c". Get rid of declaration of unused "register_http_stat_trees()". svn path=/trunk/; revision=15035
Diffstat (limited to 'plugins/stats_tree')
-rw-r--r--plugins/stats_tree/Makefile.am2
-rw-r--r--plugins/stats_tree/pinfo_stats_tree.c18
-rw-r--r--plugins/stats_tree/pinfo_stats_tree.h27
-rw-r--r--plugins/stats_tree/stats_tree_plugin.c2
4 files changed, 39 insertions, 10 deletions
diff --git a/plugins/stats_tree/Makefile.am b/plugins/stats_tree/Makefile.am
index e4bbf76f62..f1b46882f2 100644
--- a/plugins/stats_tree/Makefile.am
+++ b/plugins/stats_tree/Makefile.am
@@ -27,7 +27,7 @@ INCLUDES = -I$(top_srcdir)
plugindir = @plugindir@
plugin_LTLIBRARIES = stats_tree.la
-stats_tree_la_SOURCES = stats_tree_plugin.c pinfo_stats_tree.c
+stats_tree_la_SOURCES = stats_tree_plugin.c pinfo_stats_tree.c pinfo_stats_tree.h
stats_tree_la_LDFLAGS = -module -avoid-version
stats_tree_la_LIBADD = @PLUGIN_LIBS@
diff --git a/plugins/stats_tree/pinfo_stats_tree.c b/plugins/stats_tree/pinfo_stats_tree.c
index 757c0c827f..62cfbdda75 100644
--- a/plugins/stats_tree/pinfo_stats_tree.c
+++ b/plugins/stats_tree/pinfo_stats_tree.c
@@ -30,6 +30,8 @@
#include <epan/stats_tree.h>
+#include "pinfo_stats_tree.h"
+
/* XXX: this belongs to to_str.c */
static const gchar* port_type_to_str (port_type type) {
switch (type) {
@@ -51,11 +53,11 @@ static const gchar* port_type_to_str (port_type type) {
static int st_node_ip = -1;
static gchar* st_str_ip = "IP address";
-extern void ip_hosts_stats_tree_init(stats_tree* st) {
+static void ip_hosts_stats_tree_init(stats_tree* st) {
st_node_ip = stats_tree_create_node(st, st_str_ip, 0, TRUE);
}
-extern int ip_hosts_stats_tree_packet(stats_tree *st , packet_info *pinfo, epan_dissect_t *edt _U_, const void *p _U_) {
+static int ip_hosts_stats_tree_packet(stats_tree *st , packet_info *pinfo, epan_dissect_t *edt _U_, const void *p _U_) {
static guint8 str[128];
tick_stat_node(st, st_str_ip, 0, FALSE);
@@ -73,11 +75,11 @@ extern int ip_hosts_stats_tree_packet(stats_tree *st , packet_info *pinfo, epan
static int st_node_ptype = -1;
static gchar* st_str_ptype = "Port Type";
-extern void ptype_stats_tree_init(stats_tree* st) {
+static void ptype_stats_tree_init(stats_tree* st) {
st_node_ptype = stats_tree_create_pivot(st, st_str_ptype, 0);
}
-extern int ptype_stats_tree_packet(stats_tree* st, packet_info* pinfo, epan_dissect_t *edt _U_, const void *p _U_) {
+static int ptype_stats_tree_packet(stats_tree* st, packet_info* pinfo, epan_dissect_t *edt _U_, const void *p _U_) {
const gchar* ptype;
ptype = port_type_to_str(pinfo->ptype);
@@ -91,11 +93,11 @@ extern int ptype_stats_tree_packet(stats_tree* st, packet_info* pinfo, epan_diss
static int st_node_plen = -1;
static gchar* st_str_plen = "Packet Lenght";
-extern void plen_stats_tree_init(stats_tree* st) {
+static void plen_stats_tree_init(stats_tree* st) {
st_node_plen = stats_tree_create_range_node(st, st_str_plen, 0, "0-19","20-39","40-79","80-159","160-319","320-639","640-1279","1280-",NULL);
}
-extern int plen_stats_tree_packet(stats_tree* st, packet_info* pinfo, epan_dissect_t *edt _U_, const void *p _U_) {
+static int plen_stats_tree_packet(stats_tree* st, packet_info* pinfo, epan_dissect_t *edt _U_, const void *p _U_) {
tick_stat_node(st, st_str_plen, 0, FALSE);
stats_tree_tick_range(st, st_str_plen, 0, pinfo->fd->pkt_len);
@@ -111,11 +113,11 @@ extern int plen_stats_tree_packet(stats_tree* st, packet_info* pinfo, epan_disse
static int st_node_dsts = -1;
static gchar* st_str_dsts = "Destinations";
-extern void dsts_stats_tree_init(stats_tree* st) {
+static void dsts_stats_tree_init(stats_tree* st) {
st_node_dsts = stats_tree_create_node(st, st_str_dsts, 0, TRUE);
}
-extern int dsts_stats_tree_packet(stats_tree* st, packet_info* pinfo, epan_dissect_t *edt _U_, const void *p _U_) {
+static int dsts_stats_tree_packet(stats_tree* st, packet_info* pinfo, epan_dissect_t *edt _U_, const void *p _U_) {
static guint8 str[128];
int ip_dst_node;
int proto_node;
diff --git a/plugins/stats_tree/pinfo_stats_tree.h b/plugins/stats_tree/pinfo_stats_tree.h
new file mode 100644
index 0000000000..33d81f03ec
--- /dev/null
+++ b/plugins/stats_tree/pinfo_stats_tree.h
@@ -0,0 +1,27 @@
+/* pinfo_stats_tree.h
+* Stats tree for ethernet frames
+*
+* (c) 2005, Luis E. G. Ontanon <luis.ontanon@gmail.com>
+*
+* $Id$
+*
+* Ethereal - Network traffic analyzer
+* By Gerald Combs <gerald@ethereal.com>
+* Copyright 1998 Gerald Combs
+*
+* 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.
+*/
+
+extern void register_pinfo_stat_trees(void);
diff --git a/plugins/stats_tree/stats_tree_plugin.c b/plugins/stats_tree/stats_tree_plugin.c
index df3b743ca2..b3b8b36ce1 100644
--- a/plugins/stats_tree/stats_tree_plugin.c
+++ b/plugins/stats_tree/stats_tree_plugin.c
@@ -32,7 +32,7 @@
#include <epan/stats_tree.h>
-extern void register_http_stat_trees(void);
+#include "pinfo_stats_tree.h"
G_MODULE_EXPORT const gchar version[] = "0.0";