aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-nbipx.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2013-10-24 01:26:30 +0000
committerMichael Mann <mmann78@netscape.net>2013-10-24 01:26:30 +0000
commit71cbca03ba7055b964765818c05e2e2ec29b9dc0 (patch)
tree8c87a4d2a249bf1f876d88bb4b206ac9b15bc41c /epan/dissectors/packet-nbipx.c
parent503e21128137ba08bfb2565708ac05022b0da1a3 (diff)
Remove ipxptype from struct _packet_info and pass it into subdissectors through ipxhdr_t structure.
svn path=/trunk/; revision=52810
Diffstat (limited to 'epan/dissectors/packet-nbipx.c')
-rw-r--r--epan/dissectors/packet-nbipx.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/epan/dissectors/packet-nbipx.c b/epan/dissectors/packet-nbipx.c
index 0e2923146e..3d351613ac 100644
--- a/epan/dissectors/packet-nbipx.c
+++ b/epan/dissectors/packet-nbipx.c
@@ -223,8 +223,8 @@ add_routers(proto_tree *tree, tvbuff_t *tvb, int offset)
}
}
-static void
-dissect_nbipx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int
+dissect_nbipx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
{
gboolean has_routes;
proto_tree *nbipx_tree = NULL;
@@ -237,11 +237,12 @@ dissect_nbipx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
int name_type;
gboolean has_payload;
tvbuff_t *next_tvb;
+ ipxhdr_t *ipxh = (ipxhdr_t*)data;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "NBIPX");
col_clear(pinfo->cinfo, COL_INFO);
- if (pinfo->ipxptype == IPX_PACKET_TYPE_WANBCAST) {
+ if (ipxh->ipx_type == IPX_PACKET_TYPE_WANBCAST) {
/*
* This is a WAN Broadcast packet; we assume it will have
* 8 IPX addresses at the beginning.
@@ -428,6 +429,8 @@ dissect_nbipx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
next_tvb = tvb_new_subset_remaining(tvb, offset);
dissect_netbios_payload(next_tvb, pinfo, tree);
}
+
+ return tvb_length(tvb);
}
static void
@@ -574,7 +577,7 @@ proto_reg_handoff_nbipx(void)
{
dissector_handle_t nbipx_handle;
- nbipx_handle = create_dissector_handle(dissect_nbipx, proto_nbipx);
+ nbipx_handle = new_create_dissector_handle(dissect_nbipx, proto_nbipx);
dissector_add_uint("ipx.socket", IPX_SOCKET_NETBIOS, nbipx_handle);
}