diff options
author | Guy Harris <guy@alum.mit.edu> | 2001-09-29 00:57:36 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2001-09-29 00:57:36 +0000 |
commit | 096770328914d454c8a7267c4ec14b23c9a73977 (patch) | |
tree | 99b20c72cdc5b36b948537e8f1baab383f302ebd /packet-nbipx.c | |
parent | 168a986072dcef20db2ded2f26662eec3ff9108a (diff) |
Have "dissect_netbios_payload()" take as an argument a tvbuff containing
only the NetBIOS payload, and have the NBSS dissector construct tvbuffs
of that sort (i.e., stop at the end of the NBSS session message, not at
the end of the data handed to the NBSS dissector).
svn path=/trunk/; revision=3972
Diffstat (limited to 'packet-nbipx.c')
-rw-r--r-- | packet-nbipx.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/packet-nbipx.c b/packet-nbipx.c index 0f36201313..81092ae76f 100644 --- a/packet-nbipx.c +++ b/packet-nbipx.c @@ -2,7 +2,7 @@ * Routines for NetBIOS over IPX packet disassembly * Gilbert Ramirez <gram@xiexie.org> * - * $Id: packet-nbipx.c,v 1.39 2001/09/28 22:43:56 guy Exp $ + * $Id: packet-nbipx.c,v 1.40 2001/09/29 00:57:35 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -222,6 +222,7 @@ dissect_nbipx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) char name[(NETBIOS_NAME_LEN - 1)*4 + 1]; int name_type; gboolean has_payload; + tvbuff_t *next_tvb; if (check_col(pinfo->fd, COL_PROTOCOL)) col_set_str(pinfo->fd, COL_PROTOCOL, "NBIPX"); @@ -466,8 +467,8 @@ dissect_nbipx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_item_set_len(ti, offset); if (has_payload && tvb_offset_exists(tvb, offset)) { - dissect_netbios_payload(tvb, offset, pinfo, tree, - tvb_length_remaining(tvb, offset)); + next_tvb = tvb_new_subset(tvb, offset, -1, -1); + dissect_netbios_payload(next_tvb, pinfo, tree); } } @@ -674,6 +675,7 @@ dissect_nmpi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) int name_type; char node_name[(NETBIOS_NAME_LEN - 1)*4 + 1]; int node_name_type = 0; + tvbuff_t *next_tvb; if (check_col(pinfo->fd, COL_PROTOCOL)) col_set_str(pinfo->fd, COL_PROTOCOL, "NMPI"); @@ -767,8 +769,8 @@ dissect_nmpi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) offset += 1 + 1 + 2 + NETBIOS_NAME_LEN + NETBIOS_NAME_LEN; if (opcode == IMSLOT_SEND && tvb_offset_exists(tvb, offset)) { - dissect_netbios_payload(tvb, offset, pinfo, tree, - tvb_length_remaining(tvb, offset)); + next_tvb = tvb_new_subset(tvb, offset, -1, -1); + dissect_netbios_payload(next_tvb, pinfo, tree); } } |