forked from osmocom/wireshark
Allow a length of -1 to be specified when adding FT_NONE and FT_PROTOCOL
items to the protocol tree; it's interpreted as "the rest of the data in the tvbuff". This can be used if 1) the item covers the entire packet or the remaining payload in the packet or 2) the item's length won't be known until it's dissected, and will be then set with "proto_item_set_len()" - if an exception is thrown in the dissection, it means the item ran *past* the end of the tvbuff, so saying it runs to the end of the tvbuff is reasonable. Convert a number of "proto_tree_add_XXX()" calls using "tvb_length_remaining()", values derived from the result of "tvb_length()", or 0 (in the case of items whose length is unknown) to use -1 instead (using 0 means that if an exception is thrown, selecting the item highlights nothing; using -1 means it highlights all the data for that item that's available). In some places where "tvb_length()" or "tvb_length_remaining()" was used to determine how large a packet is, use "tvb_reported_length()" or "tvb_reported_length_remaining()", instead - the first two calls indicate how much captured data was in the packet, the latter two calls indicate how large the packet actually was (and the fact that using the latter could cause BoundsError exceptions to be thrown is a feature - if such an exception is thrown, the frame really *was* short, and it should be tagged as such). Replace some "proto_tree_add_XXX()" calls with equivalent "proto_tree_add_item()" calls. Fix some indentation. svn path=/trunk/; revision=4578
This commit is contained in:
parent
a0d7e90519
commit
92915713d3
|
@ -1,4 +1,4 @@
|
|||
$Id: README.developer,v 1.44 2001/12/17 08:35:09 guy Exp $
|
||||
$Id: README.developer,v 1.45 2002/01/20 22:12:37 guy Exp $
|
||||
|
||||
This file is a HOWTO for Ethereal developers. It describes how to start coding
|
||||
a Ethereal protocol dissector and the use some of the important functions and
|
||||
|
@ -101,7 +101,7 @@ code inside
|
|||
|
||||
is needed only if you are using the "snprintf()" function.
|
||||
|
||||
The "$Id: README.developer,v 1.44 2001/12/17 08:35:09 guy Exp $"
|
||||
The "$Id: README.developer,v 1.45 2002/01/20 22:12:37 guy Exp $"
|
||||
in the comment will be updated by CVS when the file is
|
||||
checked in; it will allow the RCS "ident" command to report which
|
||||
version of the file is currently checked out.
|
||||
|
@ -111,7 +111,7 @@ version of the file is currently checked out.
|
|||
* Routines for PROTONAME dissection
|
||||
* Copyright 2000, YOUR_NAME <YOUR_EMAIL_ADDRESS>
|
||||
*
|
||||
* $Id: README.developer,v 1.44 2001/12/17 08:35:09 guy Exp $
|
||||
* $Id: README.developer,v 1.45 2002/01/20 22:12:37 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -222,11 +222,11 @@ dissect_PROTOABBREV(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
display window when the line in the protocol tree display
|
||||
corresponding to that item is selected.
|
||||
|
||||
tvb_length(tvb) is a handy way to highlight all data from the offset to
|
||||
the end of the packet. */
|
||||
Supplying a length of -1 is the way to highlight all data from the
|
||||
offset to the end of the packet. */
|
||||
|
||||
/* create display subtree for the protocol */
|
||||
ti = proto_tree_add_item(tree, proto_PROTOABBREV, tvb, 0, tvb_length(tvb), FALSE);
|
||||
ti = proto_tree_add_item(tree, proto_PROTOABBREV, tvb, 0, -1, FALSE);
|
||||
|
||||
PROTOABBREV_tree = proto_item_add_subtree(ti, ett_PROTOABBREV);
|
||||
|
||||
|
@ -979,9 +979,8 @@ the item being added, and the 'length' argument is the length, in bytes,
|
|||
of the item.
|
||||
|
||||
The length of some items cannot be determined until the item has been
|
||||
dissected; to add such an item, add it with a length of 0, and, when the
|
||||
dissection is complete (or fails because the packet is too short), set
|
||||
the length with 'proto_item_set_len()':
|
||||
dissected; to add such an item, add it with a length of -1, and, when the
|
||||
dissection is complete, set the length with 'proto_item_set_len()':
|
||||
|
||||
void
|
||||
proto_item_set_len(ti, length);
|
||||
|
|
34
epan/proto.c
34
epan/proto.c
|
@ -1,7 +1,7 @@
|
|||
/* proto.c
|
||||
* Routines for protocol tree
|
||||
*
|
||||
* $Id: proto.c,v 1.49 2002/01/07 01:05:33 guy Exp $
|
||||
* $Id: proto.c,v 1.50 2002/01/20 22:12:39 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -1599,19 +1599,37 @@ proto_tree_add_pi(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint
|
|||
static field_info *
|
||||
alloc_field_info(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length)
|
||||
{
|
||||
field_info *fi;
|
||||
|
||||
fi = g_mem_chunk_alloc(gmc_field_info);
|
||||
|
||||
g_assert(hfindex >= 0 && (guint) hfindex < gpa_hfinfo->len);
|
||||
header_field_info *hfinfo;
|
||||
field_info *fi;
|
||||
|
||||
/*
|
||||
* We only allow a null tvbuff if the item has a zero length,
|
||||
* i.e. if there's no data backing it.
|
||||
*/
|
||||
g_assert(tvb != NULL || length == 0);
|
||||
fi->hfinfo = proto_registrar_get_nth(hfindex);
|
||||
g_assert(fi->hfinfo != NULL);
|
||||
|
||||
g_assert(hfindex >= 0 && (guint) hfindex < gpa_hfinfo->len);
|
||||
hfinfo = proto_registrar_get_nth(hfindex);
|
||||
g_assert(hfinfo != NULL);
|
||||
|
||||
if (length == -1) {
|
||||
/*
|
||||
* For FT_NONE or FT_PROTOCOL fields, this means "set the
|
||||
* length to what remains in the tvbuff"; the assumption
|
||||
* is that the length can only be determined by dissection,
|
||||
* so we set it to that value so that, if we throw an
|
||||
* exception while dissecting, it has what is probably the
|
||||
* right value.
|
||||
*
|
||||
* It's not valid for any other type of field.
|
||||
*/
|
||||
g_assert(hfinfo->type == FT_PROTOCOL ||
|
||||
hfinfo->type == FT_NONE);
|
||||
length = tvb_length_remaining(tvb, start);
|
||||
}
|
||||
|
||||
fi = g_mem_chunk_alloc(gmc_field_info);
|
||||
fi->hfinfo = hfinfo;
|
||||
fi->start = start;
|
||||
if (tvb) {
|
||||
fi->start += tvb_raw_offset(tvb);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* packet-atalk.c
|
||||
* Routines for Appletalk packet disassembly (DDP, currently).
|
||||
*
|
||||
* $Id: packet-atalk.c,v 1.60 2001/12/10 00:25:26 guy Exp $
|
||||
* $Id: packet-atalk.c,v 1.61 2002/01/20 22:12:25 guy Exp $
|
||||
*
|
||||
* Simon Wilkinson <sxw@dcs.ed.ac.uk>
|
||||
*
|
||||
|
@ -244,8 +244,7 @@ dissect_rtmp_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
|
|||
net, nodelen_bits, node);
|
||||
|
||||
if (tree) {
|
||||
ti = proto_tree_add_item(tree, proto_rtmp, tvb, offset,
|
||||
tvb_length_remaining(tvb, offset), FALSE);
|
||||
ti = proto_tree_add_item(tree, proto_rtmp, tvb, offset, -1, FALSE);
|
||||
rtmp_tree = proto_item_add_subtree(ti, ett_rtmp);
|
||||
|
||||
proto_tree_add_uint(rtmp_tree, hf_rtmp_net, tvb, offset, 2, net);
|
||||
|
@ -326,8 +325,7 @@ dissect_nbp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
|
|||
val_to_str(op, nbp_op_vals, "Unknown (0x%01x)"), count);
|
||||
|
||||
if (tree) {
|
||||
ti = proto_tree_add_item(tree, proto_nbp, tvb, offset,
|
||||
tvb_length_remaining(tvb, offset), FALSE);
|
||||
ti = proto_tree_add_item(tree, proto_nbp, tvb, offset, -1, FALSE);
|
||||
nbp_tree = proto_item_add_subtree(ti, ett_nbp);
|
||||
|
||||
info_item = proto_tree_add_uint_format(nbp_tree, hf_nbp_info, tvb, offset, 1,
|
||||
|
@ -345,7 +343,7 @@ dissect_nbp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
|
|||
proto_tree *node_item,*node_tree;
|
||||
int soffset = offset;
|
||||
|
||||
node_item = proto_tree_add_text(nbp_tree, tvb, offset, 4,
|
||||
node_item = proto_tree_add_text(nbp_tree, tvb, offset, -1,
|
||||
"Node %d", i+1);
|
||||
node_tree = proto_item_add_subtree(node_item, ett_nbp_node);
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Routines for BACnet (NPDU) dissection
|
||||
* Copyright 2001, Hartmut Mueller <hartmut@abmlinux.org>, FH Dortmund
|
||||
*
|
||||
* $Id: packet-bacnet.c,v 1.8 2001/12/10 00:25:26 guy Exp $
|
||||
* $Id: packet-bacnet.c,v 1.9 2002/01/20 22:12:25 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -218,7 +218,7 @@ dissect_bacnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
if (tree) {
|
||||
|
||||
/* I don't know the length of the NPDU by know. Setting the length after dissection */
|
||||
ti = proto_tree_add_item(tree, proto_bacnet, tvb, 0, 0, FALSE);
|
||||
ti = proto_tree_add_item(tree, proto_bacnet, tvb, 0, -1, FALSE);
|
||||
|
||||
bacnet_tree = proto_item_add_subtree(ti, ett_bacnet);
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* packet-dns.c
|
||||
* Routines for DNS packet disassembly
|
||||
*
|
||||
* $Id: packet-dns.c,v 1.78 2002/01/19 23:59:02 guy Exp $
|
||||
* $Id: packet-dns.c,v 1.79 2002/01/20 22:12:25 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -1715,7 +1715,7 @@ dissect_query_records(tvbuff_t *tvb, int cur_off, int dns_data_offset,
|
|||
start_off = cur_off;
|
||||
if (dns_tree) {
|
||||
char *s = (isupdate ? "Zone" : "Queries");
|
||||
ti = proto_tree_add_text(dns_tree, tvb, start_off, 0, s);
|
||||
ti = proto_tree_add_text(dns_tree, tvb, start_off, -1, s);
|
||||
qatree = proto_item_add_subtree(ti, ett_dns_qry);
|
||||
}
|
||||
while (count-- > 0) {
|
||||
|
@ -1738,7 +1738,7 @@ dissect_answer_records(tvbuff_t *tvb, int cur_off, int dns_data_offset,
|
|||
|
||||
start_off = cur_off;
|
||||
if (dns_tree) {
|
||||
ti = proto_tree_add_text(dns_tree, tvb, start_off, 0, name);
|
||||
ti = proto_tree_add_text(dns_tree, tvb, start_off, -1, name);
|
||||
qatree = proto_item_add_subtree(ti, ett_dns_ans);
|
||||
}
|
||||
while (count-- > 0) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* packet-dvmrp.c 2001 Ronnie Sahlberg <See AUTHORS for email>
|
||||
* Routines for IGMP/DVMRP packet disassembly
|
||||
*
|
||||
* $Id: packet-dvmrp.c,v 1.5 2001/12/23 21:36:57 guy Exp $
|
||||
* $Id: packet-dvmrp.c,v 1.6 2002/01/20 22:12:25 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -251,7 +251,7 @@ dissect_v3_report(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, in
|
|||
int old_offset = offset;
|
||||
|
||||
item = proto_tree_add_item(parent_tree, hf_route,
|
||||
tvb, offset, 0, FALSE);
|
||||
tvb, offset, -1, FALSE);
|
||||
tree = proto_item_add_subtree(item, ett_route);
|
||||
|
||||
m0 = 0xff;
|
||||
|
@ -479,14 +479,14 @@ dissect_dvmrp_v1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, int
|
|||
offset += 2;
|
||||
|
||||
/* decode all the v1 commands */
|
||||
while (tvb_length_remaining(tvb, offset)) {
|
||||
while (tvb_reported_length_remaining(tvb, offset)) {
|
||||
proto_tree *tree;
|
||||
proto_item *item;
|
||||
guint8 cmd,count;
|
||||
int old_offset = offset;
|
||||
|
||||
item = proto_tree_add_item(parent_tree, hf_commands,
|
||||
tvb, offset, 0, FALSE);
|
||||
tvb, offset, -1, FALSE);
|
||||
tree = proto_item_add_subtree(item, ett_commands);
|
||||
|
||||
cmd = tvb_get_guint8(tvb, offset);
|
||||
|
@ -637,7 +637,7 @@ dissect_dvmrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, int of
|
|||
return offset+tvb_length_remaining(tvb, offset);
|
||||
}
|
||||
|
||||
item = proto_tree_add_item(parent_tree, proto_dvmrp, tvb, offset, 0, FALSE);
|
||||
item = proto_tree_add_item(parent_tree, proto_dvmrp, tvb, offset, -1, FALSE);
|
||||
tree = proto_item_add_subtree(item, ett_dvmrp);
|
||||
|
||||
|
||||
|
|
|
@ -197,7 +197,7 @@ dissect_gmrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
offset += sizeof(guint8);
|
||||
length -= sizeof(guint8);
|
||||
|
||||
msg_item = proto_tree_add_text(gmrp_tree, tvb, msg_start, 0,
|
||||
msg_item = proto_tree_add_text(gmrp_tree, tvb, msg_start, -1,
|
||||
"Message %d", msg_index + 1);
|
||||
|
||||
proto_tree_add_uint(gmrp_tree, hf_gmrp_attribute_type, tvb,
|
||||
|
@ -251,7 +251,7 @@ dissect_gmrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
length -= sizeof(guint8);
|
||||
|
||||
attr_item = proto_tree_add_text(gmrp_tree, tvb,
|
||||
attr_start, 0, " Attribute %d", attr_index + 1);
|
||||
attr_start, -1, " Attribute %d", attr_index + 1);
|
||||
|
||||
proto_tree_add_uint(gmrp_tree, hf_gmrp_attribute_length,
|
||||
tvb, attr_start, sizeof(guint8), octet);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Routines for GVRP (GARP VLAN Registration Protocol) dissection
|
||||
* Copyright 2000, Kevin Shi <techishi@ms22.hinet.net>
|
||||
*
|
||||
* $Id: packet-gvrp.c,v 1.8 2001/12/10 00:25:28 guy Exp $
|
||||
* $Id: packet-gvrp.c,v 1.9 2002/01/20 22:12:26 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -183,7 +183,7 @@ dissect_gvrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
offset += sizeof(guint8);
|
||||
length -= sizeof(guint8);
|
||||
|
||||
msg_item = proto_tree_add_text(gvrp_tree, tvb, msg_start, 0,
|
||||
msg_item = proto_tree_add_text(gvrp_tree, tvb, msg_start, -1,
|
||||
"Message %d", msg_index + 1);
|
||||
|
||||
proto_tree_add_uint(gvrp_tree, hf_gvrp_attribute_type, tvb,
|
||||
|
@ -237,7 +237,7 @@ dissect_gvrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
length -= sizeof(guint8);
|
||||
|
||||
attr_item = proto_tree_add_text(gvrp_tree, tvb,
|
||||
attr_start, 0, " Attribute %d", attr_index + 1);
|
||||
attr_start, -1, " Attribute %d", attr_index + 1);
|
||||
|
||||
proto_tree_add_uint(gvrp_tree, hf_gvrp_attribute_length,
|
||||
tvb, attr_start, sizeof(guint8), octet);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* packet-igmp.c 2001 Ronnie Sahlberg <See AUTHORS for email>
|
||||
* Routines for IGMP packet disassembly
|
||||
*
|
||||
* $Id: packet-igmp.c,v 1.15 2001/12/23 21:36:57 guy Exp $
|
||||
* $Id: packet-igmp.c,v 1.16 2002/01/20 22:12:26 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -446,7 +446,7 @@ dissect_v3_group_record(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tr
|
|||
guint32 ip;
|
||||
|
||||
tvb_memcpy(tvb, (guint8 *)&ip, offset+4, 4);
|
||||
item = proto_tree_add_text(parent_tree, tvb, offset, 0,
|
||||
item = proto_tree_add_text(parent_tree, tvb, offset, -1,
|
||||
"Group Record : %s %s",
|
||||
ip_to_str((gchar*)&ip),
|
||||
val_to_str(tvb_get_guint8(tvb, offset), vs_record_type,"")
|
||||
|
@ -784,7 +784,7 @@ dissect_igmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
|
|||
unsigned char type;
|
||||
guint32 dst;
|
||||
|
||||
item = proto_tree_add_item(parent_tree, proto_igmp, tvb, offset, 0, FALSE);
|
||||
item = proto_tree_add_item(parent_tree, proto_igmp, tvb, offset, -1, FALSE);
|
||||
tree = proto_item_add_subtree(item, ett_igmp);
|
||||
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* Conforms to the protocol described in: draft-ietf-ips-iscsi-08.txt
|
||||
*
|
||||
* $Id: packet-iscsi.c,v 1.20 2002/01/16 20:25:07 guy Exp $
|
||||
* $Id: packet-iscsi.c,v 1.21 2002/01/20 22:12:26 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -762,7 +762,7 @@ dissect_iscsi_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint off
|
|||
|
||||
/* create display subtree for the protocol */
|
||||
ti = proto_tree_add_protocol_format(tree, proto_iscsi, tvb,
|
||||
offset, 0, "iSCSI (%s)",
|
||||
offset, -1, "iSCSI (%s)",
|
||||
(char *)opcode_str);
|
||||
|
||||
proto_tree_add_uint(ti, hf_iscsi_Opcode, tvb,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* packet-isis-lsp.c
|
||||
* Routines for decoding isis lsp packets and their CLVs
|
||||
*
|
||||
* $Id: packet-isis-lsp.c,v 1.23 2001/12/26 21:37:21 guy Exp $
|
||||
* $Id: packet-isis-lsp.c,v 1.24 2002/01/20 22:12:26 guy Exp $
|
||||
* Stuart Stanley <stuarts@mxmail.net>
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
|
@ -593,7 +593,7 @@ dissect_lsp_ext_ip_reachability_clv(tvbuff_t *tvb,
|
|||
bit_length = ctrl_info & 0x3f;
|
||||
byte_length = (bit_length + 7) / 8;
|
||||
tvb_memcpy (tvb, prefix, offset+5, byte_length);
|
||||
pi = proto_tree_add_text (tree, tvb, offset, 0,
|
||||
pi = proto_tree_add_text (tree, tvb, offset, -1,
|
||||
"IPv4 prefix: %s/%d",
|
||||
ip_to_str (prefix),
|
||||
bit_length );
|
||||
|
@ -653,7 +653,7 @@ dissect_lsp_ipv6_reachability_clv(tvbuff_t *tvb,
|
|||
bit_length = tvb_get_guint8(tvb, offset+5);
|
||||
byte_length = (bit_length + 7) / 8;
|
||||
tvb_memcpy (tvb, prefix.s6_addr, offset+6, byte_length);
|
||||
ti = proto_tree_add_text (tree, tvb, offset, 0,
|
||||
ti = proto_tree_add_text (tree, tvb, offset, -1,
|
||||
"IP prefix: %s /%d",
|
||||
ip6_to_str (&prefix),
|
||||
bit_length );
|
||||
|
@ -1287,7 +1287,7 @@ dissect_lsp_ext_is_reachability_clv(tvbuff_t *tvb,
|
|||
if (!tree) return;
|
||||
|
||||
while (length > 0) {
|
||||
ti = proto_tree_add_text (tree, tvb, offset, 0,
|
||||
ti = proto_tree_add_text (tree, tvb, offset, -1,
|
||||
"IS neighbor: %s",
|
||||
print_system_id (tvb_get_ptr(tvb, offset, 7), 7) );
|
||||
ntree = proto_item_add_subtree (ti,
|
||||
|
@ -1406,7 +1406,7 @@ static void dissect_lsp_mt_is_reachability_clv(tvbuff_t *tvb,
|
|||
mt_desc,
|
||||
mt_block&0xfff );
|
||||
|
||||
ti = proto_tree_add_text (tree, tvb, offset+2, 0,
|
||||
ti = proto_tree_add_text (tree, tvb, offset+2, -1,
|
||||
"IS neighbor: %s",
|
||||
print_system_id(tvb_get_ptr(tvb, offset+2, 7), 7) );
|
||||
|
||||
|
@ -1610,8 +1610,8 @@ isis_dissect_isis_lsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
int inx, q, some, value, len;
|
||||
|
||||
if (tree) {
|
||||
ti = proto_tree_add_text(tree, tvb, offset,
|
||||
tvb_length_remaining(tvb, offset), PROTO_STRING_LSP);
|
||||
ti = proto_tree_add_text(tree, tvb, offset, -1,
|
||||
PROTO_STRING_LSP);
|
||||
lsp_tree = proto_item_add_subtree(ti, ett_isis_lsp);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* packet-ldp.c
|
||||
* Routines for LDP (RFC 3036) packet disassembly
|
||||
*
|
||||
* $Id: packet-ldp.c,v 1.23 2001/12/10 00:25:30 guy Exp $
|
||||
* $Id: packet-ldp.c,v 1.24 2002/01/20 22:12:26 guy Exp $
|
||||
*
|
||||
* Copyright (c) November 2000 by Richard Sharpe <rsharpe@ns.aus.com>
|
||||
*
|
||||
|
@ -561,8 +561,7 @@ dissect_ldp_pdu(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
if (tree) { /* Build the tree info ..., this is wrong! FIXME */
|
||||
|
||||
ldp_item = proto_tree_add_item(tree, proto_ldp, tvb, offset,
|
||||
tvb_length_remaining(tvb, offset), FALSE);
|
||||
ldp_item = proto_tree_add_item(tree, proto_ldp, tvb, offset, -1, FALSE);
|
||||
ldp_tree = proto_item_add_subtree(ldp_item, ett_ldp);
|
||||
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Routines for IEEE 802.2 LLC layer
|
||||
* Gilbert Ramirez <gram@alumni.rice.edu>
|
||||
*
|
||||
* $Id: packet-llc.c,v 1.93 2001/12/10 00:25:30 guy Exp $
|
||||
* $Id: packet-llc.c,v 1.94 2002/01/20 22:12:26 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -289,7 +289,7 @@ dissect_llc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
dsap = tvb_get_guint8(tvb, 0);
|
||||
if (tree) {
|
||||
ti = proto_tree_add_item(tree, proto_llc, tvb, 0, 0, FALSE);
|
||||
ti = proto_tree_add_item(tree, proto_llc, tvb, 0, -1, FALSE);
|
||||
llc_tree = proto_item_add_subtree(ti, ett_llc);
|
||||
proto_tree_add_uint(llc_tree, hf_llc_dsap, tvb, 0,
|
||||
1, dsap & SAP_MASK);
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* Copyright 2001, Jeff Morriss <jeff.morriss[AT]ulticom.com>,
|
||||
* updated by Michael Tuexen <michael.tuexen[AT]icn.siemens.de>
|
||||
*
|
||||
* $Id: packet-m2pa.c,v 1.4 2001/12/10 00:25:30 guy Exp $
|
||||
* $Id: packet-m2pa.c,v 1.5 2002/01/20 22:12:26 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -197,9 +197,8 @@ dissect_m2pa_proving_data_message(tvbuff_t *message_data_tvb, proto_tree *m2pa_
|
|||
|
||||
if (m2pa_tree) {
|
||||
message_data_length = tvb_length(message_data_tvb);
|
||||
proto_tree_add_bytes(m2pa_tree, hf_m2pa_proving_data,
|
||||
message_data_tvb, 0, message_data_length,
|
||||
tvb_get_ptr(message_data_tvb, 0, message_data_length));
|
||||
proto_tree_add_item(m2pa_tree, hf_m2pa_proving_data,
|
||||
message_data_tvb, 0, message_data_length, FALSE);
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -210,9 +209,8 @@ dissect_m2pa_unknown_message(tvbuff_t *message_data_tvb, proto_tree *m2pa_tree)
|
|||
|
||||
if (m2pa_tree) {
|
||||
message_data_length = tvb_length(message_data_tvb);
|
||||
proto_tree_add_bytes(m2pa_tree, hf_m2pa_unknown_data,
|
||||
message_data_tvb, 0, message_data_length,
|
||||
tvb_get_ptr(message_data_tvb, 0, message_data_length));
|
||||
proto_tree_add_item(m2pa_tree, hf_m2pa_unknown_data,
|
||||
message_data_tvb, 0, message_data_length, FALSE);
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -296,7 +294,7 @@ dissect_m2pa(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
necessary to generate protocol tree items. */
|
||||
if (tree) {
|
||||
/* create the m2pa protocol tree */
|
||||
m2pa_item = proto_tree_add_item(tree, proto_m2pa, tvb, 0, tvb_length(tvb), FALSE);
|
||||
m2pa_item = proto_tree_add_item(tree, proto_m2pa, tvb, 0, -1, FALSE);
|
||||
m2pa_tree = proto_item_add_subtree(m2pa_item, ett_m2pa);
|
||||
} else {
|
||||
m2pa_item = NULL;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* packet-mount.c
|
||||
* Routines for mount dissection
|
||||
*
|
||||
* $Id: packet-mount.c,v 1.28 2002/01/12 10:24:46 guy Exp $
|
||||
* $Id: packet-mount.c,v 1.29 2002/01/20 22:12:26 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -164,7 +164,7 @@ dissect_mountlist(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tre
|
|||
|
||||
if (tree) {
|
||||
lock_item = proto_tree_add_item(tree, hf_mount_mountlist, tvb,
|
||||
offset, tvb_length_remaining(tvb, offset), FALSE);
|
||||
offset, -1, FALSE);
|
||||
if (lock_item)
|
||||
lock_tree = proto_item_add_subtree(lock_item, ett_mount_mountlist);
|
||||
}
|
||||
|
@ -242,7 +242,7 @@ dissect_exportlist(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr
|
|||
group_names_len=0;
|
||||
if (tree) {
|
||||
exportlist_item = proto_tree_add_item(tree, hf_mount_exportlist, tvb,
|
||||
offset, tvb_length_remaining(tvb, offset), FALSE);
|
||||
offset, -1, FALSE);
|
||||
if (exportlist_item)
|
||||
exportlist_tree = proto_item_add_subtree(exportlist_item, ett_mount_exportlist);
|
||||
}
|
||||
|
@ -253,7 +253,7 @@ dissect_exportlist(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr
|
|||
|
||||
if (tree) {
|
||||
groups_item = proto_tree_add_item(exportlist_tree, hf_mount_groups, tvb,
|
||||
offset, tvb_length_remaining(tvb, offset), FALSE);
|
||||
offset, -1, FALSE);
|
||||
if (groups_item)
|
||||
groups_tree = proto_item_add_subtree(groups_item, ett_mount_groups);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* packet-mrdisc.c 2001 Ronnie Sahlberg <See AUTHORS for email>
|
||||
* Routines for IGMP/MRDISC packet disassembly
|
||||
*
|
||||
* $Id: packet-mrdisc.c,v 1.4 2001/12/23 21:36:57 guy Exp $
|
||||
* $Id: packet-mrdisc.c,v 1.5 2002/01/20 22:12:26 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -140,7 +140,7 @@ dissect_mrdisc_mra(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, i
|
|||
int old_offset = offset;
|
||||
|
||||
item = proto_tree_add_item(parent_tree, hf_options,
|
||||
tvb, offset, 0, FALSE);
|
||||
tvb, offset, -1, FALSE);
|
||||
tree = proto_item_add_subtree(item, ett_options);
|
||||
|
||||
type = tvb_get_guint8(tvb, offset);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* packet-msnip.c 2001 Ronnie Sahlberg <See AUTHORS for email>
|
||||
* Routines for IGMP/MSNIP packet disassembly
|
||||
*
|
||||
* $Id: packet-msnip.c,v 1.3 2001/12/23 21:36:57 guy Exp $
|
||||
* $Id: packet-msnip.c,v 1.4 2002/01/20 22:12:26 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -132,7 +132,7 @@ dissect_msnip_rmr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, in
|
|||
int old_offset = offset;
|
||||
|
||||
item = proto_tree_add_item(parent_tree, hf_groups,
|
||||
tvb, offset, 0, FALSE);
|
||||
tvb, offset, -1, FALSE);
|
||||
tree = proto_item_add_subtree(item, ett_groups);
|
||||
|
||||
/* record type */
|
||||
|
@ -211,7 +211,7 @@ dissect_msnip_gm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, int
|
|||
int old_offset = offset;
|
||||
|
||||
item = proto_tree_add_item(parent_tree, hf_groups,
|
||||
tvb, offset, 0, FALSE);
|
||||
tvb, offset, -1, FALSE);
|
||||
tree = proto_item_add_subtree(item, ett_groups);
|
||||
|
||||
/* multicast group */
|
||||
|
@ -256,7 +256,7 @@ dissect_msnip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, int of
|
|||
return offset+tvb_length_remaining(tvb, offset);
|
||||
}
|
||||
|
||||
item = proto_tree_add_item(parent_tree, proto_msnip, tvb, offset, 0, FALSE);
|
||||
item = proto_tree_add_item(parent_tree, proto_msnip, tvb, offset, -1, FALSE);
|
||||
tree = proto_item_add_subtree(item, ett_msnip);
|
||||
|
||||
|
||||
|
@ -353,7 +353,7 @@ proto_register_msnip(void)
|
|||
&ett_groups,
|
||||
};
|
||||
|
||||
proto_msnip = proto_register_protocol("MSNIP : Multicast Source Notification of Interest Protocol",
|
||||
proto_msnip = proto_register_protocol("MSNIP: Multicast Source Notification of Interest Protocol",
|
||||
"MSNIP", "msnip");
|
||||
proto_register_field_array(proto_msnip, hf, array_length(hf));
|
||||
proto_register_subtree_array(ett, array_length(ett));
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
/* packet-mtp2.c
|
||||
* Routines for MTP2 dissection
|
||||
* It is hopefully (needs testing) compliant to
|
||||
* ITU-T Q. 703
|
||||
* ITU-T Q.703
|
||||
*
|
||||
* Copyright 2001, Michael Tuexen <michael.tuexen[AT]icn.siemens.de>
|
||||
*
|
||||
* $Id: packet-mtp2.c,v 1.1 2001/12/11 03:04:26 gram Exp $
|
||||
* $Id: packet-mtp2.c,v 1.2 2002/01/20 22:12:26 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -186,7 +186,7 @@ dissect_mtp2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
col_set_str(pinfo->cinfo, COL_PROTOCOL, "MTP2");
|
||||
|
||||
if (tree) {
|
||||
mtp2_item = proto_tree_add_item(tree, proto_mtp2, tvb, 0, tvb_length(tvb), FALSE);
|
||||
mtp2_item = proto_tree_add_item(tree, proto_mtp2, tvb, 0, -1, FALSE);
|
||||
mtp2_tree = proto_item_add_subtree(mtp2_item, ett_mtp2);
|
||||
};
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Routines for NetBIOS over IPX packet disassembly
|
||||
* Gilbert Ramirez <gram@alumni.rice.edu>
|
||||
*
|
||||
* $Id: packet-nbipx.c,v 1.44 2001/12/10 00:25:30 guy Exp $
|
||||
* $Id: packet-nbipx.c,v 1.45 2002/01/20 22:12:26 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -267,7 +267,7 @@ dissect_nbipx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
if (tree) {
|
||||
ti = proto_tree_add_item(tree, proto_nbipx, tvb, 0,
|
||||
0, FALSE);
|
||||
-1, FALSE);
|
||||
nbipx_tree = proto_item_add_subtree(ti, ett_nbipx);
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* to when it had only NBNS)
|
||||
* Guy Harris <guy@alum.mit.edu>
|
||||
*
|
||||
* $Id: packet-nbns.c,v 1.70 2002/01/19 23:59:03 guy Exp $
|
||||
* $Id: packet-nbns.c,v 1.71 2002/01/20 22:12:26 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -927,7 +927,7 @@ dissect_query_records(tvbuff_t *tvb, int cur_off, int nbns_data_offset,
|
|||
|
||||
start_off = cur_off;
|
||||
if (nbns_tree != NULL) {
|
||||
ti = proto_tree_add_text(nbns_tree, tvb, start_off, 0, "Queries");
|
||||
ti = proto_tree_add_text(nbns_tree, tvb, start_off, -1, "Queries");
|
||||
qatree = proto_item_add_subtree(ti, ett_nbns_qry);
|
||||
}
|
||||
while (count-- > 0) {
|
||||
|
@ -954,7 +954,7 @@ dissect_answer_records(tvbuff_t *tvb, int cur_off, int nbns_data_offset,
|
|||
|
||||
start_off = cur_off;
|
||||
if (nbns_tree != NULL) {
|
||||
ti = proto_tree_add_text(nbns_tree, tvb, start_off, 0, name);
|
||||
ti = proto_tree_add_text(nbns_tree, tvb, start_off, -1, name);
|
||||
qatree = proto_item_add_subtree(ti, ett_nbns_ans);
|
||||
}
|
||||
while (count-- > 0) {
|
||||
|
@ -1005,8 +1005,8 @@ dissect_nbns(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
}
|
||||
|
||||
if (tree) {
|
||||
ti = proto_tree_add_item(tree, proto_nbns, tvb, offset,
|
||||
tvb_length(tvb), FALSE);
|
||||
ti = proto_tree_add_item(tree, proto_nbns, tvb, offset, -1,
|
||||
FALSE);
|
||||
nbns_tree = proto_item_add_subtree(ti, ett_nbns);
|
||||
|
||||
if (flags & F_RESPONSE) {
|
||||
|
@ -1203,8 +1203,8 @@ dissect_nbdgm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
}
|
||||
|
||||
if (tree) {
|
||||
ti = proto_tree_add_item(tree, proto_nbdgm, tvb, offset,
|
||||
tvb_length_remaining(tvb, offset), FALSE);
|
||||
ti = proto_tree_add_item(tree, proto_nbdgm, tvb, offset, -1,
|
||||
FALSE);
|
||||
nbdgm_tree = proto_item_add_subtree(ti, ett_nbdgm);
|
||||
|
||||
proto_tree_add_uint(nbdgm_tree, hf_nbdgm_type, tvb,
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
* Routines for NDMP dissection
|
||||
* 2001 Ronnie Sahlberg (see AUTHORS for email)
|
||||
*
|
||||
* $Id: packet-ndmp.c,v 1.8 2002/01/18 22:37:56 guy Exp $
|
||||
* $Id: packet-ndmp.c,v 1.9 2002/01/20 22:12:26 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -1643,8 +1643,8 @@ dissect_file_name(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *par
|
|||
char *name;
|
||||
|
||||
if (parent_tree) {
|
||||
item = proto_tree_add_text(parent_tree, tvb, offset, 0,
|
||||
"File ");
|
||||
item = proto_tree_add_text(parent_tree, tvb, offset, -1,
|
||||
"File");
|
||||
tree = proto_item_add_subtree(item, ett_ndmp_file_name);
|
||||
}
|
||||
|
||||
|
@ -1761,7 +1761,7 @@ dissect_file_stats(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *pa
|
|||
nstime_t ns;
|
||||
|
||||
if (parent_tree) {
|
||||
item = proto_tree_add_text(parent_tree, tvb, offset, 0,
|
||||
item = proto_tree_add_text(parent_tree, tvb, offset, -1,
|
||||
"Stats:");
|
||||
tree = proto_item_add_subtree(item, ett_ndmp_file_stats);
|
||||
}
|
||||
|
@ -1830,7 +1830,7 @@ dissect_file(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *parent_t
|
|||
int old_offset=offset;
|
||||
|
||||
if (parent_tree) {
|
||||
item = proto_tree_add_text(parent_tree, tvb, offset, 0,
|
||||
item = proto_tree_add_text(parent_tree, tvb, offset, -1,
|
||||
"File:");
|
||||
tree = proto_item_add_subtree(item, ett_ndmp_file);
|
||||
}
|
||||
|
|
87
packet-nfs.c
87
packet-nfs.c
|
@ -3,7 +3,7 @@
|
|||
* Copyright 1999, Uwe Girlich <Uwe.Girlich@philosys.de>
|
||||
* Copyright 2000-2001, Mike Frisch <frisch@hummingbird.com> (NFSv4 decoding)
|
||||
*
|
||||
* $Id: packet-nfs.c,v 1.63 2002/01/14 13:16:31 girlich Exp $
|
||||
* $Id: packet-nfs.c,v 1.64 2002/01/20 22:12:26 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -1717,8 +1717,8 @@ dissect_fattr(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, c
|
|||
int old_offset = offset;
|
||||
|
||||
if (tree) {
|
||||
fattr_item = proto_tree_add_text(tree, tvb, offset,
|
||||
tvb_length_remaining(tvb, offset), "%s", name);
|
||||
fattr_item = proto_tree_add_text(tree, tvb, offset, -1,
|
||||
"%s", name);
|
||||
fattr_tree = proto_item_add_subtree(fattr_item, ett_nfs_fattr);
|
||||
}
|
||||
|
||||
|
@ -1756,8 +1756,8 @@ dissect_sattr(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, c
|
|||
int old_offset = offset;
|
||||
|
||||
if (tree) {
|
||||
sattr_item = proto_tree_add_text(tree, tvb, offset,
|
||||
tvb_length_remaining(tvb, offset), "%s", name);
|
||||
sattr_item = proto_tree_add_text(tree, tvb, offset, -1,
|
||||
"%s", name);
|
||||
sattr_tree = proto_item_add_subtree(sattr_item, ett_nfs_sattr);
|
||||
}
|
||||
|
||||
|
@ -1872,8 +1872,8 @@ dissect_diropargs(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tre
|
|||
int old_offset = offset;
|
||||
|
||||
if (tree) {
|
||||
diropargs_item = proto_tree_add_text(tree, tvb, offset,
|
||||
tvb_length_remaining(tvb, offset), "%s", name);
|
||||
diropargs_item = proto_tree_add_text(tree, tvb, offset, -1,
|
||||
"%s", name);
|
||||
diropargs_tree = proto_item_add_subtree(diropargs_item, ett_nfs_diropargs);
|
||||
}
|
||||
|
||||
|
@ -2153,7 +2153,7 @@ dissect_readdir_entry(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|||
|
||||
if (tree) {
|
||||
entry_item = proto_tree_add_item(tree, hf_nfs_readdir_entry, tvb,
|
||||
offset+0, tvb_length_remaining(tvb, offset), FALSE);
|
||||
offset+0, -1, FALSE);
|
||||
entry_tree = proto_item_add_subtree(entry_item, ett_nfs_readdir_entry);
|
||||
}
|
||||
|
||||
|
@ -2637,8 +2637,8 @@ dissect_fattr3(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
|
|||
guint32 type;
|
||||
|
||||
if (tree) {
|
||||
fattr3_item = proto_tree_add_text(tree, tvb, offset,
|
||||
tvb_length_remaining(tvb, offset), "%s", name);
|
||||
fattr3_item = proto_tree_add_text(tree, tvb, offset, -1,
|
||||
"%s", name);
|
||||
fattr3_tree = proto_item_add_subtree(fattr3_item, ett_nfs_fattr3);
|
||||
}
|
||||
|
||||
|
@ -2691,8 +2691,8 @@ dissect_post_op_attr(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|||
guint32 attributes_follow;
|
||||
|
||||
if (tree) {
|
||||
post_op_attr_item = proto_tree_add_text(tree, tvb, offset,
|
||||
tvb_length_remaining(tvb, offset), "%s", name);
|
||||
post_op_attr_item = proto_tree_add_text(tree, tvb, offset, -1,
|
||||
"%s", name);
|
||||
post_op_attr_tree = proto_item_add_subtree(post_op_attr_item,
|
||||
ett_nfs_post_op_attr);
|
||||
}
|
||||
|
@ -2731,8 +2731,8 @@ dissect_wcc_attr(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|||
int old_offset = offset;
|
||||
|
||||
if (tree) {
|
||||
wcc_attr_item = proto_tree_add_text(tree, tvb, offset,
|
||||
tvb_length_remaining(tvb, offset), "%s", name);
|
||||
wcc_attr_item = proto_tree_add_text(tree, tvb, offset, -1,
|
||||
"%s", name);
|
||||
wcc_attr_tree = proto_item_add_subtree(wcc_attr_item,
|
||||
ett_nfs_wcc_attr);
|
||||
}
|
||||
|
@ -2761,8 +2761,8 @@ dissect_pre_op_attr(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|||
guint32 attributes_follow;
|
||||
|
||||
if (tree) {
|
||||
pre_op_attr_item = proto_tree_add_text(tree, tvb, offset,
|
||||
tvb_length_remaining(tvb, offset), "%s", name);
|
||||
pre_op_attr_item = proto_tree_add_text(tree, tvb, offset, -1,
|
||||
"%s", name);
|
||||
pre_op_attr_tree = proto_item_add_subtree(pre_op_attr_item,
|
||||
ett_nfs_pre_op_attr);
|
||||
}
|
||||
|
@ -2801,8 +2801,8 @@ dissect_wcc_data(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|||
int old_offset = offset;
|
||||
|
||||
if (tree) {
|
||||
wcc_data_item = proto_tree_add_text(tree, tvb, offset,
|
||||
tvb_length_remaining(tvb, offset), "%s", name);
|
||||
wcc_data_item = proto_tree_add_text(tree, tvb, offset, -1,
|
||||
"%s", name);
|
||||
wcc_data_tree = proto_item_add_subtree(wcc_data_item,
|
||||
ett_nfs_wcc_data);
|
||||
}
|
||||
|
@ -2830,8 +2830,8 @@ dissect_post_op_fh3(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|||
guint32 handle_follows;
|
||||
|
||||
if (tree) {
|
||||
post_op_fh3_item = proto_tree_add_text(tree, tvb, offset,
|
||||
tvb_length_remaining(tvb, offset), "%s", name);
|
||||
post_op_fh3_item = proto_tree_add_text(tree, tvb, offset, -1,
|
||||
"%s", name);
|
||||
post_op_fh3_tree = proto_item_add_subtree(post_op_fh3_item,
|
||||
ett_nfs_post_op_fh3);
|
||||
}
|
||||
|
@ -2875,9 +2875,8 @@ dissect_set_mode3(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|||
set_it_name = val_to_str(set_it,value_follows,"Unknown");
|
||||
|
||||
if (tree) {
|
||||
set_mode3_item = proto_tree_add_text(tree, tvb, offset,
|
||||
tvb_length_remaining(tvb, offset), "%s: %s",
|
||||
name, set_it_name);
|
||||
set_mode3_item = proto_tree_add_text(tree, tvb, offset, -1,
|
||||
"%s: %s", name, set_it_name);
|
||||
set_mode3_tree = proto_item_add_subtree(set_mode3_item,
|
||||
ett_nfs_set_mode3);
|
||||
}
|
||||
|
@ -2922,9 +2921,8 @@ dissect_set_uid3(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|||
set_it_name = val_to_str(set_it,value_follows,"Unknown");
|
||||
|
||||
if (tree) {
|
||||
set_uid3_item = proto_tree_add_text(tree, tvb, offset,
|
||||
tvb_length_remaining(tvb, offset), "%s: %s",
|
||||
name, set_it_name);
|
||||
set_uid3_item = proto_tree_add_text(tree, tvb, offset, -1,
|
||||
"%s: %s", name, set_it_name);
|
||||
set_uid3_tree = proto_item_add_subtree(set_uid3_item,
|
||||
ett_nfs_set_uid3);
|
||||
}
|
||||
|
@ -2969,9 +2967,8 @@ dissect_set_gid3(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|||
set_it_name = val_to_str(set_it,value_follows,"Unknown");
|
||||
|
||||
if (tree) {
|
||||
set_gid3_item = proto_tree_add_text(tree, tvb, offset,
|
||||
tvb_length_remaining(tvb, offset), "%s: %s",
|
||||
name, set_it_name);
|
||||
set_gid3_item = proto_tree_add_text(tree, tvb, offset, -1,
|
||||
"%s: %s", name, set_it_name);
|
||||
set_gid3_tree = proto_item_add_subtree(set_gid3_item,
|
||||
ett_nfs_set_gid3);
|
||||
}
|
||||
|
@ -3016,9 +3013,8 @@ dissect_set_size3(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|||
set_it_name = val_to_str(set_it,value_follows,"Unknown");
|
||||
|
||||
if (tree) {
|
||||
set_size3_item = proto_tree_add_text(tree, tvb, offset,
|
||||
tvb_length_remaining(tvb, offset), "%s: %s",
|
||||
name, set_it_name);
|
||||
set_size3_item = proto_tree_add_text(tree, tvb, offset, -1,
|
||||
"%s: %s", name, set_it_name);
|
||||
set_size3_tree = proto_item_add_subtree(set_size3_item,
|
||||
ett_nfs_set_size3);
|
||||
}
|
||||
|
@ -3077,9 +3073,8 @@ dissect_set_atime(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|||
set_it_name = val_to_str(set_it,time_how,"Unknown");
|
||||
|
||||
if (tree) {
|
||||
set_atime_item = proto_tree_add_text(tree, tvb, offset,
|
||||
tvb_length_remaining(tvb, offset), "%s: %s",
|
||||
name, set_it_name);
|
||||
set_atime_item = proto_tree_add_text(tree, tvb, offset, -1,
|
||||
"%s: %s", name, set_it_name);
|
||||
set_atime_tree = proto_item_add_subtree(set_atime_item,
|
||||
ett_nfs_set_atime);
|
||||
}
|
||||
|
@ -3126,9 +3121,8 @@ dissect_set_mtime(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|||
set_it_name = val_to_str(set_it,time_how,"Unknown");
|
||||
|
||||
if (tree) {
|
||||
set_mtime_item = proto_tree_add_text(tree, tvb, offset,
|
||||
tvb_length_remaining(tvb, offset), "%s: %s",
|
||||
name, set_it_name);
|
||||
set_mtime_item = proto_tree_add_text(tree, tvb, offset, -1,
|
||||
"%s: %s", name, set_it_name);
|
||||
set_mtime_tree = proto_item_add_subtree(set_mtime_item,
|
||||
ett_nfs_set_mtime);
|
||||
}
|
||||
|
@ -3170,8 +3164,8 @@ dissect_sattr3(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
|
|||
int old_offset = offset;
|
||||
|
||||
if (tree) {
|
||||
sattr3_item = proto_tree_add_text(tree, tvb, offset,
|
||||
tvb_length_remaining(tvb, offset), "%s", name);
|
||||
sattr3_item = proto_tree_add_text(tree, tvb, offset, -1,
|
||||
"%s", name);
|
||||
sattr3_tree = proto_item_add_subtree(sattr3_item, ett_nfs_sattr3);
|
||||
}
|
||||
|
||||
|
@ -3203,8 +3197,8 @@ dissect_diropargs3(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|||
int name_offset, name_len;
|
||||
|
||||
if (tree) {
|
||||
diropargs3_item = proto_tree_add_text(tree, tvb, offset,
|
||||
tvb_length_remaining(tvb, offset), "%s", name);
|
||||
diropargs3_item = proto_tree_add_text(tree, tvb, offset, -1,
|
||||
"%s", name);
|
||||
diropargs3_tree = proto_item_add_subtree(diropargs3_item,
|
||||
ett_nfs_diropargs3);
|
||||
}
|
||||
|
@ -3362,9 +3356,8 @@ dissect_sattrguard3(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|||
check_name = val_to_str(check,value_follows,"Unknown");
|
||||
|
||||
if (tree) {
|
||||
sattrguard3_item = proto_tree_add_text(tree, tvb, offset,
|
||||
tvb_length_remaining(tvb, offset), "%s: %s",
|
||||
name, check_name);
|
||||
sattrguard3_item = proto_tree_add_text(tree, tvb, offset, -1,
|
||||
"%s: %s", name, check_name);
|
||||
sattrguard3_tree = proto_item_add_subtree(sattrguard3_item,
|
||||
ett_nfs_sattrguard3);
|
||||
}
|
||||
|
@ -3879,7 +3872,7 @@ dissect_entry3(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree* tree)
|
|||
|
||||
if (tree) {
|
||||
entry_item = proto_tree_add_item(tree, hf_nfs_readdir_entry, tvb,
|
||||
offset+0, tvb_length_remaining(tvb, offset), FALSE);
|
||||
offset+0, -1, FALSE);
|
||||
entry_tree = proto_item_add_subtree(entry_item, ett_nfs_readdir_entry);
|
||||
}
|
||||
|
||||
|
@ -3965,7 +3958,7 @@ dissect_entryplus3(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|||
|
||||
if (tree) {
|
||||
entry_item = proto_tree_add_item(tree, hf_nfs_readdir_entry, tvb,
|
||||
offset+0, tvb_length_remaining(tvb, offset), FALSE);
|
||||
offset+0, -1, FALSE);
|
||||
entry_tree = proto_item_add_subtree(entry_item, ett_nfs_readdir_entry);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* packet-nisplus.c
|
||||
* 2001 Ronnie Sahlberg <See AUTHORS for email>
|
||||
*
|
||||
* $Id: packet-nisplus.c,v 1.9 2001/12/23 21:36:57 guy Exp $
|
||||
* $Id: packet-nisplus.c,v 1.10 2002/01/20 22:12:27 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -296,7 +296,7 @@ dissect_group_obj(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tre
|
|||
int old_offset = offset;
|
||||
|
||||
lock_item = proto_tree_add_item(tree, hf_nisplus_group,
|
||||
tvb, offset, 0, FALSE);
|
||||
tvb, offset, -1, FALSE);
|
||||
|
||||
lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_group);
|
||||
|
||||
|
@ -355,8 +355,7 @@ dissect_table(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
|
|||
int old_offset = offset;
|
||||
|
||||
lock_item = proto_tree_add_item(tree, hf_nisplus_table_col,
|
||||
tvb, offset, 0,
|
||||
FALSE);
|
||||
tvb, offset, -1, FALSE);
|
||||
|
||||
lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_table_col);
|
||||
|
||||
|
@ -400,7 +399,7 @@ dissect_table_obj(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tre
|
|||
int old_offset = offset;
|
||||
|
||||
lock_item = proto_tree_add_item(tree, hf_nisplus_table,
|
||||
tvb, offset, 0, FALSE);
|
||||
tvb, offset, -1, FALSE);
|
||||
|
||||
lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_table);
|
||||
|
||||
|
@ -434,7 +433,7 @@ dissect_entry(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
|
|||
int old_offset = offset;
|
||||
|
||||
lock_item = proto_tree_add_item(tree, hf_nisplus_entry_col,
|
||||
tvb, offset, 0, FALSE);
|
||||
tvb, offset, -1, FALSE);
|
||||
|
||||
lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_entry_col);
|
||||
|
||||
|
@ -466,7 +465,7 @@ dissect_entry_obj(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tre
|
|||
int old_offset = offset;
|
||||
|
||||
lock_item = proto_tree_add_item(tree, hf_nisplus_entry,
|
||||
tvb, offset, 0, FALSE);
|
||||
tvb, offset, -1, FALSE);
|
||||
|
||||
lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_entry);
|
||||
|
||||
|
@ -488,7 +487,7 @@ dissect_attr(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
|
|||
int old_offset = offset;
|
||||
|
||||
lock_item = proto_tree_add_item(tree, hf_nisplus_attr,
|
||||
tvb, offset, 0, FALSE);
|
||||
tvb, offset, -1, FALSE);
|
||||
|
||||
lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_attr);
|
||||
|
||||
|
@ -510,7 +509,7 @@ dissect_link_obj(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree
|
|||
int old_offset = offset;
|
||||
|
||||
lock_item = proto_tree_add_item(tree, hf_nisplus_link,
|
||||
tvb, offset, 0, FALSE);
|
||||
tvb, offset, -1, FALSE);
|
||||
|
||||
lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_link);
|
||||
|
||||
|
@ -536,7 +535,7 @@ dissect_endpoint(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree
|
|||
int old_offset = offset;
|
||||
|
||||
lock_item = proto_tree_add_item(tree, hf_nisplus_endpoint,
|
||||
tvb, offset, 0, FALSE);
|
||||
tvb, offset, -1, FALSE);
|
||||
|
||||
lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_endpoint);
|
||||
|
||||
|
@ -562,7 +561,7 @@ dissect_directory_server(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tr
|
|||
int old_offset = offset;
|
||||
|
||||
lock_item = proto_tree_add_item(tree, hf_nisplus_server,
|
||||
tvb, offset, 0, FALSE);
|
||||
tvb, offset, -1, FALSE);
|
||||
|
||||
lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_server);
|
||||
|
||||
|
@ -591,7 +590,7 @@ dissect_directory_mask(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree
|
|||
int old_offset = offset;
|
||||
|
||||
lock_item = proto_tree_add_item(tree, hf_nisplus_directory_mask,
|
||||
tvb, offset, 0, FALSE);
|
||||
tvb, offset, -1, FALSE);
|
||||
|
||||
lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_directory_mask);
|
||||
|
||||
|
@ -612,7 +611,7 @@ dissect_directory_obj(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree
|
|||
int old_offset = offset;
|
||||
|
||||
lock_item = proto_tree_add_item(tree, hf_nisplus_directory,
|
||||
tvb, offset, 0, FALSE);
|
||||
tvb, offset, -1, FALSE);
|
||||
|
||||
lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_directory);
|
||||
|
||||
|
@ -643,7 +642,7 @@ dissect_nisplus_oid(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *t
|
|||
int old_offset = offset;
|
||||
|
||||
lock_item = proto_tree_add_item(tree, hf_nisplus_oid, tvb,
|
||||
offset, 0, FALSE);
|
||||
offset, -1, FALSE);
|
||||
|
||||
lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_oid);
|
||||
|
||||
|
@ -666,7 +665,7 @@ dissect_nisplus_object(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree
|
|||
int old_offset = offset;
|
||||
|
||||
lock_item = proto_tree_add_item(tree, hf_nisplus_object, tvb,
|
||||
offset, 0, FALSE);
|
||||
offset, -1, FALSE);
|
||||
|
||||
lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_object);
|
||||
|
||||
|
@ -789,7 +788,7 @@ dissect_nisplus_tag(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *t
|
|||
int old_offset = offset;
|
||||
|
||||
lock_item = proto_tree_add_item(tree, hf_nisplus_tag, tvb,
|
||||
offset, 0, FALSE);
|
||||
offset, -1, FALSE);
|
||||
|
||||
lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_tag);
|
||||
|
||||
|
@ -1032,7 +1031,7 @@ dissect_log_entry(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tre
|
|||
int old_offset = offset;
|
||||
|
||||
lock_item = proto_tree_add_item(tree, hf_nisplus_log_entry,
|
||||
tvb, offset, 0, FALSE);
|
||||
tvb, offset, -1, FALSE);
|
||||
|
||||
lock_tree = proto_item_add_subtree(lock_item, ett_nisplus_log_entry);
|
||||
|
||||
|
@ -1837,7 +1836,7 @@ proto_reg_handoff_nis(void)
|
|||
|
||||
|
||||
/* xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
callback protocol for NIS
|
||||
callback protocol for NIS+
|
||||
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx */
|
||||
|
||||
static int proto_nispluscb = -1;
|
||||
|
@ -1855,7 +1854,7 @@ dissect_cb_entry(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree
|
|||
int old_offset = offset;
|
||||
|
||||
lock_item = proto_tree_add_item(tree, hf_nispluscb_entry,
|
||||
tvb, offset, 0, FALSE);
|
||||
tvb, offset, -1, FALSE);
|
||||
|
||||
lock_tree = proto_item_add_subtree(lock_item, ett_nispluscb_entry);
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
/* packet-pcnfsd.c
|
||||
* Routines for PCNFSD dissection
|
||||
*
|
||||
* $Id: packet-pcnfsd.c,v 1.3 2001/11/07 07:05:58 girlich Exp $
|
||||
* $Id: packet-pcnfsd.c,v 1.4 2002/01/20 22:12:27 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@zing.org>
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
* Copyright 1998 Gerald Combs
|
||||
*
|
||||
* Copied from packet-ypbind.c
|
||||
|
@ -93,8 +93,7 @@ dissect_pcnfsd2_auth_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|||
|
||||
if (tree) {
|
||||
ident_item = proto_tree_add_text(tree, tvb,
|
||||
offset, tvb_length_remaining(tvb, offset),
|
||||
"Authentication Ident");
|
||||
offset, -1, "Authentication Ident");
|
||||
if (ident_item)
|
||||
ident_tree = proto_item_add_subtree(
|
||||
ident_item, ett_pcnfsd_auth_ident);
|
||||
|
@ -125,8 +124,7 @@ dissect_pcnfsd2_auth_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|||
|
||||
if (tree) {
|
||||
password_item = proto_tree_add_text(tree, tvb,
|
||||
offset, tvb_length_remaining(tvb, offset),
|
||||
"Authentication Password");
|
||||
offset, -1, "Authentication Password");
|
||||
if (password_item)
|
||||
password_tree = proto_item_add_subtree(
|
||||
password_item, ett_pcnfsd_auth_password);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* packet-portmap.c
|
||||
* Routines for portmap dissection
|
||||
*
|
||||
* $Id: packet-portmap.c,v 1.32 2001/12/10 00:25:32 guy Exp $
|
||||
* $Id: packet-portmap.c,v 1.33 2002/01/20 22:12:27 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -310,7 +310,7 @@ dissect_rpcb(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
if (tree) {
|
||||
rpcb_item = proto_tree_add_item(tree, hf_portmap_rpcb, tvb,
|
||||
offset, tvb_length(tvb), FALSE);
|
||||
offset, -1, FALSE);
|
||||
if (rpcb_item)
|
||||
rpcb_tree = proto_item_add_subtree(rpcb_item, ett_portmap_rpcb);
|
||||
}
|
||||
|
|
11
packet-ppp.c
11
packet-ppp.c
|
@ -1,7 +1,7 @@
|
|||
/* packet-ppp.c
|
||||
* Routines for ppp packet disassembly
|
||||
*
|
||||
* $Id: packet-ppp.c,v 1.85 2002/01/11 21:37:10 guy Exp $
|
||||
* $Id: packet-ppp.c,v 1.86 2002/01/20 22:12:27 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -2344,7 +2344,7 @@ dissect_comp_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
val_to_str(PPP_COMP, ppp_vals, "Unknown"));
|
||||
|
||||
if (tree) {
|
||||
ti = proto_tree_add_item(tree, proto_comp_data, tvb, 0, tvb_length(tvb), FALSE);
|
||||
ti = proto_tree_add_item(tree, proto_comp_data, tvb, 0, -1, FALSE);
|
||||
comp_data_tree = proto_item_add_subtree(ti, ett_comp_data);
|
||||
}
|
||||
}
|
||||
|
@ -2380,11 +2380,10 @@ dissect_pppmux(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
if (check_col(pinfo->cinfo, COL_INFO))
|
||||
col_set_str(pinfo->cinfo, COL_INFO, "PPP Multiplexing");
|
||||
|
||||
length_remaining = tvb_length(tvb);
|
||||
length_remaining = tvb_reported_length(tvb);
|
||||
|
||||
if (tree) {
|
||||
ti = proto_tree_add_item(tree, proto_pppmux, tvb, 0, length_remaining,
|
||||
FALSE);
|
||||
ti = proto_tree_add_item(tree, proto_pppmux, tvb, 0, -1, FALSE);
|
||||
mux_tree = proto_item_add_subtree(ti,ett_pppmux);
|
||||
|
||||
while (length_remaining > 0) {
|
||||
|
@ -2535,7 +2534,7 @@ dissect_ppp( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree ) {
|
|||
proto_tree *fh_tree = NULL;
|
||||
|
||||
if(tree) {
|
||||
ti = proto_tree_add_item(tree, proto_ppp, tvb, 0, 0, FALSE);
|
||||
ti = proto_tree_add_item(tree, proto_ppp, tvb, 0, -1, FALSE);
|
||||
fh_tree = proto_item_add_subtree(ti, ett_ppp);
|
||||
}
|
||||
|
||||
|
|
24
packet-rpc.c
24
packet-rpc.c
|
@ -2,7 +2,7 @@
|
|||
* Routines for rpc dissection
|
||||
* Copyright 1999, Uwe Girlich <Uwe.Girlich@philosys.de>
|
||||
*
|
||||
* $Id: packet-rpc.c,v 1.83 2002/01/20 01:13:41 guy Exp $
|
||||
* $Id: packet-rpc.c,v 1.84 2002/01/20 22:12:27 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -692,8 +692,7 @@ dissect_rpc_array(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
return offset;
|
||||
}
|
||||
|
||||
lock_item = proto_tree_add_item(tree, hfindex, tvb, offset,
|
||||
tvb_length_remaining(tvb, offset), FALSE);
|
||||
lock_item = proto_tree_add_item(tree, hfindex, tvb, offset, -1, FALSE);
|
||||
|
||||
lock_tree = proto_item_add_subtree(lock_item, ett_rpc_array);
|
||||
|
||||
|
@ -1367,11 +1366,10 @@ dissect_rpc_continuation(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
col_set_str(pinfo->cinfo, COL_INFO, "Continuation");
|
||||
|
||||
if (tree) {
|
||||
rpc_item = proto_tree_add_item(tree, proto_rpc, tvb, 0,
|
||||
tvb_length(tvb), FALSE);
|
||||
rpc_item = proto_tree_add_item(tree, proto_rpc, tvb, 0, -1,
|
||||
FALSE);
|
||||
rpc_tree = proto_item_add_subtree(rpc_item, ett_rpc);
|
||||
proto_tree_add_text(rpc_tree, tvb, 0, tvb_length(tvb),
|
||||
"Continuation data");
|
||||
proto_tree_add_text(rpc_tree, tvb, 0, -1, "Continuation data");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1527,8 +1525,8 @@ dissect_rpc_message(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|||
col_clear(pinfo->cinfo, COL_INFO);
|
||||
|
||||
if (tree) {
|
||||
rpc_item = proto_tree_add_item(tree, proto_rpc, tvb, 0,
|
||||
tvb_length(tvb), FALSE);
|
||||
rpc_item = proto_tree_add_item(tree, proto_rpc, tvb, 0, -1,
|
||||
FALSE);
|
||||
if (rpc_item) {
|
||||
rpc_tree = proto_item_add_subtree(rpc_item, ett_rpc);
|
||||
}
|
||||
|
@ -1964,8 +1962,8 @@ dissect_rpc_message(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|||
|
||||
/* create here the program specific sub-tree */
|
||||
if (tree) {
|
||||
pitem = proto_tree_add_item(tree, proto, tvb,
|
||||
offset, tvb_length(tvb) - offset, FALSE);
|
||||
pitem = proto_tree_add_item(tree, proto, tvb, offset, -1,
|
||||
FALSE);
|
||||
if (pitem) {
|
||||
ptree = proto_item_add_subtree(pitem, ett);
|
||||
}
|
||||
|
@ -1992,7 +1990,7 @@ dissect_rpc_message(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|||
* We don't know the authentication flavor, so we can't
|
||||
* dissect the payload.
|
||||
*/
|
||||
proto_tree_add_text(ptree, tvb, offset, tvb_length_remaining(tvb, offset),
|
||||
proto_tree_add_text(ptree, tvb, offset, -1,
|
||||
"Unknown authentication flavor - cannot dissect");
|
||||
return TRUE;
|
||||
|
||||
|
@ -2011,7 +2009,7 @@ dissect_rpc_message(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|||
* procedure and service information, so we can't dissect
|
||||
* the payload.
|
||||
*/
|
||||
proto_tree_add_text(ptree, tvb, offset, tvb_length_remaining(tvb, offset),
|
||||
proto_tree_add_text(ptree, tvb, offset, -1,
|
||||
"GSS-API authentication, but procedure and service unknown - cannot dissect");
|
||||
return TRUE;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* packet-rtcp.c
|
||||
*
|
||||
* $Id: packet-rtcp.c,v 1.28 2002/01/10 22:21:13 guy Exp $
|
||||
* $Id: packet-rtcp.c,v 1.29 2002/01/20 22:12:27 guy Exp $
|
||||
*
|
||||
* Routines for RTCP dissection
|
||||
* RTCP = Real-time Transport Control Protocol
|
||||
|
@ -429,7 +429,7 @@ dissect_rtcp_sdes( tvbuff_t *tvb, int offset, frame_data *fd, proto_tree *tree,
|
|||
start_offset = offset;
|
||||
|
||||
ssrc = tvb_get_ntohl( tvb, offset );
|
||||
sdes_item = proto_tree_add_text(tree, tvb, offset, 0,
|
||||
sdes_item = proto_tree_add_text(tree, tvb, offset, -1,
|
||||
"Chunk %u, SSRC/CSRC %u", chunk, ssrc);
|
||||
sdes_tree = proto_item_add_subtree( sdes_item, ett_sdes );
|
||||
|
||||
|
@ -440,7 +440,7 @@ dissect_rtcp_sdes( tvbuff_t *tvb, int offset, frame_data *fd, proto_tree *tree,
|
|||
/* Create a subtree for the SDES items; we don't yet know
|
||||
the length */
|
||||
items_start_offset = offset;
|
||||
ti = proto_tree_add_text(sdes_tree, tvb, offset, 0,
|
||||
ti = proto_tree_add_text(sdes_tree, tvb, offset, -1,
|
||||
"SDES items" );
|
||||
sdes_item_tree = proto_item_add_subtree( ti, ett_sdes_item );
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* Jason Lango <jal@netapp.com>
|
||||
* Liberally copied from packet-http.c, by Guy Harris <guy@alum.mit.edu>
|
||||
*
|
||||
* $Id: packet-rtsp.c,v 1.45 2001/12/10 00:25:33 guy Exp $
|
||||
* $Id: packet-rtsp.c,v 1.46 2002/01/20 22:12:27 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -413,8 +413,8 @@ dissect_rtspmessage(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|||
orig_offset = offset;
|
||||
rtsp_tree = NULL;
|
||||
if (tree) {
|
||||
ti = proto_tree_add_item(tree, proto_rtsp, tvb, offset,
|
||||
tvb_length_remaining(tvb, offset), FALSE);
|
||||
ti = proto_tree_add_item(tree, proto_rtsp, tvb, offset, -1,
|
||||
FALSE);
|
||||
rtsp_tree = proto_item_add_subtree(ti, ett_rtsp);
|
||||
}
|
||||
|
||||
|
|
10
packet-rx.c
10
packet-rx.c
|
@ -4,7 +4,7 @@
|
|||
* Based on routines from tcpdump patches by
|
||||
* Ken Hornstein <kenh@cmf.nrl.navy.mil>
|
||||
*
|
||||
* $Id: packet-rx.c,v 1.29 2001/12/10 00:25:34 guy Exp $
|
||||
* $Id: packet-rx.c,v 1.30 2002/01/20 22:12:27 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -151,7 +151,7 @@ dissect_rx_response_encrypted(tvbuff_t *tvb, packet_info *pinfo, proto_tree *par
|
|||
int i;
|
||||
guint32 callnumber;
|
||||
|
||||
item = proto_tree_add_item(parent_tree, hf_rx_encrypted, tvb, offset, 0, FALSE);
|
||||
item = proto_tree_add_item(parent_tree, hf_rx_encrypted, tvb, offset, -1, FALSE);
|
||||
tree = proto_item_add_subtree(item, ett_rx_encrypted);
|
||||
|
||||
/* epoch : 4 bytes */
|
||||
|
@ -219,7 +219,7 @@ dissect_rx_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree,
|
|||
);
|
||||
}
|
||||
|
||||
item = proto_tree_add_item(parent_tree, hf_rx_response, tvb, offset, 0, FALSE);
|
||||
item = proto_tree_add_item(parent_tree, hf_rx_response, tvb, offset, -1, FALSE);
|
||||
tree = proto_item_add_subtree(item, ett_rx_response);
|
||||
|
||||
version = tvb_get_ntohl(tvb, offset);
|
||||
|
@ -274,7 +274,7 @@ dissect_rx_challenge(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree,
|
|||
);
|
||||
}
|
||||
|
||||
item = proto_tree_add_item(parent_tree, hf_rx_challenge, tvb, offset, 0, FALSE);
|
||||
item = proto_tree_add_item(parent_tree, hf_rx_challenge, tvb, offset, -1, FALSE);
|
||||
tree = proto_item_add_subtree(item, ett_rx_challenge);
|
||||
|
||||
version = tvb_get_ntohl(tvb, offset);
|
||||
|
@ -316,7 +316,7 @@ dissect_rx_acks(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, int
|
|||
);
|
||||
}
|
||||
|
||||
item = proto_tree_add_item(parent_tree, hf_rx_ack, tvb, offset, 0, FALSE);
|
||||
item = proto_tree_add_item(parent_tree, hf_rx_ack, tvb, offset, -1, FALSE);
|
||||
tree = proto_item_add_subtree(item, ett_rx_ack);
|
||||
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
* - support for reassembly
|
||||
* - code cleanup
|
||||
*
|
||||
* $Id: packet-sctp.c,v 1.27 2002/01/15 23:05:36 guy Exp $
|
||||
* $Id: packet-sctp.c,v 1.28 2002/01/20 22:12:27 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -652,7 +652,7 @@ dissect_tlv_parameter_list(tvbuff_t *parameter_list_tvb, packet_info *pinfo, pro
|
|||
tvbuff_t *parameter_tvb;
|
||||
|
||||
offset = 0;
|
||||
while(tvb_length_remaining(parameter_list_tvb, offset)) {
|
||||
while(tvb_reported_length_remaining(parameter_list_tvb, offset)) {
|
||||
length = tvb_get_ntohs(parameter_list_tvb, offset + PARAMETER_LENGTH_OFFSET);
|
||||
padding_length = nr_of_padding_bytes(length);
|
||||
total_length = length + padding_length;
|
||||
|
@ -874,7 +874,7 @@ dissect_error_cause_indication_parameter(tvbuff_t *parameter_tvb, packet_info *p
|
|||
tvbuff_t *error_cause_tvb;
|
||||
|
||||
offset = PARAMETER_VALUE_OFFSET;
|
||||
while(tvb_length_remaining(parameter_tvb, offset)) {
|
||||
while(tvb_reported_length_remaining(parameter_tvb, offset)) {
|
||||
length = tvb_get_ntohs(parameter_tvb, offset + CAUSE_LENGTH_OFFSET);
|
||||
padding_length = nr_of_padding_bytes(length);
|
||||
total_length = length + padding_length;
|
||||
|
@ -1592,16 +1592,16 @@ dissect_abort_chunk(tvbuff_t *chunk_tvb, packet_info *pinfo, proto_tree *tree,
|
|||
if (chunk_tree) {
|
||||
number_of_causes = 0;
|
||||
offset = ABORT_CHUNK_FIRST_ERROR_CAUSE_OFFSET;
|
||||
while(tvb_length_remaining(chunk_tvb, offset)) {
|
||||
length = tvb_get_ntohs(chunk_tvb, offset + CAUSE_LENGTH_OFFSET);
|
||||
padding_length = nr_of_padding_bytes(length);
|
||||
total_length = length + padding_length;
|
||||
/* create a tvb for the chunk including the padding bytes */
|
||||
cause_tvb = tvb_new_subset(chunk_tvb, offset, total_length, total_length);
|
||||
dissect_error_cause(cause_tvb, pinfo, chunk_tree);
|
||||
/* get rid of the handled parameter */
|
||||
offset += total_length;
|
||||
number_of_causes++;
|
||||
while(tvb_reported_length_remaining(chunk_tvb, offset)) {
|
||||
length = tvb_get_ntohs(chunk_tvb, offset + CAUSE_LENGTH_OFFSET);
|
||||
padding_length = nr_of_padding_bytes(length);
|
||||
total_length = length + padding_length;
|
||||
/* create a tvb for the chunk including the padding bytes */
|
||||
cause_tvb = tvb_new_subset(chunk_tvb, offset, total_length, total_length);
|
||||
dissect_error_cause(cause_tvb, pinfo, chunk_tree);
|
||||
/* get rid of the handled parameter */
|
||||
offset += total_length;
|
||||
number_of_causes++;
|
||||
};
|
||||
|
||||
proto_item_set_text(chunk_item, "Abort chunk with %u cause%s",
|
||||
|
@ -1667,7 +1667,7 @@ dissect_error_chunk(tvbuff_t *chunk_tvb, packet_info *pinfo, proto_tree *tree,
|
|||
/* get rid of the handled parameter */
|
||||
offset += total_length;
|
||||
number_of_causes++;
|
||||
} while(tvb_length_remaining(chunk_tvb, offset));
|
||||
} while(tvb_reported_length_remaining(chunk_tvb, offset));
|
||||
|
||||
proto_item_set_text(chunk_item, "Error chunk with %u cause%s",
|
||||
number_of_causes, plurality(number_of_causes, "", "s"));
|
||||
|
@ -1848,7 +1848,7 @@ dissect_asconf_chunk(tvbuff_t *chunk_tvb, packet_info *pinfo, proto_tree *tree,
|
|||
offset += ASCONF_ADDR_LENGTH;
|
||||
proto_item_set_text(chunk_item, "ASCONF chunk");
|
||||
|
||||
while(tvb_length_remaining(chunk_tvb, offset)) {
|
||||
while(tvb_reported_length_remaining(chunk_tvb, offset)) {
|
||||
correlation_id = tvb_get_ntohl(chunk_tvb, offset);
|
||||
proto_tree_add_uint(chunk_tree, hf_sctp_asconf_correlation_id, chunk_tvb, offset, CORRELATION_ID_LENGTH, correlation_id);
|
||||
offset += CORRELATION_ID_LENGTH;
|
||||
|
@ -1880,7 +1880,7 @@ dissect_asconf_ack_chunk(tvbuff_t *chunk_tvb, packet_info *pinfo, proto_tree *tr
|
|||
proto_item_set_text(chunk_item, "ASCONF-ACK chunk");
|
||||
|
||||
offset = SERIAL_NUMBER_OFFSET + SERIAL_NUMBER_LENGTH;
|
||||
while(tvb_length_remaining(chunk_tvb, offset)) {
|
||||
while(tvb_reported_length_remaining(chunk_tvb, offset)) {
|
||||
correlation_id = tvb_get_ntohl(chunk_tvb, offset);
|
||||
proto_tree_add_uint(chunk_tree, hf_sctp_asconf_ack_correlation_id, chunk_tvb, offset, CORRELATION_ID_LENGTH, correlation_id);
|
||||
offset += CORRELATION_ID_LENGTH;
|
||||
|
@ -1947,7 +1947,7 @@ dissect_sctp_chunk(tvbuff_t *chunk_tvb, packet_info *pinfo, proto_tree *tree, pr
|
|||
|
||||
if (tree) {
|
||||
/* create proto_tree stuff */
|
||||
chunk_item = proto_tree_add_text(sctp_tree, chunk_tvb, CHUNK_HEADER_OFFSET, tvb_length(chunk_tvb), "Incomplete chunk");
|
||||
chunk_item = proto_tree_add_text(sctp_tree, chunk_tvb, CHUNK_HEADER_OFFSET, -1, "Incomplete chunk");
|
||||
chunk_tree = proto_item_add_subtree(chunk_item, ett_sctp_chunk);
|
||||
|
||||
/* then insert the chunk header components into the protocol tree */
|
||||
|
@ -2037,7 +2037,7 @@ dissect_sctp_chunks(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_i
|
|||
offset = COMMON_HEADER_LENGTH;
|
||||
sctp_item_length_set = FALSE;
|
||||
|
||||
while(tvb_length_remaining(tvb, offset) > 0) {
|
||||
while(tvb_reported_length_remaining(tvb, offset) > 0) {
|
||||
/* extract the chunk length and compute number of padding bytes */
|
||||
length = tvb_get_ntohs(tvb, offset + CHUNK_LENGTH_OFFSET);
|
||||
padding_length = nr_of_padding_bytes(length);
|
||||
|
@ -2050,8 +2050,8 @@ dissect_sctp_chunks(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_i
|
|||
sctp_item_length_set = TRUE;
|
||||
offset += total_length;
|
||||
last_offset = offset;
|
||||
if (tvb_length_remaining(tvb, offset) > 0) {
|
||||
sctp_item = proto_tree_add_item(tree, proto_sctp, tvb, offset, 0, FALSE);
|
||||
if (tvb_reported_length_remaining(tvb, offset) > 0) {
|
||||
sctp_item = proto_tree_add_item(tree, proto_sctp, tvb, offset, -1, FALSE);
|
||||
sctp_tree = proto_item_add_subtree(sctp_item, ett_sctp);
|
||||
sctp_item_length_set = FALSE;
|
||||
}
|
||||
|
@ -2102,7 +2102,7 @@ dissect_sctp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
necessary to generate protocol tree items. */
|
||||
if (tree) {
|
||||
/* create the sctp protocol tree */
|
||||
sctp_item = proto_tree_add_item(tree, proto_sctp, tvb, 0, 0, FALSE);
|
||||
sctp_item = proto_tree_add_item(tree, proto_sctp, tvb, 0, -1, FALSE);
|
||||
sctp_tree = proto_item_add_subtree(sctp_item, ett_sctp);
|
||||
|
||||
/* add the components of the common header to the protocol tree */
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Routines for SMB mailslot packet dissection
|
||||
* Copyright 2000, Jeffrey C. Foster <jfoste@woodward.com>
|
||||
*
|
||||
* $Id: packet-smb-mailslot.c,v 1.29 2001/12/10 00:25:34 guy Exp $
|
||||
* $Id: packet-smb-mailslot.c,v 1.30 2002/01/20 22:12:28 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -132,7 +132,7 @@ dissect_mailslot_smb(tvbuff_t *mshdr_tvb, tvbuff_t *setup_tvb,
|
|||
|
||||
if (parent_tree) {
|
||||
item = proto_tree_add_item(parent_tree, proto_smb_msp, mshdr_tvb,
|
||||
0, tvb_length(mshdr_tvb), FALSE);
|
||||
0, -1, FALSE);
|
||||
tree = proto_item_add_subtree(item, ett_smb_msp);
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ XXX Fixme : shouldnt show [malformed frame] for long packets
|
|||
* significant rewrite to tvbuffify the dissector, Ronnie Sahlberg and
|
||||
* Guy Harris 2001
|
||||
*
|
||||
* $Id: packet-smb-pipe.c,v 1.64 2002/01/17 06:29:16 guy Exp $
|
||||
* $Id: packet-smb-pipe.c,v 1.65 2002/01/20 22:12:28 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -715,8 +715,7 @@ netshareenum_shares_list(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
int offset)
|
||||
{
|
||||
if (tree) {
|
||||
return proto_tree_add_text(tree, tvb, offset,
|
||||
tvb_length_remaining(tvb, offset),
|
||||
return proto_tree_add_text(tree, tvb, offset, -1,
|
||||
"Available Shares");
|
||||
} else
|
||||
return NULL;
|
||||
|
@ -730,8 +729,7 @@ netshareenum_share_entry(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
int offset)
|
||||
{
|
||||
if (tree) {
|
||||
return proto_tree_add_text(tree, tvb, offset,
|
||||
tvb_length_remaining(tvb, offset),
|
||||
return proto_tree_add_text(tree, tvb, offset, -1,
|
||||
"Share %.13s", tvb_get_ptr(tvb, offset, 13));
|
||||
} else
|
||||
return NULL;
|
||||
|
@ -908,8 +906,8 @@ netserverenum2_servers_list(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
int offset)
|
||||
{
|
||||
if (tree) {
|
||||
return proto_tree_add_text(tree, tvb, offset,
|
||||
tvb_length_remaining(tvb, offset), "Servers");
|
||||
return proto_tree_add_text(tree, tvb, offset, -1,
|
||||
"Servers");
|
||||
} else
|
||||
return NULL;
|
||||
}
|
||||
|
@ -922,8 +920,7 @@ netserverenum2_server_entry(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
int offset)
|
||||
{
|
||||
if (tree) {
|
||||
return proto_tree_add_text(tree, tvb, offset,
|
||||
tvb_length_remaining(tvb, offset),
|
||||
return proto_tree_add_text(tree, tvb, offset, -1,
|
||||
"Server %.16s", tvb_get_ptr(tvb, offset, 16));
|
||||
} else
|
||||
return NULL;
|
||||
|
@ -1893,8 +1890,7 @@ dissect_response_data(tvbuff_t *tvb, packet_info *pinfo, int convert,
|
|||
* We can't dissect the data; just show it
|
||||
* as raw data.
|
||||
*/
|
||||
proto_tree_add_text(tree, tvb, offset,
|
||||
tvb_length_remaining(tvb, offset),
|
||||
proto_tree_add_text(tree, tvb, offset, -1,
|
||||
"Data (no descriptor available)");
|
||||
offset += tvb_length_remaining(tvb, offset);
|
||||
} else {
|
||||
|
@ -2002,7 +1998,7 @@ dissect_pipe_lanman(tvbuff_t *pd_tvb, tvbuff_t *p_tvb, tvbuff_t *d_tvb,
|
|||
|
||||
if (parent_tree) {
|
||||
item = proto_tree_add_item(parent_tree, proto_smb_lanman,
|
||||
pd_tvb, 0, tvb_length(pd_tvb), FALSE);
|
||||
pd_tvb, 0, -1, FALSE);
|
||||
tree = proto_item_add_subtree(item, ett_lanman);
|
||||
}
|
||||
|
||||
|
|
18
packet-smb.c
18
packet-smb.c
|
@ -3,7 +3,7 @@
|
|||
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
|
||||
* 2001 Rewrite by Ronnie Sahlberg and Guy Harris
|
||||
*
|
||||
* $Id: packet-smb.c,v 1.195 2002/01/17 06:29:16 guy Exp $
|
||||
* $Id: packet-smb.c,v 1.196 2002/01/20 22:12:28 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -4111,7 +4111,7 @@ dissect_locking_andx_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
|
|||
if(un){
|
||||
old_offset = offset;
|
||||
|
||||
it = proto_tree_add_text(tree, tvb, offset, 0,
|
||||
it = proto_tree_add_text(tree, tvb, offset, -1,
|
||||
"Unlocks");
|
||||
tr = proto_item_add_subtree(it, ett_smb_unlocks);
|
||||
while(un--){
|
||||
|
@ -4172,7 +4172,7 @@ dissect_locking_andx_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
|
|||
if(ln){
|
||||
old_offset = offset;
|
||||
|
||||
it = proto_tree_add_text(tree, tvb, offset, 0,
|
||||
it = proto_tree_add_text(tree, tvb, offset, -1,
|
||||
"Locks");
|
||||
tr = proto_item_add_subtree(it, ett_smb_locks);
|
||||
while(ln--){
|
||||
|
@ -6330,7 +6330,7 @@ dissect_nt_sid(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *parent
|
|||
char str[256], *strp;
|
||||
|
||||
if(parent_tree){
|
||||
item = proto_tree_add_text(parent_tree, tvb, offset, 0,
|
||||
item = proto_tree_add_text(parent_tree, tvb, offset, -1,
|
||||
"NT %s SID", name);
|
||||
tree = proto_item_add_subtree(item, ett_smb_sid);
|
||||
}
|
||||
|
@ -6474,7 +6474,7 @@ dissect_nt_v2_ace(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *par
|
|||
int old_offset = offset;
|
||||
|
||||
if(parent_tree){
|
||||
item = proto_tree_add_text(parent_tree, tvb, offset, 0,
|
||||
item = proto_tree_add_text(parent_tree, tvb, offset, -1,
|
||||
"NT ACE: ");
|
||||
tree = proto_item_add_subtree(item, ett_smb_ace);
|
||||
}
|
||||
|
@ -6513,7 +6513,7 @@ dissect_nt_acl(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *parent
|
|||
guint32 num_aces;
|
||||
|
||||
if(parent_tree){
|
||||
item = proto_tree_add_text(parent_tree, tvb, offset, 0,
|
||||
item = proto_tree_add_text(parent_tree, tvb, offset, -1,
|
||||
"NT %s ACL", name);
|
||||
tree = proto_item_add_subtree(item, ett_smb_acl);
|
||||
}
|
||||
|
@ -11829,8 +11829,8 @@ dissect_smb_command(tvbuff_t *tvb, packet_info *pinfo, proto_tree *top_tree, int
|
|||
(si->request)? "Request" : "Response");
|
||||
}
|
||||
|
||||
cmd_item = proto_tree_add_text(smb_tree, tvb, offset,
|
||||
0, "%s %s (0x%02x)",
|
||||
cmd_item = proto_tree_add_text(smb_tree, tvb, offset, -1,
|
||||
"%s %s (0x%02x)",
|
||||
decode_smb_name(cmd),
|
||||
(si->request)?"Request":"Response",
|
||||
cmd);
|
||||
|
@ -13568,7 +13568,7 @@ dissect_smb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
|
|||
|
||||
if (parent_tree) {
|
||||
item = proto_tree_add_item(parent_tree, proto_smb, tvb, offset,
|
||||
tvb_length_remaining(tvb, 0), FALSE);
|
||||
-1, FALSE);
|
||||
tree = proto_item_add_subtree(item, ett_smb);
|
||||
|
||||
hitem = proto_tree_add_text(tree, tvb, offset, 32,
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Routines for SNA
|
||||
* Gilbert Ramirez <gram@alumni.rice.edu>
|
||||
*
|
||||
* $Id: packet-sna.c,v 1.36 2001/12/10 00:25:36 guy Exp $
|
||||
* $Id: packet-sna.c,v 1.37 2002/01/20 22:12:29 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -348,13 +348,13 @@ dissect_sna(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
/* Don't bother setting length. We'll set it later after we find
|
||||
* the lengths of TH/RH/RU */
|
||||
sna_ti = proto_tree_add_item(tree, proto_sna, tvb, 0, 0, FALSE);
|
||||
sna_ti = proto_tree_add_item(tree, proto_sna, tvb, 0, -1, FALSE);
|
||||
sna_tree = proto_item_add_subtree(sna_ti, ett_sna);
|
||||
|
||||
/* --- TH --- */
|
||||
/* Don't bother setting length. We'll set it later after we find
|
||||
* the length of TH */
|
||||
th_ti = proto_tree_add_item(sna_tree, hf_sna_th, tvb, 0, 0, FALSE);
|
||||
th_ti = proto_tree_add_item(sna_tree, hf_sna_th, tvb, 0, -1, FALSE);
|
||||
th_tree = proto_item_add_subtree(th_ti, ett_sna_th);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* packet-tcp.c
|
||||
* Routines for TCP packet disassembly
|
||||
*
|
||||
* $Id: packet-tcp.c,v 1.126 2002/01/18 22:35:19 guy Exp $
|
||||
* $Id: packet-tcp.c,v 1.127 2002/01/20 22:12:29 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -866,15 +866,13 @@ dissect_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
if (tree) {
|
||||
if (tcp_summary_in_tree) {
|
||||
ti = proto_tree_add_protocol_format(tree, proto_tcp, tvb, 0,
|
||||
tvb_length(tvb),
|
||||
ti = proto_tree_add_protocol_format(tree, proto_tcp, tvb, 0, -1,
|
||||
"Transmission Control Protocol, Src Port: %s (%u), Dst Port: %s (%u)",
|
||||
get_tcp_port(th_sport), th_sport,
|
||||
get_tcp_port(th_dport), th_dport);
|
||||
}
|
||||
else {
|
||||
ti = proto_tree_add_item(tree, proto_tcp, tvb, 0,
|
||||
tvb_length(tvb), FALSE);
|
||||
ti = proto_tree_add_item(tree, proto_tcp, tvb, 0, -1, FALSE);
|
||||
}
|
||||
tcp_tree = proto_item_add_subtree(ti, ett_tcp);
|
||||
proto_tree_add_uint_format(tcp_tree, hf_tcp_srcport, tvb, offset, 2, th_sport,
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Routines for v120 frame disassembly
|
||||
* Bert Driehuis <driehuis@playbeing.org>
|
||||
*
|
||||
* $Id: packet-v120.c,v 1.22 2001/12/10 00:25:41 guy Exp $
|
||||
* $Id: packet-v120.c,v 1.23 2002/01/20 22:12:29 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -83,7 +83,7 @@ dissect_v120(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
if (check_col(pinfo->cinfo, COL_INFO))
|
||||
col_set_str(pinfo->cinfo, COL_INFO, "Invalid V.120 frame");
|
||||
if (tree)
|
||||
ti = proto_tree_add_protocol_format(tree, proto_v120, tvb, 0, tvb_length(tvb),
|
||||
ti = proto_tree_add_protocol_format(tree, proto_v120, tvb, 0, -1,
|
||||
"Invalid V.120 frame");
|
||||
return;
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ dissect_v120(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
is_response = FALSE;
|
||||
|
||||
if (tree) {
|
||||
ti = proto_tree_add_protocol_format(tree, proto_v120, tvb, 0, 0, "V.120");
|
||||
ti = proto_tree_add_protocol_format(tree, proto_v120, tvb, 0, -1, "V.120");
|
||||
v120_tree = proto_item_add_subtree(ti, ett_v120);
|
||||
addr = byte1 << 8 | byte0;
|
||||
sprintf(info, "LLI: %d C/R: %s",
|
||||
|
|
Loading…
Reference in New Issue