aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoroabad <oabad@f5534014-38df-0310-8fa8-9805f1628bb7>2000-11-05 09:26:47 +0000
committeroabad <oabad@f5534014-38df-0310-8fa8-9805f1628bb7>2000-11-05 09:26:47 +0000
commit054142bcfcaa8ffdd3c5fb86a072755732211e82 (patch)
treef2c7cd6809b7356ef2f2163f570b2b9f0ba6e6f1
parent9f36fa01f4671f037fd5582c421c28812f9d442f (diff)
Allow a plugin to specify several underlying protocols (i.e. tcp and udp).
The protocol constant definition in the plugin must be : DLLEXPORT const gchar protocol[] = "tcp udp"; git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2567 f5534014-38df-0310-8fa8-9805f1628bb7
-rw-r--r--packet-tcp.c5
-rw-r--r--packet-udp.c5
2 files changed, 6 insertions, 4 deletions
diff --git a/packet-tcp.c b/packet-tcp.c
index bf1be54bf1..a7e82a8d1f 100644
--- a/packet-tcp.c
+++ b/packet-tcp.c
@@ -1,7 +1,7 @@
/* packet-tcp.c
* Routines for TCP packet disassembly
*
- * $Id: packet-tcp.c,v 1.86 2000/10/22 09:05:12 guy Exp $
+ * $Id: packet-tcp.c,v 1.87 2000/11/05 09:26:47 oabad Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -36,6 +36,7 @@
#endif
#include <stdio.h>
+#include <string.h>
#include <glib.h>
#ifdef NEED_SNPRINTF_H
@@ -379,7 +380,7 @@ decode_tcp_ports(const u_char *pd, int offset, frame_data *fd, proto_tree *tree,
if (enabled_plugins_number > 0) {
while (pt_plug) {
- if (pt_plug->enabled && !strcmp(pt_plug->protocol, "tcp") &&
+ if (pt_plug->enabled && strstr(pt_plug->protocol, "tcp") &&
tree && dfilter_apply(pt_plug->filter, tree, pd, fd->cap_len)) {
pt_plug->dissector(pd, offset, fd, tree);
return;
diff --git a/packet-udp.c b/packet-udp.c
index c577794a4c..2ccf2f175c 100644
--- a/packet-udp.c
+++ b/packet-udp.c
@@ -1,7 +1,7 @@
/* packet-udp.c
* Routines for UDP packet disassembly
*
- * $Id: packet-udp.c,v 1.76 2000/10/21 09:54:10 guy Exp $
+ * $Id: packet-udp.c,v 1.77 2000/11/05 09:26:47 oabad Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -39,6 +39,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <glib.h>
#include "globals.h"
@@ -98,7 +99,7 @@ decode_udp_ports(const u_char *pd, int offset, frame_data *fd, proto_tree *tree,
if (enabled_plugins_number > 0) {
while (pt_plug) {
- if (pt_plug->enabled && !strcmp(pt_plug->protocol, "udp") &&
+ if (pt_plug->enabled && strstr(pt_plug->protocol, "udp") &&
tree && dfilter_apply(pt_plug->filter, tree, pd, fd->cap_len)) {
pt_plug->dissector(pd, offset, fd, tree);
return;