aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-nbipx.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2014-12-21 13:05:46 -0800
committerGuy Harris <guy@alum.mit.edu>2014-12-21 21:07:17 +0000
commitc96858b5fe9d60ef66c42d93000813249d7363af (patch)
treea6f78f2c5b04d567d91a6e86812c01a37c8c74b8 /epan/dissectors/packet-nbipx.c
parent9407160e05ab8031014b1a7db9488b3f0f7e041b (diff)
Use the "netbios" heuristic dissector list elsewhere.
Use find_heur_dissector_list() to find the "netbios" heuristic dissector list, rather than using code from packet-netbios.c. Change-Id: Ieeab58d7c6eb32491b026b242c687bd18c4d5cdb Reviewed-on: https://code.wireshark.org/review/5955 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dissectors/packet-nbipx.c')
-rw-r--r--epan/dissectors/packet-nbipx.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/epan/dissectors/packet-nbipx.c b/epan/dissectors/packet-nbipx.c
index 3ee08612b7..b362579cf6 100644
--- a/epan/dissectors/packet-nbipx.c
+++ b/epan/dissectors/packet-nbipx.c
@@ -66,6 +66,10 @@ static gint ett_nbipx_name_type_flags = -1;
static void dissect_conn_control(tvbuff_t *tvb, int offset, proto_tree *tree);
+static heur_dissector_list_t netbios_heur_subdissector_list;
+
+static dissector_handle_t data_handle;
+
/* There is no RFC or public specification of Netware or Microsoft
* NetBIOS over IPX packets. I have had to decode the protocol myself,
* so there are holes and perhaps errors in this code. (gram)
@@ -261,6 +265,20 @@ add_routers(proto_tree *tree, tvbuff_t *tvb, int offset)
}
}
+static void
+dissect_netbios_payload(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+{
+ heur_dtbl_entry_t *hdtbl_entry;
+
+ /*
+ * Try the heuristic dissectors for NetBIOS; if none of them
+ * accept the packet, dissect it as data.
+ */
+ if (!dissector_try_heuristic(netbios_heur_subdissector_list,
+ tvb, pinfo, tree, &hdtbl_entry, NULL))
+ call_dissector(data_handle,tvb, pinfo, tree);
+}
+
static int
dissect_nbipx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
{
@@ -642,6 +660,8 @@ proto_reg_handoff_nbipx(void)
nbipx_handle = new_create_dissector_handle(dissect_nbipx, proto_nbipx);
dissector_add_uint("ipx.socket", IPX_SOCKET_NETBIOS, nbipx_handle);
+ netbios_heur_subdissector_list = find_heur_dissector_list("netbios");
+ data_handle = find_dissector("data");
}
/*