Ethereal-dev: [ethereal-dev] Replacing "proto_tree_add_item()" with type-specific versions
Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.
From: Guy Harris <gharris@xxxxxxxxxxxx>
Date: Tue, 30 May 2000 03:52:15 -0700
I have a patch to: replace almost all calls to "proto_tree_add_item()" and 'proto_tree_add_item_hidden()" with calls to routines adding items of a particular type, along the lines of what we did for "proto_tree_add_item_format()", with, for example, "proto_tree_add_uint()"; rename "proto_tree_add_item()" and "proto_tree_add_item_hidden()" to "proto_tree_add_item_old()" and "proto_tree_add_item_hidden_old()" (with the intent of ultimately removing them); adding new "proto_tree_add_item()" and "proto_tree_add_item_hidden()" routines that get the value of the item from the tvbuff handed to them, and the offset and length supplied, so that you don't have to extract a value and then pass it to those routines. (I've mentioned this in mail in the past.) The intent is to add compile-time type checking of the value passed in (for the "proto_tree_add_XXX()" routines), or obviate the need for it (for "proto_tree_add_item()", which fetches the value based on the type of the item being added); adding the compile-time checking did catch some errors. I'd also expect that we might want to convert code to use the new "proto_tree_add_item()" calls as we convert it to use tvbuffs (it requires that a tvbuff be handed to it). The patch is attached; it's fairly large, as it changes most dissectors (Gilbert supplied a Perl script that did most of the work). Note that I'll be on vacation from May 31 to June 9; I may be able to check my mail via the Web during the latter part of the vacation.
? errs
? gtk/proto_draw.c.NEW
Index: packet-aarp.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-aarp.c,v
retrieving revision 1.19
diff -c -r1.19 packet-aarp.c
*** packet-aarp.c 2000/05/11 08:14:49 1.19
--- packet-aarp.c 2000/05/30 10:36:57
***************
*** 200,214 ****
2*ar_pln,
"AppleTalk Address Resolution Protocol (opcode 0x%04x)", ar_op);
aarp_tree = proto_item_add_subtree(ti, ett_aarp);
! proto_tree_add_item(aarp_tree, hf_aarp_hard_type, NullTVB, offset + AR_HRD, 2,
ar_hrd);
! proto_tree_add_item(aarp_tree, hf_aarp_proto_type, NullTVB, offset + AR_PRO, 2,
ar_pro);
! proto_tree_add_item(aarp_tree, hf_aarp_hard_size, NullTVB, offset + AR_HLN, 1,
ar_hln);
! proto_tree_add_item(aarp_tree, hf_aarp_proto_size, NullTVB, offset + AR_PLN, 1,
ar_pln);
! proto_tree_add_item(aarp_tree, hf_aarp_opcode, NullTVB, offset + AR_OP, 2,
ar_op);
proto_tree_add_bytes_format(aarp_tree, hf_aarp_src_ether, NullTVB, sha_offset, ar_hln,
&pd[sha_offset],
--- 200,214 ----
2*ar_pln,
"AppleTalk Address Resolution Protocol (opcode 0x%04x)", ar_op);
aarp_tree = proto_item_add_subtree(ti, ett_aarp);
! proto_tree_add_uint(aarp_tree, hf_aarp_hard_type, NullTVB, offset + AR_HRD, 2,
ar_hrd);
! proto_tree_add_uint(aarp_tree, hf_aarp_proto_type, NullTVB, offset + AR_PRO, 2,
ar_pro);
! proto_tree_add_uint(aarp_tree, hf_aarp_hard_size, NullTVB, offset + AR_HLN, 1,
ar_hln);
! proto_tree_add_uint(aarp_tree, hf_aarp_proto_size, NullTVB, offset + AR_PLN, 1,
ar_pln);
! proto_tree_add_uint(aarp_tree, hf_aarp_opcode, NullTVB, offset + AR_OP, 2,
ar_op);
proto_tree_add_bytes_format(aarp_tree, hf_aarp_src_ether, NullTVB, sha_offset, ar_hln,
&pd[sha_offset],
Index: packet-afs.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-afs.c,v
retrieving revision 1.10
diff -c -r1.10 packet-afs.c
*** packet-afs.c 2000/05/11 08:14:49 1.10
--- packet-afs.c 2000/05/30 10:37:03
***************
*** 1,5 ****
! /* packet-rx.c
! * Routines for RX packet dissection
* Copyright 1999, Nathan Neulinger <nneul@xxxxxxx>
* Based on routines from tcpdump patches by
* Ken Hornstein <kenh@xxxxxxxxxxxxxxxx>
--- 1,5 ----
! /* packet-afs.c
! * Routines for AFS packet dissection
* Copyright 1999, Nathan Neulinger <nneul@xxxxxxx>
* Based on routines from tcpdump patches by
* Ken Hornstein <kenh@xxxxxxxxxxxxxxxx>
***************
*** 886,892 ****
}
if (tree) {
! ti = proto_tree_add_item(tree, proto_afs, NullTVB, doffset, END_OF_FRAME);
afs_tree = proto_item_add_subtree(ti, ett_afs);
if ( !BYTES_ARE_IN_FRAME(offset, sizeof(struct rx_header) +
--- 886,892 ----
}
if (tree) {
! ti = proto_tree_add_item(tree, proto_afs, NullTVB, doffset, END_OF_FRAME, FALSE);
afs_tree = proto_item_add_subtree(ti, ett_afs);
if ( !BYTES_ARE_IN_FRAME(offset, sizeof(struct rx_header) +
***************
*** 910,922 ****
ti = NULL;
if ( !reply && node != 0 )
{
! ti = proto_tree_add_item(afs_tree,
node, NullTVB, doffset, 4, opcode);
}
else if ( reply && node != 0 )
{
/* the opcode isn't in this packet */
! ti = proto_tree_add_item(afs_tree,
node, NullTVB, doffset, 0, opcode);
}
else
--- 910,922 ----
ti = NULL;
if ( !reply && node != 0 )
{
! ti = proto_tree_add_uint(afs_tree,
node, NullTVB, doffset, 4, opcode);
}
else if ( reply && node != 0 )
{
/* the opcode isn't in this packet */
! ti = proto_tree_add_uint(afs_tree,
node, NullTVB, doffset, 0, opcode);
}
else
***************
*** 931,937 ****
if ( typenode != 0 )
{
/* indicate the type of request */
! proto_tree_add_item_hidden(afs_tree, typenode, NullTVB, doffset, 0, 1);
}
/* Process the packet according to what service it is */
--- 931,937 ----
if ( typenode != 0 )
{
/* indicate the type of request */
! proto_tree_add_boolean_hidden(afs_tree, typenode, NullTVB, doffset, 0, 1);
}
/* Process the packet according to what service it is */
***************
*** 972,1005 ****
Assumes it is in network byte order, converts to host before using */
#define UINTOUT(field) \
TRUNC(sizeof(guint32)) \
! proto_tree_add_item(tree,field, NullTVB,curoffset,sizeof(guint32), GETINT()); \
curoffset += 4;
! /* Output a unsigned integer, stored into field 'field'
! Assumes it is in network byte order, converts to host before using */
#define IPOUT(field) \
TRUNC(sizeof(gint32)) \
! proto_tree_add_item(tree,field, NullTVB,curoffset,sizeof(gint32),\
*((int*)&pd[curoffset]));\
curoffset += 4;
! /* Output a unix timestamp, after converting to a timeval */
#define BIGDATEOUT(field) \
{ struct timeval tv; \
TRUNC(2*sizeof(guint32)); \
tv.tv_sec = GETINT(); \
tv.tv_usec = GETINT(); \
! proto_tree_add_item(tree,field, NullTVB,curoffset,2*sizeof(guint32),&tv); \
curoffset += 8; \
}
! /* Output a unix timestamp, after converting to a timeval */
#define DATEOUT(field) \
{ struct timeval tv; \
TRUNC(sizeof(guint32)); \
tv.tv_sec = GETINT(); \
tv.tv_usec = 0; \
! proto_tree_add_item(tree,field, NullTVB,curoffset,sizeof(guint32),&tv); \
curoffset += 4; \
}
--- 972,1004 ----
Assumes it is in network byte order, converts to host before using */
#define UINTOUT(field) \
TRUNC(sizeof(guint32)) \
! proto_tree_add_uint(tree,field, NullTVB,curoffset,sizeof(guint32), GETINT()); \
curoffset += 4;
! /* Output an IPv4 address, stored into field 'field' */
#define IPOUT(field) \
TRUNC(sizeof(gint32)) \
! proto_tree_add_ipv4(tree,field, NullTVB,curoffset,sizeof(gint32),\
*((int*)&pd[curoffset]));\
curoffset += 4;
! /* Output a UNIX seconds/microseconds timestamp, after converting to a timeval */
#define BIGDATEOUT(field) \
{ struct timeval tv; \
TRUNC(2*sizeof(guint32)); \
tv.tv_sec = GETINT(); \
tv.tv_usec = GETINT(); \
! proto_tree_add_time(tree,field, NullTVB,curoffset,2*sizeof(guint32),&tv); \
curoffset += 8; \
}
! /* Output a UNIX seconds-only timestamp, after converting to a timeval */
#define DATEOUT(field) \
{ struct timeval tv; \
TRUNC(sizeof(guint32)); \
tv.tv_sec = GETINT(); \
tv.tv_usec = 0; \
! proto_tree_add_time(tree,field, NullTVB,curoffset,sizeof(guint32),&tv); \
curoffset += 4; \
}
***************
*** 1075,1090 ****
who, tmp, positive ? "" : " (negative)"); \
save = tree; \
tree = proto_item_add_subtree(ti, ett_afs_acl); \
! proto_tree_add_item(tree,hf_afs_fs_acl_entity, NullTVB,curoffset,strlen(who), who);\
tmpoffset = curoffset + strlen(who) + 1; \
acllen = bytes - strlen(who) - 1; \
! proto_tree_add_item(tree,hf_afs_fs_acl_r, NullTVB,tmpoffset,acllen,acl);\
! proto_tree_add_item(tree,hf_afs_fs_acl_l, NullTVB,tmpoffset,acllen,acl);\
! proto_tree_add_item(tree,hf_afs_fs_acl_i, NullTVB,tmpoffset,acllen,acl);\
! proto_tree_add_item(tree,hf_afs_fs_acl_d, NullTVB,tmpoffset,acllen,acl);\
! proto_tree_add_item(tree,hf_afs_fs_acl_w, NullTVB,tmpoffset,acllen,acl);\
! proto_tree_add_item(tree,hf_afs_fs_acl_k, NullTVB,tmpoffset,acllen,acl);\
! proto_tree_add_item(tree,hf_afs_fs_acl_a, NullTVB,tmpoffset,acllen,acl);\
tree = save; \
}
--- 1074,1089 ----
who, tmp, positive ? "" : " (negative)"); \
save = tree; \
tree = proto_item_add_subtree(ti, ett_afs_acl); \
! proto_tree_add_string(tree,hf_afs_fs_acl_entity, NullTVB,curoffset,strlen(who), who);\
tmpoffset = curoffset + strlen(who) + 1; \
acllen = bytes - strlen(who) - 1; \
! proto_tree_add_uint(tree,hf_afs_fs_acl_r, NullTVB,tmpoffset,acllen,acl);\
! proto_tree_add_uint(tree,hf_afs_fs_acl_l, NullTVB,tmpoffset,acllen,acl);\
! proto_tree_add_uint(tree,hf_afs_fs_acl_i, NullTVB,tmpoffset,acllen,acl);\
! proto_tree_add_uint(tree,hf_afs_fs_acl_d, NullTVB,tmpoffset,acllen,acl);\
! proto_tree_add_uint(tree,hf_afs_fs_acl_w, NullTVB,tmpoffset,acllen,acl);\
! proto_tree_add_uint(tree,hf_afs_fs_acl_k, NullTVB,tmpoffset,acllen,acl);\
! proto_tree_add_uint(tree,hf_afs_fs_acl_a, NullTVB,tmpoffset,acllen,acl);\
tree = save; \
}
***************
*** 1099,1105 ****
/* Raw data */
#define BYTESOUT(field, bytes) \
TRUNC(bytes); \
! proto_tree_add_item(tree,field, NullTVB,curoffset,bytes,\
(void *)&pd[curoffset]); \
curoffset += bytes;
--- 1098,1104 ----
/* Raw data */
#define BYTESOUT(field, bytes) \
TRUNC(bytes); \
! proto_tree_add_bytes(tree,field, NullTVB,curoffset,bytes,\
(void *)&pd[curoffset]); \
curoffset += bytes;
***************
*** 1112,1121 ****
curoffset += 4; \
TRUNC(i); \
if ( i > 0 ) { \
! proto_tree_add_item(tree, field, NullTVB, curoffset-4, i+4, \
(void *)&pd[curoffset]); \
} else { \
! proto_tree_add_item(tree, field, NullTVB, curoffset-4, 4, \
""); \
} \
curoffset += i; \
--- 1111,1120 ----
curoffset += 4; \
TRUNC(i); \
if ( i > 0 ) { \
! proto_tree_add_string(tree, field, NullTVB, curoffset-4, i+4, \
(void *)&pd[curoffset]); \
} else { \
! proto_tree_add_string(tree, field, NullTVB, curoffset-4, 4, \
""); \
} \
curoffset += i; \
***************
*** 1133,1139 ****
curoffset += sizeof(guint32);\
}\
tmp[length] = '\0';\
! proto_tree_add_item(tree, field, NullTVB, soff, length, tmp);\
}
/* Output a UBIK version code */
--- 1132,1138 ----
curoffset += sizeof(guint32);\
}\
tmp[length] = '\0';\
! proto_tree_add_string(tree, field, NullTVB, soff, length, tmp);\
}
/* Output a UBIK version code */
***************
*** 1152,1160 ****
"UBIK Version (%s): %u.%u", label, epoch, counter ); \
save = tree; \
tree = proto_item_add_subtree(ti, ett_afs_ubikver); \
! proto_tree_add_item(tree,hf_afs_ubik_version_epoch, NullTVB,curoffset-8, \
sizeof(guint32),&tv); \
! proto_tree_add_item(tree,hf_afs_ubik_version_counter, NullTVB,curoffset-4, \
sizeof(guint32),counter); \
tree = save; \
}
--- 1151,1159 ----
"UBIK Version (%s): %u.%u", label, epoch, counter ); \
save = tree; \
tree = proto_item_add_subtree(ti, ett_afs_ubikver); \
! proto_tree_add_time(tree,hf_afs_ubik_version_epoch, NullTVB,curoffset-8, \
sizeof(guint32),&tv); \
! proto_tree_add_uint(tree,hf_afs_ubik_version_counter, NullTVB,curoffset-4, \
sizeof(guint32),counter); \
tree = save; \
}
***************
*** 1203,1216 ****
return;
s += n;
TRUNC(1);
! proto_tree_add_item(tree, hf_afs_fs_acl_count_positive, NullTVB, curoffset, n, pos);
curoffset += n;
if (sscanf((char *) s, "%d %n", &neg, &n) != 1)
return;
s += n;
TRUNC(1);
! proto_tree_add_item(tree, hf_afs_fs_acl_count_negative, NullTVB, curoffset, n, neg);
curoffset += n;
--- 1202,1215 ----
return;
s += n;
TRUNC(1);
! proto_tree_add_uint(tree, hf_afs_fs_acl_count_positive, NullTVB, curoffset, n, pos);
curoffset += n;
if (sscanf((char *) s, "%d %n", &neg, &n) != 1)
return;
s += n;
TRUNC(1);
! proto_tree_add_uint(tree, hf_afs_fs_acl_count_negative, NullTVB, curoffset, n, neg);
curoffset += n;
***************
*** 1887,1893 ****
if ( i<nservers && j<=26 )
{
part[6] = (char) j;
! proto_tree_add_item(tree, hf_afs_vldb_partition, NullTVB,
curoffset, 4, part);
}
SKIP(4);
--- 1886,1892 ----
if ( i<nservers && j<=26 )
{
part[6] = (char) j;
! proto_tree_add_string(tree, hf_afs_vldb_partition, NullTVB,
curoffset, 4, part);
}
SKIP(4);
***************
*** 1934,1940 ****
if ( i<nservers && j<=26 )
{
part[6] = (char) j;
! proto_tree_add_item(tree, hf_afs_vldb_partition, NullTVB,
curoffset, 4, part);
}
SKIP(4);
--- 1933,1939 ----
if ( i<nservers && j<=26 )
{
part[6] = (char) j;
! proto_tree_add_string(tree, hf_afs_vldb_partition, NullTVB,
curoffset, 4, part);
}
SKIP(4);
***************
*** 1973,1979 ****
if ( i<nservers && j<=26 )
{
part[6] = (char) j;
! proto_tree_add_item(tree, hf_afs_vldb_partition, NullTVB,
curoffset, 4, part);
}
SKIP(4);
--- 1972,1978 ----
if ( i<nservers && j<=26 )
{
part[6] = (char) j;
! proto_tree_add_string(tree, hf_afs_vldb_partition, NullTVB,
curoffset, 4, part);
}
SKIP(4);
***************
*** 2064,2070 ****
switch ( opcode )
{
case 10000: /* beacon */
! proto_tree_add_item(tree,hf_afs_ubik_votetype, NullTVB,0,0,0);
break;
case 20004: /* get version */
UBIK_VERSIONOUT("DB Version");
--- 2063,2069 ----
switch ( opcode )
{
case 10000: /* beacon */
! proto_tree_add_boolean(tree,hf_afs_ubik_votetype, NullTVB,0,0,0);
break;
case 20004: /* get version */
UBIK_VERSIONOUT("DB Version");
***************
*** 2076,2082 ****
switch ( opcode )
{
case 10000:
! proto_tree_add_item(tree,hf_afs_ubik_votetype, NullTVB,0,0,1);
DATEOUT(hf_afs_ubik_voteend);
break;
default:
--- 2075,2081 ----
switch ( opcode )
{
case 10000:
! proto_tree_add_boolean(tree,hf_afs_ubik_votetype, NullTVB,0,0,1);
DATEOUT(hf_afs_ubik_voteend);
break;
default:
Index: packet-arp.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-arp.c,v
retrieving revision 1.29
diff -c -r1.29 packet-arp.c
*** packet-arp.c 2000/05/11 08:14:51 1.29
--- packet-arp.c 2000/05/30 10:37:04
***************
*** 285,293 ****
proto_tree *nsap_tree;
if (tl & ATMARP_IS_E164)
! proto_tree_add_item(tree, hf_e164, NullTVB, offset, len, &pd[offset]);
else {
! ti = proto_tree_add_item(tree, hf_nsap, NullTVB, offset, len,
&pd[offset]);
if (len >= 20) {
nsap_tree = proto_item_add_subtree(ti, ett_atmarp_nsap);
--- 285,293 ----
proto_tree *nsap_tree;
if (tl & ATMARP_IS_E164)
! proto_tree_add_string(tree, hf_e164, NullTVB, offset, len, &pd[offset]);
else {
! ti = proto_tree_add_bytes(tree, hf_nsap, NullTVB, offset, len,
&pd[offset]);
if (len >= 20) {
nsap_tree = proto_item_add_subtree(ti, ett_atmarp_nsap);
***************
*** 503,525 ****
ti = proto_tree_add_protocol_format(tree, proto_arp, NullTVB, offset, tot_len,
"ATM Address Resolution Protocol (opcode 0x%04x)", ar_op);
arp_tree = proto_item_add_subtree(ti, ett_arp);
! proto_tree_add_item(arp_tree, hf_arp_hard_type, NullTVB, offset + ATM_AR_HRD, 2,
ar_hrd);
! proto_tree_add_item(arp_tree, hf_arp_proto_type, NullTVB, offset + ATM_AR_PRO, 2,
ar_pro);
! proto_tree_add_item(arp_tree, hf_atmarp_shtl, NullTVB, offset + ATM_AR_SHTL, 1,
ar_shtl);
! proto_tree_add_item(arp_tree, hf_atmarp_ssl, NullTVB, offset + ATM_AR_SSL, 1,
ar_ssl);
! proto_tree_add_item(arp_tree, hf_arp_opcode, NullTVB, offset + AR_OP, 2,
ar_op);
! proto_tree_add_item(arp_tree, hf_atmarp_spln, NullTVB, offset + ATM_AR_SPLN, 1,
ar_spln);
! proto_tree_add_item(arp_tree, hf_atmarp_thtl, NullTVB, offset + ATM_AR_THTL, 1,
ar_thtl);
! proto_tree_add_item(arp_tree, hf_atmarp_tsl, NullTVB, offset + ATM_AR_TSL, 1,
ar_tsl);
! proto_tree_add_item(arp_tree, hf_atmarp_tpln, NullTVB, offset + ATM_AR_TPLN, 1,
ar_tpln);
if (ar_shl != 0)
dissect_atm_number(pd, sha_offset, ar_shtl, hf_atmarp_src_atm_num_e164,
--- 503,525 ----
ti = proto_tree_add_protocol_format(tree, proto_arp, NullTVB, offset, tot_len,
"ATM Address Resolution Protocol (opcode 0x%04x)", ar_op);
arp_tree = proto_item_add_subtree(ti, ett_arp);
! proto_tree_add_uint(arp_tree, hf_arp_hard_type, NullTVB, offset + ATM_AR_HRD, 2,
ar_hrd);
! proto_tree_add_uint(arp_tree, hf_arp_proto_type, NullTVB, offset + ATM_AR_PRO, 2,
ar_pro);
! proto_tree_add_uint(arp_tree, hf_atmarp_shtl, NullTVB, offset + ATM_AR_SHTL, 1,
ar_shtl);
! proto_tree_add_uint(arp_tree, hf_atmarp_ssl, NullTVB, offset + ATM_AR_SSL, 1,
ar_ssl);
! proto_tree_add_uint(arp_tree, hf_arp_opcode, NullTVB, offset + AR_OP, 2,
ar_op);
! proto_tree_add_uint(arp_tree, hf_atmarp_spln, NullTVB, offset + ATM_AR_SPLN, 1,
ar_spln);
! proto_tree_add_uint(arp_tree, hf_atmarp_thtl, NullTVB, offset + ATM_AR_THTL, 1,
ar_thtl);
! proto_tree_add_uint(arp_tree, hf_atmarp_tsl, NullTVB, offset + ATM_AR_TSL, 1,
ar_tsl);
! proto_tree_add_uint(arp_tree, hf_atmarp_tpln, NullTVB, offset + ATM_AR_TPLN, 1,
ar_tpln);
if (ar_shl != 0)
dissect_atm_number(pd, sha_offset, ar_shtl, hf_atmarp_src_atm_num_e164,
***************
*** 645,659 ****
ti = proto_tree_add_protocol_format(tree, proto_arp, NullTVB, offset, tot_len,
"Address Resolution Protocol (opcode 0x%04x)", ar_op);
arp_tree = proto_item_add_subtree(ti, ett_arp);
! proto_tree_add_item(arp_tree, hf_arp_hard_type, NullTVB, offset + AR_HRD, 2,
ar_hrd);
! proto_tree_add_item(arp_tree, hf_arp_proto_type, NullTVB, offset + AR_PRO, 2,
ar_pro);
! proto_tree_add_item(arp_tree, hf_arp_hard_size, NullTVB, offset + AR_HLN, 1,
ar_hln);
! proto_tree_add_item(arp_tree, hf_arp_proto_size, NullTVB, offset + AR_PLN, 1,
ar_pln);
! proto_tree_add_item(arp_tree, hf_arp_opcode, NullTVB, offset + AR_OP, 2,
ar_op);
if (ar_hln != 0)
proto_tree_add_bytes_format(arp_tree, hf_arp_src_ether, NullTVB, sha_offset, ar_hln,
--- 645,659 ----
ti = proto_tree_add_protocol_format(tree, proto_arp, NullTVB, offset, tot_len,
"Address Resolution Protocol (opcode 0x%04x)", ar_op);
arp_tree = proto_item_add_subtree(ti, ett_arp);
! proto_tree_add_uint(arp_tree, hf_arp_hard_type, NullTVB, offset + AR_HRD, 2,
ar_hrd);
! proto_tree_add_uint(arp_tree, hf_arp_proto_type, NullTVB, offset + AR_PRO, 2,
ar_pro);
! proto_tree_add_uint(arp_tree, hf_arp_hard_size, NullTVB, offset + AR_HLN, 1,
ar_hln);
! proto_tree_add_uint(arp_tree, hf_arp_proto_size, NullTVB, offset + AR_PLN, 1,
ar_pln);
! proto_tree_add_uint(arp_tree, hf_arp_opcode, NullTVB, offset + AR_OP, 2,
ar_op);
if (ar_hln != 0)
proto_tree_add_bytes_format(arp_tree, hf_arp_src_ether, NullTVB, sha_offset, ar_hln,
Index: packet-ascend.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-ascend.c,v
retrieving revision 1.15
diff -c -r1.15 packet-ascend.c
*** packet-ascend.c 2000/05/25 07:42:24 1.15
--- packet-ascend.c 2000/05/30 10:37:04
***************
*** 77,98 ****
if(tree) {
ti = proto_tree_add_text(tree, tvb, 0, 0, "Lucent/Ascend packet trace" );
fh_tree = proto_item_add_subtree(ti, ett_raw);
! proto_tree_add_item(fh_tree, hf_link_type, tvb, 0, 0,
pseudo_header->ascend.type);
if (pseudo_header->ascend.type == ASCEND_PFX_WDD) {
! proto_tree_add_item(fh_tree, hf_called_number, tvb, 0, 0,
pseudo_header->ascend.call_num);
! proto_tree_add_item(fh_tree, hf_chunk, tvb, 0, 0,
pseudo_header->ascend.chunk);
! proto_tree_add_item_hidden(fh_tree, hf_session_id, tvb, 0, 0, 0);
} else { /* It's wandsession data */
! proto_tree_add_item(fh_tree, hf_user_name, tvb, 0, 0,
pseudo_header->ascend.user);
! proto_tree_add_item(fh_tree, hf_session_id, tvb, 0, 0,
pseudo_header->ascend.sess);
! proto_tree_add_item_hidden(fh_tree, hf_chunk, tvb, 0, 0, 0);
}
! proto_tree_add_item(fh_tree, hf_task, tvb, 0, 0, pseudo_header->ascend.task);
}
switch (pseudo_header->ascend.type) {
--- 77,98 ----
if(tree) {
ti = proto_tree_add_text(tree, tvb, 0, 0, "Lucent/Ascend packet trace" );
fh_tree = proto_item_add_subtree(ti, ett_raw);
! proto_tree_add_uint(fh_tree, hf_link_type, tvb, 0, 0,
pseudo_header->ascend.type);
if (pseudo_header->ascend.type == ASCEND_PFX_WDD) {
! proto_tree_add_string(fh_tree, hf_called_number, tvb, 0, 0,
pseudo_header->ascend.call_num);
! proto_tree_add_uint(fh_tree, hf_chunk, tvb, 0, 0,
pseudo_header->ascend.chunk);
! proto_tree_add_uint_hidden(fh_tree, hf_session_id, tvb, 0, 0, 0);
} else { /* It's wandsession data */
! proto_tree_add_string(fh_tree, hf_user_name, tvb, 0, 0,
pseudo_header->ascend.user);
! proto_tree_add_uint(fh_tree, hf_session_id, tvb, 0, 0,
pseudo_header->ascend.sess);
! proto_tree_add_uint_hidden(fh_tree, hf_chunk, tvb, 0, 0, 0);
}
! proto_tree_add_uint(fh_tree, hf_task, tvb, 0, 0, pseudo_header->ascend.task);
}
switch (pseudo_header->ascend.type) {
Index: packet-atalk.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-atalk.c,v
retrieving revision 1.37
diff -c -r1.37 packet-atalk.c
*** packet-atalk.c 2000/05/30 03:35:51 1.37
--- packet-atalk.c 2000/05/30 10:37:06
***************
*** 168,174 ****
tmp = g_malloc( len+1 );
memcpy(tmp, &pd[offset], len);
tmp[len] = 0;
! item = proto_tree_add_item(tree, hf_index, NullTVB, offset-1, len+1, tmp);
subtree = proto_item_add_subtree(item, ett_pstring);
proto_tree_add_text(subtree, NullTVB, offset-1, 1, "Length: %d", len);
--- 168,174 ----
tmp = g_malloc( len+1 );
memcpy(tmp, &pd[offset], len);
tmp[len] = 0;
! item = proto_tree_add_string(tree, hf_index, NullTVB, offset-1, len+1, tmp);
subtree = proto_item_add_subtree(item, ett_pstring);
proto_tree_add_text(subtree, NullTVB, offset-1, 1, "Length: %d", len);
***************
*** 219,230 ****
net, nodelen_bits, node);
if (tree) {
! ti = proto_tree_add_item(tree, proto_rtmp, NullTVB, offset, END_OF_FRAME, NULL);
rtmp_tree = proto_item_add_subtree(ti, ett_rtmp);
! proto_tree_add_item(rtmp_tree, hf_rtmp_net, NullTVB, offset, 2, net);
! proto_tree_add_item(rtmp_tree, hf_rtmp_node_len, NullTVB, offset+2, 1, nodelen_bits);
! proto_tree_add_item(rtmp_tree, hf_rtmp_node, NullTVB, offset+3, nodelen, nodelen);
offset += 3 + nodelen;
i = 1;
--- 219,230 ----
net, nodelen_bits, node);
if (tree) {
! ti = proto_tree_add_item(tree, proto_rtmp, NullTVB, offset, END_OF_FRAME, FALSE);
rtmp_tree = proto_item_add_subtree(ti, ett_rtmp);
! proto_tree_add_uint(rtmp_tree, hf_rtmp_net, NullTVB, offset, 2, net);
! proto_tree_add_uint(rtmp_tree, hf_rtmp_node_len, NullTVB, offset+2, 1, nodelen_bits);
! proto_tree_add_uint(rtmp_tree, hf_rtmp_node, NullTVB, offset+3, nodelen, nodelen);
offset += 3 + nodelen;
i = 1;
***************
*** 248,256 ****
i, tuple_net, tuple_dist);
tuple_tree = proto_item_add_subtree(tuple_item, ett_rtmp_tuple);
! proto_tree_add_item(tuple_tree, hf_rtmp_tuple_net, NullTVB, offset, 2,
tuple_net);
! proto_tree_add_item(tuple_tree, hf_rtmp_tuple_dist, NullTVB, offset+2, 1,
tuple_dist);
if ( tuple_dist == 0 || tuple_dist & 0x80 ) /* phase 1/2 */
--- 248,256 ----
i, tuple_net, tuple_dist);
tuple_tree = proto_item_add_subtree(tuple_item, ett_rtmp_tuple);
! proto_tree_add_uint(tuple_tree, hf_rtmp_tuple_net, NullTVB, offset, 2,
tuple_net);
! proto_tree_add_uint(tuple_tree, hf_rtmp_tuple_dist, NullTVB, offset+2, 1,
tuple_dist);
if ( tuple_dist == 0 || tuple_dist & 0x80 ) /* phase 1/2 */
***************
*** 264,272 ****
tuple_net2 = pntohs(&pd[offset+3]);
tuple_dist2 = pd[offset+5];
! proto_tree_add_item(tuple_tree, hf_rtmp_tuple_net, NullTVB, offset, 2,
tuple_net2);
! proto_tree_add_item(tuple_tree, hf_rtmp_tuple_dist, NullTVB, offset+2, 1,
tuple_dist2);
proto_item_set_len(tuple_item, 6);
--- 264,272 ----
tuple_net2 = pntohs(&pd[offset+3]);
tuple_dist2 = pd[offset+5];
! proto_tree_add_uint(tuple_tree, hf_rtmp_tuple_net, NullTVB, offset, 2,
tuple_net2);
! proto_tree_add_uint(tuple_tree, hf_rtmp_tuple_dist, NullTVB, offset+2, 1,
tuple_dist2);
proto_item_set_len(tuple_item, 6);
***************
*** 308,314 ****
val_to_str(op, nbp_op_vals, "unknown (%1x)"), count);
if (tree) {
! ti = proto_tree_add_item(tree, proto_nbp, NullTVB, offset, END_OF_FRAME, NULL);
nbp_tree = proto_item_add_subtree(ti, ett_nbp);
info_item = proto_tree_add_uint_format(nbp_tree, hf_nbp_info, NullTVB, offset, 1,
--- 308,314 ----
val_to_str(op, nbp_op_vals, "unknown (%1x)"), count);
if (tree) {
! ti = proto_tree_add_item(tree, proto_nbp, NullTVB, offset, END_OF_FRAME, FALSE);
nbp_tree = proto_item_add_subtree(ti, ett_nbp);
info_item = proto_tree_add_uint_format(nbp_tree, hf_nbp_info, NullTVB, offset, 1,
***************
*** 317,325 ****
val_to_str(op, nbp_op_vals, "unknown"),
count);
nbp_info_tree = proto_item_add_subtree(info_item, ett_nbp_info);
! proto_tree_add_item(nbp_info_tree, hf_nbp_op, NullTVB, offset, 1, pd[offset]);
! proto_tree_add_item(nbp_info_tree, hf_nbp_count, NullTVB, offset, 1, pd[offset]);
! proto_tree_add_item(nbp_tree, hf_nbp_tid, NullTVB, offset+1, 1, pd[offset+1]);
offset += 2;
for (i=0; i<count; i++) {
--- 317,325 ----
val_to_str(op, nbp_op_vals, "unknown"),
count);
nbp_info_tree = proto_item_add_subtree(info_item, ett_nbp_info);
! proto_tree_add_uint(nbp_info_tree, hf_nbp_op, NullTVB, offset, 1, pd[offset]);
! proto_tree_add_uint(nbp_info_tree, hf_nbp_count, NullTVB, offset, 1, pd[offset]);
! proto_tree_add_uint(nbp_tree, hf_nbp_tid, NullTVB, offset+1, 1, pd[offset+1]);
offset += 2;
for (i=0; i<count; i++) {
***************
*** 343,355 ****
/* note, this is probably wrong, I need to look at my info at work
tomorrow to straighten it out */
! proto_tree_add_item(node_tree, hf_nbp_node_net, NullTVB, offset, 2, addr.net);
offset += 2;
! proto_tree_add_item(node_tree, hf_nbp_node_node, NullTVB, offset, 1, addr.node);
offset++;
! proto_tree_add_item(node_tree, hf_nbp_node_port, NullTVB, offset, 1, addr.port);
offset++;
! proto_tree_add_item(node_tree, hf_nbp_node_enum, NullTVB, offset, 1, pd[offset]);
offset++;
offset = dissect_pascal_string(pd,offset,fd,node_tree,hf_nbp_node_object);
--- 343,355 ----
/* note, this is probably wrong, I need to look at my info at work
tomorrow to straighten it out */
! proto_tree_add_uint(node_tree, hf_nbp_node_net, NullTVB, offset, 2, addr.net);
offset += 2;
! proto_tree_add_uint(node_tree, hf_nbp_node_node, NullTVB, offset, 1, addr.node);
offset++;
! proto_tree_add_uint(node_tree, hf_nbp_node_port, NullTVB, offset, 1, addr.port);
offset++;
! proto_tree_add_uint(node_tree, hf_nbp_node_enum, NullTVB, offset, 1, pd[offset]);
offset++;
offset = dissect_pascal_string(pd,offset,fd,node_tree,hf_nbp_node_object);
***************
*** 398,417 ****
val_to_str(ddp.type, op_vals, "Unknown DDP protocol (%02x)"));
if (tree) {
! ti = proto_tree_add_item(tree, proto_ddp, NullTVB, offset, DDP_HEADER_SIZE, NULL);
ddp_tree = proto_item_add_subtree(ti, ett_ddp);
! proto_tree_add_item(ddp_tree, hf_ddp_hopcount, NullTVB, offset, 1,
ddp_hops(ddp.hops_len));
! proto_tree_add_item(ddp_tree, hf_ddp_len, NullTVB, offset, 2,
ddp_len(ddp.hops_len));
! proto_tree_add_item(ddp_tree, hf_ddp_checksum, NullTVB, offset + 2, 2, ddp.sum);
! proto_tree_add_item(ddp_tree, hf_ddp_dst_net, NullTVB, offset + 4, 2, ddp.dnet);
! proto_tree_add_item(ddp_tree, hf_ddp_src_net, NullTVB, offset + 6, 2, ddp.snet);
! proto_tree_add_item(ddp_tree, hf_ddp_dst_node, NullTVB, offset + 8, 1, ddp.dnode);
! proto_tree_add_item(ddp_tree, hf_ddp_src_node, NullTVB, offset + 9, 1, ddp.snode);
! proto_tree_add_item(ddp_tree, hf_ddp_dst_socket, NullTVB, offset + 10, 1, ddp.dport);
! proto_tree_add_item(ddp_tree, hf_ddp_src_socket, NullTVB, offset + 11, 1, ddp.sport);
! proto_tree_add_item(ddp_tree, hf_ddp_type, NullTVB, offset + 12, 1, ddp.type);
}
offset += DDP_HEADER_SIZE;
--- 398,417 ----
val_to_str(ddp.type, op_vals, "Unknown DDP protocol (%02x)"));
if (tree) {
! ti = proto_tree_add_item(tree, proto_ddp, NullTVB, offset, DDP_HEADER_SIZE, FALSE);
ddp_tree = proto_item_add_subtree(ti, ett_ddp);
! proto_tree_add_uint(ddp_tree, hf_ddp_hopcount, NullTVB, offset, 1,
ddp_hops(ddp.hops_len));
! proto_tree_add_uint(ddp_tree, hf_ddp_len, NullTVB, offset, 2,
ddp_len(ddp.hops_len));
! proto_tree_add_uint(ddp_tree, hf_ddp_checksum, NullTVB, offset + 2, 2, ddp.sum);
! proto_tree_add_uint(ddp_tree, hf_ddp_dst_net, NullTVB, offset + 4, 2, ddp.dnet);
! proto_tree_add_uint(ddp_tree, hf_ddp_src_net, NullTVB, offset + 6, 2, ddp.snet);
! proto_tree_add_uint(ddp_tree, hf_ddp_dst_node, NullTVB, offset + 8, 1, ddp.dnode);
! proto_tree_add_uint(ddp_tree, hf_ddp_src_node, NullTVB, offset + 9, 1, ddp.snode);
! proto_tree_add_uint(ddp_tree, hf_ddp_dst_socket, NullTVB, offset + 10, 1, ddp.dport);
! proto_tree_add_uint(ddp_tree, hf_ddp_src_socket, NullTVB, offset + 11, 1, ddp.sport);
! proto_tree_add_uint(ddp_tree, hf_ddp_type, NullTVB, offset + 12, 1, ddp.type);
}
offset += DDP_HEADER_SIZE;
Index: packet-atm.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-atm.c,v
retrieving revision 1.21
diff -c -r1.21 packet-atm.c
*** packet-atm.c 2000/05/29 08:57:36 1.21
--- packet-atm.c 2000/05/30 10:37:07
***************
*** 668,676 ****
break;
}
}
! proto_tree_add_item(atm_tree, hf_atm_vpi, tvb, 0, 0,
pinfo->pseudo_header->ngsniffer_atm.Vpi);
! proto_tree_add_item(atm_tree, hf_atm_vci, tvb, 0, 0,
pinfo->pseudo_header->ngsniffer_atm.Vci);
switch (pinfo->pseudo_header->ngsniffer_atm.channel) {
--- 668,676 ----
break;
}
}
! proto_tree_add_uint(atm_tree, hf_atm_vpi, tvb, 0, 0,
pinfo->pseudo_header->ngsniffer_atm.Vpi);
! proto_tree_add_uint(atm_tree, hf_atm_vci, tvb, 0, 0,
pinfo->pseudo_header->ngsniffer_atm.Vci);
switch (pinfo->pseudo_header->ngsniffer_atm.channel) {
Index: packet-auto_rp.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-auto_rp.c,v
retrieving revision 1.5
diff -c -r1.5 packet-auto_rp.c
*** packet-auto_rp.c 2000/05/11 08:14:57 1.5
--- packet-auto_rp.c 2000/05/30 10:37:09
***************
*** 151,157 ****
return;
}
! ti = proto_tree_add_item(tree, proto_auto_rp, NullTVB, offset, END_OF_FRAME, NULL);
auto_rp_tree = proto_item_add_subtree(ti, ett_auto_rp);
tv = proto_tree_add_uint_format(auto_rp_tree, hf_auto_rp_ver_type, NullTVB, offset, 1,
--- 151,157 ----
return;
}
! ti = proto_tree_add_item(tree, proto_auto_rp, NullTVB, offset, END_OF_FRAME, FALSE);
auto_rp_tree = proto_item_add_subtree(ti, ett_auto_rp);
tv = proto_tree_add_uint_format(auto_rp_tree, hf_auto_rp_ver_type, NullTVB, offset, 1,
***************
*** 159,166 ****
val_to_str(hi_nibble(arh.ver_type), auto_rp_ver_vals, "Unknown"),
val_to_str(lo_nibble(arh.ver_type), auto_rp_type_vals, "Unknown"));
ver_type_tree = proto_item_add_subtree(tv, ett_auto_rp_ver_type);
! proto_tree_add_item(ver_type_tree, hf_auto_rp_version, NullTVB, offset, 1, arh.ver_type);
! proto_tree_add_item(ver_type_tree, hf_auto_rp_type, NullTVB, offset, 1, arh.ver_type);
offset++;
proto_tree_add_text(auto_rp_tree, NullTVB, offset++, 1, "RP Count: %u", arh.rp_count);
--- 159,166 ----
val_to_str(hi_nibble(arh.ver_type), auto_rp_ver_vals, "Unknown"),
val_to_str(lo_nibble(arh.ver_type), auto_rp_type_vals, "Unknown"));
ver_type_tree = proto_item_add_subtree(tv, ett_auto_rp_ver_type);
! proto_tree_add_uint(ver_type_tree, hf_auto_rp_version, NullTVB, offset, 1, arh.ver_type);
! proto_tree_add_uint(ver_type_tree, hf_auto_rp_type, NullTVB, offset, 1, arh.ver_type);
offset++;
proto_tree_add_text(auto_rp_tree, NullTVB, offset++, 1, "RP Count: %u", arh.rp_count);
***************
*** 270,276 ****
proto_tree_add_text(map_tree, NullTVB, offset, 4, "Unicast IP address of this RP: %s (%s)",
ip_to_str((void *)&m.rp_address), get_hostname(m.rp_address));
offset +=4;
! proto_tree_add_item(map_tree, hf_auto_rp_pim_ver, NullTVB, offset, 1, pd[offset]);
offset++;
proto_tree_add_text(map_tree, NullTVB, offset, 1, "Number of groups this RP maps to: %u", m.group_count);
offset++;
--- 270,276 ----
proto_tree_add_text(map_tree, NullTVB, offset, 4, "Unicast IP address of this RP: %s (%s)",
ip_to_str((void *)&m.rp_address), get_hostname(m.rp_address));
offset +=4;
! proto_tree_add_uint(map_tree, hf_auto_rp_pim_ver, NullTVB, offset, 1, pd[offset]);
offset++;
proto_tree_add_text(map_tree, NullTVB, offset, 1, "Number of groups this RP maps to: %u", m.group_count);
offset++;
***************
*** 287,293 ****
val_to_str(pd[offset]&AUTO_RP_SIGN_MASK, auto_rp_mask_sign_vals, ""));
grp_tree = proto_item_add_subtree(gi, ett_auto_rp_group);
! proto_tree_add_item(grp_tree, hf_auto_rp_mask_sgn, NullTVB, offset, 1, pd[offset]);
offset++;
proto_tree_add_text(grp_tree, NullTVB, offset, 1, "Group mask length: %u", pd[offset]);
offset++;
--- 287,293 ----
val_to_str(pd[offset]&AUTO_RP_SIGN_MASK, auto_rp_mask_sign_vals, ""));
grp_tree = proto_item_add_subtree(gi, ett_auto_rp_group);
! proto_tree_add_uint(grp_tree, hf_auto_rp_mask_sgn, NullTVB, offset, 1, pd[offset]);
offset++;
proto_tree_add_text(grp_tree, NullTVB, offset, 1, "Group mask length: %u", pd[offset]);
offset++;
Index: packet-bootp.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-bootp.c,v
retrieving revision 1.33
diff -c -r1.33 packet-bootp.c
*** packet-bootp.c 2000/05/19 04:54:32 1.33
--- packet-bootp.c 2000/05/30 10:37:10
***************
*** 583,589 ****
}
if (tree) {
! ti = proto_tree_add_item(tree, proto_bootp, NullTVB, offset, END_OF_FRAME, NULL);
bp_tree = proto_item_add_subtree(ti, ett_bootp);
proto_tree_add_uint_format(bp_tree, hf_bootp_type, NullTVB,
--- 583,589 ----
}
if (tree) {
! ti = proto_tree_add_item(tree, proto_bootp, NullTVB, offset, END_OF_FRAME, FALSE);
bp_tree = proto_item_add_subtree(ti, ett_bootp);
proto_tree_add_uint_format(bp_tree, hf_bootp_type, NullTVB,
***************
*** 597,624 ****
"Hardware type: %s",
arphrdtype_to_str(pd[offset+1],
"Unknown (0x%02x)"));
! proto_tree_add_item(bp_tree, hf_bootp_hw_len, NullTVB,
offset + 2, 1, pd[offset+2]);
! proto_tree_add_item(bp_tree, hf_bootp_hops, NullTVB,
offset + 3, 1, pd[offset+3]);
! proto_tree_add_item(bp_tree, hf_bootp_id, NullTVB,
offset + 4, 4, pntohl(&pd[offset+4]));
! proto_tree_add_item(bp_tree, hf_bootp_secs, NullTVB,
offset + 8, 2, pntohs(&pd[offset+8]));
! proto_tree_add_item(bp_tree, hf_bootp_flag, NullTVB,
offset + 10, 2, pntohs(&pd[offset+10]) & 0x8000);
memcpy(&ip_addr, &pd[offset+12], sizeof(ip_addr));
! proto_tree_add_item(bp_tree, hf_bootp_ip_client, NullTVB,
offset + 12, 4, ip_addr);
memcpy(&ip_addr, &pd[offset+16], sizeof(ip_addr));
! proto_tree_add_item(bp_tree, hf_bootp_ip_your, NullTVB,
offset + 16, 4, ip_addr);
memcpy(&ip_addr, &pd[offset+20], sizeof(ip_addr));
! proto_tree_add_item(bp_tree, hf_bootp_ip_server, NullTVB,
offset + 20, 4, ip_addr);
memcpy(&ip_addr, &pd[offset+24], sizeof(ip_addr));
! proto_tree_add_item(bp_tree, hf_bootp_ip_relay, NullTVB,
offset + 24, 4, ip_addr);
if (pd[offset+2] > 0) {
--- 597,624 ----
"Hardware type: %s",
arphrdtype_to_str(pd[offset+1],
"Unknown (0x%02x)"));
! proto_tree_add_uint(bp_tree, hf_bootp_hw_len, NullTVB,
offset + 2, 1, pd[offset+2]);
! proto_tree_add_uint(bp_tree, hf_bootp_hops, NullTVB,
offset + 3, 1, pd[offset+3]);
! proto_tree_add_uint(bp_tree, hf_bootp_id, NullTVB,
offset + 4, 4, pntohl(&pd[offset+4]));
! proto_tree_add_uint(bp_tree, hf_bootp_secs, NullTVB,
offset + 8, 2, pntohs(&pd[offset+8]));
! proto_tree_add_uint(bp_tree, hf_bootp_flag, NullTVB,
offset + 10, 2, pntohs(&pd[offset+10]) & 0x8000);
memcpy(&ip_addr, &pd[offset+12], sizeof(ip_addr));
! proto_tree_add_ipv4(bp_tree, hf_bootp_ip_client, NullTVB,
offset + 12, 4, ip_addr);
memcpy(&ip_addr, &pd[offset+16], sizeof(ip_addr));
! proto_tree_add_ipv4(bp_tree, hf_bootp_ip_your, NullTVB,
offset + 16, 4, ip_addr);
memcpy(&ip_addr, &pd[offset+20], sizeof(ip_addr));
! proto_tree_add_ipv4(bp_tree, hf_bootp_ip_server, NullTVB,
offset + 20, 4, ip_addr);
memcpy(&ip_addr, &pd[offset+24], sizeof(ip_addr));
! proto_tree_add_ipv4(bp_tree, hf_bootp_ip_relay, NullTVB,
offset + 24, 4, ip_addr);
if (pd[offset+2] > 0) {
***************
*** 630,636 ****
pd[offset+2], pd[offset+1]));
}
else {
! proto_tree_add_item(bp_tree, hf_bootp_hw_addr, NullTVB,
offset + 28, 0, NULL);
}
--- 630,636 ----
pd[offset+2], pd[offset+1]));
}
else {
! proto_tree_add_bytes(bp_tree, hf_bootp_hw_addr, NullTVB,
offset + 28, 0, NULL);
}
***************
*** 672,678 ****
}
else {
memcpy(&ip_addr, &pd[offset + 236], sizeof(ip_addr));
! proto_tree_add_item(bp_tree, hf_bootp_cookie, NullTVB,
offset + 236, 4, ip_addr);
}
--- 672,678 ----
}
else {
memcpy(&ip_addr, &pd[offset + 236], sizeof(ip_addr));
! proto_tree_add_ipv4(bp_tree, hf_bootp_cookie, NullTVB,
offset + 236, 4, ip_addr);
}
***************
*** 687,693 ****
col_add_str(fd, COL_PROTOCOL, "DHCP");
if (check_col(fd, COL_INFO))
col_add_fstr(fd, COL_INFO, "DHCP %-8s - Trans. ID 0x%x", is_dhcp, pntohl(&pd[offset+4]) );
! proto_tree_add_item_hidden(bp_tree, hf_bootp_dhcp, NullTVB, 0, 0, 1);
}
}
}
--- 687,693 ----
col_add_str(fd, COL_PROTOCOL, "DHCP");
if (check_col(fd, COL_INFO))
col_add_fstr(fd, COL_INFO, "DHCP %-8s - Trans. ID 0x%x", is_dhcp, pntohl(&pd[offset+4]) );
! proto_tree_add_boolean_hidden(bp_tree, hf_bootp_dhcp, NullTVB, 0, 0, 1);
}
}
}
Index: packet-bootparams.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-bootparams.c,v
retrieving revision 1.10
diff -c -r1.10 packet-bootparams.c
*** packet-bootparams.c 2000/05/11 08:15:03 1.10
--- packet-bootparams.c 2000/05/30 10:37:10
***************
*** 61,70 ****
/* get the address type */
if ( !BYTES_ARE_IN_FRAME(offset, 1)) return offset;
type = pntohl(&pd[offset]); /* type of address */
! #if 0
proto_tree_add_item(tree, hf_bootparams_addresstype, NullTVB,
offset, 4, type);
! #endif
offset += 4;
if ( type != 1 ) /* only know how to handle this type of address */
--- 61,71 ----
/* get the address type */
if ( !BYTES_ARE_IN_FRAME(offset, 1)) return offset;
type = pntohl(&pd[offset]); /* type of address */
! /*
! ZZZZZZZZZZZZZZZZZZZ Check type:
proto_tree_add_item(tree, hf_bootparams_addresstype, NullTVB,
offset, 4, type);
! */
offset += 4;
if ( type != 1 ) /* only know how to handle this type of address */
***************
*** 76,82 ****
if ( ! BYTES_ARE_IN_FRAME(offset, 16)) return offset;
ipaddr = (pd[offset+3]<<24) + (pd[offset+7]<<16) +
(pd[offset+11]<<8) + (pd[offset+15]);
! proto_tree_add_item(tree, hfindex, NullTVB,
offset, 16, ntohl(ipaddr));
offset += 16;
--- 77,83 ----
if ( ! BYTES_ARE_IN_FRAME(offset, 16)) return offset;
ipaddr = (pd[offset+3]<<24) + (pd[offset+7]<<16) +
(pd[offset+11]<<8) + (pd[offset+15]);
! proto_tree_add_ipv4(tree, hfindex, NullTVB,
offset, 16, ntohl(ipaddr));
offset += 16;
Index: packet-bpdu.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-bpdu.c,v
retrieving revision 1.10
diff -c -r1.10 packet-bpdu.c
*** packet-bpdu.c 2000/05/11 08:15:03 1.10
--- packet-bpdu.c 2000/05/30 10:37:11
***************
*** 132,138 ****
protocol_identifier == 0 ?
"Spanning Tree" : "Unknown Protocol");
! proto_tree_add_item(bpdu_tree, hf_bpdu_version_id, NullTVB,
offset + BPDU_VERSION_IDENTIFIER, 1,
protocol_version_identifier);
if (protocol_version_identifier != 0)
--- 132,138 ----
protocol_identifier == 0 ?
"Spanning Tree" : "Unknown Protocol");
! proto_tree_add_uint(bpdu_tree, hf_bpdu_version_id, NullTVB,
offset + BPDU_VERSION_IDENTIFIER, 1,
protocol_version_identifier);
if (protocol_version_identifier != 0)
***************
*** 157,170 ****
hello_time = pntohs(bpdu + BPDU_HELLO_TIME) / 256.0;
forward_delay = pntohs(bpdu + BPDU_FORWARD_DELAY) / 256.0;
! proto_tree_add_item(bpdu_tree, hf_bpdu_flags, NullTVB,
offset + BPDU_FLAGS, 1, flags);
if (flags & 0x80)
proto_tree_add_text(bpdu_tree, NullTVB, offset + BPDU_FLAGS, 1, " 1... .... Topology Change Acknowledgment");
if (flags & 0x01)
proto_tree_add_text(bpdu_tree, NullTVB, offset + BPDU_FLAGS, 1, " .... ...1 Topology Change");
! proto_tree_add_item_hidden(bpdu_tree, hf_bpdu_root_mac, NullTVB,
offset + BPDU_ROOT_IDENTIFIER + 2, 6,
bpdu + BPDU_ROOT_IDENTIFIER + 2);
proto_tree_add_text(bpdu_tree, NullTVB,
--- 157,170 ----
hello_time = pntohs(bpdu + BPDU_HELLO_TIME) / 256.0;
forward_delay = pntohs(bpdu + BPDU_FORWARD_DELAY) / 256.0;
! proto_tree_add_uint(bpdu_tree, hf_bpdu_flags, NullTVB,
offset + BPDU_FLAGS, 1, flags);
if (flags & 0x80)
proto_tree_add_text(bpdu_tree, NullTVB, offset + BPDU_FLAGS, 1, " 1... .... Topology Change Acknowledgment");
if (flags & 0x01)
proto_tree_add_text(bpdu_tree, NullTVB, offset + BPDU_FLAGS, 1, " .... ...1 Topology Change");
! proto_tree_add_ether_hidden(bpdu_tree, hf_bpdu_root_mac, NullTVB,
offset + BPDU_ROOT_IDENTIFIER + 2, 6,
bpdu + BPDU_ROOT_IDENTIFIER + 2);
proto_tree_add_text(bpdu_tree, NullTVB,
***************
*** 172,178 ****
"Root Identifier: %d / %s",
root_identifier_bridge_priority,
root_identifier_mac);
! proto_tree_add_item(bpdu_tree, hf_bpdu_root_cost, NullTVB,
offset + BPDU_ROOT_PATH_COST, 4,
root_path_cost);
proto_tree_add_text(bpdu_tree, NullTVB,
--- 172,178 ----
"Root Identifier: %d / %s",
root_identifier_bridge_priority,
root_identifier_mac);
! proto_tree_add_uint(bpdu_tree, hf_bpdu_root_cost, NullTVB,
offset + BPDU_ROOT_PATH_COST, 4,
root_path_cost);
proto_tree_add_text(bpdu_tree, NullTVB,
***************
*** 180,201 ****
"Bridge Identifier: %d / %s",
bridge_identifier_bridge_priority,
bridge_identifier_mac);
! proto_tree_add_item_hidden(bpdu_tree, hf_bpdu_bridge_mac, NullTVB,
offset + BPDU_BRIDGE_IDENTIFIER + 2, 6,
bpdu + BPDU_BRIDGE_IDENTIFIER + 2);
! proto_tree_add_item(bpdu_tree, hf_bpdu_port_id, NullTVB,
offset + BPDU_PORT_IDENTIFIER, 2,
port_identifier);
! proto_tree_add_item(bpdu_tree, hf_bpdu_msg_age, NullTVB,
offset + BPDU_MESSAGE_AGE, 2,
message_age);
! proto_tree_add_item(bpdu_tree, hf_bpdu_max_age, NullTVB,
offset + BPDU_MAX_AGE, 2,
max_age);
! proto_tree_add_item(bpdu_tree, hf_bpdu_hello_time, NullTVB,
offset + BPDU_HELLO_TIME, 2,
hello_time);
! proto_tree_add_item(bpdu_tree, hf_bpdu_forward_delay, NullTVB,
offset + BPDU_FORWARD_DELAY, 2,
forward_delay);
}
--- 180,201 ----
"Bridge Identifier: %d / %s",
bridge_identifier_bridge_priority,
bridge_identifier_mac);
! proto_tree_add_ether_hidden(bpdu_tree, hf_bpdu_bridge_mac, NullTVB,
offset + BPDU_BRIDGE_IDENTIFIER + 2, 6,
bpdu + BPDU_BRIDGE_IDENTIFIER + 2);
! proto_tree_add_uint(bpdu_tree, hf_bpdu_port_id, NullTVB,
offset + BPDU_PORT_IDENTIFIER, 2,
port_identifier);
! proto_tree_add_double(bpdu_tree, hf_bpdu_msg_age, NullTVB,
offset + BPDU_MESSAGE_AGE, 2,
message_age);
! proto_tree_add_double(bpdu_tree, hf_bpdu_max_age, NullTVB,
offset + BPDU_MAX_AGE, 2,
max_age);
! proto_tree_add_double(bpdu_tree, hf_bpdu_hello_time, NullTVB,
offset + BPDU_HELLO_TIME, 2,
hello_time);
! proto_tree_add_double(bpdu_tree, hf_bpdu_forward_delay, NullTVB,
offset + BPDU_FORWARD_DELAY, 2,
forward_delay);
}
Index: packet-cdp.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-cdp.c,v
retrieving revision 1.22
diff -c -r1.22 packet-cdp.c
*** packet-cdp.c 2000/05/11 08:15:04 1.22
--- packet-cdp.c 2000/05/30 10:37:12
***************
*** 107,117 ****
col_add_str(fd, COL_INFO, "Cisco Discovery Protocol");
if(tree){
! ti = proto_tree_add_item(tree, proto_cdp, NullTVB, offset, END_OF_FRAME, NULL);
cdp_tree = proto_item_add_subtree(ti, ett_cdp);
/* CDP header */
! proto_tree_add_item(cdp_tree, hf_cdp_version, NullTVB, offset, 1, pd[offset]);
offset += 1;
proto_tree_add_uint_format(cdp_tree, hf_cdp_ttl, NullTVB, offset, 1,
pntohs(&pd[offset]),
--- 107,117 ----
col_add_str(fd, COL_INFO, "Cisco Discovery Protocol");
if(tree){
! ti = proto_tree_add_item(tree, proto_cdp, NullTVB, offset, END_OF_FRAME, FALSE);
cdp_tree = proto_item_add_subtree(ti, ett_cdp);
/* CDP header */
! proto_tree_add_uint(cdp_tree, hf_cdp_version, NullTVB, offset, 1, pd[offset]);
offset += 1;
proto_tree_add_uint_format(cdp_tree, hf_cdp_ttl, NullTVB, offset, 1,
pntohs(&pd[offset]),
***************
*** 136,144 ****
&pd[offset+4]);
tlv_tree = proto_item_add_subtree(tlvi,
ett_cdp_tlv);
! proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, NullTVB,
offset + TLV_TYPE, 2, type);
! proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, NullTVB,
offset + TLV_LENGTH, 2, length);
proto_tree_add_text(tlv_tree, NullTVB, offset + 4,
length - 4, "Device ID: %s",
--- 136,144 ----
&pd[offset+4]);
tlv_tree = proto_item_add_subtree(tlvi,
ett_cdp_tlv);
! proto_tree_add_uint(tlv_tree, hf_cdp_tlvtype, NullTVB,
offset + TLV_TYPE, 2, type);
! proto_tree_add_uint(tlv_tree, hf_cdp_tlvlength, NullTVB,
offset + TLV_LENGTH, 2, length);
proto_tree_add_text(tlv_tree, NullTVB, offset + 4,
length - 4, "Device ID: %s",
***************
*** 151,159 ****
length, "Addresses");
tlv_tree = proto_item_add_subtree(tlvi,
ett_cdp_tlv);
! proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, NullTVB,
offset + TLV_TYPE, 2, type);
! proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, NullTVB,
offset + TLV_LENGTH, 2, length);
offset += 4;
length -= 4;
--- 151,159 ----
length, "Addresses");
tlv_tree = proto_item_add_subtree(tlvi,
ett_cdp_tlv);
! proto_tree_add_uint(tlv_tree, hf_cdp_tlvtype, NullTVB,
offset + TLV_TYPE, 2, type);
! proto_tree_add_uint(tlv_tree, hf_cdp_tlvlength, NullTVB,
offset + TLV_LENGTH, 2, length);
offset += 4;
length -= 4;
***************
*** 194,202 ****
&pd[offset+4]);
tlv_tree = proto_item_add_subtree(tlvi,
ett_cdp_tlv);
! proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, NullTVB,
offset + TLV_TYPE, 2, type);
! proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, NullTVB,
offset + TLV_LENGTH, 2, length);
proto_tree_add_text(tlv_tree, NullTVB, offset + 4,
real_length - 4,
--- 194,202 ----
&pd[offset+4]);
tlv_tree = proto_item_add_subtree(tlvi,
ett_cdp_tlv);
! proto_tree_add_uint(tlv_tree, hf_cdp_tlvtype, NullTVB,
offset + TLV_TYPE, 2, type);
! proto_tree_add_uint(tlv_tree, hf_cdp_tlvlength, NullTVB,
offset + TLV_LENGTH, 2, length);
proto_tree_add_text(tlv_tree, NullTVB, offset + 4,
real_length - 4,
***************
*** 209,217 ****
length, "Capabilities");
tlv_tree = proto_item_add_subtree(tlvi,
ett_cdp_tlv);
! proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, NullTVB,
offset + TLV_TYPE, 2, type);
! proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, NullTVB,
offset + TLV_LENGTH, 2, length);
offset += 4;
length -= 4;
--- 209,217 ----
length, "Capabilities");
tlv_tree = proto_item_add_subtree(tlvi,
ett_cdp_tlv);
! proto_tree_add_uint(tlv_tree, hf_cdp_tlvtype, NullTVB,
offset + TLV_TYPE, 2, type);
! proto_tree_add_uint(tlv_tree, hf_cdp_tlvlength, NullTVB,
offset + TLV_LENGTH, 2, length);
offset += 4;
length -= 4;
***************
*** 224,232 ****
length, "Software Version");
tlv_tree = proto_item_add_subtree(tlvi,
ett_cdp_tlv);
! proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, NullTVB,
offset + TLV_TYPE, 2, type);
! proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, NullTVB,
offset + TLV_LENGTH, 2, length);
add_multi_line_string_to_tree(tlv_tree,
offset + 4, length - 4, "Software Version: ",
--- 224,232 ----
length, "Software Version");
tlv_tree = proto_item_add_subtree(tlvi,
ett_cdp_tlv);
! proto_tree_add_uint(tlv_tree, hf_cdp_tlvtype, NullTVB,
offset + TLV_TYPE, 2, type);
! proto_tree_add_uint(tlv_tree, hf_cdp_tlvlength, NullTVB,
offset + TLV_LENGTH, 2, length);
add_multi_line_string_to_tree(tlv_tree,
offset + 4, length - 4, "Software Version: ",
***************
*** 243,251 ****
stringmem);
tlv_tree = proto_item_add_subtree(tlvi,
ett_cdp_tlv);
! proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, NullTVB,
offset + TLV_TYPE, 2, type);
! proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, NullTVB,
offset + TLV_LENGTH, 2, length);
proto_tree_add_text(tlv_tree, NullTVB, offset + 4,
length - 4, "Platform: %s", stringmem);
--- 243,251 ----
stringmem);
tlv_tree = proto_item_add_subtree(tlvi,
ett_cdp_tlv);
! proto_tree_add_uint(tlv_tree, hf_cdp_tlvtype, NullTVB,
offset + TLV_TYPE, 2, type);
! proto_tree_add_uint(tlv_tree, hf_cdp_tlvlength, NullTVB,
offset + TLV_LENGTH, 2, length);
proto_tree_add_text(tlv_tree, NullTVB, offset + 4,
length - 4, "Platform: %s", stringmem);
***************
*** 258,266 ****
type_str, length);
tlv_tree = proto_item_add_subtree(tlvi,
ett_cdp_tlv);
! proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, NullTVB,
offset + TLV_TYPE, 2, type);
! proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, NullTVB,
offset + TLV_LENGTH, 2, length);
if (length > 4) {
proto_tree_add_text(tlv_tree, NullTVB,
--- 258,266 ----
type_str, length);
tlv_tree = proto_item_add_subtree(tlvi,
ett_cdp_tlv);
! proto_tree_add_uint(tlv_tree, hf_cdp_tlvtype, NullTVB,
offset + TLV_TYPE, 2, type);
! proto_tree_add_uint(tlv_tree, hf_cdp_tlvlength, NullTVB,
offset + TLV_LENGTH, 2, length);
if (length > 4) {
proto_tree_add_text(tlv_tree, NullTVB,
Index: packet-cgmp.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-cgmp.c,v
retrieving revision 1.2
diff -c -r1.2 packet-cgmp.c
*** packet-cgmp.c 2000/05/11 08:15:04 1.2
--- packet-cgmp.c 2000/05/30 10:37:13
***************
*** 71,102 ****
col_add_str(fd, COL_INFO, "Cisco Group Management Protocol");
if (tree) {
! ti = proto_tree_add_item(tree, proto_cgmp, NullTVB, offset, END_OF_FRAME, NULL);
cgmp_tree = proto_item_add_subtree(ti, ett_cgmp);
! proto_tree_add_item(cgmp_tree, hf_cgmp_version, NullTVB, offset, 1,
pd[offset]);
! proto_tree_add_item(cgmp_tree, hf_cgmp_type, NullTVB, offset, 1,
pd[offset]);
offset += 1;
offset += 2; /* skip reserved field */
count = pd[offset];
! proto_tree_add_item(cgmp_tree, hf_cgmp_count, NullTVB, offset, 1,
count);
offset += 1;
while (count != 0) {
if (!BYTES_ARE_IN_FRAME(offset, 6))
break;
! proto_tree_add_item(cgmp_tree, hf_cgmp_gda, NullTVB, offset, 6,
&pd[offset]);
offset += 6;
if (!BYTES_ARE_IN_FRAME(offset, 6))
break;
! proto_tree_add_item(cgmp_tree, hf_cgmp_usa, NullTVB, offset, 6,
&pd[offset]);
offset += 6;
--- 71,102 ----
col_add_str(fd, COL_INFO, "Cisco Group Management Protocol");
if (tree) {
! ti = proto_tree_add_item(tree, proto_cgmp, NullTVB, offset, END_OF_FRAME, FALSE);
cgmp_tree = proto_item_add_subtree(ti, ett_cgmp);
! proto_tree_add_uint(cgmp_tree, hf_cgmp_version, NullTVB, offset, 1,
pd[offset]);
! proto_tree_add_uint(cgmp_tree, hf_cgmp_type, NullTVB, offset, 1,
pd[offset]);
offset += 1;
offset += 2; /* skip reserved field */
count = pd[offset];
! proto_tree_add_uint(cgmp_tree, hf_cgmp_count, NullTVB, offset, 1,
count);
offset += 1;
while (count != 0) {
if (!BYTES_ARE_IN_FRAME(offset, 6))
break;
! proto_tree_add_ether(cgmp_tree, hf_cgmp_gda, NullTVB, offset, 6,
&pd[offset]);
offset += 6;
if (!BYTES_ARE_IN_FRAME(offset, 6))
break;
! proto_tree_add_ether(cgmp_tree, hf_cgmp_usa, NullTVB, offset, 6,
&pd[offset]);
offset += 6;
Index: packet-clnp.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-clnp.c,v
retrieving revision 1.7
diff -c -r1.7 packet-clnp.c
*** packet-clnp.c 2000/05/11 08:15:04 1.7
--- packet-clnp.c 2000/05/30 10:37:17
***************
*** 272,278 ****
src_ref, dst_ref);
if (tree) {
! ti = proto_tree_add_item(tree, proto_cotp, NullTVB, offset, li + 1, NULL);
cotp_tree = proto_item_add_subtree(ti, ett_cotp);
proto_tree_add_text(cotp_tree, NullTVB, offset, 1,
"Length indicator: %u", li);
--- 272,278 ----
src_ref, dst_ref);
if (tree) {
! ti = proto_tree_add_item(tree, proto_cotp, NullTVB, offset, li + 1, FALSE);
cotp_tree = proto_item_add_subtree(ti, ett_cotp);
proto_tree_add_text(cotp_tree, NullTVB, offset, 1,
"Length indicator: %u", li);
***************
*** 364,370 ****
(fragment)? "(fragment)" : "");
if (tree) {
! ti = proto_tree_add_item(tree, proto_cotp, NullTVB, offset, li + 1, NULL);
cotp_tree = proto_item_add_subtree(ti, ett_cotp);
proto_tree_add_text(cotp_tree, NullTVB, offset, 1,
"Length indicator: %u", li);
--- 364,370 ----
(fragment)? "(fragment)" : "");
if (tree) {
! ti = proto_tree_add_item(tree, proto_cotp, NullTVB, offset, li + 1, FALSE);
cotp_tree = proto_item_add_subtree(ti, ett_cotp);
proto_tree_add_text(cotp_tree, NullTVB, offset, 1,
"Length indicator: %u", li);
***************
*** 506,512 ****
tpdu_nr, dst_ref);
if (tree) {
! ti = proto_tree_add_item(tree, proto_cotp, NullTVB, offset, li + 1, NULL);
cotp_tree = proto_item_add_subtree(ti, ett_cotp);
proto_tree_add_text(cotp_tree, NullTVB, offset, 1,
"Length indicator: %u", li);
--- 506,512 ----
tpdu_nr, dst_ref);
if (tree) {
! ti = proto_tree_add_item(tree, proto_cotp, NullTVB, offset, li + 1, FALSE);
cotp_tree = proto_item_add_subtree(ti, ett_cotp);
proto_tree_add_text(cotp_tree, NullTVB, offset, 1,
"Length indicator: %u", li);
***************
*** 587,593 ****
tpdu_nr, dst_ref);
if (tree) {
! ti = proto_tree_add_item(tree, proto_cotp, NullTVB, offset, li + 1, NULL);
cotp_tree = proto_item_add_subtree(ti, ett_cotp);
proto_tree_add_text(cotp_tree, NullTVB, offset, 1,
"Length indicator: %u", li);
--- 587,593 ----
tpdu_nr, dst_ref);
if (tree) {
! ti = proto_tree_add_item(tree, proto_cotp, NullTVB, offset, li + 1, FALSE);
cotp_tree = proto_item_add_subtree(ti, ett_cotp);
proto_tree_add_text(cotp_tree, NullTVB, offset, 1,
"Length indicator: %u", li);
***************
*** 686,692 ****
dst_ref);
if (tree) {
! ti = proto_tree_add_item(tree, proto_cotp, NullTVB, offset, li + 1, NULL);
cotp_tree = proto_item_add_subtree(ti, ett_cotp);
proto_tree_add_text(cotp_tree, NullTVB, offset, 1,
"Length indicator: %u", li);
--- 686,692 ----
dst_ref);
if (tree) {
! ti = proto_tree_add_item(tree, proto_cotp, NullTVB, offset, li + 1, FALSE);
cotp_tree = proto_item_add_subtree(ti, ett_cotp);
proto_tree_add_text(cotp_tree, NullTVB, offset, 1,
"Length indicator: %u", li);
***************
*** 970,976 ****
dst_ref);
if (tree) {
! ti = proto_tree_add_item(tree, proto_cotp, NullTVB, offset, li + 1, NULL);
cotp_tree = proto_item_add_subtree(ti, ett_cotp);
proto_tree_add_text(cotp_tree, NullTVB, offset, 1,
"Length indicator: %u", li);
--- 970,976 ----
dst_ref);
if (tree) {
! ti = proto_tree_add_item(tree, proto_cotp, NullTVB, offset, li + 1, FALSE);
cotp_tree = proto_item_add_subtree(ti, ett_cotp);
proto_tree_add_text(cotp_tree, NullTVB, offset, 1,
"Length indicator: %u", li);
***************
*** 1020,1026 ****
tpdu_nr, dst_ref);
if (tree) {
! ti = proto_tree_add_item(tree, proto_cotp, NullTVB, offset, li + 1, NULL);
cotp_tree = proto_item_add_subtree(ti, ett_cotp);
proto_tree_add_text(cotp_tree, NullTVB, offset, 1,
"Length indicator: %u", li);
--- 1020,1026 ----
tpdu_nr, dst_ref);
if (tree) {
! ti = proto_tree_add_item(tree, proto_cotp, NullTVB, offset, li + 1, FALSE);
cotp_tree = proto_item_add_subtree(ti, ett_cotp);
proto_tree_add_text(cotp_tree, NullTVB, offset, 1,
"Length indicator: %u", li);
***************
*** 1124,1130 ****
tpdu_nr, dst_ref);
if (tree) {
! ti = proto_tree_add_item(tree, proto_cotp, NullTVB, offset, li + 1, NULL);
cotp_tree = proto_item_add_subtree(ti, ett_cotp);
proto_tree_add_text(cotp_tree, NullTVB, offset, 1,
"Length indicator: %u", li);
--- 1124,1130 ----
tpdu_nr, dst_ref);
if (tree) {
! ti = proto_tree_add_item(tree, proto_cotp, NullTVB, offset, li + 1, FALSE);
cotp_tree = proto_item_add_subtree(ti, ett_cotp);
proto_tree_add_text(cotp_tree, NullTVB, offset, 1,
"Length indicator: %u", li);
***************
*** 1274,1280 ****
"EA TPDU (%u) dst-ref: 0x%04x", tpdu_nr, dst_ref);
if (tree) {
! ti = proto_tree_add_item(tree, proto_cotp, NullTVB, offset, li + 1, NULL);
cotp_tree = proto_item_add_subtree(ti, ett_cotp);
proto_tree_add_text(cotp_tree, NullTVB, offset, 1,
"Length indicator: %u", li);
--- 1274,1280 ----
"EA TPDU (%u) dst-ref: 0x%04x", tpdu_nr, dst_ref);
if (tree) {
! ti = proto_tree_add_item(tree, proto_cotp, NullTVB, offset, li + 1, FALSE);
cotp_tree = proto_item_add_subtree(ti, ett_cotp);
proto_tree_add_text(cotp_tree, NullTVB, offset, 1,
"Length indicator: %u", li);
***************
*** 1356,1362 ****
col_append_fstr(fd, COL_INFO, "ER TPDU dst-ref: 0x%04x", dst_ref);
if (tree) {
! ti = proto_tree_add_item(tree, proto_cotp, NullTVB, offset, li + 1, NULL);
cotp_tree = proto_item_add_subtree(ti, ett_cotp);
proto_tree_add_text(cotp_tree, NullTVB, offset, 1,
"Length indicator: %u", li);
--- 1356,1362 ----
col_append_fstr(fd, COL_INFO, "ER TPDU dst-ref: 0x%04x", dst_ref);
if (tree) {
! ti = proto_tree_add_item(tree, proto_cotp, NullTVB, offset, li + 1, FALSE);
cotp_tree = proto_item_add_subtree(ti, ett_cotp);
proto_tree_add_text(cotp_tree, NullTVB, offset, 1,
"Length indicator: %u", li);
***************
*** 1509,1515 ****
if (check_col(fd, COL_INFO))
col_add_str(fd, COL_INFO, "Inactive subset");
if (tree) {
! ti = proto_tree_add_item(tree, proto_clnp, NullTVB, offset, 1, NULL);
clnp_tree = proto_item_add_subtree(ti, ett_clnp);
proto_tree_add_uint_format(clnp_tree, hf_clnp_id, NullTVB, offset, 1,
clnp.cnf_proto_id,
--- 1509,1515 ----
if (check_col(fd, COL_INFO))
col_add_str(fd, COL_INFO, "Inactive subset");
if (tree) {
! ti = proto_tree_add_item(tree, proto_clnp, NullTVB, offset, 1, FALSE);
clnp_tree = proto_item_add_subtree(ti, ett_clnp);
proto_tree_add_uint_format(clnp_tree, hf_clnp_id, NullTVB, offset, 1,
clnp.cnf_proto_id,
***************
*** 1544,1556 ****
pdu_type_string = val_to_str(clnp.cnf_type & CNF_TYPE, npdu_type_vals,
"Unknown (0x%02x)");
if (tree) {
! ti = proto_tree_add_item(tree, proto_clnp, NullTVB, offset, clnp.cnf_hdr_len, NULL);
clnp_tree = proto_item_add_subtree(ti, ett_clnp);
! proto_tree_add_item(clnp_tree, hf_clnp_id, NullTVB, offset, 1,
clnp.cnf_proto_id);
! proto_tree_add_item(clnp_tree, hf_clnp_length, NullTVB, offset + 1, 1,
clnp.cnf_hdr_len);
! proto_tree_add_item(clnp_tree, hf_clnp_version, NullTVB, offset + 2, 1,
clnp.cnf_vers);
proto_tree_add_uint_format(clnp_tree, hf_clnp_ttl, NullTVB, offset + 3, 1,
clnp.cnf_ttl,
--- 1544,1556 ----
pdu_type_string = val_to_str(clnp.cnf_type & CNF_TYPE, npdu_type_vals,
"Unknown (0x%02x)");
if (tree) {
! ti = proto_tree_add_item(tree, proto_clnp, NullTVB, offset, clnp.cnf_hdr_len, FALSE);
clnp_tree = proto_item_add_subtree(ti, ett_clnp);
! proto_tree_add_uint(clnp_tree, hf_clnp_id, NullTVB, offset, 1,
clnp.cnf_proto_id);
! proto_tree_add_uint(clnp_tree, hf_clnp_length, NullTVB, offset + 1, 1,
clnp.cnf_hdr_len);
! proto_tree_add_uint(clnp_tree, hf_clnp_version, NullTVB, offset + 2, 1,
clnp.cnf_vers);
proto_tree_add_uint_format(clnp_tree, hf_clnp_ttl, NullTVB, offset + 3, 1,
clnp.cnf_ttl,
***************
*** 1562,1568 ****
clnp.cnf_type,
flag_string,
pdu_type_string);
! proto_tree_add_item(clnp_tree, hf_clnp_pdu_length, NullTVB, offset + 5, 2,
segment_length);
proto_tree_add_uint_format(clnp_tree, hf_clnp_checksum, NullTVB, offset + 7, 2,
EXTRACT_SHORT(&clnp.cnf_cksum_msb),
--- 1562,1568 ----
clnp.cnf_type,
flag_string,
pdu_type_string);
! proto_tree_add_uint(clnp_tree, hf_clnp_pdu_length, NullTVB, offset + 5, 2,
segment_length);
proto_tree_add_uint_format(clnp_tree, hf_clnp_checksum, NullTVB, offset + 7, 2,
EXTRACT_SHORT(&clnp.cnf_cksum_msb),
***************
*** 1588,1600 ****
src_len = pd[offset + dst_len + 1];
if (tree) {
! proto_tree_add_item(clnp_tree, hf_clnp_dest_length, NullTVB, offset, 1,
dst_len);
proto_tree_add_bytes_format(clnp_tree, hf_clnp_dest, NullTVB, offset + 1 , dst_len,
&pd[offset + 1],
" DA : %s",
print_nsap_net(&pd[offset + 1], dst_len));
! proto_tree_add_item(clnp_tree, hf_clnp_src_length, NullTVB,
offset + 1 + dst_len, 1, src_len);
proto_tree_add_bytes_format(clnp_tree, hf_clnp_src, NullTVB,
offset + dst_len + 2, src_len,
--- 1588,1600 ----
src_len = pd[offset + dst_len + 1];
if (tree) {
! proto_tree_add_uint(clnp_tree, hf_clnp_dest_length, NullTVB, offset, 1,
dst_len);
proto_tree_add_bytes_format(clnp_tree, hf_clnp_dest, NullTVB, offset + 1 , dst_len,
&pd[offset + 1],
" DA : %s",
print_nsap_net(&pd[offset + 1], dst_len));
! proto_tree_add_uint(clnp_tree, hf_clnp_src_length, NullTVB,
offset + 1 + dst_len, 1, src_len);
proto_tree_add_bytes_format(clnp_tree, hf_clnp_src, NullTVB,
offset + dst_len + 2, src_len,
Index: packet-ddtp.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-ddtp.c,v
retrieving revision 1.4
diff -c -r1.4 packet-ddtp.c
*** packet-ddtp.c 2000/05/28 17:04:09 1.4
--- packet-ddtp.c 2000/05/30 10:37:18
***************
*** 111,142 ****
}
if (tree) {
ti = proto_tree_add_item(tree, proto_ddtp, NullTVB, offset,
! END_OF_FRAME - offset, NULL);
ddtp_tree = proto_item_add_subtree(ti, ett_ddtp);
if (!BYTES_ARE_IN_FRAME(offset, 4)) {
proto_tree_add_text(ddtp_tree, NullTVB, offset, END_OF_FRAME-offset, "Frame too short");
return;
}
! proto_tree_add_item(ddtp_tree, hf_ddtp_version, NullTVB, offset, 4, pntohl(pd+offset));
offset += 4;
if (!BYTES_ARE_IN_FRAME(offset, 4)) {
proto_tree_add_text(ddtp_tree, NullTVB, offset, END_OF_FRAME-offset, "Frame too short");
return;
}
! proto_tree_add_item(ddtp_tree, hf_ddtp_encrypt, NullTVB, offset, 4, pntohl(pd+offset));
if (!BYTES_ARE_IN_FRAME(offset+4, 4)) {
proto_tree_add_text(ddtp_tree, NullTVB, offset+4, END_OF_FRAME-offset-4, "Frame too short");
return;
}
! proto_tree_add_item(ddtp_tree, hf_ddtp_hostid, NullTVB, offset+4, 4, pntohl(pd+offset+4));
if (pntohl(pd+offset) == DDTP_ENCRYPT_PLAINTEXT) {
offset += 8;
if (!BYTES_ARE_IN_FRAME(offset, 4)) {
proto_tree_add_text(ddtp_tree, NullTVB, offset, END_OF_FRAME-offset, "Frame too short");
return;
}
! proto_tree_add_item(ddtp_tree, hf_ddtp_msgtype, NullTVB, offset, 4, pntohl(pd+offset));
switch (pntohl(pd+offset)) {
case DDTP_MESSAGE_ERROR :
offset += 4;
--- 111,142 ----
}
if (tree) {
ti = proto_tree_add_item(tree, proto_ddtp, NullTVB, offset,
! END_OF_FRAME - offset, FALSE);
ddtp_tree = proto_item_add_subtree(ti, ett_ddtp);
if (!BYTES_ARE_IN_FRAME(offset, 4)) {
proto_tree_add_text(ddtp_tree, NullTVB, offset, END_OF_FRAME-offset, "Frame too short");
return;
}
! proto_tree_add_uint(ddtp_tree, hf_ddtp_version, NullTVB, offset, 4, pntohl(pd+offset));
offset += 4;
if (!BYTES_ARE_IN_FRAME(offset, 4)) {
proto_tree_add_text(ddtp_tree, NullTVB, offset, END_OF_FRAME-offset, "Frame too short");
return;
}
! proto_tree_add_uint(ddtp_tree, hf_ddtp_encrypt, NullTVB, offset, 4, pntohl(pd+offset));
if (!BYTES_ARE_IN_FRAME(offset+4, 4)) {
proto_tree_add_text(ddtp_tree, NullTVB, offset+4, END_OF_FRAME-offset-4, "Frame too short");
return;
}
! proto_tree_add_uint(ddtp_tree, hf_ddtp_hostid, NullTVB, offset+4, 4, pntohl(pd+offset+4));
if (pntohl(pd+offset) == DDTP_ENCRYPT_PLAINTEXT) {
offset += 8;
if (!BYTES_ARE_IN_FRAME(offset, 4)) {
proto_tree_add_text(ddtp_tree, NullTVB, offset, END_OF_FRAME-offset, "Frame too short");
return;
}
! proto_tree_add_uint(ddtp_tree, hf_ddtp_msgtype, NullTVB, offset, 4, pntohl(pd+offset));
switch (pntohl(pd+offset)) {
case DDTP_MESSAGE_ERROR :
offset += 4;
***************
*** 149,161 ****
proto_tree_add_text(ddtp_tree, NullTVB, offset, END_OF_FRAME-offset, "Frame too short");
return;
}
! proto_tree_add_item(ddtp_tree, hf_ddtp_opcode, NullTVB, offset, 4, pntohl(pd+offset));
offset += 4;
if (!BYTES_ARE_IN_FRAME(offset, 4)) {
proto_tree_add_text(ddtp_tree, NullTVB, offset, END_OF_FRAME-offset, "Frame too short");
return;
}
! proto_tree_add_item(ddtp_tree, hf_ddtp_ipaddr, NullTVB, offset, 4, pntohl(pd+offset));
break;
case DDTP_UPDATE_REPLY :
offset += 4;
--- 149,161 ----
proto_tree_add_text(ddtp_tree, NullTVB, offset, END_OF_FRAME-offset, "Frame too short");
return;
}
! proto_tree_add_uint(ddtp_tree, hf_ddtp_opcode, NullTVB, offset, 4, pntohl(pd+offset));
offset += 4;
if (!BYTES_ARE_IN_FRAME(offset, 4)) {
proto_tree_add_text(ddtp_tree, NullTVB, offset, END_OF_FRAME-offset, "Frame too short");
return;
}
! proto_tree_add_ipv4(ddtp_tree, hf_ddtp_ipaddr, NullTVB, offset, 4, pntohl(pd+offset));
break;
case DDTP_UPDATE_REPLY :
offset += 4;
***************
*** 164,170 ****
proto_tree_add_text(ddtp_tree, NullTVB, offset, END_OF_FRAME-offset, "Frame too short");
return;
}
! proto_tree_add_item(ddtp_tree, hf_ddtp_status, NullTVB, offset, 4, pntohl(pd+offset));
break;
case DDTP_ALIVE_QUERY :
offset += 4;
--- 164,170 ----
proto_tree_add_text(ddtp_tree, NullTVB, offset, END_OF_FRAME-offset, "Frame too short");
return;
}
! proto_tree_add_uint(ddtp_tree, hf_ddtp_status, NullTVB, offset, 4, pntohl(pd+offset));
break;
case DDTP_ALIVE_QUERY :
offset += 4;
Index: packet-dns.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-dns.c,v
retrieving revision 1.44
diff -c -r1.44 packet-dns.c
*** packet-dns.c 2000/05/11 08:15:05 1.44
--- packet-dns.c 2000/05/30 10:37:21
***************
*** 1573,1583 ****
dns_tree = proto_item_add_subtree(ti, ett_dns);
if (flags & F_RESPONSE)
! proto_tree_add_item_hidden(dns_tree, hf_dns_response, NullTVB, offset, 4, 1);
else
! proto_tree_add_item_hidden(dns_tree, hf_dns_query, NullTVB, offset, 4, 1);
! proto_tree_add_item(dns_tree, hf_dns_transaction_id, NullTVB,
offset + DNS_ID, 2, id);
strcpy(buf, val_to_str(flags & F_OPCODE, opcode_vals, "Unknown operation"));
--- 1573,1583 ----
dns_tree = proto_item_add_subtree(ti, ett_dns);
if (flags & F_RESPONSE)
! proto_tree_add_boolean_hidden(dns_tree, hf_dns_response, NullTVB, offset, 4, 1);
else
! proto_tree_add_boolean_hidden(dns_tree, hf_dns_query, NullTVB, offset, 4, 1);
! proto_tree_add_uint(dns_tree, hf_dns_transaction_id, NullTVB,
offset + DNS_ID, 2, id);
strcpy(buf, val_to_str(flags & F_OPCODE, opcode_vals, "Unknown operation"));
***************
*** 1640,1652 ****
decode_enumerated_bitfield(flags, F_RCODE,
2*8, rcode_vals, "%s"));
}
! proto_tree_add_item(dns_tree, hf_dns_count_questions, NullTVB,
offset + DNS_QUEST, 2, quest);
! proto_tree_add_item(dns_tree, hf_dns_count_answers, NullTVB,
offset + DNS_ANS, 2, ans);
! proto_tree_add_item(dns_tree, hf_dns_count_auth_rr, NullTVB,
offset + DNS_AUTH, 2, auth);
! proto_tree_add_item(dns_tree, hf_dns_count_add_rr, NullTVB,
offset + DNS_ADD, 2, add);
}
--- 1640,1652 ----
decode_enumerated_bitfield(flags, F_RCODE,
2*8, rcode_vals, "%s"));
}
! proto_tree_add_uint(dns_tree, hf_dns_count_questions, NullTVB,
offset + DNS_QUEST, 2, quest);
! proto_tree_add_uint(dns_tree, hf_dns_count_answers, NullTVB,
offset + DNS_ANS, 2, ans);
! proto_tree_add_uint(dns_tree, hf_dns_count_auth_rr, NullTVB,
offset + DNS_AUTH, 2, auth);
! proto_tree_add_uint(dns_tree, hf_dns_count_add_rr, NullTVB,
offset + DNS_ADD, 2, add);
}
Index: packet-eigrp.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-eigrp.c,v
retrieving revision 1.3
diff -c -r1.3 packet-eigrp.c
*** packet-eigrp.c 2000/05/30 03:35:51 1.3
--- packet-eigrp.c 2000/05/30 10:37:22
***************
*** 104,110 ****
val_to_str( ih.eigrp_opcode, eigrp_opcode_vals, "Unknown (0x%04x)"));
if (tree) {
! ti = proto_tree_add_item(tree, proto_eigrp, NullTVB, offset, END_OF_FRAME, NULL);
eigrp_tree = proto_item_add_subtree(ti, ett_eigrp);
proto_tree_add_text(eigrp_tree, NullTVB, offset, 1, "Version: %u", ih.eigrp_version);
--- 104,110 ----
val_to_str( ih.eigrp_opcode, eigrp_opcode_vals, "Unknown (0x%04x)"));
if (tree) {
! ti = proto_tree_add_item(tree, proto_eigrp, NullTVB, offset, END_OF_FRAME, FALSE);
eigrp_tree = proto_item_add_subtree(ti, ett_eigrp);
proto_tree_add_text(eigrp_tree, NullTVB, offset, 1, "Version: %u", ih.eigrp_version);
Index: packet-esis.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-esis.c,v
retrieving revision 1.3
diff -c -r1.3 packet-esis.c
*** packet-esis.c 2000/05/11 08:15:07 1.3
--- packet-esis.c 2000/05/30 10:37:23
***************
*** 319,333 ****
}
if (tree) {
! ti = proto_tree_add_item(tree, proto_esis, NullTVB, offset, END_OF_FRAME, NULL );
esis_tree = proto_item_add_subtree(ti, ett_esis);
! proto_tree_add_item( esis_tree, hf_esis_nlpi, NullTVB, offset, 1, ehdr->esis_nlpi );
! proto_tree_add_item( esis_tree, hf_esis_length, NullTVB,
offset + 1, 1, ehdr->esis_length );
! proto_tree_add_item( esis_tree, hf_esis_version, NullTVB, offset + 2, 1,
ehdr->esis_version );
! proto_tree_add_item( esis_tree, hf_esis_reserved, NullTVB, offset + 3, 1,
ehdr->esis_reserved );
pdu_type_string = val_to_str(ehdr->esis_type&OSI_PDU_TYPE_MASK,
--- 319,333 ----
}
if (tree) {
! ti = proto_tree_add_item(tree, proto_esis, NullTVB, offset, END_OF_FRAME, FALSE);
esis_tree = proto_item_add_subtree(ti, ett_esis);
! proto_tree_add_uint( esis_tree, hf_esis_nlpi, NullTVB, offset, 1, ehdr->esis_nlpi );
! proto_tree_add_uint( esis_tree, hf_esis_length, NullTVB,
offset + 1, 1, ehdr->esis_length );
! proto_tree_add_uint( esis_tree, hf_esis_version, NullTVB, offset + 2, 1,
ehdr->esis_version );
! proto_tree_add_uint( esis_tree, hf_esis_reserved, NullTVB, offset + 3, 1,
ehdr->esis_reserved );
pdu_type_string = val_to_str(ehdr->esis_type&OSI_PDU_TYPE_MASK,
Index: packet-eth.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-eth.c,v
retrieving revision 1.41
diff -c -r1.41 packet-eth.c
*** packet-eth.c 2000/05/19 05:29:44 1.41
--- packet-eth.c 2000/05/30 10:37:24
***************
*** 223,236 ****
fh_tree = proto_item_add_subtree(ti, ett_ieee8023);
! proto_tree_add_item(fh_tree, hf_eth_dst, tvb, 0, 6, dst);
! proto_tree_add_item(fh_tree, hf_eth_src, tvb, 6, 6, src);
/* add items for eth.addr filter */
! proto_tree_add_item_hidden(fh_tree, hf_eth_addr, tvb, 0, 6, dst);
! proto_tree_add_item_hidden(fh_tree, hf_eth_addr, tvb, 6, 6, src);
! proto_tree_add_item(fh_tree, hf_eth_len, tvb, 12, 2, length);
}
/* Convert the LLC length from the 802.3 header to a total
--- 223,236 ----
fh_tree = proto_item_add_subtree(ti, ett_ieee8023);
! proto_tree_add_ether(fh_tree, hf_eth_dst, tvb, 0, 6, dst);
! proto_tree_add_ether(fh_tree, hf_eth_src, tvb, 6, 6, src);
/* add items for eth.addr filter */
! proto_tree_add_ether_hidden(fh_tree, hf_eth_addr, tvb, 0, 6, dst);
! proto_tree_add_ether_hidden(fh_tree, hf_eth_addr, tvb, 6, 6, src);
! proto_tree_add_uint(fh_tree, hf_eth_len, tvb, 12, 2, length);
}
/* Convert the LLC length from the 802.3 header to a total
***************
*** 254,264 ****
fh_tree = proto_item_add_subtree(ti, ett_ether2);
! proto_tree_add_item(fh_tree, hf_eth_dst, tvb, 0, 6, dst);
! proto_tree_add_item(fh_tree, hf_eth_src, tvb, 6, 6, src);
/* add items for eth.addr filter */
! proto_tree_add_item_hidden(fh_tree, hf_eth_addr, tvb, 0, 6, dst);
! proto_tree_add_item_hidden(fh_tree, hf_eth_addr, tvb, 6, 6, src);
}
}
eth_offset += ETH_HEADER_SIZE;
--- 254,264 ----
fh_tree = proto_item_add_subtree(ti, ett_ether2);
! proto_tree_add_ether(fh_tree, hf_eth_dst, tvb, 0, 6, dst);
! proto_tree_add_ether(fh_tree, hf_eth_src, tvb, 6, 6, src);
/* add items for eth.addr filter */
! proto_tree_add_ether_hidden(fh_tree, hf_eth_addr, tvb, 0, 6, dst);
! proto_tree_add_ether_hidden(fh_tree, hf_eth_addr, tvb, 6, 6, src);
}
}
eth_offset += ETH_HEADER_SIZE;
***************
*** 298,304 ****
trailer_length = tvb_length(trailer_tvb);
if (trailer_length > 0) {
ptr = tvb_get_ptr(trailer_tvb, 0, trailer_length);
! proto_tree_add_item(fh_tree, hf_eth_trailer, tvb, ETH_HEADER_SIZE + etype,
trailer_length, ptr);
}
}
--- 298,304 ----
trailer_length = tvb_length(trailer_tvb);
if (trailer_length > 0) {
ptr = tvb_get_ptr(trailer_tvb, 0, trailer_length);
! proto_tree_add_bytes(fh_tree, hf_eth_trailer, tvb, ETH_HEADER_SIZE + etype,
trailer_length, ptr);
}
}
Index: packet-ethertype.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-ethertype.c,v
retrieving revision 1.4
diff -c -r1.4 packet-ethertype.c
*** packet-ethertype.c 2000/05/19 04:54:33 1.4
--- packet-ethertype.c 2000/05/30 10:37:24
***************
*** 97,103 ****
/* Add to proto_tree */
if (tree) {
! proto_tree_add_item(fh_tree, item_id, tvb, offset_after_etype - 2, 2, etype);
}
next_tvb = tvb_new_subset(tvb, offset_after_etype, -1, -1);
--- 97,103 ----
/* Add to proto_tree */
if (tree) {
! proto_tree_add_uint(fh_tree, item_id, tvb, offset_after_etype - 2, 2, etype);
}
next_tvb = tvb_new_subset(tvb, offset_after_etype, -1, -1);
Index: packet-fddi.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-fddi.c,v
retrieving revision 1.35
diff -c -r1.35 packet-fddi.c
*** packet-fddi.c 2000/05/28 22:02:16 1.35
--- packet-fddi.c 2000/05/30 10:37:25
***************
*** 279,285 ****
ti = proto_tree_add_protocol_format(tree, proto_fddi, tvb, 0, FDDI_HEADER_SIZE,
"Fiber Distributed Data Interface, %s", fc_str);
fh_tree = proto_item_add_subtree(ti, ett_fddi);
! proto_tree_add_item(fh_tree, hf_fddi_fc, tvb, FDDI_P_FC, 1, fc);
}
/* Extract the destination address, possibly bit-swapping it. */
--- 279,285 ----
ti = proto_tree_add_protocol_format(tree, proto_fddi, tvb, 0, FDDI_HEADER_SIZE,
"Fiber Distributed Data Interface, %s", fc_str);
fh_tree = proto_item_add_subtree(ti, ett_fddi);
! proto_tree_add_uint(fh_tree, hf_fddi_fc, tvb, FDDI_P_FC, 1, fc);
}
/* Extract the destination address, possibly bit-swapping it. */
***************
*** 295,306 ****
SET_ADDRESS(&pi.dst, AT_ETHER, 6, &dst[0]);
if (fh_tree) {
! proto_tree_add_item(fh_tree, hf_fddi_dst, tvb, FDDI_P_DHOST, 6, dst);
! proto_tree_add_item_hidden(fh_tree, hf_fddi_addr, tvb, FDDI_P_DHOST, 6, dst);
/* hide some bit-swapped mac address fields in the proto_tree, just in case */
! proto_tree_add_item_hidden(fh_tree, hf_fddi_dst, tvb, FDDI_P_DHOST, 6, dst_swapped);
! proto_tree_add_item_hidden(fh_tree, hf_fddi_addr, tvb, FDDI_P_DHOST, 6, dst_swapped);
}
/* Extract the source address, possibly bit-swapping it. */
--- 295,306 ----
SET_ADDRESS(&pi.dst, AT_ETHER, 6, &dst[0]);
if (fh_tree) {
! proto_tree_add_ether(fh_tree, hf_fddi_dst, tvb, FDDI_P_DHOST, 6, dst);
! proto_tree_add_ether_hidden(fh_tree, hf_fddi_addr, tvb, FDDI_P_DHOST, 6, dst);
/* hide some bit-swapped mac address fields in the proto_tree, just in case */
! proto_tree_add_ether_hidden(fh_tree, hf_fddi_dst, tvb, FDDI_P_DHOST, 6, dst_swapped);
! proto_tree_add_ether_hidden(fh_tree, hf_fddi_addr, tvb, FDDI_P_DHOST, 6, dst_swapped);
}
/* Extract the source address, possibly bit-swapping it. */
***************
*** 316,327 ****
SET_ADDRESS(&pi.src, AT_ETHER, 6, &src[0]);
if (fh_tree) {
! proto_tree_add_item(fh_tree, hf_fddi_src, tvb, FDDI_P_SHOST, 6, src);
! proto_tree_add_item_hidden(fh_tree, hf_fddi_addr, tvb, FDDI_P_SHOST, 6, src);
/* hide some bit-swapped mac address fields in the proto_tree, just in case */
! proto_tree_add_item_hidden(fh_tree, hf_fddi_src, tvb, FDDI_P_SHOST, 6, src_swapped);
! proto_tree_add_item_hidden(fh_tree, hf_fddi_addr, tvb, FDDI_P_SHOST, 6, src_swapped);
}
next_tvb = tvb_new_subset(tvb, FDDI_HEADER_SIZE, -1, -1);
--- 316,327 ----
SET_ADDRESS(&pi.src, AT_ETHER, 6, &src[0]);
if (fh_tree) {
! proto_tree_add_ether(fh_tree, hf_fddi_src, tvb, FDDI_P_SHOST, 6, src);
! proto_tree_add_ether_hidden(fh_tree, hf_fddi_addr, tvb, FDDI_P_SHOST, 6, src);
/* hide some bit-swapped mac address fields in the proto_tree, just in case */
! proto_tree_add_ether_hidden(fh_tree, hf_fddi_src, tvb, FDDI_P_SHOST, 6, src_swapped);
! proto_tree_add_ether_hidden(fh_tree, hf_fddi_addr, tvb, FDDI_P_SHOST, 6, src_swapped);
}
next_tvb = tvb_new_subset(tvb, FDDI_HEADER_SIZE, -1, -1);
Index: packet-ftp.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-ftp.c,v
retrieving revision 1.15
diff -c -r1.15 packet-ftp.c
*** packet-ftp.c 2000/05/11 08:15:08 1.15
--- packet-ftp.c 2000/05/30 10:37:25
***************
*** 108,121 ****
if (tree) {
! ti = proto_tree_add_item(tree, proto_ftp, NullTVB, offset, END_OF_FRAME, NULL);
ftp_tree = proto_item_add_subtree(ti, ett_ftp);
if (pi.match_port == pi.destport) { /* Request */
! proto_tree_add_item_hidden(ftp_tree, hf_ftp_request, NullTVB,
offset, i1, TRUE);
! proto_tree_add_item_hidden(ftp_tree, hf_ftp_response, NullTVB,
offset, i1, FALSE);
proto_tree_add_string_format(ftp_tree, hf_ftp_request_command, NullTVB,
offset, i1, rr, "Request: %s", rr);
--- 108,121 ----
if (tree) {
! ti = proto_tree_add_item(tree, proto_ftp, NullTVB, offset, END_OF_FRAME, FALSE);
ftp_tree = proto_item_add_subtree(ti, ett_ftp);
if (pi.match_port == pi.destport) { /* Request */
! proto_tree_add_boolean_hidden(ftp_tree, hf_ftp_request, NullTVB,
offset, i1, TRUE);
! proto_tree_add_boolean_hidden(ftp_tree, hf_ftp_response, NullTVB,
offset, i1, FALSE);
proto_tree_add_string_format(ftp_tree, hf_ftp_request_command, NullTVB,
offset, i1, rr, "Request: %s", rr);
***************
*** 125,133 ****
}
else {
! proto_tree_add_item_hidden(ftp_tree, hf_ftp_request, NullTVB,
offset, i1, FALSE);
! proto_tree_add_item_hidden(ftp_tree, hf_ftp_response, NullTVB,
offset, i1, TRUE);
proto_tree_add_uint_format(ftp_tree, hf_ftp_response_code, NullTVB,
offset, i1,
--- 125,133 ----
}
else {
! proto_tree_add_boolean_hidden(ftp_tree, hf_ftp_request, NullTVB,
offset, i1, FALSE);
! proto_tree_add_boolean_hidden(ftp_tree, hf_ftp_response, NullTVB,
offset, i1, TRUE);
proto_tree_add_uint_format(ftp_tree, hf_ftp_response_code, NullTVB,
offset, i1,
Index: packet-giop.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-giop.c,v
retrieving revision 1.13
diff -c -r1.13 packet-giop.c
*** packet-giop.c 2000/05/11 08:15:09 1.13
--- packet-giop.c 2000/05/30 10:37:27
***************
*** 271,277 ****
if (tree) {
ti = proto_tree_add_item(tree, proto_giop, NullTVB, offset,
! GIOP_HEADER_SIZE + message_size, NULL);
clnp_tree = proto_item_add_subtree(ti, ett_giop);
proto_tree_add_text(clnp_tree, NullTVB, offset, 4,
"Magic number: %s", GIOP_MAGIC);
--- 271,277 ----
if (tree) {
ti = proto_tree_add_item(tree, proto_giop, NullTVB, offset,
! GIOP_HEADER_SIZE + message_size, FALSE);
clnp_tree = proto_item_add_subtree(ti, ett_giop);
proto_tree_add_text(clnp_tree, NullTVB, offset, 4,
"Magic number: %s", GIOP_MAGIC);
***************
*** 310,316 ****
(header.message_type == MessageError) ? "MessageError" :
(header.message_type == Fragment) ? "Fragment" : "?");
! proto_tree_add_item(clnp_tree,
hf_giop_message_size,
NullTVB, offset + 8, 4,
message_size);
--- 310,316 ----
(header.message_type == MessageError) ? "MessageError" :
(header.message_type == Fragment) ? "Fragment" : "?");
! proto_tree_add_uint(clnp_tree,
hf_giop_message_size,
NullTVB, offset + 8, 4,
message_size);
Index: packet-gre.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-gre.c,v
retrieving revision 1.21
diff -c -r1.21 packet-gre.c
*** packet-gre.c 2000/05/25 07:42:24 1.21
--- packet-gre.c 2000/05/30 10:37:27
***************
*** 132,138 ****
offset += sizeof(flags_and_ver);
! proto_tree_add_item(gre_tree, hf_gre_proto, NullTVB, offset, sizeof(type), type);
offset += sizeof(type);
if (flags_and_ver & GH_B_C || flags_and_ver & GH_B_R) {
--- 132,138 ----
offset += sizeof(flags_and_ver);
! proto_tree_add_uint(gre_tree, hf_gre_proto, NullTVB, offset, sizeof(type), type);
offset += sizeof(type);
if (flags_and_ver & GH_B_C || flags_and_ver & GH_B_R) {
Index: packet-h1.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-h1.c,v
retrieving revision 1.8
diff -c -r1.8 packet-h1.c
*** packet-h1.c 2000/05/11 08:15:09 1.8
--- packet-h1.c 2000/05/30 10:37:28
***************
*** 122,132 ****
col_add_str (fd, COL_INFO, "S5: ");
if (tree)
{
! ti = proto_tree_add_item (tree, proto_h1, NullTVB, offset, 16, NULL);
h1_tree = proto_item_add_subtree (ti, ett_h1);
! proto_tree_add_item (h1_tree, hf_h1_header, NullTVB, offset, 2,
pd[offset] * 0x100 + pd[offset + 1]);
! proto_tree_add_item (h1_tree, hf_h1_len, NullTVB, offset + 2, 1,
pd[offset + 2]);
}
--- 122,132 ----
col_add_str (fd, COL_INFO, "S5: ");
if (tree)
{
! ti = proto_tree_add_item (tree, proto_h1, NullTVB, offset, 16, FALSE);
h1_tree = proto_item_add_subtree (ti, ett_h1);
! proto_tree_add_uint (h1_tree, hf_h1_header, NullTVB, offset, 2,
pd[offset] * 0x100 + pd[offset + 1]);
! proto_tree_add_uint (h1_tree, hf_h1_len, NullTVB, offset + 2, 1,
pd[offset + 2]);
}
***************
*** 137,151 ****
case OPCODE_BLOCK:
if (h1_tree)
{
! ti = proto_tree_add_item (h1_tree, hf_h1_opfield, NullTVB,
offset + position,
pd[offset + position + 1],
pd[offset + position]);
opcode_tree = proto_item_add_subtree (ti, ett_opcode);
! proto_tree_add_item (opcode_tree, hf_h1_oplen, NullTVB,
offset + position + 1, 1,
pd[offset + position + 1]);
! proto_tree_add_item (opcode_tree, hf_h1_opcode, NullTVB,
offset + position + 2, 1,
pd[offset + position + 2]);
}
--- 137,151 ----
case OPCODE_BLOCK:
if (h1_tree)
{
! ti = proto_tree_add_uint (h1_tree, hf_h1_opfield, NullTVB,
offset + position,
pd[offset + position + 1],
pd[offset + position]);
opcode_tree = proto_item_add_subtree (ti, ett_opcode);
! proto_tree_add_uint (opcode_tree, hf_h1_oplen, NullTVB,
offset + position + 1, 1,
pd[offset + position + 1]);
! proto_tree_add_uint (opcode_tree, hf_h1_opcode, NullTVB,
offset + position + 2, 1,
pd[offset + position + 2]);
}
***************
*** 159,183 ****
case REQUEST_BLOCK:
if (h1_tree)
{
! ti = proto_tree_add_item (h1_tree, hf_h1_requestblock, NullTVB,
offset + position,
pd[offset + position + 1],
pd[offset + position]);
org_tree = proto_item_add_subtree (ti, ett_org);
! proto_tree_add_item (org_tree, hf_h1_requestlen, NullTVB,
offset + position + 1, 1,
pd[offset + position + 1]);
! proto_tree_add_item (org_tree, hf_h1_org, NullTVB,
offset + position + 2, 1,
pd[offset + position + 2]);
! proto_tree_add_item (org_tree, hf_h1_dbnr, NullTVB,
offset + position + 3, 1,
pd[offset + position + 3]);
! proto_tree_add_item (org_tree, hf_h1_dwnr, NullTVB,
offset + position + 4, 2,
pd[offset + position + 4] * 0x100 +
pd[offset + position + 5]);
! proto_tree_add_item (org_tree, hf_h1_dlen, NullTVB,
offset + position + 6, 2,
pd[offset + position + 6] * 0x100 +
pd[offset + position + 7]);
--- 159,183 ----
case REQUEST_BLOCK:
if (h1_tree)
{
! ti = proto_tree_add_uint (h1_tree, hf_h1_requestblock, NullTVB,
offset + position,
pd[offset + position + 1],
pd[offset + position]);
org_tree = proto_item_add_subtree (ti, ett_org);
! proto_tree_add_uint (org_tree, hf_h1_requestlen, NullTVB,
offset + position + 1, 1,
pd[offset + position + 1]);
! proto_tree_add_uint (org_tree, hf_h1_org, NullTVB,
offset + position + 2, 1,
pd[offset + position + 2]);
! proto_tree_add_uint (org_tree, hf_h1_dbnr, NullTVB,
offset + position + 3, 1,
pd[offset + position + 3]);
! proto_tree_add_uint (org_tree, hf_h1_dwnr, NullTVB,
offset + position + 4, 2,
pd[offset + position + 4] * 0x100 +
pd[offset + position + 5]);
! proto_tree_add_int (org_tree, hf_h1_dlen, NullTVB,
offset + position + 6, 2,
pd[offset + position + 6] * 0x100 +
pd[offset + position + 7]);
***************
*** 199,213 ****
case RESPONSE_BLOCK:
if (h1_tree)
{
! ti = proto_tree_add_item (h1_tree, hf_h1_response, NullTVB,
offset + position,
pd[offset + position + 1],
pd[offset + position]);
response_tree = proto_item_add_subtree (ti, ett_response);
! proto_tree_add_item (response_tree, hf_h1_response_len, NullTVB,
offset + position + 1, 1,
pd[offset + position + 1]);
! proto_tree_add_item (response_tree, hf_h1_response_value, NullTVB,
offset + position + 2, 1,
pd[offset + position + 2]);
}
--- 199,213 ----
case RESPONSE_BLOCK:
if (h1_tree)
{
! ti = proto_tree_add_uint (h1_tree, hf_h1_response, NullTVB,
offset + position,
pd[offset + position + 1],
pd[offset + position]);
response_tree = proto_item_add_subtree (ti, ett_response);
! proto_tree_add_uint (response_tree, hf_h1_response_len, NullTVB,
offset + position + 1, 1,
pd[offset + position + 1]);
! proto_tree_add_uint (response_tree, hf_h1_response_value, NullTVB,
offset + position + 2, 1,
pd[offset + position + 2]);
}
***************
*** 221,233 ****
case EMPTY_BLOCK:
if (h1_tree)
{
! ti = proto_tree_add_item (h1_tree, hf_h1_empty, NullTVB,
offset + position,
pd[offset + position + 1],
pd[offset + position]);
empty_tree = proto_item_add_subtree (ti, ett_empty);
! proto_tree_add_item (empty_tree, hf_h1_empty_len, NullTVB,
offset + position + 1, 1,
pd[offset + position + 1]);
}
--- 221,233 ----
case EMPTY_BLOCK:
if (h1_tree)
{
! ti = proto_tree_add_uint (h1_tree, hf_h1_empty, NullTVB,
offset + position,
pd[offset + position + 1],
pd[offset + position]);
empty_tree = proto_item_add_subtree (ti, ett_empty);
! proto_tree_add_uint (empty_tree, hf_h1_empty_len, NullTVB,
offset + position + 1, 1,
pd[offset + position + 1]);
}
Index: packet-hsrp.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-hsrp.c,v
retrieving revision 1.4
diff -c -r1.4 packet-hsrp.c
*** packet-hsrp.c 2000/05/11 08:15:10 1.4
--- packet-hsrp.c 2000/05/30 10:37:28
***************
*** 120,126 ****
return;
}
! ti = proto_tree_add_item(tree, proto_hsrp, NullTVB, offset, END_OF_FRAME, NULL);
hsrp_tree = proto_item_add_subtree(ti, ett_hsrp);
proto_tree_add_text(hsrp_tree, NullTVB, offset++, 1, "Version: %u", hsrp.version);
--- 120,126 ----
return;
}
! ti = proto_tree_add_item(tree, proto_hsrp, NullTVB, offset, END_OF_FRAME, FALSE);
hsrp_tree = proto_item_add_subtree(ti, ett_hsrp);
proto_tree_add_text(hsrp_tree, NullTVB, offset++, 1, "Version: %u", hsrp.version);
Index: packet-http.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-http.c,v
retrieving revision 1.18
diff -c -r1.18 packet-http.c
*** packet-http.c 2000/05/11 08:15:10 1.18
--- packet-http.c 2000/05/30 10:37:29
***************
*** 92,98 ****
}
if (tree) {
! ti = proto_tree_add_item(tree, proto_http, NullTVB, offset, END_OF_FRAME, NULL);
http_tree = proto_item_add_subtree(ti, ett_http);
while (data < dataend) {
--- 92,98 ----
}
if (tree) {
! ti = proto_tree_add_item(tree, proto_http, NullTVB, offset, END_OF_FRAME, FALSE);
http_tree = proto_item_add_subtree(ti, ett_http);
while (data < dataend) {
***************
*** 189,200 ****
switch (http_type) {
case HTTP_RESPONSE:
! proto_tree_add_item_hidden(http_tree,
hf_http_response, NullTVB, 0, 0, 1);
break;
case HTTP_REQUEST:
! proto_tree_add_item_hidden(http_tree,
hf_http_request, NullTVB, 0, 0, 1);
break;
--- 189,200 ----
switch (http_type) {
case HTTP_RESPONSE:
! proto_tree_add_boolean_hidden(http_tree,
hf_http_response, NullTVB, 0, 0, 1);
break;
case HTTP_REQUEST:
! proto_tree_add_boolean_hidden(http_tree,
hf_http_request, NullTVB, 0, 0, 1);
break;
Index: packet-icmpv6.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-icmpv6.c,v
retrieving revision 1.16
diff -c -r1.16 packet-icmpv6.c
*** packet-icmpv6.c 2000/05/11 08:15:10 1.16
--- packet-icmpv6.c 2000/05/30 10:37:30
***************
*** 345,351 ****
if (tree) {
/* !!! specify length */
! ti = proto_tree_add_item(tree, proto_icmpv6, NullTVB, offset, len, NULL);
icmp6_tree = proto_item_add_subtree(ti, ett_icmpv6);
proto_tree_add_uint_format(icmp6_tree, hf_icmpv6_type, NullTVB,
--- 345,351 ----
if (tree) {
/* !!! specify length */
! ti = proto_tree_add_item(tree, proto_icmpv6, NullTVB, offset, len, FALSE);
icmp6_tree = proto_item_add_subtree(ti, ett_icmpv6);
proto_tree_add_uint_format(icmp6_tree, hf_icmpv6_type, NullTVB,
***************
*** 358,364 ****
dp->icmp6_code,
"Code: 0x%02x (%s)", dp->icmp6_code, codename);
}
! proto_tree_add_item(icmp6_tree, hf_icmpv6_checksum, NullTVB,
offset + offsetof(struct icmp6_hdr, icmp6_cksum), 2,
(guint16)htons(dp->icmp6_cksum));
--- 358,364 ----
dp->icmp6_code,
"Code: 0x%02x (%s)", dp->icmp6_code, codename);
}
! proto_tree_add_uint(icmp6_tree, hf_icmpv6_checksum, NullTVB,
offset + offsetof(struct icmp6_hdr, icmp6_cksum), 2,
(guint16)htons(dp->icmp6_cksum));
Index: packet-icp.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-icp.c,v
retrieving revision 1.7
diff -c -r1.7 packet-icp.c
*** packet-icp.c 2000/05/11 08:15:10 1.7
--- packet-icp.c 2000/05/30 10:37:31
***************
*** 209,216 ****
if (tree)
{
! ti = proto_tree_add_item(tree,proto_icp , NullTVB,offset,fd->pkt_len-offset,
! NULL);
icp_tree = proto_item_add_subtree(ti, ett_icp);
proto_tree_add_uint_format(icp_tree,hf_icp_opcode, NullTVB, offset, 1,
--- 209,215 ----
if (tree)
{
! ti = proto_tree_add_item(tree,proto_icp, NullTVB,offset,fd->pkt_len-offset, FALSE);
icp_tree = proto_item_add_subtree(ti, ett_icp);
proto_tree_add_uint_format(icp_tree,hf_icp_opcode, NullTVB, offset, 1,
Index: packet-imap.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-imap.c,v
retrieving revision 1.6
diff -c -r1.6 packet-imap.c
*** packet-imap.c 2000/05/11 08:15:11 1.6
--- packet-imap.c 2000/05/30 10:37:31
***************
*** 91,102 ****
if (tree) {
! ti = proto_tree_add_item(tree, proto_imap, NullTVB, offset, END_OF_FRAME, NULL);
imap_tree = proto_item_add_subtree(ti, ett_imap);
if (pi.match_port == pi.destport) { /* Request */
! proto_tree_add_item_hidden(imap_tree, hf_imap_request, NullTVB, offset, i1, TRUE);
proto_tree_add_text(imap_tree, NullTVB, offset, i1, "Request Tag: %s", rr);
proto_tree_add_text(imap_tree, NullTVB, offset + i1 + 1, END_OF_FRAME, "Request: %s", rd);
--- 91,102 ----
if (tree) {
! ti = proto_tree_add_item(tree, proto_imap, NullTVB, offset, END_OF_FRAME, FALSE);
imap_tree = proto_item_add_subtree(ti, ett_imap);
if (pi.match_port == pi.destport) { /* Request */
! proto_tree_add_boolean_hidden(imap_tree, hf_imap_request, NullTVB, offset, i1, TRUE);
proto_tree_add_text(imap_tree, NullTVB, offset, i1, "Request Tag: %s", rr);
proto_tree_add_text(imap_tree, NullTVB, offset + i1 + 1, END_OF_FRAME, "Request: %s", rd);
***************
*** 104,110 ****
}
else {
! proto_tree_add_item_hidden(imap_tree, hf_imap_response, NullTVB, offset, i1, TRUE);
proto_tree_add_text(imap_tree, NullTVB, offset, i1, "Response Tag: %s", rr);
proto_tree_add_text(imap_tree, NullTVB, offset + i1 + 1, END_OF_FRAME, "Response: %s", rd);
--- 104,110 ----
}
else {
! proto_tree_add_boolean_hidden(imap_tree, hf_imap_response, NullTVB, offset, i1, TRUE);
proto_tree_add_text(imap_tree, NullTVB, offset, i1, "Response Tag: %s", rr);
proto_tree_add_text(imap_tree, NullTVB, offset + i1 + 1, END_OF_FRAME, "Response: %s", rd);
Index: packet-ip.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-ip.c,v
retrieving revision 1.89
diff -c -r1.89 packet-ip.c
*** packet-ip.c 2000/05/28 22:59:18 1.89
--- packet-ip.c 2000/05/30 10:37:35
***************
*** 861,870 ****
break;
}
! ti = proto_tree_add_item(tree, proto_ip, NullTVB, offset, hlen, NULL);
ip_tree = proto_item_add_subtree(ti, ett_ip);
! proto_tree_add_item(ip_tree, hf_ip_version, NullTVB, offset, 1, hi_nibble(iph.ip_v_hl));
proto_tree_add_uint_format(ip_tree, hf_ip_hdr_len, NullTVB, offset, 1, hlen,
"Header length: %u bytes", hlen);
--- 861,870 ----
break;
}
! ti = proto_tree_add_item(tree, proto_ip, NullTVB, offset, hlen, FALSE);
ip_tree = proto_item_add_subtree(ti, ett_ip);
! proto_tree_add_uint(ip_tree, hf_ip_version, NullTVB, offset, 1, hi_nibble(iph.ip_v_hl));
proto_tree_add_uint_format(ip_tree, hf_ip_hdr_len, NullTVB, offset, 1, hlen,
"Header length: %u bytes", hlen);
***************
*** 875,914 ****
"Unknown DSCP"));
field_tree = proto_item_add_subtree(tf, ett_ip_dsfield);
! proto_tree_add_item(field_tree, hf_ip_dsfield_dscp, NullTVB, offset + 1, 1, iph.ip_tos);
! proto_tree_add_item(field_tree, hf_ip_dsfield_cu, NullTVB, offset + 1, 1, iph.ip_tos);
} else {
tf = proto_tree_add_uint_format(ip_tree, hf_ip_tos, NullTVB, offset + 1, 1, iph.ip_tos,
"Type of service: 0x%02x (%s)", iph.ip_tos,
val_to_str( IPTOS_TOS(iph.ip_tos), iptos_vals, "Unknown") );
field_tree = proto_item_add_subtree(tf, ett_ip_tos);
! proto_tree_add_item(field_tree, hf_ip_tos_precedence, NullTVB, offset + 1, 1, iph.ip_tos);
! proto_tree_add_item(field_tree, hf_ip_tos_delay, NullTVB, offset + 1, 1, iph.ip_tos);
! proto_tree_add_item(field_tree, hf_ip_tos_throughput, NullTVB, offset + 1, 1, iph.ip_tos);
! proto_tree_add_item(field_tree, hf_ip_tos_reliability, NullTVB, offset + 1, 1, iph.ip_tos);
! proto_tree_add_item(field_tree, hf_ip_tos_cost, NullTVB, offset + 1, 1, iph.ip_tos);
}
! proto_tree_add_item(ip_tree, hf_ip_len, NullTVB, offset + 2, 2, iph.ip_len);
! proto_tree_add_item(ip_tree, hf_ip_id, NullTVB, offset + 4, 2, iph.ip_id);
flags = (iph.ip_off & (IP_DF|IP_MF)) >> 12;
! tf = proto_tree_add_item(ip_tree, hf_ip_flags, NullTVB, offset + 6, 1, flags);
field_tree = proto_item_add_subtree(tf, ett_ip_off);
! proto_tree_add_item(field_tree, hf_ip_flags_df, NullTVB, offset + 6, 1, flags),
! proto_tree_add_item(field_tree, hf_ip_flags_mf, NullTVB, offset + 6, 1, flags),
! proto_tree_add_item(ip_tree, hf_ip_frag_offset, NullTVB, offset + 6, 2,
(iph.ip_off & IP_OFFSET)*8);
! proto_tree_add_item(ip_tree, hf_ip_ttl, NullTVB, offset + 8, 1, iph.ip_ttl);
proto_tree_add_uint_format(ip_tree, hf_ip_proto, NullTVB, offset + 9, 1, iph.ip_p,
"Protocol: %s (0x%02x)", ipprotostr(iph.ip_p), iph.ip_p);
proto_tree_add_uint_format(ip_tree, hf_ip_checksum, NullTVB, offset + 10, 2, iph.ip_sum,
"Header checksum: 0x%04x (%s)", iph.ip_sum, ip_checksum_state((e_ip*) &pd[offset]));
! proto_tree_add_item(ip_tree, hf_ip_src, NullTVB, offset + 12, 4, iph.ip_src);
! proto_tree_add_item(ip_tree, hf_ip_dst, NullTVB, offset + 16, 4, iph.ip_dst);
! proto_tree_add_item_hidden(ip_tree, hf_ip_addr, NullTVB, offset + 12, 4, iph.ip_src);
! proto_tree_add_item_hidden(ip_tree, hf_ip_addr, NullTVB, offset + 16, 4, iph.ip_dst);
/* Decode IP options, if any. */
if (hlen > sizeof (e_ip)) {
--- 875,914 ----
"Unknown DSCP"));
field_tree = proto_item_add_subtree(tf, ett_ip_dsfield);
! proto_tree_add_uint(field_tree, hf_ip_dsfield_dscp, NullTVB, offset + 1, 1, iph.ip_tos);
! proto_tree_add_uint(field_tree, hf_ip_dsfield_cu, NullTVB, offset + 1, 1, iph.ip_tos);
} else {
tf = proto_tree_add_uint_format(ip_tree, hf_ip_tos, NullTVB, offset + 1, 1, iph.ip_tos,
"Type of service: 0x%02x (%s)", iph.ip_tos,
val_to_str( IPTOS_TOS(iph.ip_tos), iptos_vals, "Unknown") );
field_tree = proto_item_add_subtree(tf, ett_ip_tos);
! proto_tree_add_uint(field_tree, hf_ip_tos_precedence, NullTVB, offset + 1, 1, iph.ip_tos);
! proto_tree_add_boolean(field_tree, hf_ip_tos_delay, NullTVB, offset + 1, 1, iph.ip_tos);
! proto_tree_add_boolean(field_tree, hf_ip_tos_throughput, NullTVB, offset + 1, 1, iph.ip_tos);
! proto_tree_add_boolean(field_tree, hf_ip_tos_reliability, NullTVB, offset + 1, 1, iph.ip_tos);
! proto_tree_add_boolean(field_tree, hf_ip_tos_cost, NullTVB, offset + 1, 1, iph.ip_tos);
}
! proto_tree_add_uint(ip_tree, hf_ip_len, NullTVB, offset + 2, 2, iph.ip_len);
! proto_tree_add_uint(ip_tree, hf_ip_id, NullTVB, offset + 4, 2, iph.ip_id);
flags = (iph.ip_off & (IP_DF|IP_MF)) >> 12;
! tf = proto_tree_add_uint(ip_tree, hf_ip_flags, NullTVB, offset + 6, 1, flags);
field_tree = proto_item_add_subtree(tf, ett_ip_off);
! proto_tree_add_boolean(field_tree, hf_ip_flags_df, NullTVB, offset + 6, 1, flags),
! proto_tree_add_boolean(field_tree, hf_ip_flags_mf, NullTVB, offset + 6, 1, flags),
! proto_tree_add_uint(ip_tree, hf_ip_frag_offset, NullTVB, offset + 6, 2,
(iph.ip_off & IP_OFFSET)*8);
! proto_tree_add_uint(ip_tree, hf_ip_ttl, NullTVB, offset + 8, 1, iph.ip_ttl);
proto_tree_add_uint_format(ip_tree, hf_ip_proto, NullTVB, offset + 9, 1, iph.ip_p,
"Protocol: %s (0x%02x)", ipprotostr(iph.ip_p), iph.ip_p);
proto_tree_add_uint_format(ip_tree, hf_ip_checksum, NullTVB, offset + 10, 2, iph.ip_sum,
"Header checksum: 0x%04x (%s)", iph.ip_sum, ip_checksum_state((e_ip*) &pd[offset]));
! proto_tree_add_ipv4(ip_tree, hf_ip_src, NullTVB, offset + 12, 4, iph.ip_src);
! proto_tree_add_ipv4(ip_tree, hf_ip_dst, NullTVB, offset + 16, 4, iph.ip_dst);
! proto_tree_add_ipv4_hidden(ip_tree, hf_ip_addr, NullTVB, offset + 12, 4, iph.ip_src);
! proto_tree_add_ipv4_hidden(ip_tree, hf_ip_addr, NullTVB, offset + 16, 4, iph.ip_dst);
/* Decode IP options, if any. */
if (hlen > sizeof (e_ip)) {
***************
*** 1093,1099 ****
col_add_str(fd, COL_INFO, type_str);
if (tree) {
! ti = proto_tree_add_item(tree, proto_icmp, NullTVB, offset, 4, NULL);
icmp_tree = proto_item_add_subtree(ti, ett_icmp);
proto_tree_add_uint_format(icmp_tree, hf_icmp_type, NullTVB, offset, 1,
ih.icmp_type,
--- 1093,1099 ----
col_add_str(fd, COL_INFO, type_str);
if (tree) {
! ti = proto_tree_add_item(tree, proto_icmp, NullTVB, offset, 4, FALSE);
icmp_tree = proto_item_add_subtree(ti, ett_icmp);
proto_tree_add_uint_format(icmp_tree, hf_icmp_type, NullTVB, offset, 1,
ih.icmp_type,
***************
*** 1103,1109 ****
ih.icmp_code,
"Code: %u %s",
ih.icmp_code, code_str);
! proto_tree_add_item(icmp_tree, hf_icmp_checksum, NullTVB, offset + 2, 2,
cksum);
/* Decode the second 4 bytes of the packet. */
--- 1103,1109 ----
ih.icmp_code,
"Code: %u %s",
ih.icmp_code, code_str);
! proto_tree_add_uint(icmp_tree, hf_icmp_checksum, NullTVB, offset + 2, 2,
cksum);
/* Decode the second 4 bytes of the packet. */
***************
*** 1252,1260 ****
if (check_col(fd, COL_INFO))
col_add_str(fd, COL_INFO, type_str);
if (tree) {
! ti = proto_tree_add_item(tree, proto_igmp, NullTVB, offset, 8, NULL);
igmp_tree = proto_item_add_subtree(ti, ett_igmp);
! proto_tree_add_item(igmp_tree, hf_igmp_version, NullTVB, offset, 1,
hi_nibble(ih.igmp_v_t));
proto_tree_add_uint_format(igmp_tree, hf_igmp_type, NullTVB, offset , 1,
lo_nibble(ih.igmp_v_t),
--- 1252,1260 ----
if (check_col(fd, COL_INFO))
col_add_str(fd, COL_INFO, type_str);
if (tree) {
! ti = proto_tree_add_item(tree, proto_igmp, NullTVB, offset, 8, FALSE);
igmp_tree = proto_item_add_subtree(ti, ett_igmp);
! proto_tree_add_uint(igmp_tree, hf_igmp_version, NullTVB, offset, 1,
hi_nibble(ih.igmp_v_t));
proto_tree_add_uint_format(igmp_tree, hf_igmp_type, NullTVB, offset , 1,
lo_nibble(ih.igmp_v_t),
***************
*** 1264,1272 ****
ih.igmp_unused,
"Unused: 0x%02x",
ih.igmp_unused);
! proto_tree_add_item(igmp_tree, hf_igmp_checksum, NullTVB, offset + 2, 2,
cksum);
! proto_tree_add_item(igmp_tree, hf_igmp_group, NullTVB, offset + 4, 4,
ih.igmp_gaddr);
}
}
--- 1264,1272 ----
ih.igmp_unused,
"Unused: 0x%02x",
ih.igmp_unused);
! proto_tree_add_uint(igmp_tree, hf_igmp_checksum, NullTVB, offset + 2, 2,
cksum);
! proto_tree_add_ipv4(igmp_tree, hf_igmp_group, NullTVB, offset + 4, 4,
ih.igmp_gaddr);
}
}
Index: packet-ipp.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-ipp.c,v
retrieving revision 1.9
diff -c -r1.9 packet-ipp.c
*** packet-ipp.c 2000/05/11 08:15:13 1.9
--- packet-ipp.c 2000/05/30 10:37:36
***************
*** 177,183 ****
}
if (tree) {
! ti = proto_tree_add_item(tree, proto_ipp, NullTVB, offset, END_OF_FRAME, NULL);
ipp_tree = proto_item_add_subtree(ti, ett_ipp);
proto_tree_add_text(ipp_tree, NullTVB, offset, 2, "Version: %u.%u",
--- 177,183 ----
}
if (tree) {
! ti = proto_tree_add_item(tree, proto_ipp, NullTVB, offset, END_OF_FRAME, FALSE);
ipp_tree = proto_item_add_subtree(ti, ett_ipp);
proto_tree_add_text(ipp_tree, NullTVB, offset, 2, "Version: %u.%u",
Index: packet-ipsec.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-ipsec.c,v
retrieving revision 1.15
diff -c -r1.15 packet-ipsec.c
*** packet-ipsec.c 2000/05/11 08:15:14 1.15
--- packet-ipsec.c 2000/05/30 10:37:37
***************
*** 120,136 ****
if (tree) {
/* !!! specify length */
! ti = proto_tree_add_item(tree, proto_ah, NullTVB, offset, advance, NULL);
ah_tree = proto_item_add_subtree(ti, ett_ah);
proto_tree_add_text(ah_tree, NullTVB, offset + offsetof(struct newah, ah_nxt), 1,
"Next Header: %s (0x%02x)", ipprotostr(ah.ah_nxt), ah.ah_nxt);
proto_tree_add_text(ah_tree, NullTVB, offset + offsetof(struct newah, ah_len), 1,
"Length: %d", ah.ah_len << 2);
! proto_tree_add_item(ah_tree, hf_ah_spi, NullTVB,
offset + offsetof(struct newah, ah_spi), 4,
(guint32)ntohl(ah.ah_spi));
! proto_tree_add_item(ah_tree, hf_ah_sequence, NullTVB,
offset + offsetof(struct newah, ah_seq), 4,
(guint32)ntohl(ah.ah_seq));
proto_tree_add_text(ah_tree, NullTVB, offset + sizeof(ah), (ah.ah_len - 1) << 2,
--- 120,136 ----
if (tree) {
/* !!! specify length */
! ti = proto_tree_add_item(tree, proto_ah, NullTVB, offset, advance, FALSE);
ah_tree = proto_item_add_subtree(ti, ett_ah);
proto_tree_add_text(ah_tree, NullTVB, offset + offsetof(struct newah, ah_nxt), 1,
"Next Header: %s (0x%02x)", ipprotostr(ah.ah_nxt), ah.ah_nxt);
proto_tree_add_text(ah_tree, NullTVB, offset + offsetof(struct newah, ah_len), 1,
"Length: %d", ah.ah_len << 2);
! proto_tree_add_uint(ah_tree, hf_ah_spi, NullTVB,
offset + offsetof(struct newah, ah_spi), 4,
(guint32)ntohl(ah.ah_spi));
! proto_tree_add_uint(ah_tree, hf_ah_sequence, NullTVB,
offset + offsetof(struct newah, ah_seq), 4,
(guint32)ntohl(ah.ah_seq));
proto_tree_add_text(ah_tree, NullTVB, offset + sizeof(ah), (ah.ah_len - 1) << 2,
***************
*** 166,177 ****
* (ie none)
*/
if(tree) {
! ti = proto_tree_add_item(tree, proto_esp, NullTVB, offset, END_OF_FRAME, NULL);
esp_tree = proto_item_add_subtree(ti, ett_esp);
! proto_tree_add_item(esp_tree, hf_esp_spi, NullTVB,
offset + offsetof(struct newesp, esp_spi), 4,
(guint32)ntohl(esp.esp_spi));
! proto_tree_add_item(esp_tree, hf_esp_sequence, NullTVB,
offset + offsetof(struct newesp, esp_seq), 4,
(guint32)ntohl(esp.esp_seq));
dissect_data(pd, offset + sizeof(struct newesp), fd, esp_tree);
--- 166,177 ----
* (ie none)
*/
if(tree) {
! ti = proto_tree_add_item(tree, proto_esp, NullTVB, offset, END_OF_FRAME, FALSE);
esp_tree = proto_item_add_subtree(ti, ett_esp);
! proto_tree_add_uint(esp_tree, hf_esp_spi, NullTVB,
offset + offsetof(struct newesp, esp_spi), 4,
(guint32)ntohl(esp.esp_spi));
! proto_tree_add_uint(esp_tree, hf_esp_sequence, NullTVB,
offset + offsetof(struct newesp, esp_seq), 4,
(guint32)ntohl(esp.esp_seq));
dissect_data(pd, offset + sizeof(struct newesp), fd, esp_tree);
***************
*** 209,227 ****
*/
if (tree) {
ti = proto_tree_add_item(tree, proto_ipcomp, NullTVB, offset, END_OF_FRAME,
! NULL);
ipcomp_tree = proto_item_add_subtree(ti, ett_ipcomp);
proto_tree_add_text(ipcomp_tree, NullTVB,
offset + offsetof(struct ipcomp, comp_nxt), 1,
"Next Header: %s (0x%02x)",
ipprotostr(ipcomp.comp_nxt), ipcomp.comp_nxt);
! proto_tree_add_item(ipcomp_tree, hf_ipcomp_flags, NullTVB,
offset + offsetof(struct ipcomp, comp_flags), 1,
ipcomp.comp_flags);
p = val_to_str(ntohs(ipcomp.comp_cpi), cpi2val, "");
if (p[0] == '\0') {
! proto_tree_add_item(ipcomp_tree, hf_ipcomp_cpi, NullTVB,
offset + offsetof(struct ipcomp, comp_cpi), 2,
ntohs(ipcomp.comp_cpi));
} else {
--- 209,227 ----
*/
if (tree) {
ti = proto_tree_add_item(tree, proto_ipcomp, NullTVB, offset, END_OF_FRAME,
! FALSE);
ipcomp_tree = proto_item_add_subtree(ti, ett_ipcomp);
proto_tree_add_text(ipcomp_tree, NullTVB,
offset + offsetof(struct ipcomp, comp_nxt), 1,
"Next Header: %s (0x%02x)",
ipprotostr(ipcomp.comp_nxt), ipcomp.comp_nxt);
! proto_tree_add_uint(ipcomp_tree, hf_ipcomp_flags, NullTVB,
offset + offsetof(struct ipcomp, comp_flags), 1,
ipcomp.comp_flags);
p = val_to_str(ntohs(ipcomp.comp_cpi), cpi2val, "");
if (p[0] == '\0') {
! proto_tree_add_uint(ipcomp_tree, hf_ipcomp_cpi, NullTVB,
offset + offsetof(struct ipcomp, comp_cpi), 2,
ntohs(ipcomp.comp_cpi));
} else {
Index: packet-ipv6.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-ipv6.c,v
retrieving revision 1.37
diff -c -r1.37 packet-ipv6.c
*** packet-ipv6.c 2000/05/24 07:52:31 1.37
--- packet-ipv6.c 2000/05/30 10:37:38
***************
*** 268,283 ****
if (tree) {
/* !!! specify length */
! ti = proto_tree_add_item(tree, proto_ipv6, NullTVB, offset, 40, NULL);
ipv6_tree = proto_item_add_subtree(ti, ett_ipv6);
/* !!! warning: version also contains 4 Bit priority */
! proto_tree_add_item(ipv6_tree, hf_ipv6_version, NullTVB,
offset + offsetof(struct ip6_hdr, ip6_vfc), 1,
(ipv6.ip6_vfc >> 4) & 0x0f);
! proto_tree_add_item(ipv6_tree, hf_ipv6_class, NullTVB,
offset + offsetof(struct ip6_hdr, ip6_flow), 4,
(guint8)((ntohl(ipv6.ip6_flow) >> 20) & 0xff));
--- 268,283 ----
if (tree) {
/* !!! specify length */
! ti = proto_tree_add_item(tree, proto_ipv6, NullTVB, offset, 40, FALSE);
ipv6_tree = proto_item_add_subtree(ti, ett_ipv6);
/* !!! warning: version also contains 4 Bit priority */
! proto_tree_add_uint(ipv6_tree, hf_ipv6_version, NullTVB,
offset + offsetof(struct ip6_hdr, ip6_vfc), 1,
(ipv6.ip6_vfc >> 4) & 0x0f);
! proto_tree_add_uint(ipv6_tree, hf_ipv6_class, NullTVB,
offset + offsetof(struct ip6_hdr, ip6_flow), 4,
(guint8)((ntohl(ipv6.ip6_flow) >> 20) & 0xff));
***************
*** 291,297 ****
"Flowlabel: 0x%05lx",
(unsigned long)(ntohl(ipv6.ip6_flow & IPV6_FLOWLABEL_MASK)));
! proto_tree_add_item(ipv6_tree, hf_ipv6_plen, NullTVB,
offset + offsetof(struct ip6_hdr, ip6_plen), 2,
ntohs(ipv6.ip6_plen));
--- 291,297 ----
"Flowlabel: 0x%05lx",
(unsigned long)(ntohl(ipv6.ip6_flow & IPV6_FLOWLABEL_MASK)));
! proto_tree_add_uint(ipv6_tree, hf_ipv6_plen, NullTVB,
offset + offsetof(struct ip6_hdr, ip6_plen), 2,
ntohs(ipv6.ip6_plen));
***************
*** 301,307 ****
"Next header: %s (0x%02x)",
ipprotostr(ipv6.ip6_nxt), ipv6.ip6_nxt);
! proto_tree_add_item(ipv6_tree, hf_ipv6_hlim, NullTVB,
offset + offsetof(struct ip6_hdr, ip6_hlim), 1,
ipv6.ip6_hlim);
--- 301,307 ----
"Next header: %s (0x%02x)",
ipprotostr(ipv6.ip6_nxt), ipv6.ip6_nxt);
! proto_tree_add_uint(ipv6_tree, hf_ipv6_hlim, NullTVB,
offset + offsetof(struct ip6_hdr, ip6_hlim), 1,
ipv6.ip6_hlim);
***************
*** 363,369 ****
}
#ifdef TEST_FINALHDR
! proto_tree_add_item_hidden(ipv6_tree, hf_ipv6_final, NullTVB, poffset, 1, nxt);
#endif
if (frag) {
/* fragmented */
--- 363,369 ----
}
#ifdef TEST_FINALHDR
! proto_tree_add_uint_hidden(ipv6_tree, hf_ipv6_final, NullTVB, poffset, 1, nxt);
#endif
if (frag) {
/* fragmented */
Index: packet-ipx.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-ipx.c,v
retrieving revision 1.60
diff -c -r1.60 packet-ipx.c
*** packet-ipx.c 2000/05/30 03:35:51 1.60
--- packet-ipx.c 2000/05/30 10:37:40
***************
*** 333,353 ****
ipx_checksum = pntohs(&pd[offset]);
ipx_hops = pd[offset+4];
! ti = proto_tree_add_item(tree, proto_ipx, NullTVB, offset, 30, NULL);
ipx_tree = proto_item_add_subtree(ti, ett_ipx);
! proto_tree_add_item(ipx_tree, hf_ipx_checksum, NullTVB, offset, 2, ipx_checksum);
proto_tree_add_uint_format(ipx_tree, hf_ipx_len, NullTVB, offset+2, 2, ipx_length,
"Length: %d bytes", ipx_length);
proto_tree_add_uint_format(ipx_tree, hf_ipx_hops, NullTVB, offset+4, 1, ipx_hops,
"Transport Control: %d hops", ipx_hops);
! proto_tree_add_item(ipx_tree, hf_ipx_packet_type, NullTVB, offset+5, 1, ipx_type);
! proto_tree_add_item(ipx_tree, hf_ipx_dnet, NullTVB, offset+6, 4, ipx_dnet_val);
! proto_tree_add_item(ipx_tree, hf_ipx_dnode, NullTVB, offset+10, 6, ipx_dnode);
proto_tree_add_uint_format(ipx_tree, hf_ipx_dsocket, NullTVB, offset+16, 2,
ipx_dsocket, "Destination Socket: %s (0x%04X)",
port_text(ipx_dsocket), ipx_dsocket);
! proto_tree_add_item(ipx_tree, hf_ipx_snet, NullTVB, offset+18, 4, ipx_snet_val);
! proto_tree_add_item(ipx_tree, hf_ipx_snode, NullTVB, offset+22, 6, ipx_snode);
proto_tree_add_uint_format(ipx_tree, hf_ipx_ssocket, NullTVB, offset+28, 2,
ipx_ssocket, "Source Socket: %s (0x%04X)", port_text(ipx_ssocket),
ipx_ssocket);
--- 333,353 ----
ipx_checksum = pntohs(&pd[offset]);
ipx_hops = pd[offset+4];
! ti = proto_tree_add_item(tree, proto_ipx, NullTVB, offset, 30, FALSE);
ipx_tree = proto_item_add_subtree(ti, ett_ipx);
! proto_tree_add_uint(ipx_tree, hf_ipx_checksum, NullTVB, offset, 2, ipx_checksum);
proto_tree_add_uint_format(ipx_tree, hf_ipx_len, NullTVB, offset+2, 2, ipx_length,
"Length: %d bytes", ipx_length);
proto_tree_add_uint_format(ipx_tree, hf_ipx_hops, NullTVB, offset+4, 1, ipx_hops,
"Transport Control: %d hops", ipx_hops);
! proto_tree_add_uint(ipx_tree, hf_ipx_packet_type, NullTVB, offset+5, 1, ipx_type);
! proto_tree_add_ipxnet(ipx_tree, hf_ipx_dnet, NullTVB, offset+6, 4, ipx_dnet_val);
! proto_tree_add_ether(ipx_tree, hf_ipx_dnode, NullTVB, offset+10, 6, ipx_dnode);
proto_tree_add_uint_format(ipx_tree, hf_ipx_dsocket, NullTVB, offset+16, 2,
ipx_dsocket, "Destination Socket: %s (0x%04X)",
port_text(ipx_dsocket), ipx_dsocket);
! proto_tree_add_ipxnet(ipx_tree, hf_ipx_snet, NullTVB, offset+18, 4, ipx_snet_val);
! proto_tree_add_ether(ipx_tree, hf_ipx_snode, NullTVB, offset+22, 6, ipx_snode);
proto_tree_add_uint_format(ipx_tree, hf_ipx_ssocket, NullTVB, offset+28, 2,
ipx_ssocket, "Source Socket: %s (0x%04X)", port_text(ipx_ssocket),
ipx_ssocket);
***************
*** 430,436 ****
col_add_str(fd, COL_INFO, "SPX");
if (tree) {
! ti = proto_tree_add_item(tree, proto_spx, NullTVB, offset, 12, NULL);
spx_tree = proto_item_add_subtree(ti, ett_spx);
proto_tree_add_uint_format(spx_tree, hf_spx_connection_control, NullTVB,
--- 430,436 ----
col_add_str(fd, COL_INFO, "SPX");
if (tree) {
! ti = proto_tree_add_item(tree, proto_spx, NullTVB, offset, 12, FALSE);
spx_tree = proto_item_add_subtree(ti, ett_spx);
proto_tree_add_uint_format(spx_tree, hf_spx_connection_control, NullTVB,
***************
*** 447,469 ****
spx_datastream(pd[offset+1]),
pd[offset+1]);
! proto_tree_add_item(spx_tree, hf_spx_src_id, NullTVB,
offset+2, 2,
pntohs( &pd[offset+2] ));
! proto_tree_add_item(spx_tree, hf_spx_dst_id, NullTVB,
offset+4, 2,
pntohs( &pd[offset+4] ));
! proto_tree_add_item(spx_tree, hf_spx_seq_nr, NullTVB,
offset+6, 2,
pntohs( &pd[offset+6] ) );
! proto_tree_add_item(spx_tree, hf_spx_ack_nr, NullTVB,
offset+8, 2,
pntohs( &pd[offset+8] ) );
! proto_tree_add_item(spx_tree, hf_spx_all_nr, NullTVB,
offset+10, 2,
pntohs( &pd[offset+10] ) );
--- 447,469 ----
spx_datastream(pd[offset+1]),
pd[offset+1]);
! proto_tree_add_uint(spx_tree, hf_spx_src_id, NullTVB,
offset+2, 2,
pntohs( &pd[offset+2] ));
! proto_tree_add_uint(spx_tree, hf_spx_dst_id, NullTVB,
offset+4, 2,
pntohs( &pd[offset+4] ));
! proto_tree_add_uint(spx_tree, hf_spx_seq_nr, NullTVB,
offset+6, 2,
pntohs( &pd[offset+6] ) );
! proto_tree_add_uint(spx_tree, hf_spx_ack_nr, NullTVB,
offset+8, 2,
pntohs( &pd[offset+8] ) );
! proto_tree_add_uint(spx_tree, hf_spx_all_nr, NullTVB,
offset+10, 2,
pntohs( &pd[offset+10] ) );
***************
*** 498,508 ****
}
if (tree) {
! ti = proto_tree_add_item(tree, proto_ipxmsg, NullTVB, offset, END_OF_FRAME, NULL);
msg_tree = proto_item_add_subtree(ti, ett_ipxmsg);
! proto_tree_add_item(msg_tree, hf_msg_conn, NullTVB, offset, 1, conn_number);
! proto_tree_add_item(msg_tree, hf_msg_sigchar, NullTVB, offset+1, 1, sig_char);
}
}
--- 498,508 ----
}
if (tree) {
! ti = proto_tree_add_item(tree, proto_ipxmsg, NullTVB, offset, END_OF_FRAME, FALSE);
msg_tree = proto_item_add_subtree(ti, ett_ipxmsg);
! proto_tree_add_uint(msg_tree, hf_msg_conn, NullTVB, offset, 1, conn_number);
! proto_tree_add_uint(msg_tree, hf_msg_sigchar, NullTVB, offset+1, 1, sig_char);
}
}
***************
*** 534,540 ****
}
if (tree) {
! ti = proto_tree_add_item(tree, proto_ipxrip, NullTVB, offset, END_OF_FRAME, NULL);
rip_tree = proto_item_add_subtree(ti, ett_ipxrip);
if (operation < 2) {
--- 534,540 ----
}
if (tree) {
! ti = proto_tree_add_item(tree, proto_ipxrip, NullTVB, offset, END_OF_FRAME, FALSE);
rip_tree = proto_item_add_subtree(ti, ett_ipxrip);
if (operation < 2) {
***************
*** 542,552 ****
"RIP packet type: %s", rip_type[operation]);
if (operation == 0) {
! proto_tree_add_item_hidden(rip_tree,
hf_ipxrip_request,
NullTVB, offset, 2, 1);
} else {
! proto_tree_add_item_hidden(rip_tree,
hf_ipxrip_response,
NullTVB, offset, 2, 1);
}
--- 542,552 ----
"RIP packet type: %s", rip_type[operation]);
if (operation == 0) {
! proto_tree_add_boolean_hidden(rip_tree,
hf_ipxrip_request,
NullTVB, offset, 2, 1);
} else {
! proto_tree_add_boolean_hidden(rip_tree,
hf_ipxrip_response,
NullTVB, offset, 2, 1);
}
***************
*** 682,698 ****
}
if (tree) {
! ti = proto_tree_add_item(tree, proto_sap, NullTVB, offset, END_OF_FRAME, NULL);
sap_tree = proto_item_add_subtree(ti, ett_ipxsap);
if (query.query_type >= 1 && query.query_type <= 4) {
proto_tree_add_text(sap_tree, NullTVB, offset, 2, sap_type[query.query_type - 1]);
if ((query.query_type - 1) % 2) {
! proto_tree_add_item_hidden(sap_tree,
hf_sap_response,
NullTVB, offset, 2, 1);
} else {
! proto_tree_add_item_hidden(sap_tree,
hf_sap_request,
NullTVB, offset, 2, 1);
}
--- 682,698 ----
}
if (tree) {
! ti = proto_tree_add_item(tree, proto_sap, NullTVB, offset, END_OF_FRAME, FALSE);
sap_tree = proto_item_add_subtree(ti, ett_ipxsap);
if (query.query_type >= 1 && query.query_type <= 4) {
proto_tree_add_text(sap_tree, NullTVB, offset, 2, sap_type[query.query_type - 1]);
if ((query.query_type - 1) % 2) {
! proto_tree_add_boolean_hidden(sap_tree,
hf_sap_response,
NullTVB, offset, 2, 1);
} else {
! proto_tree_add_boolean_hidden(sap_tree,
hf_sap_request,
NullTVB, offset, 2, 1);
}
Index: packet-irc.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-irc.c,v
retrieving revision 1.5
diff -c -r1.5 packet-irc.c
*** packet-irc.c 2000/05/11 08:15:15 1.5
--- packet-irc.c 2000/05/30 10:37:40
***************
*** 55,61 ****
static void
dissect_irc_request(proto_tree *tree, char *line, int offset, int len)
{
! proto_tree_add_item_hidden(tree, hf_irc_request, NullTVB,
offset, len, TRUE);
proto_tree_add_text(tree, NullTVB, offset,
len, "Request Line: %s", line);
--- 55,61 ----
static void
dissect_irc_request(proto_tree *tree, char *line, int offset, int len)
{
! proto_tree_add_boolean_hidden(tree, hf_irc_request, NullTVB,
offset, len, TRUE);
proto_tree_add_text(tree, NullTVB, offset,
len, "Request Line: %s", line);
***************
*** 64,70 ****
static void
dissect_irc_response(proto_tree *tree, char *line, int offset, int len)
{
! proto_tree_add_item_hidden(tree, hf_irc_response, NullTVB,
offset, len, TRUE);
proto_tree_add_text(tree, NullTVB, offset,
len, "Response Line: %s", line);
--- 64,70 ----
static void
dissect_irc_response(proto_tree *tree, char *line, int offset, int len)
{
! proto_tree_add_boolean_hidden(tree, hf_irc_response, NullTVB,
offset, len, TRUE);
proto_tree_add_text(tree, NullTVB, offset,
len, "Response Line: %s", line);
***************
*** 89,95 ****
if (tree)
{
! ti = proto_tree_add_item(tree, proto_irc, NullTVB, offset, END_OF_FRAME, NULL);
irc_tree = proto_item_add_subtree(ti, ett_irc);
tmpline = (char *)g_malloc( pi.captured_len );
--- 89,95 ----
if (tree)
{
! ti = proto_tree_add_item(tree, proto_irc, NullTVB, offset, END_OF_FRAME, FALSE);
irc_tree = proto_item_add_subtree(ti, ett_irc);
tmpline = (char *)g_malloc( pi.captured_len );
Index: packet-isakmp.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-isakmp.c,v
retrieving revision 1.21
diff -c -r1.21 packet-isakmp.c
*** packet-isakmp.c 2000/05/22 17:59:53 1.21
--- packet-isakmp.c 2000/05/30 10:37:43
***************
*** 366,372 ****
proto_item * ti;
proto_tree * isakmp_tree;
! ti = proto_tree_add_item(tree, proto_isakmp, NullTVB, offset, len, NULL);
isakmp_tree = proto_item_add_subtree(ti, ett_isakmp);
proto_tree_add_text(isakmp_tree, NullTVB, offset, sizeof(hdr->icookie),
--- 366,372 ----
proto_item * ti;
proto_tree * isakmp_tree;
! ti = proto_tree_add_item(tree, proto_isakmp, NullTVB, offset, len, FALSE);
isakmp_tree = proto_item_add_subtree(ti, ett_isakmp);
proto_tree_add_text(isakmp_tree, NullTVB, offset, sizeof(hdr->icookie),
Index: packet-isis-clv.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-isis-clv.c,v
retrieving revision 1.4
diff -c -r1.4 packet-isis-clv.c
*** packet-isis-clv.c 2000/05/11 08:15:16 1.4
--- packet-isis-clv.c 2000/05/30 10:37:44
***************
*** 212,218 ****
}
memcpy(&addr, &pd[offset], sizeof(addr));
if ( tree ) {
! proto_tree_add_item(tree, tree_id, NullTVB, offset, 4, addr);
}
offset += 4;
length -= 4;
--- 212,218 ----
}
memcpy(&addr, &pd[offset], sizeof(addr));
if ( tree ) {
! proto_tree_add_ipv4(tree, tree_id, NullTVB, offset, 4, addr);
}
offset += 4;
length -= 4;
Index: packet-isis-hello.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-isis-hello.c,v
retrieving revision 1.7
diff -c -r1.7 packet-isis-hello.c
*** packet-isis-hello.c 2000/05/11 08:15:16 1.7
--- packet-isis-hello.c 2000/05/30 10:37:45
***************
*** 437,443 ****
if (tree) {
ti = proto_tree_add_item(tree, proto_isis_hello, NullTVB,
! offset, END_OF_FRAME, NULL);
hello_tree = proto_item_add_subtree(ti, ett_isis_hello);
proto_tree_add_uint_format(hello_tree,
hf_isis_hello_circuit_reserved,
--- 437,443 ----
if (tree) {
ti = proto_tree_add_item(tree, proto_isis_hello, NullTVB,
! offset, END_OF_FRAME, FALSE);
hello_tree = proto_item_add_subtree(ti, ett_isis_hello);
proto_tree_add_uint_format(hello_tree,
hf_isis_hello_circuit_reserved,
***************
*** 453,468 ****
offset + 1, 6, ihp->isis_hello_source_id,
"SystemID{ Sender of PDU } : %s",
print_system_id( pd + offset + 1, 6 ) );
! proto_tree_add_item(hello_tree, hf_isis_hello_holding_timer, NullTVB,
offset + 7, 2,pntohs(&ihp->isis_hello_holding_timer[0]));
! proto_tree_add_item(hello_tree, hf_isis_hello_pdu_length, NullTVB,
offset + 9, 2,pntohs(&ihp->isis_hello_pdu_length[0]));
proto_tree_add_uint_format(hello_tree, hf_isis_hello_priority_reserved, NullTVB,
offset + 11, 1, ihp->isis_hello_priority_reserved,
"Priority : %d, reserved(0x%02x == 0)",
ihp->isis_hello_priority, ihp->isis_hello_preserved );
if (hello_type == ISIS_TYPE_PTP_HELLO) {
! proto_tree_add_item(hello_tree, hf_isis_hello_local_circuit_id, NullTVB,
offset + 12, 1, ihp->isis_hello_lan_id[0] );
} else {
proto_tree_add_string_format(hello_tree, hf_isis_hello_lan_id, NullTVB,
--- 453,468 ----
offset + 1, 6, ihp->isis_hello_source_id,
"SystemID{ Sender of PDU } : %s",
print_system_id( pd + offset + 1, 6 ) );
! proto_tree_add_uint(hello_tree, hf_isis_hello_holding_timer, NullTVB,
offset + 7, 2,pntohs(&ihp->isis_hello_holding_timer[0]));
! proto_tree_add_uint(hello_tree, hf_isis_hello_pdu_length, NullTVB,
offset + 9, 2,pntohs(&ihp->isis_hello_pdu_length[0]));
proto_tree_add_uint_format(hello_tree, hf_isis_hello_priority_reserved, NullTVB,
offset + 11, 1, ihp->isis_hello_priority_reserved,
"Priority : %d, reserved(0x%02x == 0)",
ihp->isis_hello_priority, ihp->isis_hello_preserved );
if (hello_type == ISIS_TYPE_PTP_HELLO) {
! proto_tree_add_uint(hello_tree, hf_isis_hello_local_circuit_id, NullTVB,
offset + 12, 1, ihp->isis_hello_lan_id[0] );
} else {
proto_tree_add_string_format(hello_tree, hf_isis_hello_lan_id, NullTVB,
Index: packet-isis-lsp.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-isis-lsp.c,v
retrieving revision 1.6
diff -c -r1.6 packet-isis-lsp.c
*** packet-isis-lsp.c 2000/05/11 08:15:16 1.6
--- packet-isis-lsp.c 2000/05/30 10:37:47
***************
*** 791,810 ****
if (tree) {
ti = proto_tree_add_item(tree, proto_isis_lsp, NullTVB,
! offset, END_OF_FRAME, NULL);
lsp_tree = proto_item_add_subtree(ti, ett_isis_lsp);
! proto_tree_add_item(lsp_tree, hf_isis_lsp_pdu_length, NullTVB,
offset, 2, pntohs(&ilp->isis_lsp_pdu_length));
! proto_tree_add_item(lsp_tree, hf_isis_lsp_remaining_life, NullTVB,
offset + 2, 2, pntohs(&ilp->isis_lsp_remaining_life));
isis_lsp_decode_lsp_id("LSP ID", lsp_tree, offset + 4,
&ilp->isis_lsp_id );
! proto_tree_add_item(lsp_tree, hf_isis_lsp_sequence_number, NullTVB,
offset + 12, 4,
pntohl(&ilp->isis_lsp_sequence_number));
/* XXX -> we could validate the cksum here! */
! proto_tree_add_item(lsp_tree, hf_isis_lsp_checksum, NullTVB,
offset + 16, 2, pntohs(&ilp->isis_lsp_checksum));
/*
--- 791,810 ----
if (tree) {
ti = proto_tree_add_item(tree, proto_isis_lsp, NullTVB,
! offset, END_OF_FRAME, FALSE);
lsp_tree = proto_item_add_subtree(ti, ett_isis_lsp);
! proto_tree_add_uint(lsp_tree, hf_isis_lsp_pdu_length, NullTVB,
offset, 2, pntohs(&ilp->isis_lsp_pdu_length));
! proto_tree_add_uint(lsp_tree, hf_isis_lsp_remaining_life, NullTVB,
offset + 2, 2, pntohs(&ilp->isis_lsp_remaining_life));
isis_lsp_decode_lsp_id("LSP ID", lsp_tree, offset + 4,
&ilp->isis_lsp_id );
! proto_tree_add_uint(lsp_tree, hf_isis_lsp_sequence_number, NullTVB,
offset + 12, 4,
pntohl(&ilp->isis_lsp_sequence_number));
/* XXX -> we could validate the cksum here! */
! proto_tree_add_uint(lsp_tree, hf_isis_lsp_checksum, NullTVB,
offset + 16, 2, pntohs(&ilp->isis_lsp_checksum));
/*
Index: packet-isis-snp.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-isis-snp.c,v
retrieving revision 1.4
diff -c -r1.4 packet-isis-snp.c
*** packet-isis-snp.c 2000/05/11 08:15:17 1.4
--- packet-isis-snp.c 2000/05/30 10:37:48
***************
*** 254,262 ****
if (tree) {
ti = proto_tree_add_item(tree, proto_isis_csnp, NullTVB,
! offset, END_OF_FRAME, NULL);
csnp_tree = proto_item_add_subtree(ti, ett_isis_csnp);
! proto_tree_add_item(csnp_tree, hf_isis_csnp_pdu_length, NullTVB,
offset, 2, pntohs(&ilp->isis_csnp_pdu_length));
proto_tree_add_text(csnp_tree, NullTVB, offset + 2, 7,
"Source id : %s",
--- 254,262 ----
if (tree) {
ti = proto_tree_add_item(tree, proto_isis_csnp, NullTVB,
! offset, END_OF_FRAME, FALSE);
csnp_tree = proto_item_add_subtree(ti, ett_isis_csnp);
! proto_tree_add_uint(csnp_tree, hf_isis_csnp_pdu_length, NullTVB,
offset, 2, pntohs(&ilp->isis_csnp_pdu_length));
proto_tree_add_text(csnp_tree, NullTVB, offset + 2, 7,
"Source id : %s",
***************
*** 322,330 ****
if (tree) {
ti = proto_tree_add_item(tree, proto_isis_psnp, NullTVB,
! offset, END_OF_FRAME, NULL);
psnp_tree = proto_item_add_subtree(ti, ett_isis_psnp);
! proto_tree_add_item(psnp_tree, hf_isis_psnp_pdu_length, NullTVB,
offset, 2, pntohs(&ilp->isis_psnp_pdu_length));
proto_tree_add_text(psnp_tree, NullTVB, offset + 2, 7,
"Source id: %s",
--- 322,330 ----
if (tree) {
ti = proto_tree_add_item(tree, proto_isis_psnp, NullTVB,
! offset, END_OF_FRAME, FALSE);
psnp_tree = proto_item_add_subtree(ti, ett_isis_psnp);
! proto_tree_add_uint(psnp_tree, hf_isis_psnp_pdu_length, NullTVB,
offset, 2, pntohs(&ilp->isis_psnp_pdu_length));
proto_tree_add_text(psnp_tree, NullTVB, offset + 2, 7,
"Source id: %s",
Index: packet-isis.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-isis.c,v
retrieving revision 1.9
diff -c -r1.9 packet-isis.c
*** packet-isis.c 2000/05/11 08:15:17 1.9
--- packet-isis.c 2000/05/30 10:37:48
***************
*** 160,174 ****
if (tree) {
ti = proto_tree_add_item(tree, proto_isis, NullTVB, offset,
! END_OF_FRAME, NULL );
isis_tree = proto_item_add_subtree(ti, ett_isis);
! proto_tree_add_item(isis_tree, hf_isis_irpd, NullTVB, offset, 1,
ihdr->isis_irpd );
! proto_tree_add_item(isis_tree, hf_isis_header_length, NullTVB,
offset + 1, 1, ihdr->isis_header_length );
! proto_tree_add_item(isis_tree, hf_isis_version, NullTVB,
offset + 2, 1, ihdr->isis_version );
! proto_tree_add_item(isis_tree, hf_isis_system_id_length, NullTVB,
offset + 3, 1, ihdr->isis_system_id_len );
proto_tree_add_uint_format(isis_tree, hf_isis_type, NullTVB,
offset + 4, 1, ihdr->isis_type,
--- 160,174 ----
if (tree) {
ti = proto_tree_add_item(tree, proto_isis, NullTVB, offset,
! END_OF_FRAME, FALSE );
isis_tree = proto_item_add_subtree(ti, ett_isis);
! proto_tree_add_uint(isis_tree, hf_isis_irpd, NullTVB, offset, 1,
ihdr->isis_irpd );
! proto_tree_add_uint(isis_tree, hf_isis_header_length, NullTVB,
offset + 1, 1, ihdr->isis_header_length );
! proto_tree_add_uint(isis_tree, hf_isis_version, NullTVB,
offset + 2, 1, ihdr->isis_version );
! proto_tree_add_uint(isis_tree, hf_isis_system_id_length, NullTVB,
offset + 3, 1, ihdr->isis_system_id_len );
proto_tree_add_uint_format(isis_tree, hf_isis_type, NullTVB,
offset + 4, 1, ihdr->isis_type,
***************
*** 178,188 ****
(ihdr->isis_type & ISIS_R8_MASK) ? "1" : "0",
(ihdr->isis_type & ISIS_R7_MASK) ? "1" : "0",
(ihdr->isis_type & ISIS_R6_MASK) ? "1" : "0");
! proto_tree_add_item(isis_tree, hf_isis_version2, NullTVB,
offset + 5, 1, ihdr->isis_version2 );
! proto_tree_add_item(isis_tree, hf_isis_reserved, NullTVB,
offset + 6, 1, ihdr->isis_reserved );
! proto_tree_add_item(isis_tree, hf_isis_max_area_adr, NullTVB,
offset + 7, 1, ihdr->isis_max_area_adr );
}
--- 178,188 ----
(ihdr->isis_type & ISIS_R8_MASK) ? "1" : "0",
(ihdr->isis_type & ISIS_R7_MASK) ? "1" : "0",
(ihdr->isis_type & ISIS_R6_MASK) ? "1" : "0");
! proto_tree_add_uint(isis_tree, hf_isis_version2, NullTVB,
offset + 5, 1, ihdr->isis_version2 );
! proto_tree_add_uint(isis_tree, hf_isis_reserved, NullTVB,
offset + 6, 1, ihdr->isis_reserved );
! proto_tree_add_uint(isis_tree, hf_isis_max_area_adr, NullTVB,
offset + 7, 1, ihdr->isis_max_area_adr );
}
Index: packet-isl.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-isl.c,v
retrieving revision 1.11
diff -c -r1.11 packet-isl.c
*** packet-isl.c 2000/05/16 06:21:32 1.11
--- packet-isl.c 2000/05/30 10:37:49
***************
*** 162,187 ****
ti = proto_tree_add_protocol_format(tree, proto_isl, NullTVB, offset, ISL_HEADER_SIZE,
"ISL");
fh_tree = proto_item_add_subtree(ti, ett_isl);
! proto_tree_add_item(fh_tree, hf_isl_dst, NullTVB, offset+0, 6, &pd[offset+0]);
! proto_tree_add_item_hidden(fh_tree, hf_isl_addr, NullTVB, offset+0, 6, &pd[offset+0]);
! proto_tree_add_item(fh_tree, hf_isl_type, NullTVB, offset+5, 1, pd[offset+5]);
switch (type) {
case TYPE_ETHER:
! proto_tree_add_item(fh_tree, hf_isl_user_eth, NullTVB, offset+5, 1,
pd[offset+5]&0x03);
break;
default:
/* XXX - the spec appears to indicate that the "User" field is
used for TYPE_TR to distinguish between types of packets. */
! proto_tree_add_item(fh_tree, hf_isl_user, NullTVB, offset+5, 1, pd[offset+5]);
break;
}
! proto_tree_add_item(fh_tree, hf_isl_src, NullTVB, offset+6, 6, &pd[offset+6]);
! proto_tree_add_item_hidden(fh_tree, hf_isl_addr, NullTVB, offset+6, 6, &pd[offset+6]);
length = pntohs(&pd[offset+12]);
! proto_tree_add_item(fh_tree, hf_isl_len, NullTVB, offset+12, 2, length);
/* This part looks sort of like a SNAP-encapsulated LLC header... */
proto_tree_add_text(fh_tree, NullTVB, offset+14, 1, "DSAP: 0x%X", pd[offset+14]);
--- 162,187 ----
ti = proto_tree_add_protocol_format(tree, proto_isl, NullTVB, offset, ISL_HEADER_SIZE,
"ISL");
fh_tree = proto_item_add_subtree(ti, ett_isl);
! proto_tree_add_ether(fh_tree, hf_isl_dst, NullTVB, offset+0, 6, &pd[offset+0]);
! proto_tree_add_ether_hidden(fh_tree, hf_isl_addr, NullTVB, offset+0, 6, &pd[offset+0]);
! proto_tree_add_uint(fh_tree, hf_isl_type, NullTVB, offset+5, 1, pd[offset+5]);
switch (type) {
case TYPE_ETHER:
! proto_tree_add_uint(fh_tree, hf_isl_user_eth, NullTVB, offset+5, 1,
pd[offset+5]&0x03);
break;
default:
/* XXX - the spec appears to indicate that the "User" field is
used for TYPE_TR to distinguish between types of packets. */
! proto_tree_add_uint(fh_tree, hf_isl_user, NullTVB, offset+5, 1, pd[offset+5]);
break;
}
! proto_tree_add_ether(fh_tree, hf_isl_src, NullTVB, offset+6, 6, &pd[offset+6]);
! proto_tree_add_ether_hidden(fh_tree, hf_isl_addr, NullTVB, offset+6, 6, &pd[offset+6]);
length = pntohs(&pd[offset+12]);
! proto_tree_add_uint(fh_tree, hf_isl_len, NullTVB, offset+12, 2, length);
/* This part looks sort of like a SNAP-encapsulated LLC header... */
proto_tree_add_text(fh_tree, NullTVB, offset+14, 1, "DSAP: 0x%X", pd[offset+14]);
***************
*** 190,207 ****
/* ...but this is the manufacturer's ID portion of the source address
field (which is, admittedly, an OUI). */
! proto_tree_add_item(fh_tree, hf_isl_hsa, NullTVB, offset+17, 3,
pd[offset+17] << 16 | pd[offset+18] << 8 | pd[offset+19]);
! proto_tree_add_item(fh_tree, hf_isl_vlan_id, NullTVB, offset+20, 2,
pntohs(&pd[offset+20]));
! proto_tree_add_item(fh_tree, hf_isl_bpdu, NullTVB, offset+20, 2,
pntohs(&pd[offset+20]));
! proto_tree_add_item(fh_tree, hf_isl_index, NullTVB, offset+22, 2,
pntohs(&pd[offset+22]));
/* Now for the CRC, which is at the *end* of the packet. */
if (BYTES_ARE_IN_FRAME(pi.len - 4, 4)) {
! proto_tree_add_item(fh_tree, hf_isl_crc, NullTVB, pi.len - 4, 4,
pntohl(&pd[END_OF_FRAME - 4]));
}
}
--- 190,207 ----
/* ...but this is the manufacturer's ID portion of the source address
field (which is, admittedly, an OUI). */
! proto_tree_add_uint(fh_tree, hf_isl_hsa, NullTVB, offset+17, 3,
pd[offset+17] << 16 | pd[offset+18] << 8 | pd[offset+19]);
! proto_tree_add_uint(fh_tree, hf_isl_vlan_id, NullTVB, offset+20, 2,
pntohs(&pd[offset+20]));
! proto_tree_add_boolean(fh_tree, hf_isl_bpdu, NullTVB, offset+20, 2,
pntohs(&pd[offset+20]));
! proto_tree_add_uint(fh_tree, hf_isl_index, NullTVB, offset+22, 2,
pntohs(&pd[offset+22]));
/* Now for the CRC, which is at the *end* of the packet. */
if (BYTES_ARE_IN_FRAME(pi.len - 4, 4)) {
! proto_tree_add_uint(fh_tree, hf_isl_crc, NullTVB, pi.len - 4, 4,
pntohl(&pd[END_OF_FRAME - 4]));
}
}
***************
*** 214,230 ****
break;
case TYPE_TR:
! proto_tree_add_item(fh_tree, hf_isl_src_vlan_id, NullTVB, offset+24, 2,
pntohs(&pd[offset+24]));
! proto_tree_add_item(fh_tree, hf_isl_explorer, NullTVB, offset+24, 2,
pntohs(&pd[offset+24]));
! proto_tree_add_item(fh_tree, hf_isl_dst_route_descriptor, NullTVB, offset+26, 2,
pntohs(&pd[offset+26]));
! proto_tree_add_item(fh_tree, hf_isl_src_route_descriptor, NullTVB, offset+28, 2,
pntohs(&pd[offset+28]));
! proto_tree_add_item(fh_tree, hf_isl_fcs_not_incl, NullTVB, offset+30, 1,
pd[offset+30]);
! proto_tree_add_item(fh_tree, hf_isl_esize, NullTVB, offset+16, 1,
pd[offset+30]);
next_tvb = tvb_new_subset(pi.compat_top_tvb, offset+31, -1, -1);
dissect_tr(next_tvb, &pi, tree);
--- 214,230 ----
break;
case TYPE_TR:
! proto_tree_add_uint(fh_tree, hf_isl_src_vlan_id, NullTVB, offset+24, 2,
pntohs(&pd[offset+24]));
! proto_tree_add_boolean(fh_tree, hf_isl_explorer, NullTVB, offset+24, 2,
pntohs(&pd[offset+24]));
! proto_tree_add_uint(fh_tree, hf_isl_dst_route_descriptor, NullTVB, offset+26, 2,
pntohs(&pd[offset+26]));
! proto_tree_add_uint(fh_tree, hf_isl_src_route_descriptor, NullTVB, offset+28, 2,
pntohs(&pd[offset+28]));
! proto_tree_add_boolean(fh_tree, hf_isl_fcs_not_incl, NullTVB, offset+30, 1,
pd[offset+30]);
! proto_tree_add_uint(fh_tree, hf_isl_esize, NullTVB, offset+16, 1,
pd[offset+30]);
next_tvb = tvb_new_subset(pi.compat_top_tvb, offset+31, -1, -1);
dissect_tr(next_tvb, &pi, tree);
Index: packet-l2tp.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-l2tp.c,v
retrieving revision 1.9
diff -c -r1.9 packet-l2tp.c
*** packet-l2tp.c 2000/05/11 08:15:17 1.9
--- packet-l2tp.c 2000/05/30 10:37:51
***************
*** 336,342 ****
col_add_fstr(fd,COL_INFO,textbuffer);
}
if (tree) {
! ti = proto_tree_add_item(tree,proto_l2tp, NullTVB, offset, length , NULL);
l2tp_tree = proto_item_add_subtree(ti, ett_l2tp);
proto_tree_add_uint_format(l2tp_tree,hf_l2tp_code, NullTVB, offset ,1,
rhcode, "Packet Type: %s Tunnel Id=%d Session Id=%d",( CONTROL_BIT(ver) ? control_msg : data_msg) ,tid,cid);
--- 336,342 ----
col_add_fstr(fd,COL_INFO,textbuffer);
}
if (tree) {
! ti = proto_tree_add_item(tree,proto_l2tp, NullTVB, offset, length, FALSE);
l2tp_tree = proto_item_add_subtree(ti, ett_l2tp);
proto_tree_add_uint_format(l2tp_tree,hf_l2tp_code, NullTVB, offset ,1,
rhcode, "Packet Type: %s Tunnel Id=%d Session Id=%d",( CONTROL_BIT(ver) ? control_msg : data_msg) ,tid,cid);
Index: packet-lapd.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-lapd.c,v
retrieving revision 1.9
diff -c -r1.9 packet-lapd.c
*** packet-lapd.c 2000/05/29 08:57:37 1.9
--- packet-lapd.c 2000/05/30 10:37:51
***************
*** 122,138 ****
if (tree) {
! ti = proto_tree_add_item(tree, proto_lapd, NullTVB, 0, 3, NULL);
lapd_tree = proto_item_add_subtree(ti, ett_lapd);
! ti = proto_tree_add_item(lapd_tree, hf_lapd_address, NullTVB, 0, 2, address);
addr_tree = proto_item_add_subtree(ti, ett_lapd_address);
! proto_tree_add_item(addr_tree, hf_lapd_sapi, NullTVB, 0, 1, address);
! proto_tree_add_item(addr_tree, hf_lapd_cr, NullTVB, 0, 1, address);
! proto_tree_add_item(addr_tree, hf_lapd_ea1, NullTVB, 0, 1, address);
! proto_tree_add_item(addr_tree, hf_lapd_tei, NullTVB, 1, 1, address);
! proto_tree_add_item(addr_tree, hf_lapd_ea2, NullTVB, 1, 1, address);
}
else {
lapd_tree = NULL;
--- 122,138 ----
if (tree) {
! ti = proto_tree_add_item(tree, proto_lapd, NullTVB, 0, 3, FALSE);
lapd_tree = proto_item_add_subtree(ti, ett_lapd);
! ti = proto_tree_add_uint(lapd_tree, hf_lapd_address, NullTVB, 0, 2, address);
addr_tree = proto_item_add_subtree(ti, ett_lapd_address);
! proto_tree_add_uint(addr_tree, hf_lapd_sapi, NullTVB, 0, 1, address);
! proto_tree_add_uint(addr_tree, hf_lapd_cr, NullTVB, 0, 1, address);
! proto_tree_add_uint(addr_tree, hf_lapd_ea1, NullTVB, 0, 1, address);
! proto_tree_add_uint(addr_tree, hf_lapd_tei, NullTVB, 1, 1, address);
! proto_tree_add_uint(addr_tree, hf_lapd_ea2, NullTVB, 1, 1, address);
}
else {
lapd_tree = NULL;
Index: packet-ldap.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-ldap.c,v
retrieving revision 1.11
diff -c -r1.11 packet-ldap.c
*** packet-ldap.c 2000/05/12 08:04:29 1.11
--- packet-ldap.c 2000/05/30 10:37:54
***************
*** 152,158 ****
*len = length;
if (tree)
! proto_tree_add_item(tree, hf_id, NullTVB, start-a->begin, a->pointer-start, length);
return 0;
}
--- 152,158 ----
*len = length;
if (tree)
! proto_tree_add_uint(tree, hf_id, NullTVB, start-a->begin, a->pointer-start, length);
return 0;
}
***************
*** 204,210 ****
if (tree)
{
proto_tree *temp_tree = 0;
! temp_tree = proto_tree_add_item(tree, hf_id, NullTVB, start-a->begin, a->pointer-start, integer);
if (new_tree)
*new_tree = temp_tree;
}
--- 204,210 ----
if (tree)
{
proto_tree *temp_tree = 0;
! temp_tree = proto_tree_add_uint(tree, hf_id, NullTVB, start-a->begin, a->pointer-start, integer);
if (new_tree)
*new_tree = temp_tree;
}
***************
*** 228,233 ****
--- 228,270 ----
return read_integer_value(a, tree, hf_id, new_tree, i, start, length);
}
+ static int read_boolean_value(ASN1_SCK *a, proto_tree *tree, int hf_id,
+ proto_tree **new_tree, guint *i, const guchar *start, guint length)
+ {
+ guint integer = 0;
+
+ asn1_uint32_value_decode(a, length, &integer);
+
+ if (i)
+ *i = integer;
+
+ if (tree)
+ {
+ proto_tree *temp_tree = 0;
+ temp_tree = proto_tree_add_boolean(tree, hf_id, NullTVB, start-a->begin, a->pointer-start, integer);
+ if (new_tree)
+ *new_tree = temp_tree;
+ }
+
+ return 0;
+ }
+
+ static int read_boolean(ASN1_SCK *a, proto_tree *tree, int hf_id,
+ proto_tree **new_tree, guint *i)
+ {
+ guint cls, con, tag;
+ gboolean def;
+ guint length;
+ const guchar *start = a->pointer;
+
+ if (asn1_header_decode(a, &cls, &con, &tag, &def, &length) != ASN1_ERR_NOERROR)
+ return 1;
+ if (cls != ASN1_UNI || con != ASN1_PRI || tag != ASN1_BOL)
+ return 1;
+
+ return read_boolean_value(a, tree, hf_id, new_tree, i, start, length);
+ }
+
static void read_string_value(ASN1_SCK *a, proto_tree *tree, int hf_id,
proto_tree **new_tree, char **s, const guchar *start, guint length)
{
***************
*** 245,251 ****
if (tree)
{
proto_tree *temp_tree;
! temp_tree = proto_tree_add_item(tree, hf_id, NullTVB, start - a->begin, a->pointer - start, string);
if (new_tree)
*new_tree = temp_tree;
}
--- 282,288 ----
if (tree)
{
proto_tree *temp_tree;
! temp_tree = proto_tree_add_string(tree, hf_id, NullTVB, start - a->begin, a->pointer - start, string);
if (new_tree)
*new_tree = temp_tree;
}
***************
*** 535,541 ****
proto_tree_add_text(tree, NullTVB, start-a->begin, 0,
"Error parsing filter (%d)", ret);
} else
! proto_tree_add_item(tree, hf_id, NullTVB, start-a->begin, a->pointer-start, filter);
}
g_free(filter);
--- 572,578 ----
proto_tree_add_text(tree, NullTVB, start-a->begin, 0,
"Error parsing filter (%d)", ret);
} else
! proto_tree_add_string(tree, hf_id, NullTVB, start-a->begin, a->pointer-start, filter);
}
g_free(filter);
***************
*** 586,592 ****
return 1; /* XXX - right return value for an error? */
if (cls != ASN1_CTX)
return 1; /* RFCs 1777 and 2251 say these are context-specific types */
! proto_tree_add_item(tree, hf_ldap_message_bind_auth, NullTVB, start - a->begin,
a->pointer - start, tag);
switch (tag)
{
--- 623,629 ----
return 1; /* XXX - right return value for an error? */
if (cls != ASN1_CTX)
return 1; /* RFCs 1777 and 2251 say these are context-specific types */
! proto_tree_add_uint(tree, hf_ldap_message_bind_auth, NullTVB, start - a->begin,
a->pointer - start, tag);
switch (tag)
{
***************
*** 620,626 ****
read_integer(a, tree, hf_ldap_message_search_deref, 0, 0, ASN1_ENUM);
read_integer(a, tree, hf_ldap_message_search_sizeLimit, 0, 0, ASN1_INT);
read_integer(a, tree, hf_ldap_message_search_timeLimit, 0, 0, ASN1_INT);
! read_integer(a, tree, hf_ldap_message_search_typesOnly, 0, 0, ASN1_BOL);
ret = read_filter(a, tree, hf_ldap_message_search_filter);
if (ret != ASN1_ERR_NOERROR)
return ret;
--- 657,663 ----
read_integer(a, tree, hf_ldap_message_search_deref, 0, 0, ASN1_ENUM);
read_integer(a, tree, hf_ldap_message_search_sizeLimit, 0, 0, ASN1_INT);
read_integer(a, tree, hf_ldap_message_search_timeLimit, 0, 0, ASN1_INT);
! read_boolean(a, tree, hf_ldap_message_search_typesOnly, 0, 0);
ret = read_filter(a, tree, hf_ldap_message_search_filter);
if (ret != ASN1_ERR_NOERROR)
return ret;
***************
*** 704,710 ****
read_string(a, tree, hf_ldap_message_dn, 0, 0, ASN1_UNI, ASN1_OTS);
read_string(a, tree, hf_ldap_message_modrdn_name, 0, 0, ASN1_UNI, ASN1_OTS);
! read_integer(a, tree, hf_ldap_message_modrdn_delete, 0, 0, ASN1_BOL);
if (a->pointer < (start + length)) {
/* LDAP V3 Modify DN operation, with newSuperior */
--- 741,747 ----
read_string(a, tree, hf_ldap_message_dn, 0, 0, ASN1_UNI, ASN1_OTS);
read_string(a, tree, hf_ldap_message_modrdn_name, 0, 0, ASN1_UNI, ASN1_OTS);
! read_boolean(a, tree, hf_ldap_message_modrdn_delete, 0, 0);
if (a->pointer < (start + length)) {
/* LDAP V3 Modify DN operation, with newSuperior */
***************
*** 732,738 ****
length = 2 + strlen(string1) + strlen(string2);
compare = g_malloc0(length);
snprintf(compare, length, "%s=%s", string1, string2);
! proto_tree_add_item(tree, hf_ldap_message_compare, NullTVB, start-a->begin, a->pointer-start, compare);
g_free(string1);
g_free(string2);
--- 769,775 ----
length = 2 + strlen(string1) + strlen(string2);
compare = g_malloc0(length);
snprintf(compare, length, "%s=%s", string1, string2);
! proto_tree_add_string(tree, hf_ldap_message_compare, NullTVB, start-a->begin, a->pointer-start, compare);
g_free(string1);
g_free(string2);
***************
*** 807,813 ****
if (tree)
{
! ti = proto_tree_add_item(tree, proto_ldap, NullTVB, offset, END_OF_FRAME, NULL);
ldap_tree = proto_item_add_subtree(ti, ett_ldap);
}
--- 844,850 ----
if (tree)
{
! ti = proto_tree_add_item(tree, proto_ldap, NullTVB, offset, END_OF_FRAME, FALSE);
ldap_tree = proto_item_add_subtree(ti, ett_ldap);
}
***************
*** 862,869 ****
if (ldap_tree)
{
! proto_tree_add_item_hidden(ldap_tree, hf_ldap_message_id, NullTVB, message_id_start, message_id_length, messageId);
! proto_tree_add_item_hidden(ldap_tree, hf_ldap_message_type, NullTVB,
start - a.begin, a.pointer - start, protocolOpTag);
ti = proto_tree_add_text(ldap_tree, NullTVB, message_id_start, messageLength, "Message: Id=%u %s", messageId, typestr);
msg_tree = proto_item_add_subtree(ti, ett_ldap_message);
--- 899,906 ----
if (ldap_tree)
{
! proto_tree_add_uint_hidden(ldap_tree, hf_ldap_message_id, NullTVB, message_id_start, message_id_length, messageId);
! proto_tree_add_uint_hidden(ldap_tree, hf_ldap_message_type, NullTVB,
start - a.begin, a.pointer - start, protocolOpTag);
ti = proto_tree_add_text(ldap_tree, NullTVB, message_id_start, messageLength, "Message: Id=%u %s", messageId, typestr);
msg_tree = proto_item_add_subtree(ti, ett_ldap_message);
***************
*** 985,996 ****
static hf_register_info hf[] = {
{ &hf_ldap_length,
{ "Length", "ldap.length",
! FT_INT32, BASE_DEC, NULL, 0x0,
"LDAP Length" }},
{ &hf_ldap_message_id,
{ "Message Id", "ldap.message_id",
! FT_INT32, BASE_DEC, NULL, 0x0,
"LDAP Message Id" }},
{ &hf_ldap_message_type,
{ "Message Type", "ldap.message_type",
--- 1022,1033 ----
static hf_register_info hf[] = {
{ &hf_ldap_length,
{ "Length", "ldap.length",
! FT_UINT32, BASE_DEC, NULL, 0x0,
"LDAP Length" }},
{ &hf_ldap_message_id,
{ "Message Id", "ldap.message_id",
! FT_UINT32, BASE_DEC, NULL, 0x0,
"LDAP Message Id" }},
{ &hf_ldap_message_type,
{ "Message Type", "ldap.message_type",
***************
*** 998,1009 ****
"LDAP Message Type" }},
{ &hf_ldap_message_length,
{ "Message Length", "ldap.message_length",
! FT_INT32, BASE_DEC, NULL, 0x0,
"LDAP Message Length" }},
{ &hf_ldap_message_result,
{ "Result Code", "ldap.result.code",
! FT_INT8, BASE_HEX, result_codes, 0x0,
"LDAP Result Code" }},
{ &hf_ldap_message_result_matcheddn,
{ "Matched DN", "ldap.result.matcheddn",
--- 1035,1046 ----
"LDAP Message Type" }},
{ &hf_ldap_message_length,
{ "Message Length", "ldap.message_length",
! FT_UINT32, BASE_DEC, NULL, 0x0,
"LDAP Message Length" }},
{ &hf_ldap_message_result,
{ "Result Code", "ldap.result.code",
! FT_UINT8, BASE_HEX, result_codes, 0x0,
"LDAP Result Code" }},
{ &hf_ldap_message_result_matcheddn,
{ "Matched DN", "ldap.result.matcheddn",
***************
*** 1020,1026 ****
{ &hf_ldap_message_bind_version,
{ "Version", "ldap.bind.version",
! FT_INT32, BASE_DEC, NULL, 0x0,
"LDAP Bind Version" }},
{ &hf_ldap_message_bind_dn,
{ "DN", "ldap.bind.dn",
--- 1057,1063 ----
{ &hf_ldap_message_bind_version,
{ "Version", "ldap.bind.version",
! FT_UINT32, BASE_DEC, NULL, 0x0,
"LDAP Bind Version" }},
{ &hf_ldap_message_bind_dn,
{ "DN", "ldap.bind.dn",
***************
*** 1049,1059 ****
"LDAP Search Dereference" }},
{ &hf_ldap_message_search_sizeLimit,
{ "Size Limit", "ldap.search.sizelimit",
! FT_INT32, BASE_DEC, NULL, 0x0,
"LDAP Search Size Limit" }},
{ &hf_ldap_message_search_timeLimit,
{ "Time Limit", "ldap.search.timelimit",
! FT_INT32, BASE_DEC, NULL, 0x0,
"LDAP Search Time Limit" }},
{ &hf_ldap_message_search_typesOnly,
{ "Attributes Only", "ldap.search.typesonly",
--- 1086,1096 ----
"LDAP Search Dereference" }},
{ &hf_ldap_message_search_sizeLimit,
{ "Size Limit", "ldap.search.sizelimit",
! FT_UINT32, BASE_DEC, NULL, 0x0,
"LDAP Search Size Limit" }},
{ &hf_ldap_message_search_timeLimit,
{ "Time Limit", "ldap.search.timelimit",
! FT_UINT32, BASE_DEC, NULL, 0x0,
"LDAP Search Time Limit" }},
{ &hf_ldap_message_search_typesOnly,
{ "Attributes Only", "ldap.search.typesonly",
***************
*** 1109,1115 ****
{ &hf_ldap_message_abandon_msgid,
{ "Abandon Msg Id", "ldap.abandon.msgid",
! FT_INT32, BASE_DEC, NULL, 0x0,
"LDAP Abandon Msg Id" }},
};
--- 1146,1152 ----
{ &hf_ldap_message_abandon_msgid,
{ "Abandon Msg Id", "ldap.abandon.msgid",
! FT_UINT32, BASE_DEC, NULL, 0x0,
"LDAP Abandon Msg Id" }},
};
***************
*** 1130,1133 ****
{
dissector_add("tcp.port", TCP_PORT_LDAP, dissect_ldap);
}
-
--- 1167,1169 ----
Index: packet-llc.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-llc.c,v
retrieving revision 1.63
diff -c -r1.63 packet-llc.c
*** packet-llc.c 2000/05/28 22:02:17 1.63
--- packet-llc.c 2000/05/30 10:37:55
***************
*** 286,305 ****
dsap = tvb_get_guint8(tvb, 0);
if (tree) {
! ti = proto_tree_add_item(tree, proto_llc, tvb, 0, 0, NULL);
llc_tree = proto_item_add_subtree(ti, ett_llc);
! proto_tree_add_item(llc_tree, hf_llc_dsap, tvb, 0,
1, dsap & SAP_MASK);
! proto_tree_add_item(llc_tree, hf_llc_dsap_ig, tvb, 0,
1, dsap & DSAP_GI_BIT);
} else
llc_tree = NULL;
ssap = tvb_get_guint8(tvb, 1);
if (tree) {
! proto_tree_add_item(llc_tree, hf_llc_ssap, tvb, 1,
1, ssap & SAP_MASK);
! proto_tree_add_item(llc_tree, hf_llc_ssap_cr, tvb, 1,
1, ssap & SSAP_CR_BIT);
} else
llc_tree = NULL;
--- 286,305 ----
dsap = tvb_get_guint8(tvb, 0);
if (tree) {
! ti = proto_tree_add_item(tree, proto_llc, tvb, 0, 0, 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);
! proto_tree_add_boolean(llc_tree, hf_llc_dsap_ig, tvb, 0,
1, dsap & DSAP_GI_BIT);
} else
llc_tree = NULL;
ssap = tvb_get_guint8(tvb, 1);
if (tree) {
! proto_tree_add_uint(llc_tree, hf_llc_ssap, tvb, 1,
1, ssap & SAP_MASK);
! proto_tree_add_boolean(llc_tree, hf_llc_ssap_cr, tvb, 1,
1, ssap & SSAP_CR_BIT);
} else
llc_tree = NULL;
***************
*** 339,345 ****
etype);
}
if (tree) {
! proto_tree_add_item(llc_tree, hf_llc_oui, tvb, 3, 3,
oui);
}
--- 339,345 ----
etype);
}
if (tree) {
! proto_tree_add_uint(llc_tree, hf_llc_oui, tvb, 3, 3,
oui);
}
***************
*** 371,377 ****
are some of them raw or encapsulated
Ethernet? */
if (tree) {
! proto_tree_add_item(llc_tree,
hf_llc_pid, tvb, 6, 2, etype);
}
if (XDLC_IS_INFORMATION(control)) {
--- 371,377 ----
are some of them raw or encapsulated
Ethernet? */
if (tree) {
! proto_tree_add_uint(llc_tree,
hf_llc_pid, tvb, 6, 2, etype);
}
if (XDLC_IS_INFORMATION(control)) {
***************
*** 405,411 ****
case OUI_CABLE_BPDU: /* DOCSIS cable modem spanning tree BPDU */
if (tree) {
! proto_tree_add_item(llc_tree,
hf_llc_pid, tvb, 6, 2, etype);
}
dissect_bpdu(pd, offset, pinfo->fd, tree);
--- 405,411 ----
case OUI_CABLE_BPDU: /* DOCSIS cable modem spanning tree BPDU */
if (tree) {
! proto_tree_add_uint(llc_tree,
hf_llc_pid, tvb, 6, 2, etype);
}
dissect_bpdu(pd, offset, pinfo->fd, tree);
***************
*** 413,419 ****
default:
if (tree) {
! proto_tree_add_item(llc_tree,
hf_llc_pid, tvb, 6, 2, etype);
}
dissect_data_tvb(next_tvb, pinfo, tree);
--- 413,419 ----
default:
if (tree) {
! proto_tree_add_uint(llc_tree,
hf_llc_pid, tvb, 6, 2, etype);
}
dissect_data_tvb(next_tvb, pinfo, tree);
Index: packet-lpd.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-lpd.c,v
retrieving revision 1.19
diff -c -r1.19 packet-lpd.c
*** packet-lpd.c 2000/05/11 08:15:23 1.19
--- packet-lpd.c 2000/05/30 10:37:55
***************
*** 105,117 ****
if (tree) {
ti = proto_tree_add_item(tree, proto_lpd, NullTVB, offset,
! END_OF_FRAME, NULL);
lpd_tree = proto_item_add_subtree(ti, ett_lpd);
if (lpr_packet_type == response) {
! proto_tree_add_item_hidden(lpd_tree, hf_lpd_response, NullTVB, 0, 0, TRUE);
} else {
! proto_tree_add_item_hidden(lpd_tree, hf_lpd_request, NullTVB, 0, 0, TRUE);
}
if (lpr_packet_type == request) {
--- 105,117 ----
if (tree) {
ti = proto_tree_add_item(tree, proto_lpd, NullTVB, offset,
! END_OF_FRAME, FALSE);
lpd_tree = proto_item_add_subtree(ti, ett_lpd);
if (lpr_packet_type == response) {
! proto_tree_add_boolean_hidden(lpd_tree, hf_lpd_response, NullTVB, 0, 0, TRUE);
} else {
! proto_tree_add_boolean_hidden(lpd_tree, hf_lpd_request, NullTVB, 0, 0, TRUE);
}
if (lpr_packet_type == request) {
Index: packet-mapi.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-mapi.c,v
retrieving revision 1.6
diff -c -r1.6 packet-mapi.c
*** packet-mapi.c 2000/05/11 08:15:23 1.6
--- packet-mapi.c 2000/05/30 10:37:55
***************
*** 66,84 ****
if (tree)
{
! ti = proto_tree_add_item(tree, proto_mapi, NullTVB, offset, END_OF_FRAME, NULL);
mapi_tree = proto_item_add_subtree(ti, ett_mapi);
if (pi.match_port == pi.destport)
{
! proto_tree_add_item_hidden(mapi_tree, hf_mapi_request, NullTVB,
offset, END_OF_FRAME, TRUE);
proto_tree_add_text(mapi_tree, NullTVB, offset,
END_OF_FRAME, "Request: <opaque data>" );
}
else
{
! proto_tree_add_item_hidden(mapi_tree, hf_mapi_response, NullTVB,
offset, END_OF_FRAME, TRUE);
proto_tree_add_text(mapi_tree, NullTVB, offset,
END_OF_FRAME, "Response: <opaque data>");
--- 66,84 ----
if (tree)
{
! ti = proto_tree_add_item(tree, proto_mapi, NullTVB, offset, END_OF_FRAME, FALSE);
mapi_tree = proto_item_add_subtree(ti, ett_mapi);
if (pi.match_port == pi.destport)
{
! proto_tree_add_boolean_hidden(mapi_tree, hf_mapi_request, NullTVB,
offset, END_OF_FRAME, TRUE);
proto_tree_add_text(mapi_tree, NullTVB, offset,
END_OF_FRAME, "Request: <opaque data>" );
}
else
{
! proto_tree_add_boolean_hidden(mapi_tree, hf_mapi_response, NullTVB,
offset, END_OF_FRAME, TRUE);
proto_tree_add_text(mapi_tree, NullTVB, offset,
END_OF_FRAME, "Response: <opaque data>");
Index: packet-mip.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-mip.c,v
retrieving revision 1.3
diff -c -r1.3 packet-mip.c
*** packet-mip.c 2000/05/27 17:51:15 1.3
--- packet-mip.c 2000/05/30 10:37:56
***************
*** 165,187 ****
col_add_str(fd, COL_INFO, "Mobile IP Registration Request");
if (tree) {
! ti = proto_tree_add_item(tree, proto_mip, tvb, 0, tvb_length(tvb), NULL);
mip_tree = proto_item_add_subtree(ti, ett_mip);
! proto_tree_add_item(mip_tree, hf_mip_type, 0, 1, type);
code = tvb_get_guint8(tvb, 1);
! proto_tree_add_item(mip_tree, hf_mip_s, tvb, 1, 1, code);
! proto_tree_add_item(mip_tree, hf_mip_b, tvb, 1, 1, code);
! proto_tree_add_item(mip_tree, hf_mip_d, tvb, 1, 1, code);
! proto_tree_add_item(mip_tree, hf_mip_m, tvb, 1, 1, code);
! proto_tree_add_item(mip_tree, hf_mip_g, tvb, 1, 1, code);
! proto_tree_add_item(mip_tree, hf_mip_v, tvb, 1, 1, code);
!
! proto_tree_add_item(mip_tree, hf_mip_life, tvb, 2, 2, tvb_get_ntohs(tvb, 2));
! proto_tree_add_item(mip_tree, hf_mip_homeaddr, tvb, 4, 4, tvb_get_letohl(tvb, 4));
! proto_tree_add_item(mip_tree, hf_mip_haaddr, tvb, 8, 4, tvb_get_letohl(tvb, 8));
! proto_tree_add_item(mip_tree, hf_mip_coa, tvb, 12, 4, tvb_get_letohl(tvb, 12));
! proto_tree_add_item(mip_tree, hf_mip_ident, tvb, 16, 8, tvb_get_ptr(tvb, 16, 8));
}
}
--- 165,187 ----
col_add_str(fd, COL_INFO, "Mobile IP Registration Request");
if (tree) {
! ti = proto_tree_add_item(tree, proto_mip, tvb, 0, tvb_length(tvb), FALSE);
mip_tree = proto_item_add_subtree(ti, ett_mip);
! proto_tree_add_int(mip_tree, hf_mip_type, tvb, 0, 1, type);
code = tvb_get_guint8(tvb, 1);
! proto_tree_add_boolean(mip_tree, hf_mip_s, tvb, 1, 1, code);
! proto_tree_add_boolean(mip_tree, hf_mip_b, tvb, 1, 1, code);
! proto_tree_add_boolean(mip_tree, hf_mip_d, tvb, 1, 1, code);
! proto_tree_add_boolean(mip_tree, hf_mip_m, tvb, 1, 1, code);
! proto_tree_add_boolean(mip_tree, hf_mip_g, tvb, 1, 1, code);
! proto_tree_add_boolean(mip_tree, hf_mip_v, tvb, 1, 1, code);
!
! proto_tree_add_int(mip_tree, hf_mip_life, tvb, 2, 2, tvb_get_ntohs(tvb, 2));
! proto_tree_add_ipv4(mip_tree, hf_mip_homeaddr, tvb, 4, 4, tvb_get_letohl(tvb, 4));
! proto_tree_add_ipv4(mip_tree, hf_mip_haaddr, tvb, 8, 4, tvb_get_letohl(tvb, 8));
! proto_tree_add_ipv4(mip_tree, hf_mip_coa, tvb, 12, 4, tvb_get_letohl(tvb, 12));
! proto_tree_add_bytes(mip_tree, hf_mip_ident, tvb, 16, 8, tvb_get_ptr(tvb, 16, 8));
}
}
***************
*** 191,206 ****
col_add_str(fd, COL_INFO, "Mobile IP Registration Reply");
if (tree) {
! ti = proto_tree_add_item(tree, proto_mip, tvb, 0, tvb_length(tvb), NULL);
mip_tree = proto_item_add_subtree(ti, ett_mip);
! proto_tree_add_item(mip_tree, hf_mip_type, tvb, 0, 1, type);
code = tvb_get_guint8(tvb, 1);
! proto_tree_add_item(mip_tree, hf_mip_code, tvb, 1, 1, code);
! proto_tree_add_item(mip_tree, hf_mip_life, tvb, 2, 2, tvb_get_ntohs(tvb, 2));
! proto_tree_add_item(mip_tree, hf_mip_homeaddr, tvb, 4, 4, tvb_get_letohl(tvb, 4));
! proto_tree_add_item(mip_tree, hf_mip_haaddr, tvb, 8, 4, tvb_get_letohl(tvb, 8));
! proto_tree_add_item(mip_tree, hf_mip_ident, tvb, 12, 8, tvb_get_ptr(tvb, 12, 8));
}
}
}
--- 191,206 ----
col_add_str(fd, COL_INFO, "Mobile IP Registration Reply");
if (tree) {
! ti = proto_tree_add_item(tree, proto_mip, tvb, 0, tvb_length(tvb), FALSE);
mip_tree = proto_item_add_subtree(ti, ett_mip);
! proto_tree_add_int(mip_tree, hf_mip_type, tvb, 0, 1, type);
code = tvb_get_guint8(tvb, 1);
! proto_tree_add_uint(mip_tree, hf_mip_code, tvb, 1, 1, code);
! proto_tree_add_int(mip_tree, hf_mip_life, tvb, 2, 2, tvb_get_ntohs(tvb, 2));
! proto_tree_add_ipv4(mip_tree, hf_mip_homeaddr, tvb, 4, 4, tvb_get_letohl(tvb, 4));
! proto_tree_add_ipv4(mip_tree, hf_mip_haaddr, tvb, 8, 4, tvb_get_letohl(tvb, 8));
! proto_tree_add_bytes(mip_tree, hf_mip_ident, tvb, 12, 8, tvb_get_ptr(tvb, 12, 8));
}
}
}
Index: packet-mount.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-mount.c,v
retrieving revision 1.14
diff -c -r1.14 packet-mount.c
*** packet-mount.c 2000/05/11 08:15:23 1.14
--- packet-mount.c 2000/05/30 10:37:58
***************
*** 86,92 ****
if (!BYTES_ARE_IN_FRAME(offset,4)) return offset;
status = EXTRACT_UINT(pd, offset+0);
if (tree) {
! proto_tree_add_item(tree, hf_mount_status, NullTVB, offset, 4, status);
}
offset += 4;
--- 86,92 ----
if (!BYTES_ARE_IN_FRAME(offset,4)) return offset;
status = EXTRACT_UINT(pd, offset+0);
if (tree) {
! proto_tree_add_uint(tree, hf_mount_status, NullTVB, offset, 4, status);
}
offset += 4;
***************
*** 140,146 ****
if (tree) {
mountlist_item = proto_tree_add_item(tree, hf_mount_mountlist, NullTVB,
! offset+0, END_OF_FRAME, NULL);
if (mountlist_item)
mountlist_tree = proto_item_add_subtree(mountlist_item, ett_mount_mountlist);
}
--- 140,146 ----
if (tree) {
mountlist_item = proto_tree_add_item(tree, hf_mount_mountlist, NullTVB,
! offset+0, END_OF_FRAME, FALSE);
if (mountlist_item)
mountlist_tree = proto_item_add_subtree(mountlist_item, ett_mount_mountlist);
}
***************
*** 199,205 ****
if (tree) {
exportlist_item = proto_tree_add_item(tree, hf_mount_exportlist, NullTVB,
! offset+0, END_OF_FRAME, NULL);
if (exportlist_item)
exportlist_tree = proto_item_add_subtree(exportlist_item, ett_mount_exportlist);
}
--- 199,205 ----
if (tree) {
exportlist_item = proto_tree_add_item(tree, hf_mount_exportlist, NullTVB,
! offset+0, END_OF_FRAME, FALSE);
if (exportlist_item)
exportlist_tree = proto_item_add_subtree(exportlist_item, ett_mount_exportlist);
}
***************
*** 208,214 ****
groups_offset = offset;
if (tree) {
groups_item = proto_tree_add_item(exportlist_tree, hf_mount_groups, NullTVB,
! offset+0, END_OF_FRAME, NULL);
if (groups_item)
groups_tree = proto_item_add_subtree(groups_item, ett_mount_groups);
}
--- 208,214 ----
groups_offset = offset;
if (tree) {
groups_item = proto_tree_add_item(exportlist_tree, hf_mount_groups, NullTVB,
! offset+0, END_OF_FRAME, FALSE);
if (groups_item)
groups_tree = proto_item_add_subtree(groups_item, ett_mount_groups);
}
***************
*** 330,336 ****
return offset;
if (!(pc_mask & (PC_ERROR_LINK_MAX|PC_ERROR_ALL))) {
if (tree) {
! proto_tree_add_item(tree,
hf_mount_pathconf_link_max, NullTVB, offset, 4,
EXTRACT_UINT(pd, offset+0));
}
--- 330,336 ----
return offset;
if (!(pc_mask & (PC_ERROR_LINK_MAX|PC_ERROR_ALL))) {
if (tree) {
! proto_tree_add_uint(tree,
hf_mount_pathconf_link_max, NullTVB, offset, 4,
EXTRACT_UINT(pd, offset+0));
}
***************
*** 341,347 ****
return offset;
if (!(pc_mask & (PC_ERROR_MAX_CANON|PC_ERROR_ALL))) {
if (tree) {
! proto_tree_add_item(tree,
hf_mount_pathconf_max_canon, NullTVB, offset + 2, 2,
(EXTRACT_UINT(pd, offset+0)) & 0xFFFF);
}
--- 341,347 ----
return offset;
if (!(pc_mask & (PC_ERROR_MAX_CANON|PC_ERROR_ALL))) {
if (tree) {
! proto_tree_add_uint(tree,
hf_mount_pathconf_max_canon, NullTVB, offset + 2, 2,
(EXTRACT_UINT(pd, offset+0)) & 0xFFFF);
}
***************
*** 353,359 ****
return offset;
if (!(pc_mask & (PC_ERROR_MAX_INPUT|PC_ERROR_ALL))) {
if (tree) {
! proto_tree_add_item(tree,
hf_mount_pathconf_max_input, NullTVB, offset + 2, 2,
(EXTRACT_UINT(pd, offset+0)) & 0xFFFF);
}
--- 353,359 ----
return offset;
if (!(pc_mask & (PC_ERROR_MAX_INPUT|PC_ERROR_ALL))) {
if (tree) {
! proto_tree_add_uint(tree,
hf_mount_pathconf_max_input, NullTVB, offset + 2, 2,
(EXTRACT_UINT(pd, offset+0)) & 0xFFFF);
}
***************
*** 364,370 ****
return offset;
if (!(pc_mask & (PC_ERROR_NAME_MAX|PC_ERROR_ALL))) {
if (tree) {
! proto_tree_add_item(tree,
hf_mount_pathconf_name_max, NullTVB, offset + 2, 2,
(EXTRACT_UINT(pd, offset+0)) & 0xFFFF);
}
--- 364,370 ----
return offset;
if (!(pc_mask & (PC_ERROR_NAME_MAX|PC_ERROR_ALL))) {
if (tree) {
! proto_tree_add_uint(tree,
hf_mount_pathconf_name_max, NullTVB, offset + 2, 2,
(EXTRACT_UINT(pd, offset+0)) & 0xFFFF);
}
***************
*** 375,381 ****
return offset;
if (!(pc_mask & (PC_ERROR_PATH_MAX|PC_ERROR_ALL))) {
if (tree) {
! proto_tree_add_item(tree,
hf_mount_pathconf_path_max, NullTVB, offset + 2, 2,
(EXTRACT_UINT(pd, offset+0)) & 0xFFFF);
}
--- 375,381 ----
return offset;
if (!(pc_mask & (PC_ERROR_PATH_MAX|PC_ERROR_ALL))) {
if (tree) {
! proto_tree_add_uint(tree,
hf_mount_pathconf_path_max, NullTVB, offset + 2, 2,
(EXTRACT_UINT(pd, offset+0)) & 0xFFFF);
}
***************
*** 386,392 ****
return offset;
if (!(pc_mask & (PC_ERROR_PIPE_BUF|PC_ERROR_ALL))) {
if (tree) {
! proto_tree_add_item(tree,
hf_mount_pathconf_pipe_buf, NullTVB, offset + 2, 2,
(EXTRACT_UINT(pd, offset+0)) & 0xFFFF);
}
--- 386,392 ----
return offset;
if (!(pc_mask & (PC_ERROR_PIPE_BUF|PC_ERROR_ALL))) {
if (tree) {
! proto_tree_add_uint(tree,
hf_mount_pathconf_pipe_buf, NullTVB, offset + 2, 2,
(EXTRACT_UINT(pd, offset+0)) & 0xFFFF);
}
***************
*** 399,405 ****
return offset;
if (!(pc_mask & (PC_ERROR_VDISABLE|PC_ERROR_ALL))) {
if (tree) {
! proto_tree_add_item(tree,
hf_mount_pathconf_vdisable, NullTVB, offset + 3, 1,
(EXTRACT_UINT(pd, offset+0)) & 0xFF);
}
--- 399,405 ----
return offset;
if (!(pc_mask & (PC_ERROR_VDISABLE|PC_ERROR_ALL))) {
if (tree) {
! proto_tree_add_uint(tree,
hf_mount_pathconf_vdisable, NullTVB, offset + 3, 1,
(EXTRACT_UINT(pd, offset+0)) & 0xFF);
}
***************
*** 407,434 ****
offset += 4;
if (tree) {
! ti = proto_tree_add_item(tree, hf_mount_pathconf_mask, NullTVB,
offset + 2, 2, pc_mask);
mask_tree = proto_item_add_subtree(ti, ett_mount_pathconf_mask);
! proto_tree_add_item(mask_tree, hf_mount_pathconf_error_all, NullTVB,
offset + 2, 2, pc_mask);
! proto_tree_add_item(mask_tree, hf_mount_pathconf_error_link_max, NullTVB,
offset + 2, 2, pc_mask);
! proto_tree_add_item(mask_tree, hf_mount_pathconf_error_max_canon, NullTVB,
offset + 2, 2, pc_mask);
! proto_tree_add_item(mask_tree, hf_mount_pathconf_error_max_input, NullTVB,
offset + 2, 2, pc_mask);
! proto_tree_add_item(mask_tree, hf_mount_pathconf_error_name_max, NullTVB,
offset + 2, 2, pc_mask);
! proto_tree_add_item(mask_tree, hf_mount_pathconf_error_path_max, NullTVB,
offset + 2, 2, pc_mask);
! proto_tree_add_item(mask_tree, hf_mount_pathconf_error_pipe_buf, NullTVB,
offset + 2, 2, pc_mask);
! proto_tree_add_item(mask_tree, hf_mount_pathconf_chown_restricted, NullTVB,
offset + 2, 2, pc_mask);
! proto_tree_add_item(mask_tree, hf_mount_pathconf_no_trunc, NullTVB,
offset + 2, 2, pc_mask);
! proto_tree_add_item(mask_tree, hf_mount_pathconf_error_vdisable, NullTVB,
offset + 2, 2, pc_mask);
}
offset += 4;
--- 407,434 ----
offset += 4;
if (tree) {
! ti = proto_tree_add_uint(tree, hf_mount_pathconf_mask, NullTVB,
offset + 2, 2, pc_mask);
mask_tree = proto_item_add_subtree(ti, ett_mount_pathconf_mask);
! proto_tree_add_boolean(mask_tree, hf_mount_pathconf_error_all, NullTVB,
offset + 2, 2, pc_mask);
! proto_tree_add_boolean(mask_tree, hf_mount_pathconf_error_link_max, NullTVB,
offset + 2, 2, pc_mask);
! proto_tree_add_boolean(mask_tree, hf_mount_pathconf_error_max_canon, NullTVB,
offset + 2, 2, pc_mask);
! proto_tree_add_boolean(mask_tree, hf_mount_pathconf_error_max_input, NullTVB,
offset + 2, 2, pc_mask);
! proto_tree_add_boolean(mask_tree, hf_mount_pathconf_error_name_max, NullTVB,
offset + 2, 2, pc_mask);
! proto_tree_add_boolean(mask_tree, hf_mount_pathconf_error_path_max, NullTVB,
offset + 2, 2, pc_mask);
! proto_tree_add_boolean(mask_tree, hf_mount_pathconf_error_pipe_buf, NullTVB,
offset + 2, 2, pc_mask);
! proto_tree_add_boolean(mask_tree, hf_mount_pathconf_chown_restricted, NullTVB,
offset + 2, 2, pc_mask);
! proto_tree_add_boolean(mask_tree, hf_mount_pathconf_no_trunc, NullTVB,
offset + 2, 2, pc_mask);
! proto_tree_add_boolean(mask_tree, hf_mount_pathconf_error_vdisable, NullTVB,
offset + 2, 2, pc_mask);
}
offset += 4;
***************
*** 510,516 ****
mountstat3 = EXTRACT_UINT(pd, offset+0);
if (tree) {
! proto_tree_add_item(tree, hfindex, NullTVB, offset, 4, mountstat3);
}
offset += 4;
--- 510,516 ----
mountstat3 = EXTRACT_UINT(pd, offset+0);
if (tree) {
! proto_tree_add_uint(tree, hfindex, NullTVB, offset, 4, mountstat3);
}
offset += 4;
***************
*** 535,547 ****
offset = dissect_nfs_fh3(pd,offset,fd,tree,"fhandle");
if (!BYTES_ARE_IN_FRAME(offset,4)) return offset;
auth_flavors = EXTRACT_UINT(pd,offset+0);
! proto_tree_add_item(tree,hf_mount_flavors, NullTVB,
offset, 4, auth_flavors);
offset += 4;
for (auth_flavor_i = 0 ; auth_flavor_i < hf_mount_flavors ; auth_flavor_i++) {
if (!BYTES_ARE_IN_FRAME(offset,4)) return offset;
auth_flavor = EXTRACT_UINT(pd,offset+0);
! proto_tree_add_item(tree,hf_mount_flavor, NullTVB,
offset, 4, auth_flavor);
offset += 4;
}
--- 535,547 ----
offset = dissect_nfs_fh3(pd,offset,fd,tree,"fhandle");
if (!BYTES_ARE_IN_FRAME(offset,4)) return offset;
auth_flavors = EXTRACT_UINT(pd,offset+0);
! proto_tree_add_uint(tree,hf_mount_flavors, NullTVB,
offset, 4, auth_flavors);
offset += 4;
for (auth_flavor_i = 0 ; auth_flavor_i < hf_mount_flavors ; auth_flavor_i++) {
if (!BYTES_ARE_IN_FRAME(offset,4)) return offset;
auth_flavor = EXTRACT_UINT(pd,offset+0);
! proto_tree_add_uint(tree,hf_mount_flavor, NullTVB,
offset, 4, auth_flavor);
offset += 4;
}
Index: packet-mpls.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-mpls.c,v
retrieving revision 1.6
diff -c -r1.6 packet-mpls.c
*** packet-mpls.c 2000/05/11 08:15:23 1.6
--- packet-mpls.c 2000/05/30 10:37:58
***************
*** 153,159 ****
if (tree) {
! ti = proto_tree_add_item(tree, proto_mpls, NullTVB, offset, 4, NULL);
mpls_tree = proto_item_add_subtree(ti, ett_mpls);
if (label <= MAX_RESERVED)
--- 153,159 ----
if (tree) {
! ti = proto_tree_add_item(tree, proto_mpls, NullTVB, offset, 4, FALSE);
mpls_tree = proto_item_add_subtree(ti, ett_mpls);
if (label <= MAX_RESERVED)
***************
*** 162,175 ****
label, val_to_str(label, special_labels,
"Reserved - Unknown"));
else
! proto_tree_add_item(mpls_tree, mpls_filter[MPLSF_LABEL], NullTVB,
offset, 3, label);
! proto_tree_add_item(mpls_tree,mpls_filter[MPLSF_EXP], NullTVB,
offset+2,1, exp);
! proto_tree_add_item(mpls_tree,mpls_filter[MPLSF_BOTTOM_OF_STACK], NullTVB,
offset+2,1, bos);
! proto_tree_add_item(mpls_tree,mpls_filter[MPLSF_TTL], NullTVB,
offset+3,1, ttl);
}
offset += 4;
--- 162,175 ----
label, val_to_str(label, special_labels,
"Reserved - Unknown"));
else
! proto_tree_add_uint(mpls_tree, mpls_filter[MPLSF_LABEL], NullTVB,
offset, 3, label);
! proto_tree_add_uint(mpls_tree,mpls_filter[MPLSF_EXP], NullTVB,
offset+2,1, exp);
! proto_tree_add_uint(mpls_tree,mpls_filter[MPLSF_BOTTOM_OF_STACK], NullTVB,
offset+2,1, bos);
! proto_tree_add_uint(mpls_tree,mpls_filter[MPLSF_TTL], NullTVB,
offset+3,1, ttl);
}
offset += 4;
Index: packet-msproxy.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-msproxy.c,v
retrieving revision 1.2
diff -c -r1.2 packet-msproxy.c
*** packet-msproxy.c 2000/05/11 08:15:23 1.2
--- packet-msproxy.c 2000/05/30 10:38:01
***************
*** 243,256 ****
if ( tree) {
ti = proto_tree_add_item( tree, proto_msproxy, NullTVB, offset, 0,
! NULL, "MS Proxy:" );
msp_tree = proto_item_add_subtree(ti, ett_msproxy);
! proto_tree_add_item( msp_tree, hf_msproxy_dstport, NullTVB,
offset, 0, redirect_info->remote_port);
! proto_tree_add_item( msp_tree, hf_msproxy_dstaddr, NullTVB, offset, 0,
redirect_info->remote_addr);
}
--- 243,256 ----
if ( tree) {
ti = proto_tree_add_item( tree, proto_msproxy, NullTVB, offset, 0,
! FALSE );
msp_tree = proto_item_add_subtree(ti, ett_msproxy);
! proto_tree_add_uint( msp_tree, hf_msproxy_dstport, NullTVB,
offset, 0, redirect_info->remote_port);
! proto_tree_add_ipv4( msp_tree, hf_msproxy_dstaddr, NullTVB, offset, 0,
redirect_info->remote_addr);
}
***************
*** 434,452 ****
CHECK_PACKET_LENGTH( 4);
if ( tree)
! proto_tree_add_item( tree, hf_msproxy_bindaddr, NullTVB, offset, 4,
GWORD( pd, offset));
offset += 4;
CHECK_PACKET_LENGTH( 2);
if ( tree)
! proto_tree_add_item( tree, hf_msproxy_bindport, NullTVB, offset, 2,
pntohs( &pd[ offset]));
offset += 6;
CHECK_PACKET_LENGTH( 2);
if ( tree)
! proto_tree_add_item( tree, hf_msproxy_clntport, NullTVB, offset, 2,
pntohs( &pd[ offset]));
offset += 2;
--- 434,452 ----
CHECK_PACKET_LENGTH( 4);
if ( tree)
! proto_tree_add_ipv4( tree, hf_msproxy_bindaddr, NullTVB, offset, 4,
GWORD( pd, offset));
offset += 4;
CHECK_PACKET_LENGTH( 2);
if ( tree)
! proto_tree_add_uint( tree, hf_msproxy_bindport, NullTVB, offset, 2,
pntohs( &pd[ offset]));
offset += 6;
CHECK_PACKET_LENGTH( 2);
if ( tree)
! proto_tree_add_uint( tree, hf_msproxy_clntport, NullTVB, offset, 2,
pntohs( &pd[ offset]));
offset += 2;
***************
*** 455,461 ****
if ( tree){
CHECK_PACKET_LENGTH( 2);
! proto_tree_add_item( tree, hf_msproxy_boundport, NullTVB, offset, 2,
pntohs( &pd[ offset]));
offset += 82;
--- 455,461 ----
if ( tree){
CHECK_PACKET_LENGTH( 2);
! proto_tree_add_uint( tree, hf_msproxy_boundport, NullTVB, offset, 2,
pntohs( &pd[ offset]));
offset += 82;
***************
*** 499,509 ****
offset += 6;
CHECK_PACKET_LENGTH( 4);
! proto_tree_add_item( tree, hf_msproxy_bind_id, NullTVB, offset, 4, pntohl( &pd[ offset]));
offset += 16;
CHECK_PACKET_LENGTH( 2);
! proto_tree_add_item( tree, hf_msproxy_boundport, NullTVB, offset, 2,
pntohs( &pd[ offset]));
offset += 96;
--- 499,509 ----
offset += 6;
CHECK_PACKET_LENGTH( 4);
! proto_tree_add_uint( tree, hf_msproxy_bind_id, NullTVB, offset, 4, pntohl( &pd[ offset]));
offset += 16;
CHECK_PACKET_LENGTH( 2);
! proto_tree_add_uint( tree, hf_msproxy_boundport, NullTVB, offset, 2,
pntohs( &pd[ offset]));
offset += 96;
***************
*** 523,529 ****
CHECK_PACKET_LENGTH( 2);
if ( tree)
! proto_tree_add_item( tree, hf_msproxy_dstport, NullTVB, offset, 2,
pntohs( &pd[ offset]));
conv_info->dst_port = pntohs( &pd[ offset]);
--- 523,529 ----
CHECK_PACKET_LENGTH( 2);
if ( tree)
! proto_tree_add_uint( tree, hf_msproxy_dstport, NullTVB, offset, 2,
pntohs( &pd[ offset]));
conv_info->dst_port = pntohs( &pd[ offset]);
***************
*** 531,537 ****
CHECK_PACKET_LENGTH( 4);
if ( tree)
! proto_tree_add_item( tree, hf_msproxy_dstaddr, NullTVB, offset, 4,
GWORD( pd, offset));
memcpy( &conv_info->dst_addr, &pd[ offset], sizeof( guint32));
--- 531,537 ----
CHECK_PACKET_LENGTH( 4);
if ( tree)
! proto_tree_add_ipv4( tree, hf_msproxy_dstaddr, NullTVB, offset, 4,
GWORD( pd, offset));
memcpy( &conv_info->dst_addr, &pd[ offset], sizeof( guint32));
***************
*** 542,548 ****
conv_info->clnt_port = pntohs( &pd[ offset]);
if ( tree){
! proto_tree_add_item( tree, hf_msproxy_clntport, NullTVB, offset, 2,
pntohs( &pd[ offset]));
offset += 84;
--- 542,548 ----
conv_info->clnt_port = pntohs( &pd[ offset]);
if ( tree){
! proto_tree_add_uint( tree, hf_msproxy_clntport, NullTVB, offset, 2,
pntohs( &pd[ offset]));
offset += 84;
***************
*** 562,592 ****
offset += 6;
CHECK_PACKET_LENGTH( 4);
! proto_tree_add_item( tree, hf_msproxy_bind_id, NullTVB, offset, 4, pntohl( &pd[ offset]));
offset += 14;
CHECK_PACKET_LENGTH( 2);
! proto_tree_add_item( tree, hf_msproxy_dstport, NullTVB, offset, 2,
pntohs( &pd[ offset]));
offset += 2;
CHECK_PACKET_LENGTH( 4);
! proto_tree_add_item( tree, hf_msproxy_dstaddr, NullTVB, offset, 4,
GWORD( pd, offset));
offset += 12;
CHECK_PACKET_LENGTH( 2);
! proto_tree_add_item( tree, hf_msproxy_server_int_port, NullTVB, offset,
2, pntohs( &pd[ offset]));
offset += 4;
CHECK_PACKET_LENGTH( 2);
! proto_tree_add_item( tree, hf_msproxy_server_ext_port, NullTVB, offset,
2, pntohs( &pd[ offset]));
offset += 2;
CHECK_PACKET_LENGTH( 4);
! proto_tree_add_item( tree, hf_msproxy_server_ext_addr, NullTVB, offset,
4, GWORD( pd, offset));
offset += 78;
--- 562,592 ----
offset += 6;
CHECK_PACKET_LENGTH( 4);
! proto_tree_add_uint( tree, hf_msproxy_bind_id, NullTVB, offset, 4, pntohl( &pd[ offset]));
offset += 14;
CHECK_PACKET_LENGTH( 2);
! proto_tree_add_uint( tree, hf_msproxy_dstport, NullTVB, offset, 2,
pntohs( &pd[ offset]));
offset += 2;
CHECK_PACKET_LENGTH( 4);
! proto_tree_add_ipv4( tree, hf_msproxy_dstaddr, NullTVB, offset, 4,
GWORD( pd, offset));
offset += 12;
CHECK_PACKET_LENGTH( 2);
! proto_tree_add_uint( tree, hf_msproxy_server_int_port, NullTVB, offset,
2, pntohs( &pd[ offset]));
offset += 4;
CHECK_PACKET_LENGTH( 2);
! proto_tree_add_uint( tree, hf_msproxy_server_ext_port, NullTVB, offset,
2, pntohs( &pd[ offset]));
offset += 2;
CHECK_PACKET_LENGTH( 4);
! proto_tree_add_ipv4( tree, hf_msproxy_server_ext_addr, NullTVB, offset,
4, GWORD( pd, offset));
offset += 78;
***************
*** 644,662 ****
CHECK_PACKET_LENGTH( 4);
if ( tree)
! proto_tree_add_item( tree, hf_msproxy_bind_id, NullTVB, offset, 4, pntohl( &pd[ offset]));
offset += 12;
CHECK_PACKET_LENGTH( 2);
if ( tree)
! proto_tree_add_item( tree, hf_msproxy_dstport, NullTVB, offset, 2,
pntohs( &pd[ offset]));
offset += 2;
CHECK_PACKET_LENGTH( 4);
if ( tree)
! proto_tree_add_item( tree, hf_msproxy_dstaddr, NullTVB, offset, 4,
GWORD( pd, offset));
offset += 96;
--- 644,662 ----
CHECK_PACKET_LENGTH( 4);
if ( tree)
! proto_tree_add_uint( tree, hf_msproxy_bind_id, NullTVB, offset, 4, pntohl( &pd[ offset]));
offset += 12;
CHECK_PACKET_LENGTH( 2);
if ( tree)
! proto_tree_add_uint( tree, hf_msproxy_dstport, NullTVB, offset, 2,
pntohs( &pd[ offset]));
offset += 2;
CHECK_PACKET_LENGTH( 4);
if ( tree)
! proto_tree_add_ipv4( tree, hf_msproxy_dstaddr, NullTVB, offset, 4,
GWORD( pd, offset));
offset += 96;
***************
*** 677,683 ****
CHECK_PACKET_LENGTH( 2);
if ( tree)
! proto_tree_add_item( tree, hf_msproxy_clntport, NullTVB, offset, 2,
pntohs( &pd[ offset]));
conv_info->clnt_port = pntohs( &pd[ offset]);
--- 677,683 ----
CHECK_PACKET_LENGTH( 2);
if ( tree)
! proto_tree_add_uint( tree, hf_msproxy_clntport, NullTVB, offset, 2,
pntohs( &pd[ offset]));
conv_info->clnt_port = pntohs( &pd[ offset]);
***************
*** 800,811 ****
if ( tree) {
CHECK_PACKET_LENGTH( 2);
! proto_tree_add_item( tree, hf_msproxy_serverport, NullTVB, offset, 2,
pntohs( &pd[ offset]));
offset += 2;
CHECK_PACKET_LENGTH( 4);
! proto_tree_add_item( tree, hf_msproxy_serveraddr, NullTVB, offset, 4,
GWORD( pd, offset));
offset += 4;
}
--- 800,811 ----
if ( tree) {
CHECK_PACKET_LENGTH( 2);
! proto_tree_add_uint( tree, hf_msproxy_serverport, NullTVB, offset, 2,
pntohs( &pd[ offset]));
offset += 2;
CHECK_PACKET_LENGTH( 4);
! proto_tree_add_ipv4( tree, hf_msproxy_serveraddr, NullTVB, offset, 4,
GWORD( pd, offset));
offset += 4;
}
***************
*** 834,848 ****
if ( tree) {
CHECK_PACKET_LENGTH( 4);
! proto_tree_add_item( tree, hf_msproxy_bind_id, NullTVB, offset, 4, pntohl( &pd[ offset]));
offset += 14;
CHECK_PACKET_LENGTH( 2);
! proto_tree_add_item( tree, hf_msproxy_server_ext_port, NullTVB, offset, 2, pntohs( &pd[ offset]));
offset += 2;
CHECK_PACKET_LENGTH( 4);
! proto_tree_add_item( tree, hf_msproxy_server_ext_addr, NullTVB, offset, 4, GWORD( pd, offset));
offset += 96;
display_application_name( pd, offset, fd, tree);
--- 834,848 ----
if ( tree) {
CHECK_PACKET_LENGTH( 4);
! proto_tree_add_uint( tree, hf_msproxy_bind_id, NullTVB, offset, 4, pntohl( &pd[ offset]));
offset += 14;
CHECK_PACKET_LENGTH( 2);
! proto_tree_add_uint( tree, hf_msproxy_server_ext_port, NullTVB, offset, 2, pntohs( &pd[ offset]));
offset += 2;
CHECK_PACKET_LENGTH( 4);
! proto_tree_add_ipv4( tree, hf_msproxy_server_ext_addr, NullTVB, offset, 4, GWORD( pd, offset));
offset += 96;
display_application_name( pd, offset, fd, tree);
***************
*** 893,899 ****
CHECK_PACKET_LENGTH( 2);
if ( tree)
! proto_tree_add_item( tree, hf_msproxy_server_int_port, NullTVB, offset, 2, pntohs( &pd[ offset]));
conv_info->proto = PT_TCP;
--- 893,899 ----
CHECK_PACKET_LENGTH( 2);
if ( tree)
! proto_tree_add_uint( tree, hf_msproxy_server_int_port, NullTVB, offset, 2, pntohs( &pd[ offset]));
conv_info->proto = PT_TCP;
***************
*** 902,916 ****
if ( tree){
CHECK_PACKET_LENGTH( 2);
! proto_tree_add_item( tree, hf_msproxy_server_int_addr, NullTVB, offset, 2, GWORD( pd, offset));
offset += 14;
CHECK_PACKET_LENGTH( 2);
! proto_tree_add_item( tree, hf_msproxy_server_ext_port, NullTVB, offset, 2, pntohs( &pd[ offset]));
offset += 2;
CHECK_PACKET_LENGTH( 4);
! proto_tree_add_item( tree, hf_msproxy_server_ext_addr, NullTVB, offset, 4, GWORD( pd, offset));
offset += 80;
display_application_name( pd, offset, fd, tree);
--- 902,916 ----
if ( tree){
CHECK_PACKET_LENGTH( 2);
! proto_tree_add_ipv4( tree, hf_msproxy_server_int_addr, NullTVB, offset, 2, GWORD( pd, offset));
offset += 14;
CHECK_PACKET_LENGTH( 2);
! proto_tree_add_uint( tree, hf_msproxy_server_ext_port, NullTVB, offset, 2, pntohs( &pd[ offset]));
offset += 2;
CHECK_PACKET_LENGTH( 4);
! proto_tree_add_ipv4( tree, hf_msproxy_server_ext_addr, NullTVB, offset, 4, GWORD( pd, offset));
offset += 80;
display_application_name( pd, offset, fd, tree);
***************
*** 930,950 ****
offset += 6;
CHECK_PACKET_LENGTH( 4);
! proto_tree_add_item( tree, hf_msproxy_bind_id, NullTVB, offset, 4, pntohl( &pd[ offset]));
offset += 16;
CHECK_PACKET_LENGTH( 2);
! proto_tree_add_item( tree, hf_msproxy_server_int_port, NullTVB, offset,
2, pntohs( &pd[ offset]));
offset += 6;
CHECK_PACKET_LENGTH( 2);
! proto_tree_add_item( tree, hf_msproxy_server_ext_port, NullTVB, offset,
2, pntohs( &pd[ offset]));
offset += 2;
CHECK_PACKET_LENGTH( 4);
! proto_tree_add_item( tree, hf_msproxy_server_ext_addr, NullTVB, offset,
4, GWORD( pd, offset));
offset += 88;
--- 930,950 ----
offset += 6;
CHECK_PACKET_LENGTH( 4);
! proto_tree_add_uint( tree, hf_msproxy_bind_id, NullTVB, offset, 4, pntohl( &pd[ offset]));
offset += 16;
CHECK_PACKET_LENGTH( 2);
! proto_tree_add_uint( tree, hf_msproxy_server_int_port, NullTVB, offset,
2, pntohs( &pd[ offset]));
offset += 6;
CHECK_PACKET_LENGTH( 2);
! proto_tree_add_uint( tree, hf_msproxy_server_ext_port, NullTVB, offset,
2, pntohs( &pd[ offset]));
offset += 2;
CHECK_PACKET_LENGTH( 4);
! proto_tree_add_ipv4( tree, hf_msproxy_server_ext_addr, NullTVB, offset,
4, GWORD( pd, offset));
offset += 88;
***************
*** 964,983 ****
CHECK_PACKET_LENGTH( 4);
if ( tree)
! proto_tree_add_item( tree, hf_msproxy_bind_id, NullTVB, offset, 4, pntohl( &pd[ offset]));
offset += 14;
CHECK_PACKET_LENGTH( 2);
if ( tree)
! proto_tree_add_item( tree, hf_msproxy_dstport, NullTVB, offset, 2,
pntohs( &pd[ offset]));
conv_info->dst_port = pntohs( &pd[ offset]);
offset += 2;
CHECK_PACKET_LENGTH( 4);
if ( tree)
! proto_tree_add_item( tree, hf_msproxy_dstaddr, NullTVB, offset, 4,
GWORD( pd, offset));
memcpy( &conv_info->dst_addr, &pd[ offset], sizeof( guint32));
--- 964,983 ----
CHECK_PACKET_LENGTH( 4);
if ( tree)
! proto_tree_add_uint( tree, hf_msproxy_bind_id, NullTVB, offset, 4, pntohl( &pd[ offset]));
offset += 14;
CHECK_PACKET_LENGTH( 2);
if ( tree)
! proto_tree_add_uint( tree, hf_msproxy_dstport, NullTVB, offset, 2,
pntohs( &pd[ offset]));
conv_info->dst_port = pntohs( &pd[ offset]);
offset += 2;
CHECK_PACKET_LENGTH( 4);
if ( tree)
! proto_tree_add_ipv4( tree, hf_msproxy_dstaddr, NullTVB, offset, 4,
GWORD( pd, offset));
memcpy( &conv_info->dst_addr, &pd[ offset], sizeof( guint32));
***************
*** 986,992 ****
CHECK_PACKET_LENGTH( 2);
if ( tree)
! proto_tree_add_item( tree, hf_msproxy_server_int_port, NullTVB, offset,
2, pntohs( &pd[ offset]));
conv_info->server_int_port = pntohs( &pd[ offset]);
offset += 4;
--- 986,992 ----
CHECK_PACKET_LENGTH( 2);
if ( tree)
! proto_tree_add_uint( tree, hf_msproxy_server_int_port, NullTVB, offset,
2, pntohs( &pd[ offset]));
conv_info->server_int_port = pntohs( &pd[ offset]);
offset += 4;
***************
*** 994,1005 ****
if ( tree) {
CHECK_PACKET_LENGTH( 2);
! proto_tree_add_item( tree, hf_msproxy_server_ext_port, NullTVB, offset,
2, pntohs( &pd[ offset]));
offset += 2;
CHECK_PACKET_LENGTH( 4);
! proto_tree_add_item( tree, hf_msproxy_server_ext_addr, NullTVB, offset,
4, GWORD( pd, offset));
offset += 78;
--- 994,1005 ----
if ( tree) {
CHECK_PACKET_LENGTH( 2);
! proto_tree_add_uint( tree, hf_msproxy_server_ext_port, NullTVB, offset,
2, pntohs( &pd[ offset]));
offset += 2;
CHECK_PACKET_LENGTH( 4);
! proto_tree_add_ipv4( tree, hf_msproxy_server_ext_addr, NullTVB, offset,
4, GWORD( pd, offset));
offset += 78;
***************
*** 1034,1040 ****
offset += addr_offset;
CHECK_PACKET_LENGTH( 4);
! proto_tree_add_item( tree, hf_msproxy_resolvaddr, NullTVB, offset, 4,
GWORD( pd, offset));
}
}
--- 1034,1040 ----
offset += addr_offset;
CHECK_PACKET_LENGTH( 4);
! proto_tree_add_ipv4( tree, hf_msproxy_resolvaddr, NullTVB, offset, 4,
GWORD( pd, offset));
}
}
***************
*** 1203,1209 ****
if (tree) { /* if proto tree, decode data */
ti = proto_tree_add_item( tree, proto_msproxy, NullTVB, offset,
! END_OF_FRAME, NULL, "MSproxy:" );
msproxy_tree = proto_item_add_subtree(ti, ett_msproxy);
}
--- 1203,1209 ----
if (tree) { /* if proto tree, decode data */
ti = proto_tree_add_item( tree, proto_msproxy, NullTVB, offset,
! END_OF_FRAME, FALSE );
msproxy_tree = proto_item_add_subtree(ti, ett_msproxy);
}
***************
*** 1356,1361 ****
dissector_add("udp.port", UDP_PORT_MSPROXY, dissect_msproxy);
}
-
-
-
--- 1356,1358 ----
Index: packet-nbipx.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-nbipx.c,v
retrieving revision 1.20
diff -c -r1.20 packet-nbipx.c
*** packet-nbipx.c 2000/05/30 03:35:52 1.20
--- packet-nbipx.c 2000/05/30 10:38:01
***************
*** 187,193 ****
}
if (tree) {
! ti = proto_tree_add_item(tree, proto_nbipx, NullTVB, offset, 50, NULL);
nbipx_tree = proto_item_add_subtree(ti, ett_nbipx);
add_routers(nbipx_tree, pd, offset);
--- 187,193 ----
}
if (tree) {
! ti = proto_tree_add_item(tree, proto_nbipx, NullTVB, offset, 50, FALSE);
nbipx_tree = proto_item_add_subtree(ti, ett_nbipx);
add_routers(nbipx_tree, pd, offset);
***************
*** 239,245 ****
if (tree) {
ti = proto_tree_add_item(tree, proto_nbipx, NullTVB, offset,
! 2+NETBIOS_NAME_LEN+NETBIOS_NAME_LEN, NULL);
nbipx_tree = proto_item_add_subtree(ti, ett_nbipx);
proto_tree_add_text(nbipx_tree, NullTVB, offset, 1,
--- 239,245 ----
if (tree) {
ti = proto_tree_add_item(tree, proto_nbipx, NullTVB, offset,
! 2+NETBIOS_NAME_LEN+NETBIOS_NAME_LEN, FALSE);
nbipx_tree = proto_item_add_subtree(ti, ett_nbipx);
proto_tree_add_text(nbipx_tree, NullTVB, offset, 1,
***************
*** 341,347 ****
}
if (tree) {
! ti = proto_tree_add_item(tree, proto_nbipx, NullTVB, offset, 68, NULL);
nbipx_tree = proto_item_add_subtree(ti, ett_nbipx);
add_routers(nbipx_tree, pd, offset);
--- 341,347 ----
}
if (tree) {
! ti = proto_tree_add_item(tree, proto_nbipx, NullTVB, offset, 68, FALSE);
nbipx_tree = proto_item_add_subtree(ti, ett_nbipx);
add_routers(nbipx_tree, pd, offset);
Index: packet-nbns.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-nbns.c,v
retrieving revision 1.42
diff -c -r1.42 packet-nbns.c
*** packet-nbns.c 2000/05/11 08:15:24 1.42
--- packet-nbns.c 2000/05/30 10:38:05
***************
*** 1167,1194 ****
}
if (tree) {
! ti = proto_tree_add_item(tree, proto_nbns, NullTVB, offset, END_OF_FRAME, NULL);
nbns_tree = proto_item_add_subtree(ti, ett_nbns);
if (flags & F_RESPONSE) {
! proto_tree_add_item_hidden(nbns_tree, hf_nbns_response, NullTVB,
0, 0, TRUE);
} else {
! proto_tree_add_item_hidden(nbns_tree, hf_nbns_query, NullTVB,
0, 0, TRUE);
}
! proto_tree_add_item(nbns_tree, hf_nbns_transaction_id, NullTVB,
offset + NBNS_ID, 2, id);
nbns_add_nbns_flags(nbns_tree, offset + NBNS_FLAGS, flags, 0);
! proto_tree_add_item(nbns_tree, hf_nbns_count_questions, NullTVB,
offset + NBNS_QUEST, 2, quest);
! proto_tree_add_item(nbns_tree, hf_nbns_count_answers, NullTVB,
offset + NBNS_ANS, 2, ans);
! proto_tree_add_item(nbns_tree, hf_nbns_count_auth_rr, NullTVB,
offset + NBNS_AUTH, 2, auth);
! proto_tree_add_item(nbns_tree, hf_nbns_count_add_rr, NullTVB,
offset + NBNS_ADD, 2, add);
}
--- 1167,1194 ----
}
if (tree) {
! ti = proto_tree_add_item(tree, proto_nbns, NullTVB, offset, END_OF_FRAME, FALSE);
nbns_tree = proto_item_add_subtree(ti, ett_nbns);
if (flags & F_RESPONSE) {
! proto_tree_add_boolean_hidden(nbns_tree, hf_nbns_response, NullTVB,
0, 0, TRUE);
} else {
! proto_tree_add_boolean_hidden(nbns_tree, hf_nbns_query, NullTVB,
0, 0, TRUE);
}
! proto_tree_add_uint(nbns_tree, hf_nbns_transaction_id, NullTVB,
offset + NBNS_ID, 2, id);
nbns_add_nbns_flags(nbns_tree, offset + NBNS_FLAGS, flags, 0);
! proto_tree_add_uint(nbns_tree, hf_nbns_count_questions, NullTVB,
offset + NBNS_QUEST, 2, quest);
! proto_tree_add_uint(nbns_tree, hf_nbns_count_answers, NullTVB,
offset + NBNS_ANS, 2, ans);
! proto_tree_add_uint(nbns_tree, hf_nbns_count_auth_rr, NullTVB,
offset + NBNS_AUTH, 2, auth);
! proto_tree_add_uint(nbns_tree, hf_nbns_count_add_rr, NullTVB,
offset + NBNS_ADD, 2, add);
}
***************
*** 1325,1331 ****
}
if (tree) {
! ti = proto_tree_add_item(tree, proto_nbdgm, NullTVB, offset, header.dgm_length, NULL);
nbdgm_tree = proto_item_add_subtree(ti, ett_nbdgm);
proto_tree_add_uint_format(nbdgm_tree, hf_nbdgm_type, NullTVB,
--- 1325,1331 ----
}
if (tree) {
! ti = proto_tree_add_item(tree, proto_nbdgm, NullTVB, offset, header.dgm_length, FALSE);
nbdgm_tree = proto_item_add_subtree(ti, ett_nbdgm);
proto_tree_add_uint_format(nbdgm_tree, hf_nbdgm_type, NullTVB,
***************
*** 1349,1359 ****
"Node Type: %s",
node[header.flags.node_type]);
! proto_tree_add_item(nbdgm_tree, hf_nbdgm_datagram_id, NullTVB,
offset+2, 2, header.dgm_id);
! proto_tree_add_item(nbdgm_tree, hf_nbdgm_src_ip, NullTVB,
offset+4, 4, header.src_ip);
! proto_tree_add_item(nbdgm_tree, hf_nbdgm_src_port, NullTVB,
offset+8, 2, header.src_port);
}
--- 1349,1359 ----
"Node Type: %s",
node[header.flags.node_type]);
! proto_tree_add_uint(nbdgm_tree, hf_nbdgm_datagram_id, NullTVB,
offset+2, 2, header.dgm_id);
! proto_tree_add_ipv4(nbdgm_tree, hf_nbdgm_src_ip, NullTVB,
offset+4, 4, header.src_ip);
! proto_tree_add_uint(nbdgm_tree, hf_nbdgm_src_port, NullTVB,
offset+8, 2, header.src_port);
}
***************
*** 1490,1496 ****
}
if (tree) {
! ti = proto_tree_add_item(tree, proto_nbss, NullTVB, offset, length + 4, NULL);
nbss_tree = proto_item_add_subtree(ti, ett_nbss);
proto_tree_add_uint_format(nbss_tree, hf_nbss_type, NullTVB,
--- 1490,1496 ----
}
if (tree) {
! ti = proto_tree_add_item(tree, proto_nbss, NullTVB, offset, length + 4, FALSE);
nbss_tree = proto_item_add_subtree(ti, ett_nbss);
proto_tree_add_uint_format(nbss_tree, hf_nbss_type, NullTVB,
***************
*** 1510,1516 ****
offset += 3;
} else {
if (tree) {
! tf = proto_tree_add_item(nbss_tree, hf_nbss_flags, NullTVB, offset, 1, flags);
field_tree = proto_item_add_subtree(tf, ett_nbss_flags);
proto_tree_add_text(field_tree, NullTVB, offset, 1, "%s",
decode_boolean_bitfield(flags, NBSS_FLAGS_E,
--- 1510,1516 ----
offset += 3;
} else {
if (tree) {
! tf = proto_tree_add_uint(nbss_tree, hf_nbss_flags, NullTVB, offset, 1, flags);
field_tree = proto_item_add_subtree(tf, ett_nbss_flags);
proto_tree_add_text(field_tree, NullTVB, offset, 1, "%s",
decode_boolean_bitfield(flags, NBSS_FLAGS_E,
Index: packet-ncp.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-ncp.c,v
retrieving revision 1.36
diff -c -r1.36 packet-ncp.c
*** packet-ncp.c 2000/05/30 03:35:53 1.36
--- packet-ncp.c 2000/05/30 10:38:07
***************
*** 575,588 ****
nw_ncp_type = header.type;
if (tree) {
! ti = proto_tree_add_item(tree, proto_ncp, NullTVB, offset, END_OF_FRAME, NULL);
ncp_tree = proto_item_add_subtree(ti, ett_ncp);
if ( pi.ptype == PT_TCP || pi.ptype == PT_UDP ) {
! proto_tree_add_item(ncp_tree, hf_ncp_ip_sig, NullTVB, offset - 16, 4, ncpiph.signature);
proto_tree_add_text(ncp_tree, NullTVB, offset - 12, 4, "Length: %d", ncpiph.length);
if ( ncpiph.signature == NCPIP_RQST ) {
! proto_tree_add_item(ncp_tree, hf_ncp_ip_ver, NullTVB, offset - 8, 4, ncpiphrq.version);
proto_tree_add_text(ncp_tree, NullTVB, offset - 4, 4, "Reply buffer size: %d", ncpiphrq.rplybufsize);
};
};
--- 575,588 ----
nw_ncp_type = header.type;
if (tree) {
! ti = proto_tree_add_item(tree, proto_ncp, NullTVB, offset, END_OF_FRAME, FALSE);
ncp_tree = proto_item_add_subtree(ti, ett_ncp);
if ( pi.ptype == PT_TCP || pi.ptype == PT_UDP ) {
! proto_tree_add_uint(ncp_tree, hf_ncp_ip_sig, NullTVB, offset - 16, 4, ncpiph.signature);
proto_tree_add_text(ncp_tree, NullTVB, offset - 12, 4, "Length: %d", ncpiph.length);
if ( ncpiph.signature == NCPIP_RQST ) {
! proto_tree_add_uint(ncp_tree, hf_ncp_ip_ver, NullTVB, offset - 8, 4, ncpiphrq.version);
proto_tree_add_text(ncp_tree, NullTVB, offset - 4, 4, "Reply buffer size: %d", ncpiphrq.rplybufsize);
};
};
***************
*** 594,606 ****
request_reply_values,
"Unknown (%04X)"));
! proto_tree_add_item(ncp_tree, hf_ncp_seq, NullTVB,
offset+2, 1, header.sequence);
! proto_tree_add_item(ncp_tree, hf_ncp_connection, NullTVB,
offset+3, 3, nw_connection);
! proto_tree_add_item(ncp_tree, hf_ncp_task, NullTVB,
offset+4, 1, header.task);
}
--- 594,606 ----
request_reply_values,
"Unknown (%04X)"));
! proto_tree_add_uint(ncp_tree, hf_ncp_seq, NullTVB,
offset+2, 1, header.sequence);
! proto_tree_add_uint(ncp_tree, hf_ncp_connection, NullTVB,
offset+3, 3, nw_connection);
! proto_tree_add_uint(ncp_tree, hf_ncp_task, NullTVB,
offset+4, 1, header.task);
}
Index: packet-netbios.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-netbios.c,v
retrieving revision 1.19
diff -c -r1.19 packet-netbios.c
*** packet-netbios.c 2000/05/11 08:15:28 1.19
--- packet-netbios.c 2000/05/30 10:38:10
***************
*** 986,992 ****
if (tree) {
ti = proto_tree_add_item(tree, proto_netbios, NullTVB,
! offset, END_OF_FRAME, NULL);
netb_tree = proto_item_add_subtree(ti, ett_netb);
proto_tree_add_text( netb_tree, NullTVB, offset,
--- 986,992 ----
if (tree) {
ti = proto_tree_add_item(tree, proto_netbios, NullTVB,
! offset, END_OF_FRAME, FALSE);
netb_tree = proto_item_add_subtree(ti, ett_netb);
proto_tree_add_text( netb_tree, NullTVB, offset,
***************
*** 1030,1036 ****
if (tree) {
! ti = proto_tree_add_item(tree, proto_netbios, NullTVB, offset, END_OF_FRAME, NULL);
netb_tree = proto_item_add_subtree(ti, ett_netb);
--- 1030,1036 ----
if (tree) {
! ti = proto_tree_add_item(tree, proto_netbios, NullTVB, offset, END_OF_FRAME, FALSE);
netb_tree = proto_item_add_subtree(ti, ett_netb);
Index: packet-nfs.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-nfs.c,v
retrieving revision 1.27
diff -c -r1.27 packet-nfs.c
*** packet-nfs.c 2000/05/11 08:15:28 1.27
--- packet-nfs.c 2000/05/30 10:38:16
***************
*** 663,673 ****
count = EXTRACT_UINT(pd, offset+4);
totalcount = EXTRACT_UINT(pd, offset+8);
if (tree) {
! proto_tree_add_item(tree, hf_nfs_read_offset, NullTVB,
offset+0, 4, offset_value);
! proto_tree_add_item(tree, hf_nfs_read_count, NullTVB,
offset+4, 4, count);
! proto_tree_add_item(tree, hf_nfs_read_totalcount, NullTVB,
offset+8, 4, totalcount);
}
offset += 12;
--- 663,673 ----
count = EXTRACT_UINT(pd, offset+4);
totalcount = EXTRACT_UINT(pd, offset+8);
if (tree) {
! proto_tree_add_uint(tree, hf_nfs_read_offset, NullTVB,
offset+0, 4, offset_value);
! proto_tree_add_uint(tree, hf_nfs_read_count, NullTVB,
offset+4, 4, count);
! proto_tree_add_uint(tree, hf_nfs_read_totalcount, NullTVB,
offset+8, 4, totalcount);
}
offset += 12;
***************
*** 711,721 ****
offset_value = EXTRACT_UINT(pd, offset+4);
totalcount = EXTRACT_UINT(pd, offset+8);
if (tree) {
! proto_tree_add_item(tree, hf_nfs_write_beginoffset, NullTVB,
offset+0, 4, beginoffset);
! proto_tree_add_item(tree, hf_nfs_write_offset, NullTVB,
offset+4, 4, offset_value);
! proto_tree_add_item(tree, hf_nfs_write_totalcount, NullTVB,
offset+8, 4, totalcount);
}
offset += 12;
--- 711,721 ----
offset_value = EXTRACT_UINT(pd, offset+4);
totalcount = EXTRACT_UINT(pd, offset+8);
if (tree) {
! proto_tree_add_uint(tree, hf_nfs_write_beginoffset, NullTVB,
offset+0, 4, beginoffset);
! proto_tree_add_uint(tree, hf_nfs_write_offset, NullTVB,
offset+4, 4, offset_value);
! proto_tree_add_uint(tree, hf_nfs_write_totalcount, NullTVB,
offset+8, 4, totalcount);
}
offset += 12;
***************
*** 783,791 ****
cookie = EXTRACT_UINT(pd, offset+ 0);
count = EXTRACT_UINT(pd, offset+ 4);
if (tree) {
! proto_tree_add_item(tree, hf_nfs_readdir_cookie, NullTVB,
offset+ 0, 4, cookie);
! proto_tree_add_item(tree, hf_nfs_readdir_count, NullTVB,
offset+ 4, 4, count);
}
offset += 8;
--- 783,791 ----
cookie = EXTRACT_UINT(pd, offset+ 0);
count = EXTRACT_UINT(pd, offset+ 4);
if (tree) {
! proto_tree_add_uint(tree, hf_nfs_readdir_cookie, NullTVB,
offset+ 0, 4, cookie);
! proto_tree_add_uint(tree, hf_nfs_readdir_count, NullTVB,
offset+ 4, 4, count);
}
offset += 8;
***************
*** 807,813 ****
if (tree) {
entry_item = proto_tree_add_item(tree, hf_nfs_readdir_entry, NullTVB,
! offset+0, END_OF_FRAME, NULL);
if (entry_item)
entry_tree = proto_item_add_subtree(entry_item, ett_nfs_readdir_entry);
}
--- 807,813 ----
if (tree) {
entry_item = proto_tree_add_item(tree, hf_nfs_readdir_entry, NullTVB,
! offset+0, END_OF_FRAME, FALSE);
if (entry_item)
entry_tree = proto_item_add_subtree(entry_item, ett_nfs_readdir_entry);
}
***************
*** 818,824 ****
}
fileid = EXTRACT_UINT(pd, offset + 0);
if (entry_tree)
! proto_tree_add_item(entry_tree, hf_nfs_readdir_entry_fileid, NullTVB,
offset+0, 4, fileid);
offset += 4;
--- 818,824 ----
}
fileid = EXTRACT_UINT(pd, offset + 0);
if (entry_tree)
! proto_tree_add_uint(entry_tree, hf_nfs_readdir_entry_fileid, NullTVB,
offset+0, 4, fileid);
offset += 4;
***************
*** 832,838 ****
if (!BYTES_ARE_IN_FRAME(offset, 4)) return offset;
cookie = EXTRACT_UINT(pd, offset + 0);
if (entry_tree)
! proto_tree_add_item(entry_tree, hf_nfs_readdir_entry_cookie, NullTVB,
offset+0, 4, cookie);
offset += 4;
--- 832,838 ----
if (!BYTES_ARE_IN_FRAME(offset, 4)) return offset;
cookie = EXTRACT_UINT(pd, offset + 0);
if (entry_tree)
! proto_tree_add_uint(entry_tree, hf_nfs_readdir_entry_cookie, NullTVB,
offset+0, 4, cookie);
offset += 4;
***************
*** 858,864 ****
while (1) {
if (!BYTES_ARE_IN_FRAME(offset,4)) break;
value_follows = EXTRACT_UINT(pd, offset+0);
! proto_tree_add_item(tree,hf_nfs_readdir_value_follows, NullTVB,
offset+0, 4, value_follows);
offset += 4;
if (value_follows == 1) {
--- 858,864 ----
while (1) {
if (!BYTES_ARE_IN_FRAME(offset,4)) break;
value_follows = EXTRACT_UINT(pd, offset+0);
! proto_tree_add_boolean(tree,hf_nfs_readdir_value_follows, NullTVB,
offset+0, 4, value_follows);
offset += 4;
if (value_follows == 1) {
***************
*** 871,877 ****
if (!BYTES_ARE_IN_FRAME(offset,4)) return offset;
eof_value = EXTRACT_UINT(pd, offset+0);
if (tree)
! proto_tree_add_item(tree, hf_nfs_readdir_eof, NullTVB,
offset+ 0, 4, eof_value);
offset += 4;
break;
--- 871,877 ----
if (!BYTES_ARE_IN_FRAME(offset,4)) return offset;
eof_value = EXTRACT_UINT(pd, offset+0);
if (tree)
! proto_tree_add_uint(tree, hf_nfs_readdir_eof, NullTVB,
offset+ 0, 4, eof_value);
offset += 4;
break;
***************
*** 905,919 ****
bfree = EXTRACT_UINT(pd, offset+12);
bavail = EXTRACT_UINT(pd, offset+16);
if (tree) {
! proto_tree_add_item(tree, hf_nfs_statfs_tsize, NullTVB,
offset+ 0, 4, tsize);
! proto_tree_add_item(tree, hf_nfs_statfs_bsize, NullTVB,
offset+ 4, 4, bsize);
! proto_tree_add_item(tree, hf_nfs_statfs_blocks, NullTVB,
offset+ 8, 4, blocks);
! proto_tree_add_item(tree, hf_nfs_statfs_bfree, NullTVB,
offset+12, 4, bfree);
! proto_tree_add_item(tree, hf_nfs_statfs_bavail, NullTVB,
offset+16, 4, bavail);
}
offset += 20;
--- 905,919 ----
bfree = EXTRACT_UINT(pd, offset+12);
bavail = EXTRACT_UINT(pd, offset+16);
if (tree) {
! proto_tree_add_uint(tree, hf_nfs_statfs_tsize, NullTVB,
offset+ 0, 4, tsize);
! proto_tree_add_uint(tree, hf_nfs_statfs_bsize, NullTVB,
offset+ 4, 4, bsize);
! proto_tree_add_uint(tree, hf_nfs_statfs_blocks, NullTVB,
offset+ 8, 4, blocks);
! proto_tree_add_uint(tree, hf_nfs_statfs_bfree, NullTVB,
offset+12, 4, bfree);
! proto_tree_add_uint(tree, hf_nfs_statfs_bavail, NullTVB,
offset+16, 4, bavail);
}
offset += 20;
***************
*** 1219,1225 ****
nfsstat3 = EXTRACT_UINT(pd, offset+0);
if (tree) {
! proto_tree_add_item(tree, hf_nfs_nfsstat3, NullTVB,
offset, 4, nfsstat3);
}
--- 1219,1225 ----
nfsstat3 = EXTRACT_UINT(pd, offset+0);
if (tree) {
! proto_tree_add_uint(tree, hf_nfs_nfsstat3, NullTVB,
offset, 4, nfsstat3);
}
***************
*** 1253,1259 ****
type = EXTRACT_UINT(pd, offset+0);
if (tree) {
! proto_tree_add_item(tree, hf, NullTVB, offset, 4, type);
}
offset += 4;
--- 1253,1259 ----
type = EXTRACT_UINT(pd, offset+0);
if (tree) {
! proto_tree_add_uint(tree, hf, NullTVB, offset, 4, type);
}
offset += 4;
***************
*** 2249,2255 ****
if (!BYTES_ARE_IN_FRAME(offset,4)) return offset;
stable_how = EXTRACT_UINT(pd,offset+0);
if (tree) {
! proto_tree_add_item(tree, hfindex, NullTVB,
offset, 4, stable_how);
}
offset += 4;
--- 2249,2255 ----
if (!BYTES_ARE_IN_FRAME(offset,4)) return offset;
stable_how = EXTRACT_UINT(pd,offset+0);
if (tree) {
! proto_tree_add_uint(tree, hfindex, NullTVB,
offset, 4, stable_how);
}
offset += 4;
***************
*** 2313,2319 ****
if (!BYTES_ARE_IN_FRAME(offset, 4)) return offset;
mode_value = EXTRACT_UINT(pd, offset + 0);
if (tree) {
! proto_tree_add_item(tree, hf_nfs_createmode3, NullTVB,
offset+0, 4, mode_value);
}
offset += 4;
--- 2313,2319 ----
if (!BYTES_ARE_IN_FRAME(offset, 4)) return offset;
mode_value = EXTRACT_UINT(pd, offset + 0);
if (tree) {
! proto_tree_add_uint(tree, hf_nfs_createmode3, NullTVB,
offset+0, 4, mode_value);
}
offset += 4;
***************
*** 2527,2533 ****
if (tree) {
entry_item = proto_tree_add_item(tree, hf_nfs_readdir_entry, NullTVB,
! offset+0, END_OF_FRAME, NULL);
if (entry_item)
entry_tree = proto_item_add_subtree(entry_item, ett_nfs_readdir_entry);
}
--- 2527,2533 ----
if (tree) {
entry_item = proto_tree_add_item(tree, hf_nfs_readdir_entry, NullTVB,
! offset+0, END_OF_FRAME, FALSE);
if (entry_item)
entry_tree = proto_item_add_subtree(entry_item, ett_nfs_readdir_entry);
}
***************
*** 2567,2573 ****
while (1) {
if (!BYTES_ARE_IN_FRAME(offset,4)) break;
value_follows = EXTRACT_UINT(pd, offset+0);
! proto_tree_add_item(tree,hf_nfs_readdir_value_follows, NullTVB,
offset+0, 4, value_follows);
offset += 4;
if (value_follows == 1) {
--- 2567,2573 ----
while (1) {
if (!BYTES_ARE_IN_FRAME(offset,4)) break;
value_follows = EXTRACT_UINT(pd, offset+0);
! proto_tree_add_boolean(tree,hf_nfs_readdir_value_follows, NullTVB,
offset+0, 4, value_follows);
offset += 4;
if (value_follows == 1) {
***************
*** 2580,2586 ****
if (!BYTES_ARE_IN_FRAME(offset,4)) return offset;
eof_value = EXTRACT_UINT(pd, offset+0);
if (tree)
! proto_tree_add_item(tree, hf_nfs_readdir_eof, NullTVB,
offset+ 0, 4, eof_value);
offset += 4;
break;
--- 2580,2586 ----
if (!BYTES_ARE_IN_FRAME(offset,4)) return offset;
eof_value = EXTRACT_UINT(pd, offset+0);
if (tree)
! proto_tree_add_uint(tree, hf_nfs_readdir_eof, NullTVB,
offset+ 0, 4, eof_value);
offset += 4;
break;
***************
*** 2618,2624 ****
if (tree) {
entry_item = proto_tree_add_item(tree, hf_nfs_readdir_entry, NullTVB,
! offset+0, END_OF_FRAME, NULL);
if (entry_item)
entry_tree = proto_item_add_subtree(entry_item, ett_nfs_readdir_entry);
}
--- 2618,2624 ----
if (tree) {
entry_item = proto_tree_add_item(tree, hf_nfs_readdir_entry, NullTVB,
! offset+0, END_OF_FRAME, FALSE);
if (entry_item)
entry_tree = proto_item_add_subtree(entry_item, ett_nfs_readdir_entry);
}
***************
*** 2661,2667 ****
while (1) {
if (!BYTES_ARE_IN_FRAME(offset,4)) break;
value_follows = EXTRACT_UINT(pd, offset+0);
! proto_tree_add_item(tree,hf_nfs_readdir_value_follows, NullTVB,
offset+0, 4, value_follows);
offset += 4;
if (value_follows == 1) {
--- 2661,2667 ----
while (1) {
if (!BYTES_ARE_IN_FRAME(offset,4)) break;
value_follows = EXTRACT_UINT(pd, offset+0);
! proto_tree_add_boolean(tree,hf_nfs_readdir_value_follows, NullTVB,
offset+0, 4, value_follows);
offset += 4;
if (value_follows == 1) {
***************
*** 2674,2680 ****
if (!BYTES_ARE_IN_FRAME(offset,4)) return offset;
eof_value = EXTRACT_UINT(pd, offset+0);
if (tree)
! proto_tree_add_item(tree, hf_nfs_readdir_eof, NullTVB,
offset+ 0, 4, eof_value);
offset += 4;
break;
--- 2674,2680 ----
if (!BYTES_ARE_IN_FRAME(offset,4)) return offset;
eof_value = EXTRACT_UINT(pd, offset+0);
if (tree)
! proto_tree_add_uint(tree, hf_nfs_readdir_eof, NullTVB,
offset+ 0, 4, eof_value);
offset += 4;
break;
***************
*** 2707,2713 ****
if (!BYTES_ARE_IN_FRAME(offset, 4)) return offset;
invarsec = EXTRACT_UINT(pd, offset + 0);
if (tree)
! proto_tree_add_item(tree, hf_nfs_fsstat_invarsec, NullTVB,
offset+0, 4, invarsec);
offset += 4;
break;
--- 2707,2713 ----
if (!BYTES_ARE_IN_FRAME(offset, 4)) return offset;
invarsec = EXTRACT_UINT(pd, offset + 0);
if (tree)
! proto_tree_add_uint(tree, hf_nfs_fsstat_invarsec, NullTVB,
offset+0, 4, invarsec);
offset += 4;
break;
***************
*** 2749,2791 ****
if (!BYTES_ARE_IN_FRAME(offset,4)) return offset;
rtmax = EXTRACT_UINT(pd, offset+0);
if (tree)
! proto_tree_add_item(tree, hf_nfs_fsinfo_rtmax, NullTVB,
offset+0, 4, rtmax);
offset += 4;
if (!BYTES_ARE_IN_FRAME(offset,4)) return offset;
rtpref = EXTRACT_UINT(pd, offset+0);
if (tree)
! proto_tree_add_item(tree, hf_nfs_fsinfo_rtpref, NullTVB,
offset+0, 4, rtpref);
offset += 4;
if (!BYTES_ARE_IN_FRAME(offset,4)) return offset;
rtmult = EXTRACT_UINT(pd, offset+0);
if (tree)
! proto_tree_add_item(tree, hf_nfs_fsinfo_rtmult, NullTVB,
offset+0, 4, rtmult);
offset += 4;
if (!BYTES_ARE_IN_FRAME(offset,4)) return offset;
wtmax = EXTRACT_UINT(pd, offset+0);
if (tree)
! proto_tree_add_item(tree, hf_nfs_fsinfo_wtmax, NullTVB,
offset+0, 4, wtmax);
offset += 4;
if (!BYTES_ARE_IN_FRAME(offset,4)) return offset;
wtpref = EXTRACT_UINT(pd, offset+0);
if (tree)
! proto_tree_add_item(tree, hf_nfs_fsinfo_wtpref, NullTVB,
offset+0, 4, wtpref);
offset += 4;
if (!BYTES_ARE_IN_FRAME(offset,4)) return offset;
wtmult = EXTRACT_UINT(pd, offset+0);
if (tree)
! proto_tree_add_item(tree, hf_nfs_fsinfo_wtmult, NullTVB,
offset+0, 4, wtmult);
offset += 4;
if (!BYTES_ARE_IN_FRAME(offset,4)) return offset;
dtpref = EXTRACT_UINT(pd, offset+0);
if (tree)
! proto_tree_add_item(tree, hf_nfs_fsinfo_dtpref, NullTVB,
offset+0, 4, dtpref);
offset += 4;
--- 2749,2791 ----
if (!BYTES_ARE_IN_FRAME(offset,4)) return offset;
rtmax = EXTRACT_UINT(pd, offset+0);
if (tree)
! proto_tree_add_uint(tree, hf_nfs_fsinfo_rtmax, NullTVB,
offset+0, 4, rtmax);
offset += 4;
if (!BYTES_ARE_IN_FRAME(offset,4)) return offset;
rtpref = EXTRACT_UINT(pd, offset+0);
if (tree)
! proto_tree_add_uint(tree, hf_nfs_fsinfo_rtpref, NullTVB,
offset+0, 4, rtpref);
offset += 4;
if (!BYTES_ARE_IN_FRAME(offset,4)) return offset;
rtmult = EXTRACT_UINT(pd, offset+0);
if (tree)
! proto_tree_add_uint(tree, hf_nfs_fsinfo_rtmult, NullTVB,
offset+0, 4, rtmult);
offset += 4;
if (!BYTES_ARE_IN_FRAME(offset,4)) return offset;
wtmax = EXTRACT_UINT(pd, offset+0);
if (tree)
! proto_tree_add_uint(tree, hf_nfs_fsinfo_wtmax, NullTVB,
offset+0, 4, wtmax);
offset += 4;
if (!BYTES_ARE_IN_FRAME(offset,4)) return offset;
wtpref = EXTRACT_UINT(pd, offset+0);
if (tree)
! proto_tree_add_uint(tree, hf_nfs_fsinfo_wtpref, NullTVB,
offset+0, 4, wtpref);
offset += 4;
if (!BYTES_ARE_IN_FRAME(offset,4)) return offset;
wtmult = EXTRACT_UINT(pd, offset+0);
if (tree)
! proto_tree_add_uint(tree, hf_nfs_fsinfo_wtmult, NullTVB,
offset+0, 4, wtmult);
offset += 4;
if (!BYTES_ARE_IN_FRAME(offset,4)) return offset;
dtpref = EXTRACT_UINT(pd, offset+0);
if (tree)
! proto_tree_add_uint(tree, hf_nfs_fsinfo_dtpref, NullTVB,
offset+0, 4, dtpref);
offset += 4;
***************
*** 2794,2800 ****
if (!BYTES_ARE_IN_FRAME(offset,4)) return offset;
properties = EXTRACT_UINT(pd, offset+0);
if (tree) {
! properties_item = proto_tree_add_item(tree,
hf_nfs_fsinfo_properties,
NullTVB, offset+0, 4, properties);
if (properties_item)
--- 2794,2800 ----
if (!BYTES_ARE_IN_FRAME(offset,4)) return offset;
properties = EXTRACT_UINT(pd, offset+0);
if (tree) {
! properties_item = proto_tree_add_uint(tree,
hf_nfs_fsinfo_properties,
NullTVB, offset+0, 4, properties);
if (properties_item)
***************
*** 2855,2867 ****
if (!BYTES_ARE_IN_FRAME(offset, 4)) return offset;
linkmax = EXTRACT_UINT(pd, offset + 0);
if (tree)
! proto_tree_add_item(tree, hf_nfs_pathconf_linkmax, NullTVB,
offset+0, 4, linkmax);
offset += 4;
if (!BYTES_ARE_IN_FRAME(offset, 4)) return offset;
name_max = EXTRACT_UINT(pd, offset + 0);
if (tree)
! proto_tree_add_item(tree, hf_nfs_pathconf_name_max, NullTVB,
offset+0, 4, name_max);
offset += 4;
offset = dissect_rpc_bool(pd, offset, fd, tree, hf_nfs_pathconf_no_trunc);
--- 2855,2867 ----
if (!BYTES_ARE_IN_FRAME(offset, 4)) return offset;
linkmax = EXTRACT_UINT(pd, offset + 0);
if (tree)
! proto_tree_add_uint(tree, hf_nfs_pathconf_linkmax, NullTVB,
offset+0, 4, linkmax);
offset += 4;
if (!BYTES_ARE_IN_FRAME(offset, 4)) return offset;
name_max = EXTRACT_UINT(pd, offset + 0);
if (tree)
! proto_tree_add_uint(tree, hf_nfs_pathconf_name_max, NullTVB,
offset+0, 4, name_max);
offset += 4;
offset = dissect_rpc_bool(pd, offset, fd, tree, hf_nfs_pathconf_no_trunc);
Index: packet-nntp.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-nntp.c,v
retrieving revision 1.9
diff -c -r1.9 packet-nntp.c
*** packet-nntp.c 2000/05/11 08:15:30 1.9
--- packet-nntp.c 2000/05/30 10:38:16
***************
*** 84,96 ****
if (tree) {
! ti = proto_tree_add_item(tree, proto_nntp, NullTVB, offset, END_OF_FRAME, NULL);
nntp_tree = proto_item_add_subtree(ti, ett_nntp);
if (pi.match_port == pi.destport) {
! proto_tree_add_item_hidden(nntp_tree, hf_nntp_request, NullTVB, 0, 0, TRUE);
} else {
! proto_tree_add_item_hidden(nntp_tree, hf_nntp_response, NullTVB, 0, 0, TRUE);
}
/*
--- 84,96 ----
if (tree) {
! ti = proto_tree_add_item(tree, proto_nntp, NullTVB, offset, END_OF_FRAME, FALSE);
nntp_tree = proto_item_add_subtree(ti, ett_nntp);
if (pi.match_port == pi.destport) {
! proto_tree_add_boolean_hidden(nntp_tree, hf_nntp_request, NullTVB, 0, 0, TRUE);
} else {
! proto_tree_add_boolean_hidden(nntp_tree, hf_nntp_response, NullTVB, 0, 0, TRUE);
}
/*
Index: packet-ntp.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-ntp.c,v
retrieving revision 1.12
diff -c -r1.12 packet-ntp.c
*** packet-ntp.c 2000/05/11 08:15:30 1.12
--- packet-ntp.c 2000/05/30 10:38:18
***************
*** 255,263 ****
if (tree) {
/* Adding NTP item and subtree */
! ti = proto_tree_add_item(tree, proto_ntp, NullTVB, offset, END_OF_FRAME, NULL);
ntp_tree = proto_item_add_subtree(ti, ett_ntp);
! tf = proto_tree_add_item(ntp_tree, hf_ntp_flags, NullTVB, offset, 1, pkt->flags);
/* Adding flag subtree and items */
flags_tree = proto_item_add_subtree(tf, ett_ntp_flags);
--- 255,263 ----
if (tree) {
/* Adding NTP item and subtree */
! ti = proto_tree_add_item(tree, proto_ntp, NullTVB, offset, END_OF_FRAME, FALSE);
ntp_tree = proto_item_add_subtree(ti, ett_ntp);
! tf = proto_tree_add_bytes(ntp_tree, hf_ntp_flags, NullTVB, offset, 1, pkt->flags);
/* Adding flag subtree and items */
flags_tree = proto_item_add_subtree(tf, ett_ntp_flags);
***************
*** 368,376 ****
* hex code for now.
*/
if ( BYTES_ARE_IN_FRAME(offset, 50) )
! proto_tree_add_item(ntp_tree, hf_ntp_keyid, NullTVB, offset+48, 4, pkt->keyid);
if ( BYTES_ARE_IN_FRAME(offset, 53) )
! proto_tree_add_item(ntp_tree, hf_ntp_mac, NullTVB, offset+52, END_OF_FRAME, pkt->mac);
}
}
--- 368,376 ----
* hex code for now.
*/
if ( BYTES_ARE_IN_FRAME(offset, 50) )
! proto_tree_add_bytes(ntp_tree, hf_ntp_keyid, NullTVB, offset+48, 4, pkt->keyid);
if ( BYTES_ARE_IN_FRAME(offset, 53) )
! proto_tree_add_bytes(ntp_tree, hf_ntp_mac, NullTVB, offset+52, END_OF_FRAME, pkt->mac);
}
}
Index: packet-null.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-null.c,v
retrieving revision 1.24
diff -c -r1.24 packet-null.c
*** packet-null.c 2000/05/25 07:42:24 1.24
--- packet-null.c 2000/05/30 10:38:19
***************
*** 272,278 ****
*/
if (null_header > IEEE_802_3_MAX_LEN) {
if (tree) {
! ti = proto_tree_add_item(tree, proto_null, tvb, 0, 4, NULL);
fh_tree = proto_item_add_subtree(ti, ett_null);
} else
fh_tree = NULL;
--- 272,278 ----
*/
if (null_header > IEEE_802_3_MAX_LEN) {
if (tree) {
! ti = proto_tree_add_item(tree, proto_null, tvb, 0, 4, FALSE);
fh_tree = proto_item_add_subtree(ti, ett_null);
} else
fh_tree = NULL;
***************
*** 281,289 ****
/* populate a tree in the second pane with the status of the link
layer (ie none) */
if (tree) {
! ti = proto_tree_add_item(tree, proto_null, tvb, 0, 4, NULL);
fh_tree = proto_item_add_subtree(ti, ett_null);
! proto_tree_add_item(fh_tree, hf_null_family, tvb, 0, 4, null_header);
}
next_tvb = tvb_new_subset(tvb, 4, -1, -1);
--- 281,289 ----
/* populate a tree in the second pane with the status of the link
layer (ie none) */
if (tree) {
! ti = proto_tree_add_item(tree, proto_null, tvb, 0, 4, FALSE);
fh_tree = proto_item_add_subtree(ti, ett_null);
! proto_tree_add_uint(fh_tree, hf_null_family, tvb, 0, 4, null_header);
}
next_tvb = tvb_new_subset(tvb, 4, -1, -1);
Index: packet-ospf.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-ospf.c,v
retrieving revision 1.23
diff -c -r1.23 packet-ospf.c
*** packet-ospf.c 2000/05/11 08:15:32 1.23
--- packet-ospf.c 2000/05/30 10:38:21
***************
*** 111,117 ****
}
if (tree) {
! ti = proto_tree_add_item(tree, proto_ospf, NullTVB, offset, ntohs(ospfh.length), NULL);
ospf_tree = proto_item_add_subtree(ti, ett_ospf);
ti = proto_tree_add_text(ospf_tree, NullTVB, offset, OSPF_HEADER_LENGTH, "OSPF Header");
--- 111,117 ----
}
if (tree) {
! ti = proto_tree_add_item(tree, proto_ospf, NullTVB, offset, ntohs(ospfh.length), FALSE);
ospf_tree = proto_item_add_subtree(ti, ett_ospf);
ti = proto_tree_add_text(ospf_tree, NullTVB, offset, OSPF_HEADER_LENGTH, "OSPF Header");
Index: packet-pim.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-pim.c,v
retrieving revision 1.13
diff -c -r1.13 packet-pim.c
*** packet-pim.c 2000/05/11 08:15:33 1.13
--- packet-pim.c 2000/05/30 10:38:22
***************
*** 218,233 ****
col_add_fstr(fd, COL_INFO, "%s", typestr);
if (tree) {
! ti = proto_tree_add_item(tree, proto_pim, NullTVB, offset, END_OF_FRAME, NULL);
pim_tree = proto_item_add_subtree(ti, ett_pim);
! proto_tree_add_item(pim_tree, hf_pim_version, NullTVB, offset, 1,
PIM_VER(pim.pim_typever));
proto_tree_add_uint_format(pim_tree, hf_pim_type, NullTVB, offset, 1,
PIM_TYPE(pim.pim_typever),
"Type: %s (%u)", typestr, PIM_TYPE(pim.pim_typever));
! proto_tree_add_item(pim_tree, hf_pim_cksum, NullTVB,
offset + offsetof(struct pim, pim_cksum), sizeof(pim.pim_cksum),
ntohs(pim.pim_cksum));
--- 218,233 ----
col_add_fstr(fd, COL_INFO, "%s", typestr);
if (tree) {
! ti = proto_tree_add_item(tree, proto_pim, NullTVB, offset, END_OF_FRAME, FALSE);
pim_tree = proto_item_add_subtree(ti, ett_pim);
! proto_tree_add_uint(pim_tree, hf_pim_version, NullTVB, offset, 1,
PIM_VER(pim.pim_typever));
proto_tree_add_uint_format(pim_tree, hf_pim_type, NullTVB, offset, 1,
PIM_TYPE(pim.pim_typever),
"Type: %s (%u)", typestr, PIM_TYPE(pim.pim_typever));
! proto_tree_add_uint(pim_tree, hf_pim_cksum, NullTVB,
offset + offsetof(struct pim, pim_cksum), sizeof(pim.pim_cksum),
ntohs(pim.pim_cksum));
Index: packet-pop.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-pop.c,v
retrieving revision 1.14
diff -c -r1.14 packet-pop.c
*** packet-pop.c 2000/05/11 08:15:33 1.14
--- packet-pop.c 2000/05/30 10:38:23
***************
*** 101,111 ****
if (tree) {
! ti = proto_tree_add_item(tree, proto_pop, NullTVB, offset, END_OF_FRAME, NULL);
pop_tree = proto_item_add_subtree(ti, ett_pop);
if (pi.match_port == pi.destport) { /* Request */
! proto_tree_add_item_hidden(pop_tree, hf_pop_request, NullTVB, offset, i1, TRUE);
proto_tree_add_text(pop_tree, NullTVB, offset, i1, "Request: %s", rr);
if (strlen(rd) != 0)
--- 101,111 ----
if (tree) {
! ti = proto_tree_add_item(tree, proto_pop, NullTVB, offset, END_OF_FRAME, FALSE);
pop_tree = proto_item_add_subtree(ti, ett_pop);
if (pi.match_port == pi.destport) { /* Request */
! proto_tree_add_boolean_hidden(pop_tree, hf_pop_request, NullTVB, offset, i1, TRUE);
proto_tree_add_text(pop_tree, NullTVB, offset, i1, "Request: %s", rr);
if (strlen(rd) != 0)
***************
*** 113,119 ****
}
else {
! proto_tree_add_item_hidden(pop_tree, hf_pop_response, NullTVB, offset, i1, TRUE);
if (is_continuation(pd+offset))
dissect_data(pd, offset, fd, pop_tree);
--- 113,119 ----
}
else {
! proto_tree_add_boolean_hidden(pop_tree, hf_pop_response, NullTVB, offset, i1, TRUE);
if (is_continuation(pd+offset))
dissect_data(pd, offset, fd, pop_tree);
Index: packet-portmap.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-portmap.c,v
retrieving revision 1.15
diff -c -r1.15 packet-portmap.c
*** packet-portmap.c 2000/05/11 08:15:34 1.15
--- packet-portmap.c 2000/05/30 10:38:24
***************
*** 77,90 ****
proto_tree_add_uint_format(tree, hf_portmap_prog, NullTVB,
offset, 4, prog, "Program: %s (%u)",
rpc_prog_name(prog), prog);
! proto_tree_add_item(tree, hf_portmap_version, NullTVB,
offset+4, 4, pntohl(&pd[offset+4]));
proto = pntohl(&pd[offset+8]);
proto_tree_add_uint_format(tree, hf_portmap_proto, NullTVB,
offset+8, 4, proto, "Proto: %s (%u)", ipprotostr(proto), proto);
! proto_tree_add_item(tree, hf_portmap_port, NullTVB,
offset+12, 4, pntohl(&pd[offset+12]));
}
--- 77,90 ----
proto_tree_add_uint_format(tree, hf_portmap_prog, NullTVB,
offset, 4, prog, "Program: %s (%u)",
rpc_prog_name(prog), prog);
! proto_tree_add_uint(tree, hf_portmap_version, NullTVB,
offset+4, 4, pntohl(&pd[offset+4]));
proto = pntohl(&pd[offset+8]);
proto_tree_add_uint_format(tree, hf_portmap_proto, NullTVB,
offset+8, 4, proto, "Proto: %s (%u)", ipprotostr(proto), proto);
! proto_tree_add_uint(tree, hf_portmap_port, NullTVB,
offset+12, 4, pntohl(&pd[offset+12]));
}
***************
*** 97,103 ****
if ( !BYTES_ARE_IN_FRAME(offset, 4)) return offset;
if ( tree )
{
! proto_tree_add_item(tree, hf_portmap_port, NullTVB,
offset, 4, pntohl(&pd[offset+0]));
}
return offset+=4;
--- 97,103 ----
if ( !BYTES_ARE_IN_FRAME(offset, 4)) return offset;
if ( tree )
{
! proto_tree_add_uint(tree, hf_portmap_port, NullTVB,
offset, 4, pntohl(&pd[offset+0]));
}
return offset+=4;
***************
*** 117,130 ****
proto_tree_add_uint_format(tree, hf_portmap_prog, NullTVB,
offset, 4, prog, "Program: %s (%d)",
rpc_prog_name(prog), prog);
! proto_tree_add_item(tree, hf_portmap_version, NullTVB,
offset+4, 4, pntohl(&pd[offset+4]));
proto = pntohl(&pd[offset+8]);
proto_tree_add_uint_format(tree, hf_portmap_proto, NullTVB,
offset+8, 4, proto, "Proto: %s (%d)", ipprotostr(proto), proto);
! proto_tree_add_item(tree, hf_portmap_port, NullTVB,
offset+12, 4, pntohl(&pd[offset+12]));
}
--- 117,130 ----
proto_tree_add_uint_format(tree, hf_portmap_prog, NullTVB,
offset, 4, prog, "Program: %s (%d)",
rpc_prog_name(prog), prog);
! proto_tree_add_uint(tree, hf_portmap_version, NullTVB,
offset+4, 4, pntohl(&pd[offset+4]));
proto = pntohl(&pd[offset+8]);
proto_tree_add_uint_format(tree, hf_portmap_proto, NullTVB,
offset+8, 4, proto, "Proto: %s (%d)", ipprotostr(proto), proto);
! proto_tree_add_uint(tree, hf_portmap_port, NullTVB,
offset+12, 4, pntohl(&pd[offset+12]));
}
***************
*** 145,158 ****
proto_tree_add_uint_format(tree, hf_portmap_prog, NullTVB,
offset, 4, prog, "Program: %s (%d)",
rpc_prog_name(prog), prog);
! proto_tree_add_item(tree, hf_portmap_version, NullTVB,
offset+4, 4, pntohl(&pd[offset+4]));
proto = pntohl(&pd[offset+8]);
! proto_tree_add_item(tree, hf_portmap_proto, NullTVB,
offset+8, 4, proto);
! proto_tree_add_item(tree, hf_portmap_port, NullTVB,
offset+12, 4, pntohl(&pd[offset+12]));
}
--- 145,158 ----
proto_tree_add_uint_format(tree, hf_portmap_prog, NullTVB,
offset, 4, prog, "Program: %s (%d)",
rpc_prog_name(prog), prog);
! proto_tree_add_uint(tree, hf_portmap_version, NullTVB,
offset+4, 4, pntohl(&pd[offset+4]));
proto = pntohl(&pd[offset+8]);
! proto_tree_add_uint(tree, hf_portmap_proto, NullTVB,
offset+8, 4, proto);
! proto_tree_add_uint(tree, hf_portmap_port, NullTVB,
offset+12, 4, pntohl(&pd[offset+12]));
}
***************
*** 166,172 ****
{
if ( !BYTES_ARE_IN_FRAME(offset, 4)) return offset;
! proto_tree_add_item(tree, hf_portmap_answer, NullTVB,
offset, 4, pntohl(&pd[offset+0]));
offset += 4;
}
--- 166,172 ----
{
if ( !BYTES_ARE_IN_FRAME(offset, 4)) return offset;
! proto_tree_add_boolean(tree, hf_portmap_answer, NullTVB,
offset, 4, pntohl(&pd[offset+0]));
offset += 4;
}
***************
*** 184,190 ****
value_follows = pntohl(&pd[offset+0]);
if ( tree )
{
! proto_tree_add_item(tree, hf_portmap_value_follows, NullTVB,
offset, 4, value_follows);
}
offset += 4;
--- 184,190 ----
value_follows = pntohl(&pd[offset+0]);
if ( tree )
{
! proto_tree_add_boolean(tree, hf_portmap_value_follows, NullTVB,
offset, 4, value_follows);
}
offset += 4;
***************
*** 209,220 ****
proto_tree_add_uint_format(subtree, hf_portmap_prog, NullTVB,
offset+0, 4, prog,
"Program: %s (%u)", rpc_prog_name(prog), prog);
! proto_tree_add_item(subtree, hf_portmap_version, NullTVB,
offset+4, 4, version);
proto_tree_add_uint_format(subtree, hf_portmap_proto, NullTVB,
offset+8, 4, proto,
"Protocol: %s (0x%02x)", ipprotostr(proto), proto);
! proto_tree_add_item(subtree, hf_portmap_port, NullTVB,
offset+12, 4, port);
}
offset += 16;
--- 209,220 ----
proto_tree_add_uint_format(subtree, hf_portmap_prog, NullTVB,
offset+0, 4, prog,
"Program: %s (%u)", rpc_prog_name(prog), prog);
! proto_tree_add_uint(subtree, hf_portmap_version, NullTVB,
offset+4, 4, version);
proto_tree_add_uint_format(subtree, hf_portmap_proto, NullTVB,
offset+8, 4, proto,
"Protocol: %s (0x%02x)", ipprotostr(proto), proto);
! proto_tree_add_uint(subtree, hf_portmap_port, NullTVB,
offset+12, 4, port);
}
offset += 16;
***************
*** 265,271 ****
if (tree) {
rpcb_item = proto_tree_add_item(tree, hfindex, NullTVB,
! offset+0, END_OF_FRAME, NULL);
if (rpcb_item)
rpcb_tree = proto_item_add_subtree(rpcb_item, ett_portmap_rpcb);
}
--- 265,271 ----
if (tree) {
rpcb_item = proto_tree_add_item(tree, hfindex, NullTVB,
! offset+0, END_OF_FRAME, FALSE);
if (rpcb_item)
rpcb_tree = proto_item_add_subtree(rpcb_item, ett_portmap_rpcb);
}
***************
*** 281,287 ****
if (!BYTES_ARE_IN_FRAME(offset, 4)) return offset;
version = EXTRACT_UINT(pd, offset + 0);
if (rpcb_tree)
! proto_tree_add_item(rpcb_tree, hf_portmap_rpcb_version, NullTVB,
offset+0, 4, version);
offset += 4;
--- 281,287 ----
if (!BYTES_ARE_IN_FRAME(offset, 4)) return offset;
version = EXTRACT_UINT(pd, offset + 0);
if (rpcb_tree)
! proto_tree_add_uint(rpcb_tree, hf_portmap_rpcb_version, NullTVB,
offset+0, 4, version);
offset += 4;
***************
*** 328,334 ****
while (1) {
if (!BYTES_ARE_IN_FRAME(offset,4)) break;
value_follows = EXTRACT_UINT(pd, offset+0);
! proto_tree_add_item(tree,hf_portmap_value_follows, NullTVB,
offset+0, 4, value_follows);
offset += 4;
if (value_follows == 1) {
--- 328,334 ----
while (1) {
if (!BYTES_ARE_IN_FRAME(offset,4)) break;
value_follows = EXTRACT_UINT(pd, offset+0);
! proto_tree_add_boolean(tree,hf_portmap_value_follows, NullTVB,
offset+0, 4, value_follows);
offset += 4;
if (value_follows == 1) {
Index: packet-ppp.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-ppp.c,v
retrieving revision 1.35
diff -c -r1.35 packet-ppp.c
*** packet-ppp.c 2000/05/25 07:42:25 1.35
--- packet-ppp.c 2000/05/30 10:38:26
***************
*** 1069,1075 ****
flag_str = "Unknown";
break;
}
! ti = proto_tree_add_item(tree, proto_mp, tvb, 0, 4, NULL);
mp_tree = proto_item_add_subtree(ti, ett_mp);
ti = proto_tree_add_text(mp_tree, tvb, 0, 1, "Fragment: 0x%2X (%s)",
flags, flag_str);
--- 1069,1075 ----
flag_str = "Unknown";
break;
}
! ti = proto_tree_add_item(tree, proto_mp, tvb, 0, 4, FALSE);
mp_tree = proto_item_add_subtree(ti, ett_mp);
ti = proto_tree_add_text(mp_tree, tvb, 0, 1, "Fragment: 0x%2X (%s)",
flags, flag_str);
***************
*** 1083,1096 ****
proto_tree_add_text(hdr_tree, tvb, 0, 1, "%s",
decode_boolean_bitfield(flags, MP_FRAG_RESERVED, sizeof(flags) * 8,
"reserved", "reserved"));
! proto_tree_add_item(mp_tree, hf_mp_sequence_num, tvb, 1, 3, seq);
}
next_tvb = tvb_new_subset(tvb, 4, -1, -1);
if (tvb_length(next_tvb) > 0) {
if (tree) {
! ti = proto_tree_add_item(tree, proto_ppp, next_tvb, 0, 1, NULL);
fh_tree = proto_item_add_subtree(ti, ett_ppp);
}
dissect_ppp_stuff(next_tvb, pinfo, tree, fh_tree);
--- 1083,1096 ----
proto_tree_add_text(hdr_tree, tvb, 0, 1, "%s",
decode_boolean_bitfield(flags, MP_FRAG_RESERVED, sizeof(flags) * 8,
"reserved", "reserved"));
! proto_tree_add_uint(mp_tree, hf_mp_sequence_num, tvb, 1, 3, seq);
}
next_tvb = tvb_new_subset(tvb, 4, -1, -1);
if (tvb_length(next_tvb) > 0) {
if (tree) {
! ti = proto_tree_add_item(tree, proto_ppp, next_tvb, 0, 1, FALSE);
fh_tree = proto_item_add_subtree(ti, ett_ppp);
}
dissect_ppp_stuff(next_tvb, pinfo, tree, fh_tree);
***************
*** 1106,1112 ****
/* populate a tree in the second pane with the status of the link
layer (ie none) */
if(tree) {
! ti = proto_tree_add_item(tree, proto_ppp, NullTVB, 0+offset, 2, NULL);
fh_tree = proto_item_add_subtree(ti, ett_ppp);
}
--- 1106,1112 ----
/* populate a tree in the second pane with the status of the link
layer (ie none) */
if(tree) {
! ti = proto_tree_add_item(tree, proto_ppp, NullTVB, 0+offset, 2, FALSE);
fh_tree = proto_item_add_subtree(ti, ett_ppp);
}
***************
*** 1151,1157 ****
/* populate a tree in the second pane with the status of the link
layer (ie none) */
if(tree) {
! ti = proto_tree_add_item(tree, proto_ppp, tvb, 0, 4, NULL);
fh_tree = proto_item_add_subtree(ti, ett_ppp);
if (byte0 == 0xff) {
proto_tree_add_text(fh_tree, tvb, 0, 1, "Address: %02x", ph.ppp_addr);
--- 1151,1157 ----
/* populate a tree in the second pane with the status of the link
layer (ie none) */
if(tree) {
! ti = proto_tree_add_item(tree, proto_ppp, tvb, 0, 4, FALSE);
fh_tree = proto_item_add_subtree(ti, ett_ppp);
if (byte0 == 0xff) {
proto_tree_add_text(fh_tree, tvb, 0, 1, "Address: %02x", ph.ppp_addr);
Index: packet-q2931.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-q2931.c,v
retrieving revision 1.9
diff -c -r1.9 packet-q2931.c
*** packet-q2931.c 2000/05/29 08:57:37 1.9
--- packet-q2931.c 2000/05/30 10:38:31
***************
*** 1995,2015 ****
if (tree) {
ti = proto_tree_add_item(tree, proto_q2931, tvb, offset,
! tvb_length(tvb), NULL);
q2931_tree = proto_item_add_subtree(ti, ett_q2931);
! proto_tree_add_item(q2931_tree, hf_q2931_discriminator, tvb, offset, 1, tvb_get_guint8(tvb, offset));
}
offset += 1;
call_ref_len = tvb_get_guint8(tvb, offset) & 0xF; /* XXX - do as a bit field? */
if (q2931_tree != NULL)
! proto_tree_add_item(q2931_tree, hf_q2931_call_ref_len, tvb, offset, 1, call_ref_len);
offset += 1;
if (call_ref_len != 0) {
/* XXX - split this into flag and value */
tvb_memcpy(tvb, call_ref, offset, call_ref_len);
if (q2931_tree != NULL)
! proto_tree_add_item(q2931_tree, hf_q2931_call_ref, tvb, offset, call_ref_len, call_ref);
offset += call_ref_len;
}
message_type = tvb_get_guint8(tvb, offset);
--- 1995,2015 ----
if (tree) {
ti = proto_tree_add_item(tree, proto_q2931, tvb, offset,
! tvb_length(tvb), FALSE);
q2931_tree = proto_item_add_subtree(ti, ett_q2931);
! proto_tree_add_uint(q2931_tree, hf_q2931_discriminator, tvb, offset, 1, tvb_get_guint8(tvb, offset));
}
offset += 1;
call_ref_len = tvb_get_guint8(tvb, offset) & 0xF; /* XXX - do as a bit field? */
if (q2931_tree != NULL)
! proto_tree_add_uint(q2931_tree, hf_q2931_call_ref_len, tvb, offset, 1, call_ref_len);
offset += 1;
if (call_ref_len != 0) {
/* XXX - split this into flag and value */
tvb_memcpy(tvb, call_ref, offset, call_ref_len);
if (q2931_tree != NULL)
! proto_tree_add_bytes(q2931_tree, hf_q2931_call_ref, tvb, offset, call_ref_len, call_ref);
offset += call_ref_len;
}
message_type = tvb_get_guint8(tvb, offset);
***************
*** 2019,2036 ****
"Unknown message type (0x%02X)"));
}
if (q2931_tree != NULL)
! proto_tree_add_item(q2931_tree, hf_q2931_message_type, tvb, offset, 1, message_type);
offset += 1;
message_type_ext = tvb_get_guint8(tvb, offset);
if (q2931_tree != NULL) {
! ti = proto_tree_add_item(q2931_tree, hf_q2931_message_type_ext, tvb,
offset, 1, message_type_ext);
ext_tree = proto_item_add_subtree(ti, ett_q2931_ext);
! proto_tree_add_item(ext_tree, hf_q2931_message_flag, tvb,
offset, 1, message_type_ext);
if (message_type_ext & Q2931_MSG_TYPE_EXT_FOLLOW_INST) {
! proto_tree_add_item(ext_tree, hf_q2931_message_action_indicator, tvb,
offset, 1, message_type_ext);
}
}
--- 2019,2036 ----
"Unknown message type (0x%02X)"));
}
if (q2931_tree != NULL)
! proto_tree_add_uint(q2931_tree, hf_q2931_message_type, tvb, offset, 1, message_type);
offset += 1;
message_type_ext = tvb_get_guint8(tvb, offset);
if (q2931_tree != NULL) {
! ti = proto_tree_add_uint(q2931_tree, hf_q2931_message_type_ext, tvb,
offset, 1, message_type_ext);
ext_tree = proto_item_add_subtree(ti, ett_q2931_ext);
! proto_tree_add_boolean(ext_tree, hf_q2931_message_flag, tvb,
offset, 1, message_type_ext);
if (message_type_ext & Q2931_MSG_TYPE_EXT_FOLLOW_INST) {
! proto_tree_add_uint(ext_tree, hf_q2931_message_action_indicator, tvb,
offset, 1, message_type_ext);
}
}
***************
*** 2038,2044 ****
message_len = tvb_get_ntohs(tvb, offset);
if (q2931_tree != NULL)
! proto_tree_add_item(q2931_tree, hf_q2931_message_len, tvb, offset, 2, message_len);
offset += 2;
/*
--- 2038,2044 ----
message_len = tvb_get_ntohs(tvb, offset);
if (q2931_tree != NULL)
! proto_tree_add_uint(q2931_tree, hf_q2931_message_len, tvb, offset, 2, message_len);
offset += 2;
/*
Index: packet-q931.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-q931.c,v
retrieving revision 1.15
diff -c -r1.15 packet-q931.c
*** packet-q931.c 2000/05/29 08:57:38 1.15
--- packet-q931.c 2000/05/30 10:38:36
***************
*** 2074,2094 ****
if (tree) {
ti = proto_tree_add_item(tree, proto_q931, tvb, offset,
! END_OF_FRAME, NULL);
q931_tree = proto_item_add_subtree(ti, ett_q931);
! proto_tree_add_item(q931_tree, hf_q931_discriminator, tvb, offset, 1, tvb_get_guint8(tvb, offset));
}
offset += 1;
call_ref_len = tvb_get_guint8(tvb, offset) & 0xF; /* XXX - do as a bit field? */
if (q931_tree != NULL)
! proto_tree_add_item(q931_tree, hf_q931_call_ref_len, tvb, offset, 1, call_ref_len);
offset += 1;
if (call_ref_len != 0) {
/* XXX - split this into flag and value */
tvb_memcpy(tvb, call_ref, offset, call_ref_len);
if (q931_tree != NULL)
! proto_tree_add_item(q931_tree, hf_q931_call_ref, tvb, offset, call_ref_len, call_ref);
offset += call_ref_len;
}
message_type = tvb_get_guint8(tvb, offset);
--- 2074,2094 ----
if (tree) {
ti = proto_tree_add_item(tree, proto_q931, tvb, offset,
! tvb_length(tvb), FALSE);
q931_tree = proto_item_add_subtree(ti, ett_q931);
! proto_tree_add_uint(q931_tree, hf_q931_discriminator, tvb, offset, 1, tvb_get_guint8(tvb, offset));
}
offset += 1;
call_ref_len = tvb_get_guint8(tvb, offset) & 0xF; /* XXX - do as a bit field? */
if (q931_tree != NULL)
! proto_tree_add_uint(q931_tree, hf_q931_call_ref_len, tvb, offset, 1, call_ref_len);
offset += 1;
if (call_ref_len != 0) {
/* XXX - split this into flag and value */
tvb_memcpy(tvb, call_ref, offset, call_ref_len);
if (q931_tree != NULL)
! proto_tree_add_bytes(q931_tree, hf_q931_call_ref, tvb, offset, call_ref_len, call_ref);
offset += call_ref_len;
}
message_type = tvb_get_guint8(tvb, offset);
***************
*** 2098,2104 ****
"Unknown message type (0x%02X)"));
}
if (q931_tree != NULL)
! proto_tree_add_item(q931_tree, hf_q931_message_type, tvb, offset, 1, message_type);
offset += 1;
/*
--- 2098,2104 ----
"Unknown message type (0x%02X)"));
}
if (q931_tree != NULL)
! proto_tree_add_uint(q931_tree, hf_q931_message_type, tvb, offset, 1, message_type);
offset += 1;
/*
Index: packet-radius.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-radius.c,v
retrieving revision 1.12
diff -c -r1.12 packet-radius.c
*** packet-radius.c 2000/05/11 08:15:40 1.12
--- packet-radius.c 2000/05/30 10:38:38
***************
*** 704,710 ****
{
ti = proto_tree_add_item(tree,proto_radius, NullTVB, offset, rhlength,
! NULL);
radius_tree = proto_item_add_subtree(ti, ett_radius);
--- 704,710 ----
{
ti = proto_tree_add_item(tree,proto_radius, NullTVB, offset, rhlength,
! FALSE);
radius_tree = proto_item_add_subtree(ti, ett_radius);
Index: packet-rip.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-rip.c,v
retrieving revision 1.15
diff -c -r1.15 packet-rip.c
*** packet-rip.c 2000/05/11 08:15:40 1.15
--- packet-rip.c 2000/05/30 10:38:38
***************
*** 97,103 ****
col_add_str(fd, COL_INFO, packet_type[rip_header.command]);
if (tree) {
! ti = proto_tree_add_item(tree, proto_rip, NullTVB, offset, END_OF_FRAME, NULL);
rip_tree = proto_item_add_subtree(ti, ett_rip);
proto_tree_add_text(rip_tree, NullTVB, offset, 1, "Command: %d (%s)", rip_header.command, packet_type[rip_header.command]);
--- 97,103 ----
col_add_str(fd, COL_INFO, packet_type[rip_header.command]);
if (tree) {
! ti = proto_tree_add_item(tree, proto_rip, NullTVB, offset, END_OF_FRAME, FALSE);
rip_tree = proto_item_add_subtree(ti, ett_rip);
proto_tree_add_text(rip_tree, NullTVB, offset, 1, "Command: %d (%s)", rip_header.command, packet_type[rip_header.command]);
Index: packet-ripng.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-ripng.c,v
retrieving revision 1.11
diff -c -r1.11 packet-ripng.c
*** packet-ripng.c 2000/05/17 04:09:32 1.11
--- packet-ripng.c 2000/05/30 10:38:39
***************
*** 78,90 ****
col_add_fstr(fd, COL_INFO, "%s", cmd);
if (tree) {
! ti = proto_tree_add_item(tree, proto_ripng, NullTVB, offset, END_OF_FRAME, NULL);
ripng_tree = proto_item_add_subtree(ti, ett_ripng);
proto_tree_add_uint_format(ripng_tree, hf_ripng_cmd, NullTVB, offset, 1,
rip6.rip6_cmd,
"Command: %s (%u)", cmd, rip6.rip6_cmd);
! proto_tree_add_item(ripng_tree, hf_ripng_version, NullTVB, offset + 1, 1,
rip6.rip6_vers);
offset += 4;
--- 78,90 ----
col_add_fstr(fd, COL_INFO, "%s", cmd);
if (tree) {
! ti = proto_tree_add_item(tree, proto_ripng, NullTVB, offset, END_OF_FRAME, FALSE);
ripng_tree = proto_item_add_subtree(ti, ett_ripng);
proto_tree_add_uint_format(ripng_tree, hf_ripng_cmd, NullTVB, offset, 1,
rip6.rip6_cmd,
"Command: %s (%u)", cmd, rip6.rip6_cmd);
! proto_tree_add_uint(ripng_tree, hf_ripng_version, NullTVB, offset + 1, 1,
rip6.rip6_vers);
offset += 4;
Index: packet-rlogin.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-rlogin.c,v
retrieving revision 1.2
diff -c -r1.2 packet-rlogin.c
*** packet-rlogin.c 2000/05/11 08:15:41 1.2
--- packet-rlogin.c 2000/05/30 10:38:40
***************
*** 211,217 ****
proto_item *user_info_item, *window_info_item;
ti = proto_tree_add_item( tree, proto_rlogin, NullTVB, offset,
! END_OF_FRAME, NULL, "Rlogin:" );
rlogin_tree = proto_item_add_subtree(ti, ett_rlogin);
--- 211,217 ----
proto_item *user_info_item, *window_info_item;
ti = proto_tree_add_item( tree, proto_rlogin, NullTVB, offset,
! END_OF_FRAME, FALSE);
rlogin_tree = proto_item_add_subtree(ti, ett_rlogin);
***************
*** 252,258 ****
if ( compare_packet_ptr( hash_info->info_row)){ /* user info ?*/
user_info_item = proto_tree_add_item( rlogin_tree, hf_user_info, NullTVB,
! offset, END_OF_FRAME, NULL );
str = &pd[ offset]; /* do server user name */
--- 252,258 ----
if ( compare_packet_ptr( hash_info->info_row)){ /* user info ?*/
user_info_item = proto_tree_add_item( rlogin_tree, hf_user_info, NullTVB,
! offset, END_OF_FRAME, FALSE);
str = &pd[ offset]; /* do server user name */
***************
*** 297,303 ****
CHECK_PACKET_LENGTH( 12);
window_info_item = proto_tree_add_item( rlogin_tree,
! hf_window_info, NullTVB, offset, 12, NULL );
window_tree = proto_item_add_subtree( window_info_item,
ett_rlogin_window);
--- 297,303 ----
CHECK_PACKET_LENGTH( 12);
window_info_item = proto_tree_add_item( rlogin_tree,
! hf_window_info, NullTVB, offset, 12, FALSE );
window_tree = proto_item_add_subtree( window_info_item,
ett_rlogin_window);
***************
*** 313,334 ****
offset += 2;
CHECK_PACKET_LENGTH( 2);
! proto_tree_add_item( window_tree, hf_window_info_rows, NullTVB, offset,
2, pntohs( &pd[offset]));
offset += 2;
CHECK_PACKET_LENGTH( 2);
! proto_tree_add_item( window_tree, hf_window_info_cols, NullTVB, offset,
2, pntohs( &pd[offset]) );
offset += 2;
CHECK_PACKET_LENGTH( 2);
! proto_tree_add_item( window_tree, hf_window_info_x_pixels, NullTVB,
offset, 2, pntohs( &pd[offset]));
offset += 2;
CHECK_PACKET_LENGTH( 2);
! proto_tree_add_item( window_tree, hf_window_info_y_pixels, NullTVB,
offset, 2, pntohs( &pd[offset]) );
offset += 2;
}
--- 313,334 ----
offset += 2;
CHECK_PACKET_LENGTH( 2);
! proto_tree_add_uint( window_tree, hf_window_info_rows, NullTVB, offset,
2, pntohs( &pd[offset]));
offset += 2;
CHECK_PACKET_LENGTH( 2);
! proto_tree_add_uint( window_tree, hf_window_info_cols, NullTVB, offset,
2, pntohs( &pd[offset]) );
offset += 2;
CHECK_PACKET_LENGTH( 2);
! proto_tree_add_uint( window_tree, hf_window_info_x_pixels, NullTVB,
offset, 2, pntohs( &pd[offset]));
offset += 2;
CHECK_PACKET_LENGTH( 2);
! proto_tree_add_uint( window_tree, hf_window_info_y_pixels, NullTVB,
offset, 2, pntohs( &pd[offset]) );
offset += 2;
}
Index: packet-rpc.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-rpc.c,v
retrieving revision 1.30
diff -c -r1.30 packet-rpc.c
*** packet-rpc.c 2000/05/11 08:15:41 1.30
--- packet-rpc.c 2000/05/30 10:38:42
***************
*** 338,344 ****
if (!BYTES_ARE_IN_FRAME(offset,4)) return offset;
value = EXTRACT_UINT(pd, offset+0);
if (tree)
! proto_tree_add_item(tree, hfindex, NullTVB, offset, 4, value);
offset += 4;
return offset;
--- 338,344 ----
if (!BYTES_ARE_IN_FRAME(offset,4)) return offset;
value = EXTRACT_UINT(pd, offset+0);
if (tree)
! proto_tree_add_boolean(tree, hfindex, NullTVB, offset, 4, value);
offset += 4;
return offset;
***************
*** 499,505 ****
string_item = proto_tree_add_text(tree, NullTVB,offset+0, END_OF_FRAME,
"%s: %s", proto_registrar_get_name(hfindex), string_buffer_print);
if (string_data) {
! proto_tree_add_item_hidden(tree, hfindex, NullTVB, offset+4,
string_length_copy, string_buffer);
}
if (string_item) {
--- 499,505 ----
string_item = proto_tree_add_text(tree, NullTVB,offset+0, END_OF_FRAME,
"%s: %s", proto_registrar_get_name(hfindex), string_buffer_print);
if (string_data) {
! proto_tree_add_string_hidden(tree, hfindex, NullTVB, offset+4,
string_length_copy, string_buffer);
}
if (string_item) {
***************
*** 585,591 ****
while (1) {
if (!BYTES_ARE_IN_FRAME(offset,4)) break;
value_follows = EXTRACT_UINT(pd, offset+0);
! proto_tree_add_item(tree,hf_rpc_value_follows, NullTVB,
offset+0, 4, value_follows);
offset += 4;
if (value_follows == 1) {
--- 585,591 ----
while (1) {
if (!BYTES_ARE_IN_FRAME(offset,4)) break;
value_follows = EXTRACT_UINT(pd, offset+0);
! proto_tree_add_boolean(tree,hf_rpc_value_follows, NullTVB,
offset+0, 4, value_follows);
offset += 4;
if (value_follows == 1) {
***************
*** 615,623 ****
/* if (!BYTES_ARE_IN_FRAME(offset+8,full_length)) return; */
if (tree) {
! proto_tree_add_item(tree, hf_rpc_auth_flavor, NullTVB, offset+0, 4,
flavor);
! proto_tree_add_item(tree, hf_rpc_auth_length, NullTVB, offset+4, 4,
length);
}
--- 615,623 ----
/* if (!BYTES_ARE_IN_FRAME(offset+8,full_length)) return; */
if (tree) {
! proto_tree_add_uint(tree, hf_rpc_auth_flavor, NullTVB, offset+0, 4,
flavor);
! proto_tree_add_uint(tree, hf_rpc_auth_length, NullTVB, offset+4, 4,
length);
}
***************
*** 637,643 ****
if (!BYTES_ARE_IN_FRAME(offset,4)) return;
stamp = EXTRACT_UINT(pd,offset+0);
if (tree)
! proto_tree_add_item(tree, hf_rpc_auth_stamp, NullTVB,
offset+0, 4, stamp);
offset += 4;
--- 637,643 ----
if (!BYTES_ARE_IN_FRAME(offset,4)) return;
stamp = EXTRACT_UINT(pd,offset+0);
if (tree)
! proto_tree_add_uint(tree, hf_rpc_auth_stamp, NullTVB,
offset+0, 4, stamp);
offset += 4;
***************
*** 647,660 ****
if (!BYTES_ARE_IN_FRAME(offset,4)) return;
uid = EXTRACT_UINT(pd,offset+0);
if (tree)
! proto_tree_add_item(tree, hf_rpc_auth_uid, NullTVB,
offset+0, 4, uid);
offset += 4;
if (!BYTES_ARE_IN_FRAME(offset,4)) return;
gid = EXTRACT_UINT(pd,offset+0);
if (tree)
! proto_tree_add_item(tree, hf_rpc_auth_gid, NullTVB,
offset+0, 4, gid);
offset += 4;
--- 647,660 ----
if (!BYTES_ARE_IN_FRAME(offset,4)) return;
uid = EXTRACT_UINT(pd,offset+0);
if (tree)
! proto_tree_add_uint(tree, hf_rpc_auth_uid, NullTVB,
offset+0, 4, uid);
offset += 4;
if (!BYTES_ARE_IN_FRAME(offset,4)) return;
gid = EXTRACT_UINT(pd,offset+0);
if (tree)
! proto_tree_add_uint(tree, hf_rpc_auth_gid, NullTVB,
offset+0, 4, gid);
offset += 4;
***************
*** 670,676 ****
for (gids_i = 0 ; gids_i < gids_count ; gids_i++) {
gids_entry = EXTRACT_UINT(pd,offset+0);
if (gtree)
! proto_tree_add_item(gtree, hf_rpc_auth_gid, NullTVB,
offset, 4, gids_entry);
offset+=4;
}
--- 670,676 ----
for (gids_i = 0 ; gids_i < gids_count ; gids_i++) {
gids_entry = EXTRACT_UINT(pd,offset+0);
if (gtree)
! proto_tree_add_uint(gtree, hf_rpc_auth_gid, NullTVB,
offset, 4, gids_entry);
offset+=4;
}
***************
*** 882,897 ****
col_add_str(fd, COL_PROTOCOL, "RPC");
if (tree) {
! rpc_item = proto_tree_add_item(tree, proto_rpc, NullTVB, offset, END_OF_FRAME, NULL);
if (rpc_item) {
rpc_tree = proto_item_add_subtree(rpc_item, ett_rpc);
}
}
if (use_rm && rpc_tree) {
! proto_tree_add_item(rpc_tree,hf_rpc_lastfrag, NullTVB,
offset-4, 4, (rpc_rm >> 31) & 0x1);
! proto_tree_add_item(rpc_tree,hf_rpc_fraglen, NullTVB,
offset-4, 4, rpc_rm & RPC_RM_FRAGLEN);
}
--- 882,897 ----
col_add_str(fd, COL_PROTOCOL, "RPC");
if (tree) {
! rpc_item = proto_tree_add_item(tree, proto_rpc, NullTVB, offset, END_OF_FRAME, FALSE);
if (rpc_item) {
rpc_tree = proto_item_add_subtree(rpc_item, ett_rpc);
}
}
if (use_rm && rpc_tree) {
! proto_tree_add_boolean(rpc_tree,hf_rpc_lastfrag, NullTVB,
offset-4, 4, (rpc_rm >> 31) & 0x1);
! proto_tree_add_uint(rpc_tree,hf_rpc_fraglen, NullTVB,
offset-4, 4, rpc_rm & RPC_RM_FRAGLEN);
}
***************
*** 903,909 ****
msg_type_name = val_to_str(msg_type,rpc_msg_type,"%u");
if (rpc_tree) {
! proto_tree_add_item(rpc_tree, hf_rpc_msgtype, NullTVB,
offset+4, 4, msg_type);
}
--- 903,909 ----
msg_type_name = val_to_str(msg_type,rpc_msg_type,"%u");
if (rpc_tree) {
! proto_tree_add_uint(rpc_tree, hf_rpc_msgtype, NullTVB,
offset+4, 4, msg_type);
}
***************
*** 918,924 ****
rpcvers = EXTRACT_UINT(pd,offset+0);
if (rpc_tree) {
! proto_tree_add_item(rpc_tree,
hf_rpc_version, NullTVB, offset+0, 4, rpcvers);
}
--- 918,924 ----
rpcvers = EXTRACT_UINT(pd,offset+0);
if (rpc_tree) {
! proto_tree_add_uint(rpc_tree,
hf_rpc_version, NullTVB, offset+0, 4, rpcvers);
}
***************
*** 940,946 ****
return TRUE;
vers = EXTRACT_UINT(pd,offset+8);
if (rpc_tree) {
! proto_tree_add_item(rpc_tree,
hf_rpc_programversion, NullTVB, offset+8, 4, vers);
}
--- 940,946 ----
return TRUE;
vers = EXTRACT_UINT(pd,offset+8);
if (rpc_tree) {
! proto_tree_add_uint(rpc_tree,
hf_rpc_programversion, NullTVB, offset+8, 4, vers);
}
***************
*** 1003,1011 ****
if (check_col(fd, COL_INFO)) {
col_append_fstr(fd, COL_INFO, " dup XID 0x%x", xid);
if (rpc_tree) {
! proto_tree_add_item_hidden(rpc_tree,
hf_rpc_dup, NullTVB, 0,0, xid);
! proto_tree_add_item_hidden(rpc_tree,
hf_rpc_call_dup, NullTVB, 0,0, xid);
}
}
--- 1003,1011 ----
if (check_col(fd, COL_INFO)) {
col_append_fstr(fd, COL_INFO, " dup XID 0x%x", xid);
if (rpc_tree) {
! proto_tree_add_uint_hidden(rpc_tree,
hf_rpc_dup, NullTVB, 0,0, xid);
! proto_tree_add_uint_hidden(rpc_tree,
hf_rpc_call_dup, NullTVB, 0,0, xid);
}
}
***************
*** 1085,1091 ****
proto_tree_add_uint_format(rpc_tree,
hf_rpc_program, NullTVB, 0, 0, prog,
"Program: %s (%u)", progname, prog);
! proto_tree_add_item(rpc_tree,
hf_rpc_programversion, NullTVB, 0, 0, vers);
proto_tree_add_uint_format(rpc_tree,
hf_rpc_procedure, NullTVB, 0, 0, proc,
--- 1085,1091 ----
proto_tree_add_uint_format(rpc_tree,
hf_rpc_program, NullTVB, 0, 0, prog,
"Program: %s (%u)", progname, prog);
! proto_tree_add_uint(rpc_tree,
hf_rpc_programversion, NullTVB, 0, 0, vers);
proto_tree_add_uint_format(rpc_tree,
hf_rpc_procedure, NullTVB, 0, 0, proc,
***************
*** 1096,1104 ****
if (check_col(fd, COL_INFO)) {
col_append_fstr(fd, COL_INFO, " dup XID 0x%x", xid);
if (rpc_tree) {
! proto_tree_add_item_hidden(rpc_tree,
hf_rpc_dup, NullTVB, 0,0, xid);
! proto_tree_add_item_hidden(rpc_tree,
hf_rpc_reply_dup, NullTVB, 0,0, xid);
}
}
--- 1096,1104 ----
if (check_col(fd, COL_INFO)) {
col_append_fstr(fd, COL_INFO, " dup XID 0x%x", xid);
if (rpc_tree) {
! proto_tree_add_uint_hidden(rpc_tree,
hf_rpc_dup, NullTVB, 0,0, xid);
! proto_tree_add_uint_hidden(rpc_tree,
hf_rpc_reply_dup, NullTVB, 0,0, xid);
}
}
***************
*** 1108,1114 ****
return TRUE;
reply_state = EXTRACT_UINT(pd,offset+0);
if (rpc_tree) {
! proto_tree_add_item(rpc_tree, hf_rpc_state_reply, NullTVB,
offset+0, 4, reply_state);
}
offset += 4;
--- 1108,1114 ----
return TRUE;
reply_state = EXTRACT_UINT(pd,offset+0);
if (rpc_tree) {
! proto_tree_add_uint(rpc_tree, hf_rpc_state_reply, NullTVB,
offset+0, 4, reply_state);
}
offset += 4;
***************
*** 1119,1125 ****
return TRUE;
accept_state = EXTRACT_UINT(pd,offset+0);
if (rpc_tree) {
! proto_tree_add_item(rpc_tree, hf_rpc_state_accept, NullTVB,
offset+0, 4, accept_state);
}
offset += 4;
--- 1119,1125 ----
return TRUE;
accept_state = EXTRACT_UINT(pd,offset+0);
if (rpc_tree) {
! proto_tree_add_uint(rpc_tree, hf_rpc_state_accept, NullTVB,
offset+0, 4, accept_state);
}
offset += 4;
***************
*** 1134,1143 ****
vers_low = EXTRACT_UINT(pd,offset+0);
vers_high = EXTRACT_UINT(pd,offset+4);
if (rpc_tree) {
! proto_tree_add_item(rpc_tree,
hf_rpc_programversion_min,
NullTVB, offset+0, 4, vers_low);
! proto_tree_add_item(rpc_tree,
hf_rpc_programversion_max,
NullTVB, offset+4, 4, vers_high);
}
--- 1134,1143 ----
vers_low = EXTRACT_UINT(pd,offset+0);
vers_high = EXTRACT_UINT(pd,offset+4);
if (rpc_tree) {
! proto_tree_add_uint(rpc_tree,
hf_rpc_programversion_min,
NullTVB, offset+0, 4, vers_low);
! proto_tree_add_uint(rpc_tree,
hf_rpc_programversion_max,
NullTVB, offset+4, 4, vers_high);
}
***************
*** 1152,1158 ****
return TRUE;
reject_state = EXTRACT_UINT(pd,offset+0);
if (rpc_tree) {
! proto_tree_add_item(rpc_tree,
hf_rpc_state_reject, NullTVB, offset+0, 4,
reject_state);
}
--- 1152,1158 ----
return TRUE;
reject_state = EXTRACT_UINT(pd,offset+0);
if (rpc_tree) {
! proto_tree_add_uint(rpc_tree,
hf_rpc_state_reject, NullTVB, offset+0, 4,
reject_state);
}
***************
*** 1164,1173 ****
vers_low = EXTRACT_UINT(pd,offset+0);
vers_high = EXTRACT_UINT(pd,offset+4);
if (rpc_tree) {
! proto_tree_add_item(rpc_tree,
hf_rpc_version_min,
NullTVB, offset+0, 4, vers_low);
! proto_tree_add_item(rpc_tree,
hf_rpc_version_max,
NullTVB, offset+4, 4, vers_high);
}
--- 1164,1173 ----
vers_low = EXTRACT_UINT(pd,offset+0);
vers_high = EXTRACT_UINT(pd,offset+4);
if (rpc_tree) {
! proto_tree_add_uint(rpc_tree,
hf_rpc_version_min,
NullTVB, offset+0, 4, vers_low);
! proto_tree_add_uint(rpc_tree,
hf_rpc_version_max,
NullTVB, offset+4, 4, vers_high);
}
***************
*** 1177,1183 ****
return TRUE;
auth_state = EXTRACT_UINT(pd,offset+0);
if (rpc_tree) {
! proto_tree_add_item(rpc_tree,
hf_rpc_state_auth, NullTVB, offset+0, 4,
auth_state);
}
--- 1177,1183 ----
return TRUE;
auth_state = EXTRACT_UINT(pd,offset+0);
if (rpc_tree) {
! proto_tree_add_uint(rpc_tree,
hf_rpc_state_auth, NullTVB, offset+0, 4,
auth_state);
}
***************
*** 1196,1208 ****
/* create here the program specific sub-tree */
if (tree) {
! pitem = proto_tree_add_item(tree, proto, NullTVB, offset, END_OF_FRAME);
if (pitem) {
ptree = proto_item_add_subtree(pitem, ett);
}
if (ptree) {
! proto_tree_add_item(ptree,
hf_rpc_programversion, NullTVB, 0, 0, vers);
proto_tree_add_uint_format(ptree,
hf_rpc_procedure, NullTVB, 0, 0, proc,
--- 1196,1208 ----
/* create here the program specific sub-tree */
if (tree) {
! pitem = proto_tree_add_item(tree, proto, NullTVB, offset, END_OF_FRAME, FALSE);
if (pitem) {
ptree = proto_item_add_subtree(pitem, ett);
}
if (ptree) {
! proto_tree_add_uint(ptree,
hf_rpc_programversion, NullTVB, 0, 0, vers);
proto_tree_add_uint_format(ptree,
hf_rpc_procedure, NullTVB, 0, 0, proc,
Index: packet-rsvp.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-rsvp.c,v
retrieving revision 1.21
diff -c -r1.21 packet-rsvp.c
*** packet-rsvp.c 2000/05/11 08:15:41 1.21
--- packet-rsvp.c 2000/05/30 10:38:47
***************
*** 857,863 ****
if (tree) {
msg_length = pntohs(pd+offset+6);
! ti = proto_tree_add_item(tree, proto_rsvp, NullTVB, offset, msg_length, NULL);
rsvp_tree = proto_item_add_subtree(ti, ett_rsvp);
ti = proto_tree_add_text(rsvp_tree, NullTVB, offset,
--- 857,863 ----
if (tree) {
msg_length = pntohs(pd+offset+6);
! ti = proto_tree_add_item(tree, proto_rsvp, NullTVB, offset, msg_length, FALSE);
rsvp_tree = proto_item_add_subtree(ti, ett_rsvp);
ti = proto_tree_add_text(rsvp_tree, NullTVB, offset,
***************
*** 868,881 ****
(hdr->ver_flags & 0xf0)>>4);
proto_tree_add_text(rsvp_header_tree, NullTVB, offset, 1, "Flags: %02X",
hdr->ver_flags & 0xf);
! proto_tree_add_item(rsvp_header_tree, rsvp_filter[RSVPF_MSG], NullTVB,
offset+1, 1, hdr->message_type);
if (hdr->message_type >= RSVPF_MAX) {
proto_tree_add_text(rsvp_header_tree, NullTVB, offset+1, 1, "Message Type: %u - Unknown",
hdr->message_type);
return;
}
! proto_tree_add_item_hidden(rsvp_header_tree, rsvp_filter[RSVPF_MSG + hdr->message_type], NullTVB,
offset+1, 1, 1);
proto_tree_add_text(rsvp_header_tree, NullTVB, offset + 2 , 2, "Message Checksum");
proto_tree_add_text(rsvp_header_tree, NullTVB, offset + 4 , 1, "Sending TTL: %u",
--- 868,881 ----
(hdr->ver_flags & 0xf0)>>4);
proto_tree_add_text(rsvp_header_tree, NullTVB, offset, 1, "Flags: %02X",
hdr->ver_flags & 0xf);
! proto_tree_add_uint(rsvp_header_tree, rsvp_filter[RSVPF_MSG], NullTVB,
offset+1, 1, hdr->message_type);
if (hdr->message_type >= RSVPF_MAX) {
proto_tree_add_text(rsvp_header_tree, NullTVB, offset+1, 1, "Message Type: %u - Unknown",
hdr->message_type);
return;
}
! proto_tree_add_item_hidden_old(rsvp_header_tree, rsvp_filter[RSVPF_MSG + hdr->message_type], NullTVB,
offset+1, 1, 1);
proto_tree_add_text(rsvp_header_tree, NullTVB, offset + 2 , 2, "Message Checksum");
proto_tree_add_text(rsvp_header_tree, NullTVB, offset + 4 , 1, "Sending TTL: %u",
***************
*** 896,904 ****
object_type = match_strval(obj->class, rsvp_class_vals);
if (!object_type) object_type = "Unknown";
! ti = proto_tree_add_item_hidden(rsvp_tree, rsvp_filter[RSVPF_OBJECT], NullTVB,
offset, obj_length, obj->class);
! ti = proto_tree_add_item(rsvp_tree, rsvp_filter[rsvp_class_to_filter_num(obj->class)], NullTVB,
offset, obj_length, obj->class);
offset2 = offset + sizeof(rsvp_object);
--- 896,904 ----
object_type = match_strval(obj->class, rsvp_class_vals);
if (!object_type) object_type = "Unknown";
! ti = proto_tree_add_uint_hidden(rsvp_tree, rsvp_filter[RSVPF_OBJECT], NullTVB,
offset, obj_length, obj->class);
! ti = proto_tree_add_item_old(rsvp_tree, rsvp_filter[rsvp_class_to_filter_num(obj->class)], NullTVB,
offset, obj_length, obj->class);
offset2 = offset + sizeof(rsvp_object);
***************
*** 917,930 ****
proto_tree_add_text(rsvp_object_tree, NullTVB, offset+3, 1,
"C-type: 1 - IPv4");
memcpy(&ip_addr, pd+offset2, 4);
! proto_tree_add_item(rsvp_object_tree, rsvp_filter[RSVPF_SESSION_IP], NullTVB,
offset2, 4, ip_addr);
! proto_tree_add_item(rsvp_object_tree, rsvp_filter[RSVPF_SESSION_PROTO], NullTVB,
offset2+4, 1, *(pd+offset2+4));
proto_tree_add_text(rsvp_object_tree, NullTVB, offset2+5, 1,
"Flags: %x", pntohs(pd+offset2+5));
! proto_tree_add_item(rsvp_object_tree, rsvp_filter[RSVPF_SESSION_PORT], NullTVB,
offset2+6, 2, pntohs(pd+offset2+6));
break;
}
--- 917,930 ----
proto_tree_add_text(rsvp_object_tree, NullTVB, offset+3, 1,
"C-type: 1 - IPv4");
memcpy(&ip_addr, pd+offset2, 4);
! proto_tree_add_ipv4(rsvp_object_tree, rsvp_filter[RSVPF_SESSION_IP], NullTVB,
offset2, 4, ip_addr);
! proto_tree_add_uint(rsvp_object_tree, rsvp_filter[RSVPF_SESSION_PROTO], NullTVB,
offset2+4, 1, *(pd+offset2+4));
proto_tree_add_text(rsvp_object_tree, NullTVB, offset2+5, 1,
"Flags: %x", pntohs(pd+offset2+5));
! proto_tree_add_uint(rsvp_object_tree, rsvp_filter[RSVPF_SESSION_PORT], NullTVB,
offset2+6, 2, pntohs(pd+offset2+6));
break;
}
***************
*** 950,959 ****
proto_tree_add_text(rsvp_object_tree, NullTVB, offset+3, 1,
"C-type: 7 - IPv4 LSP");
memcpy(&ip_addr, pd+offset2, 4);
! proto_tree_add_item(rsvp_object_tree, rsvp_filter[RSVPF_SESSION_IP], NullTVB,
offset2, 4, ip_addr);
! proto_tree_add_item(rsvp_object_tree, rsvp_filter[RSVPF_SESSION_TUNNEL_ID], NullTVB,
offset2+6, 2, pntohs(pd+offset2+6));
memcpy(&ip_addr, pd+offset2+8, 4);
--- 950,959 ----
proto_tree_add_text(rsvp_object_tree, NullTVB, offset+3, 1,
"C-type: 7 - IPv4 LSP");
memcpy(&ip_addr, pd+offset2, 4);
! proto_tree_add_ipv4(rsvp_object_tree, rsvp_filter[RSVPF_SESSION_IP], NullTVB,
offset2, 4, ip_addr);
! proto_tree_add_uint(rsvp_object_tree, rsvp_filter[RSVPF_SESSION_TUNNEL_ID], NullTVB,
offset2+6, 2, pntohs(pd+offset2+6));
memcpy(&ip_addr, pd+offset2+8, 4);
***************
*** 961,967 ****
"Extended Tunnel ID: %lu (%s)",
(unsigned long)ntohl(ip_addr),
ip_to_str(pd+offset2+8));
! proto_tree_add_item_hidden(rsvp_object_tree, rsvp_filter[RSVPF_SESSION_EXT_TUNNEL_ID], NullTVB,
offset2+8, 4, ip_addr);
break;
}
--- 961,967 ----
"Extended Tunnel ID: %lu (%s)",
(unsigned long)ntohl(ip_addr),
ip_to_str(pd+offset2+8));
! proto_tree_add_uint_hidden(rsvp_object_tree, rsvp_filter[RSVPF_SESSION_EXT_TUNNEL_ID], NullTVB,
offset2+8, 4, ip_addr);
break;
}
***************
*** 1253,1262 ****
proto_tree_add_text(rsvp_object_tree, NullTVB, offset+3, 1,
"C-type: 1 - IPv4");
memcpy(&ip_addr, pd+offset2, 4);
! proto_tree_add_item(rsvp_object_tree, rsvp_filter[RSVPF_SENDER_IP], NullTVB,
offset2, 4, ip_addr);
! proto_tree_add_item(rsvp_object_tree, rsvp_filter[RSVPF_SENDER_PORT], NullTVB,
offset2+6, 2, pntohs(pd+offset2+6));
break;
}
--- 1253,1262 ----
proto_tree_add_text(rsvp_object_tree, NullTVB, offset+3, 1,
"C-type: 1 - IPv4");
memcpy(&ip_addr, pd+offset2, 4);
! proto_tree_add_ipv4(rsvp_object_tree, rsvp_filter[RSVPF_SENDER_IP], NullTVB,
offset2, 4, ip_addr);
! proto_tree_add_uint(rsvp_object_tree, rsvp_filter[RSVPF_SENDER_PORT], NullTVB,
offset2+6, 2, pntohs(pd+offset2+6));
break;
}
***************
*** 1277,1286 ****
proto_tree_add_text(rsvp_object_tree, NullTVB, offset+3, 1,
"C-type: 7 - IPv4 LSP");
memcpy(&ip_addr, pd+offset2, 4);
! proto_tree_add_item(rsvp_object_tree, rsvp_filter[RSVPF_SENDER_IP], NullTVB,
offset2, 4, ip_addr);
! proto_tree_add_item(rsvp_object_tree, rsvp_filter[RSVPF_SENDER_LSP_ID], NullTVB,
offset2+6, 2, pntohs(pd+offset2+6));
break;
}
--- 1277,1286 ----
proto_tree_add_text(rsvp_object_tree, NullTVB, offset+3, 1,
"C-type: 7 - IPv4 LSP");
memcpy(&ip_addr, pd+offset2, 4);
! proto_tree_add_ipv4(rsvp_object_tree, rsvp_filter[RSVPF_SENDER_IP], NullTVB,
offset2, 4, ip_addr);
! proto_tree_add_uint(rsvp_object_tree, rsvp_filter[RSVPF_SENDER_LSP_ID], NullTVB,
offset2+6, 2, pntohs(pd+offset2+6));
break;
}
Index: packet-rtcp.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-rtcp.c,v
retrieving revision 1.2
diff -c -r1.2 packet-rtcp.c
*** packet-rtcp.c 2000/05/11 08:15:42 1.2
--- packet-rtcp.c 2000/05/30 10:38:47
***************
*** 342,348 ****
start_packet = offset;
end_offset = offset + END_OF_FRAME;
! ti = proto_tree_add_item(tree, proto_rtcp, NullTVB, offset, END_OF_FRAME, NULL);
rtcp_tree = proto_item_add_subtree(ti, ett_rtcp);
memcpy(&hdr, data, END_OF_FRAME < sizeof(rtcp_hdr_t) ?
--- 342,348 ----
start_packet = offset;
end_offset = offset + END_OF_FRAME;
! ti = proto_tree_add_item(tree, proto_rtcp, NullTVB, offset, END_OF_FRAME, FALSE);
rtcp_tree = proto_item_add_subtree(ti, ett_rtcp);
memcpy(&hdr, data, END_OF_FRAME < sizeof(rtcp_hdr_t) ?
Index: packet-rtp.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-rtp.c,v
retrieving revision 1.3
diff -c -r1.3 packet-rtp.c
*** packet-rtp.c 2000/05/11 08:15:43 1.3
--- packet-rtp.c 2000/05/30 10:38:48
***************
*** 108,114 ****
if (tree) {
ti = proto_tree_add_item(tree, proto_rtp, NullTVB, offset, END_OF_FRAME,
! NULL);
rtp_tree = proto_item_add_subtree(ti, ett_rtp);
}
--- 108,114 ----
if (tree) {
ti = proto_tree_add_item(tree, proto_rtp, NullTVB, offset, END_OF_FRAME,
! FALSE);
rtp_tree = proto_item_add_subtree(ti, ett_rtp);
}
Index: packet-rtsp.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-rtsp.c,v
retrieving revision 1.13
diff -c -r1.13 packet-rtsp.c
*** packet-rtsp.c 2000/05/11 08:15:43 1.13
--- packet-rtsp.c 2000/05/30 10:38:49
***************
*** 154,160 ****
rtsp_tree = NULL;
if (tree) {
ti = proto_tree_add_item(tree, proto_rtsp, NullTVB, offset,
! END_OF_FRAME, NULL);
rtsp_tree = proto_item_add_subtree(ti, ett_rtsp);
}
--- 154,160 ----
rtsp_tree = NULL;
if (tree) {
ti = proto_tree_add_item(tree, proto_rtsp, NullTVB, offset,
! END_OF_FRAME, FALSE);
rtsp_tree = proto_item_add_subtree(ti, ett_rtsp);
}
***************
*** 318,324 ****
status_start = status;
while (status < lineend && isdigit(*status))
status_i = status_i * 10 + *status++ - '0';
! proto_tree_add_item_hidden(tree, hf_rtsp_status, NullTVB,
offset + (status_start - data),
status - status_start, status_i);
}
--- 318,324 ----
status_start = status;
while (status < lineend && isdigit(*status))
status_i = status_i * 10 + *status++ - '0';
! proto_tree_add_uint_hidden(tree, hf_rtsp_status, NullTVB,
offset + (status_start - data),
status - status_start, status_i);
}
***************
*** 340,346 ****
u_char *tmp_url;
/* method name */
! proto_tree_add_item_hidden(tree, hf_rtsp_method, NullTVB, offset,
strlen(rtsp_methods[ii]), rtsp_methods[ii]);
/* URL */
--- 340,346 ----
u_char *tmp_url;
/* method name */
! proto_tree_add_string_hidden(tree, hf_rtsp_method, NullTVB, offset,
strlen(rtsp_methods[ii]), rtsp_methods[ii]);
/* URL */
***************
*** 355,361 ****
tmp_url = g_malloc(url - url_start + 1);
memcpy(tmp_url, url_start, url - url_start);
tmp_url[url - url_start] = 0;
! proto_tree_add_item_hidden(tree, hf_rtsp_url, NullTVB,
offset + (url_start - data), url - url_start, tmp_url);
g_free(tmp_url);
}
--- 355,361 ----
tmp_url = g_malloc(url - url_start + 1);
memcpy(tmp_url, url_start, url - url_start);
tmp_url[url - url_start] = 0;
! proto_tree_add_string_hidden(tree, hf_rtsp_url, NullTVB,
offset + (url_start - data), url - url_start, tmp_url);
g_free(tmp_url);
}
Index: packet-rx.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-rx.c,v
retrieving revision 1.11
diff -c -r1.11 packet-rx.c
*** packet-rx.c 2000/05/11 08:15:43 1.11
--- packet-rx.c 2000/05/30 10:38:49
***************
*** 119,159 ****
val_to_str(rxh->type,rx_types,"unknown (%d)"));
rx_tree = proto_item_add_subtree(ti, ett_rx);
! proto_tree_add_item(rx_tree, hf_rx_epoch, NullTVB,
offset, 4, pntohl(&rxh->epoch));
! proto_tree_add_item(rx_tree, hf_rx_cid, NullTVB,
offset+4, 4, pntohl(&rxh->cid));
! proto_tree_add_item(rx_tree, hf_rx_callnumber, NullTVB,
offset+8, 4, pntohl(&rxh->callNumber));
! proto_tree_add_item(rx_tree, hf_rx_seq, NullTVB,
offset+12, 4, pntohl(&rxh->seq));
! proto_tree_add_item(rx_tree, hf_rx_serial, NullTVB,
offset+16, 4, pntohl(&rxh->serial));
! proto_tree_add_item(rx_tree, hf_rx_type, NullTVB,
offset+20, 1, rxh->type);
! rx_flags = proto_tree_add_item(rx_tree, hf_rx_flags, NullTVB,
offset+21, 1, rxh->flags);
rx_tree_flags = proto_item_add_subtree(rx_flags, ett_rx_flags);
! proto_tree_add_item(rx_tree_flags, hf_rx_flags_free_packet, NullTVB,
offset+21, 1, rxh->flags);
! proto_tree_add_item(rx_tree_flags, hf_rx_flags_more_packets, NullTVB,
offset+21, 1, rxh->flags);
! proto_tree_add_item(rx_tree_flags, hf_rx_flags_last_packet, NullTVB,
offset+21, 1, rxh->flags);
! proto_tree_add_item(rx_tree_flags, hf_rx_flags_request_ack, NullTVB,
offset+21, 1, rxh->flags);
! proto_tree_add_item(rx_tree_flags, hf_rx_flags_clientinit, NullTVB,
offset+21, 1, rxh->flags);
! proto_tree_add_item(rx_tree, hf_rx_userstatus, NullTVB,
offset+22, 1, rxh->userStatus);
! proto_tree_add_item(rx_tree, hf_rx_securityindex, NullTVB,
offset+23, 1, rxh->securityIndex);
! proto_tree_add_item(rx_tree, hf_rx_spare, NullTVB,
offset+24, 2, pntohs(&rxh->spare));
! proto_tree_add_item(rx_tree, hf_rx_serviceid, NullTVB,
offset+26, 2, pntohs(&rxh->serviceId));
}
--- 119,159 ----
val_to_str(rxh->type,rx_types,"unknown (%d)"));
rx_tree = proto_item_add_subtree(ti, ett_rx);
! proto_tree_add_uint(rx_tree, hf_rx_epoch, NullTVB,
offset, 4, pntohl(&rxh->epoch));
! proto_tree_add_uint(rx_tree, hf_rx_cid, NullTVB,
offset+4, 4, pntohl(&rxh->cid));
! proto_tree_add_uint(rx_tree, hf_rx_callnumber, NullTVB,
offset+8, 4, pntohl(&rxh->callNumber));
! proto_tree_add_uint(rx_tree, hf_rx_seq, NullTVB,
offset+12, 4, pntohl(&rxh->seq));
! proto_tree_add_uint(rx_tree, hf_rx_serial, NullTVB,
offset+16, 4, pntohl(&rxh->serial));
! proto_tree_add_uint(rx_tree, hf_rx_type, NullTVB,
offset+20, 1, rxh->type);
! rx_flags = proto_tree_add_uint(rx_tree, hf_rx_flags, NullTVB,
offset+21, 1, rxh->flags);
rx_tree_flags = proto_item_add_subtree(rx_flags, ett_rx_flags);
! proto_tree_add_uint(rx_tree_flags, hf_rx_flags_free_packet, NullTVB,
offset+21, 1, rxh->flags);
! proto_tree_add_uint(rx_tree_flags, hf_rx_flags_more_packets, NullTVB,
offset+21, 1, rxh->flags);
! proto_tree_add_uint(rx_tree_flags, hf_rx_flags_last_packet, NullTVB,
offset+21, 1, rxh->flags);
! proto_tree_add_uint(rx_tree_flags, hf_rx_flags_request_ack, NullTVB,
offset+21, 1, rxh->flags);
! proto_tree_add_uint(rx_tree_flags, hf_rx_flags_clientinit, NullTVB,
offset+21, 1, rxh->flags);
! proto_tree_add_uint(rx_tree, hf_rx_userstatus, NullTVB,
offset+22, 1, rxh->userStatus);
! proto_tree_add_uint(rx_tree, hf_rx_securityindex, NullTVB,
offset+23, 1, rxh->securityIndex);
! proto_tree_add_uint(rx_tree, hf_rx_spare, NullTVB,
offset+24, 2, pntohs(&rxh->spare));
! proto_tree_add_uint(rx_tree, hf_rx_serviceid, NullTVB,
offset+26, 2, pntohs(&rxh->serviceId));
}
Index: packet-sap.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-sap.c,v
retrieving revision 1.7
diff -c -r1.7 packet-sap.c
*** packet-sap.c 2000/05/11 08:15:43 1.7
--- packet-sap.c 2000/05/30 10:38:50
***************
*** 154,170 ****
}
if (tree) {
! si = proto_tree_add_item(tree, proto_sap, NullTVB, offset, END_OF_FRAME, NULL);
sap_tree = proto_item_add_subtree(si, ett_sap);
! sif = proto_tree_add_item(sap_tree, hf_sap_flags, NullTVB, offset, 1, pd[offset]);
sap_flags_tree = proto_item_add_subtree(sif, ett_sap_flags);
! proto_tree_add_item(sap_flags_tree, hf_sap_flags_v, NullTVB, offset, 1, pd[offset]);
! proto_tree_add_item(sap_flags_tree, hf_sap_flags_a, NullTVB, offset, 1, pd[offset]);
! proto_tree_add_item(sap_flags_tree, hf_sap_flags_r, NullTVB, offset, 1, pd[offset]);
! proto_tree_add_item(sap_flags_tree, hf_sap_flags_t, NullTVB, offset, 1, pd[offset]);
! proto_tree_add_item(sap_flags_tree, hf_sap_flags_e, NullTVB, offset, 1, pd[offset]);
! proto_tree_add_item(sap_flags_tree, hf_sap_flags_c, NullTVB, offset, 1, pd[offset]);
offset++;
proto_tree_add_text(sap_tree, NullTVB, offset, 1, "Authentication Length: %u", pd[offset]);
--- 154,170 ----
}
if (tree) {
! si = proto_tree_add_item(tree, proto_sap, NullTVB, offset, END_OF_FRAME, FALSE);
sap_tree = proto_item_add_subtree(si, ett_sap);
! sif = proto_tree_add_uint(sap_tree, hf_sap_flags, NullTVB, offset, 1, pd[offset]);
sap_flags_tree = proto_item_add_subtree(sif, ett_sap_flags);
! proto_tree_add_uint(sap_flags_tree, hf_sap_flags_v, NullTVB, offset, 1, pd[offset]);
! proto_tree_add_boolean(sap_flags_tree, hf_sap_flags_a, NullTVB, offset, 1, pd[offset]);
! proto_tree_add_boolean(sap_flags_tree, hf_sap_flags_r, NullTVB, offset, 1, pd[offset]);
! proto_tree_add_boolean(sap_flags_tree, hf_sap_flags_t, NullTVB, offset, 1, pd[offset]);
! proto_tree_add_boolean(sap_flags_tree, hf_sap_flags_e, NullTVB, offset, 1, pd[offset]);
! proto_tree_add_boolean(sap_flags_tree, hf_sap_flags_c, NullTVB, offset, 1, pd[offset]);
offset++;
proto_tree_add_text(sap_tree, NullTVB, offset, 1, "Authentication Length: %u", pd[offset]);
***************
*** 189,202 ****
auth_data_len = auth_len * sizeof(guint32);
! sdi = proto_tree_add_item(sap_tree, hf_auth_data, NullTVB, offset, auth_data_len, pd[offset]);
sa_tree = proto_item_add_subtree(sdi, ett_sap_auth);
! sai = proto_tree_add_item(sa_tree, hf_auth_flags, NullTVB, offset, 1, pd[offset]);
saf_tree = proto_item_add_subtree(sai, ett_sap_authf);
! proto_tree_add_item(saf_tree, hf_auth_flags_v, NullTVB, offset, 1, pd[offset]);
! proto_tree_add_item(saf_tree, hf_auth_flags_p, NullTVB, offset, 1, pd[offset]);
! proto_tree_add_item(saf_tree, hf_auth_flags_t, NullTVB, offset, 1, pd[offset]);
has_pad = pd[offset]&MCAST_SAP_AUTH_BIT_P;
if (has_pad) pad_len = *(pd+offset+auth_data_len-1);
--- 189,202 ----
auth_data_len = auth_len * sizeof(guint32);
! sdi = proto_tree_add_item(sap_tree, hf_auth_data, NullTVB, offset, auth_data_len, FALSE);
sa_tree = proto_item_add_subtree(sdi, ett_sap_auth);
! sai = proto_tree_add_uint(sa_tree, hf_auth_flags, NullTVB, offset, 1, pd[offset]);
saf_tree = proto_item_add_subtree(sai, ett_sap_authf);
! proto_tree_add_uint(saf_tree, hf_auth_flags_v, NullTVB, offset, 1, pd[offset]);
! proto_tree_add_boolean(saf_tree, hf_auth_flags_p, NullTVB, offset, 1, pd[offset]);
! proto_tree_add_uint(saf_tree, hf_auth_flags_t, NullTVB, offset, 1, pd[offset]);
has_pad = pd[offset]&MCAST_SAP_AUTH_BIT_P;
if (has_pad) pad_len = *(pd+offset+auth_data_len-1);
Index: packet-sdp.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-sdp.c,v
retrieving revision 1.7
diff -c -r1.7 packet-sdp.c
*** packet-sdp.c 2000/05/11 08:15:43 1.7
--- packet-sdp.c 2000/05/30 10:38:50
***************
*** 72,78 ****
if (!tree)
return;
! ti = proto_tree_add_item(tree, proto_sdp, NullTVB, offset, END_OF_FRAME, NULL);
sdp_tree = proto_item_add_subtree(ti, ett_sdp);
section = 0;
--- 72,78 ----
if (!tree)
return;
! ti = proto_tree_add_item(tree, proto_sdp, NullTVB, offset, END_OF_FRAME, FALSE);
sdp_tree = proto_item_add_subtree(ti, ett_sdp);
section = 0;
Index: packet-smb-browse.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-smb-browse.c,v
retrieving revision 1.3
diff -c -r1.3 packet-smb-browse.c
*** packet-smb-browse.c 2000/05/11 08:15:44 1.3
--- packet-smb-browse.c 2000/05/30 10:38:52
***************
*** 167,173 ****
if (tree) { /* Add the browse tree */
! ti = proto_tree_add_item(parent, proto_smb_browse, NullTVB, DataOffset, DataCount, NULL);
browse_tree = proto_item_add_subtree(ti, ett_browse);
proto_tree_add_text(browse_tree, NullTVB, loc_offset, 1, "OpCode: %s", (OpCode > (sizeof(browse_commands)/sizeof(char *))) ? "Error, No Such Command" : browse_commands[OpCode]);
--- 167,173 ----
if (tree) { /* Add the browse tree */
! ti = proto_tree_add_item(parent, proto_smb_browse, NullTVB, DataOffset, DataCount, FALSE);
browse_tree = proto_item_add_subtree(ti, ett_browse);
proto_tree_add_text(browse_tree, NullTVB, loc_offset, 1, "OpCode: %s", (OpCode > (sizeof(browse_commands)/sizeof(char *))) ? "Error, No Such Command" : browse_commands[OpCode]);
Index: packet-smb-logon.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-smb-logon.c,v
retrieving revision 1.4
diff -c -r1.4 packet-smb-logon.c
*** packet-smb-logon.c 2000/05/11 08:15:45 1.4
--- packet-smb-logon.c 2000/05/30 10:38:53
***************
*** 531,537 ****
if (tree) {
ti = proto_tree_add_item( parent, proto_smb_logon, NullTVB, offset,
! END_OF_FRAME, NULL);
smb_logon_tree = proto_item_add_subtree(ti, ett_smb_logon);
proto_tree_add_text(smb_logon_tree, NullTVB, offset, 1,
--- 531,537 ----
if (tree) {
ti = proto_tree_add_item( parent, proto_smb_logon, NullTVB, offset,
! END_OF_FRAME, FALSE);
smb_logon_tree = proto_item_add_subtree(ti, ett_smb_logon);
proto_tree_add_text(smb_logon_tree, NullTVB, offset, 1,
Index: packet-smb-mailslot.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-smb-mailslot.c,v
retrieving revision 1.4
diff -c -r1.4 packet-smb-mailslot.c
*** packet-smb-mailslot.c 2000/05/11 08:15:45 1.4
--- packet-smb-mailslot.c 2000/05/30 10:38:53
***************
*** 92,98 ****
if (tree) {
ti = proto_tree_add_item( parent, proto_smb_msp, NullTVB, offset,
! END_OF_FRAME, NULL);
smb_msp_tree = proto_item_add_subtree(ti, ett_smb_msp);
proto_tree_add_text(smb_msp_tree, NullTVB, offset, 2, "Op code: %u (%s)",
--- 92,98 ----
if (tree) {
ti = proto_tree_add_item( parent, proto_smb_msp, NullTVB, offset,
! END_OF_FRAME, FALSE);
smb_msp_tree = proto_item_add_subtree(ti, ett_smb_msp);
proto_tree_add_text(smb_msp_tree, NullTVB, offset, 2, "Op code: %u (%s)",
Index: packet-smb-pipe.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-smb-pipe.c,v
retrieving revision 1.8
diff -c -r1.8 packet-smb-pipe.c
*** packet-smb-pipe.c 2000/05/14 20:50:03 1.8
--- packet-smb-pipe.c 2000/05/30 10:38:56
***************
*** 593,599 ****
if (tree) {
! ti = proto_tree_add_item(parent, proto_smb_lanman, NullTVB, SMB_offset + ParameterOffset, ParameterCount, NULL);
lanman_tree = proto_item_add_subtree(ti, ett_lanman);
proto_tree_add_text(lanman_tree, NullTVB, loc_offset, 2, "Function Code: NetShareEnum");
--- 593,599 ----
if (tree) {
! ti = proto_tree_add_item(parent, proto_smb_lanman, NullTVB, SMB_offset + ParameterOffset, ParameterCount, FALSE);
lanman_tree = proto_item_add_subtree(ti, ett_lanman);
proto_tree_add_text(lanman_tree, NullTVB, loc_offset, 2, "Function Code: NetShareEnum");
***************
*** 666,672 ****
if (tree) {
! ti = proto_tree_add_item(parent, proto_smb_lanman, NullTVB, SMB_offset + ParameterOffset, ParameterCount, NULL);
lanman_tree = proto_item_add_subtree(ti, ett_lanman);
proto_tree_add_text(lanman_tree, NullTVB, loc_offset, 2, "Function Code: NetServerEnum2");
--- 666,672 ----
if (tree) {
! ti = proto_tree_add_item(parent, proto_smb_lanman, NullTVB, SMB_offset + ParameterOffset, ParameterCount, FALSE);
lanman_tree = proto_item_add_subtree(ti, ett_lanman);
proto_tree_add_text(lanman_tree, NullTVB, loc_offset, 2, "Function Code: NetServerEnum2");
***************
*** 762,768 ****
if (tree) {
! ti = proto_tree_add_item(parent, proto_smb_lanman, NullTVB, SMB_offset + ParameterOffset, ParameterCount, NULL);
lanman_tree = proto_item_add_subtree(ti, ett_lanman);
if (lanman) {
--- 762,768 ----
if (tree) {
! ti = proto_tree_add_item(parent, proto_smb_lanman, NullTVB, SMB_offset + ParameterOffset, ParameterCount, FALSE);
lanman_tree = proto_item_add_subtree(ti, ett_lanman);
if (lanman) {
***************
*** 851,857 ****
if (tree) {
! ti = proto_tree_add_item(parent, proto_smb_lanman, NullTVB, SMB_offset + DataOffset, END_OF_FRAME, NULL);
lanman_tree = proto_item_add_subtree(ti, ett_lanman);
--- 851,857 ----
if (tree) {
! ti = proto_tree_add_item(parent, proto_smb_lanman, NullTVB, SMB_offset + DataOffset, END_OF_FRAME, FALSE);
lanman_tree = proto_item_add_subtree(ti, ett_lanman);
***************
*** 878,884 ****
if (tree) {
! ti = proto_tree_add_item(parent, proto_smb_lanman, NullTVB, SMB_offset + ParameterOffset, END_OF_FRAME, NULL);
lanman_tree = proto_item_add_subtree(ti, ett_lanman);
proto_tree_add_text(lanman_tree, NullTVB, loc_offset, 0, "Function Code: NetShareEnum");
--- 878,884 ----
if (tree) {
! ti = proto_tree_add_item(parent, proto_smb_lanman, NullTVB, SMB_offset + ParameterOffset, END_OF_FRAME, FALSE);
lanman_tree = proto_item_add_subtree(ti, ett_lanman);
proto_tree_add_text(lanman_tree, NullTVB, loc_offset, 0, "Function Code: NetShareEnum");
***************
*** 1003,1009 ****
if (tree) {
! ti = proto_tree_add_item(parent, proto_smb_lanman, NullTVB, SMB_offset + ParameterOffset, END_OF_FRAME, NULL);
lanman_tree = proto_item_add_subtree(ti, ett_lanman);
proto_tree_add_text(lanman_tree, NullTVB, loc_offset, 2, "Function Code: NetServerEnum2");
--- 1003,1009 ----
if (tree) {
! ti = proto_tree_add_item(parent, proto_smb_lanman, NullTVB, SMB_offset + ParameterOffset, END_OF_FRAME, FALSE);
lanman_tree = proto_item_add_subtree(ti, ett_lanman);
proto_tree_add_text(lanman_tree, NullTVB, loc_offset, 2, "Function Code: NetServerEnum2");
***************
*** 1166,1172 ****
if (tree) {
! ti = proto_tree_add_item(parent, proto_smb_lanman, NullTVB, SMB_offset + ParameterOffset, END_OF_FRAME, NULL);
lanman_tree = proto_item_add_subtree(ti, ett_lanman);
if (lanman) {
proto_tree_add_text(lanman_tree, NullTVB, 0, 0, "%s Response", lanman -> lanman_name);
--- 1166,1172 ----
if (tree) {
! ti = proto_tree_add_item(parent, proto_smb_lanman, NullTVB, SMB_offset + ParameterOffset, END_OF_FRAME, FALSE);
lanman_tree = proto_item_add_subtree(ti, ett_lanman);
if (lanman) {
proto_tree_add_text(lanman_tree, NullTVB, 0, 0, "%s Response", lanman -> lanman_name);
Index: packet-smb.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-smb.c,v
retrieving revision 1.67
diff -c -r1.67 packet-smb.c
*** packet-smb.c 2000/05/25 08:38:54 1.67
--- packet-smb.c 2000/05/30 10:39:14
***************
*** 10351,10357 ****
if (tree) {
! ti = proto_tree_add_item(tree, proto_smb, NullTVB, offset, END_OF_FRAME, NULL);
smb_tree = proto_item_add_subtree(ti, ett_smb);
/* 0xFFSMB is actually a 1 byte msg type and 3 byte server
--- 10351,10357 ----
if (tree) {
! ti = proto_tree_add_item(tree, proto_smb, NullTVB, offset, END_OF_FRAME, FALSE);
smb_tree = proto_item_add_subtree(ti, ett_smb);
/* 0xFFSMB is actually a 1 byte msg type and 3 byte server
Index: packet-sna.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-sna.c,v
retrieving revision 1.15
diff -c -r1.15 packet-sna.c
*** packet-sna.c 2000/05/11 08:15:48 1.15
--- packet-sna.c 2000/05/30 10:39:17
***************
*** 332,344 ****
/* 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, NullTVB, offset, 0, NULL);
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, NullTVB, offset, 0, NULL);
th_tree = proto_item_add_subtree(th_ti, ett_sna_th);
}
--- 332,344 ----
/* 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, NullTVB, offset, 0, 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, NullTVB, offset, 0, FALSE);
th_tree = proto_item_add_subtree(th_ti, ett_sna_th);
}
***************
*** 375,381 ****
/* --- RH --- */
if (BYTES_ARE_IN_FRAME(offset, 3)) {
! rh_ti = proto_tree_add_item(sna_tree, hf_sna_rh, NullTVB, offset, 3, NULL);
rh_tree = proto_item_add_subtree(rh_ti, ett_sna_rh);
dissect_rh(pd, offset, fd, rh_tree);
sna_header_len += 3;
--- 375,381 ----
/* --- RH --- */
if (BYTES_ARE_IN_FRAME(offset, 3)) {
! rh_ti = proto_tree_add_item(sna_tree, hf_sna_rh, NullTVB, offset, 3, FALSE);
rh_tree = proto_item_add_subtree(rh_ti, ett_sna_rh);
dissect_rh(pd, offset, fd, rh_tree);
sna_header_len += 3;
***************
*** 432,449 ****
}
/* Create the bitfield tree */
! bf_item = proto_tree_add_item(tree, hf_sna_th_0, NullTVB, offset, 1, th_0);
bf_tree = proto_item_add_subtree(bf_item, ett_sna_th_fid);
! proto_tree_add_item(bf_tree, hf_sna_th_fid, NullTVB, offset, 1, th_0);
! proto_tree_add_item(bf_tree, hf_sna_th_mpf, NullTVB, offset, 1, th_0);
! proto_tree_add_item(bf_tree, hf_sna_th_efi , NullTVB,offset, 1, th_0);
proto_tree_add_text(tree, NullTVB, offset+1, 1, "Reserved");
! proto_tree_add_item(tree, hf_sna_th_daf , NullTVB,offset+2, 1, daf);
! proto_tree_add_item(tree, hf_sna_th_oaf , NullTVB,offset+4, 1, oaf);
! proto_tree_add_item(tree, hf_sna_th_snf , NullTVB,offset+6, 2, snf);
! proto_tree_add_item(tree, hf_sna_th_dcf , NullTVB,offset+8, 2, dcf);
return bytes_in_header;
--- 432,449 ----
}
/* Create the bitfield tree */
! bf_item = proto_tree_add_uint(tree, hf_sna_th_0, NullTVB, offset, 1, th_0);
bf_tree = proto_item_add_subtree(bf_item, ett_sna_th_fid);
! proto_tree_add_uint(bf_tree, hf_sna_th_fid, NullTVB, offset, 1, th_0);
! proto_tree_add_uint(bf_tree, hf_sna_th_mpf, NullTVB, offset, 1, th_0);
! proto_tree_add_uint(bf_tree, hf_sna_th_efi , NullTVB,offset, 1, th_0);
proto_tree_add_text(tree, NullTVB, offset+1, 1, "Reserved");
! proto_tree_add_uint(tree, hf_sna_th_daf , NullTVB,offset+2, 1, daf);
! proto_tree_add_uint(tree, hf_sna_th_oaf , NullTVB,offset+4, 1, oaf);
! proto_tree_add_uint(tree, hf_sna_th_snf , NullTVB,offset+6, 2, snf);
! proto_tree_add_uint(tree, hf_sna_th_dcf , NullTVB,offset+8, 2, dcf);
return bytes_in_header;
***************
*** 482,494 ****
snf = pntohs(&pd[offset+4]);
/* Create the bitfield tree */
! bf_item = proto_tree_add_item(tree, hf_sna_th_0, NullTVB, offset, 1, th_0);
bf_tree = proto_item_add_subtree(bf_item, ett_sna_th_fid);
! proto_tree_add_item(bf_tree, hf_sna_th_fid, NullTVB, offset, 1, th_0);
! proto_tree_add_item(bf_tree, hf_sna_th_mpf, NullTVB, offset, 1, th_0);
! proto_tree_add_item(bf_tree, hf_sna_th_odai , NullTVB,offset, 1, th_0);
! proto_tree_add_item(bf_tree, hf_sna_th_efi , NullTVB,offset, 1, th_0);
/* Addresses in FID 2 are FT_UINT8 */
proto_tree_add_text(tree, NullTVB, offset+1, 1, "Reserved");
--- 482,494 ----
snf = pntohs(&pd[offset+4]);
/* Create the bitfield tree */
! bf_item = proto_tree_add_uint(tree, hf_sna_th_0, NullTVB, offset, 1, th_0);
bf_tree = proto_item_add_subtree(bf_item, ett_sna_th_fid);
! proto_tree_add_uint(bf_tree, hf_sna_th_fid, NullTVB, offset, 1, th_0);
! proto_tree_add_uint(bf_tree, hf_sna_th_mpf, NullTVB, offset, 1, th_0);
! proto_tree_add_uint(bf_tree, hf_sna_th_odai , NullTVB,offset, 1, th_0);
! proto_tree_add_uint(bf_tree, hf_sna_th_efi , NullTVB,offset, 1, th_0);
/* Addresses in FID 2 are FT_UINT8 */
proto_tree_add_text(tree, NullTVB, offset+1, 1, "Reserved");
***************
*** 496,502 ****
"Destination Address Field: 0x%02x", daf);
proto_tree_add_uint_format(tree, hf_sna_th_oaf , NullTVB,offset+3, 1, oaf,
"Origin Address Field: 0x%02x", oaf);
! proto_tree_add_item(tree, hf_sna_th_snf , NullTVB,offset+4, 2, snf);
return bytes_in_header;
}
--- 496,502 ----
"Destination Address Field: 0x%02x", daf);
proto_tree_add_uint_format(tree, hf_sna_th_oaf , NullTVB,offset+3, 1, oaf,
"Origin Address Field: 0x%02x", oaf);
! proto_tree_add_uint(tree, hf_sna_th_snf , NullTVB,offset+4, 2, snf);
return bytes_in_header;
}
***************
*** 524,537 ****
lsid = pd[offset+1];
/* Create the bitfield tree */
! bf_item = proto_tree_add_item(tree, hf_sna_th_0, NullTVB, offset, 1, th_0);
bf_tree = proto_item_add_subtree(bf_item, ett_sna_th_fid);
! proto_tree_add_item(bf_tree, hf_sna_th_fid, NullTVB, offset, 1, th_0);
! proto_tree_add_item(bf_tree, hf_sna_th_mpf, NullTVB, offset, 1, th_0);
! proto_tree_add_item(bf_tree, hf_sna_th_efi , NullTVB,offset, 1, th_0);
! proto_tree_add_item(tree, hf_sna_th_lsid , NullTVB,offset+1, 1, lsid);
return bytes_in_header;
}
--- 524,537 ----
lsid = pd[offset+1];
/* Create the bitfield tree */
! bf_item = proto_tree_add_uint(tree, hf_sna_th_0, NullTVB, offset, 1, th_0);
bf_tree = proto_item_add_subtree(bf_item, ett_sna_th_fid);
! proto_tree_add_uint(bf_tree, hf_sna_th_fid, NullTVB, offset, 1, th_0);
! proto_tree_add_uint(bf_tree, hf_sna_th_mpf, NullTVB, offset, 1, th_0);
! proto_tree_add_uint(bf_tree, hf_sna_th_efi , NullTVB,offset, 1, th_0);
! proto_tree_add_uint(tree, hf_sna_th_lsid , NullTVB,offset+1, 1, lsid);
return bytes_in_header;
}
***************
*** 601,615 ****
th_byte = pd[offset];
/* Create the bitfield tree */
! bf_item = proto_tree_add_item(tree, hf_sna_th_0, NullTVB, offset, 1, th_byte);
bf_tree = proto_item_add_subtree(bf_item, ett_sna_th_fid);
/* Byte 0 */
! proto_tree_add_item(bf_tree, hf_sna_th_fid, NullTVB, offset, 1, th_byte);
! proto_tree_add_item(bf_tree, hf_sna_th_tg_sweep, NullTVB, offset, 1, th_byte);
! proto_tree_add_item(bf_tree, hf_sna_th_er_vr_supp_ind, NullTVB, offset, 1, th_byte);
! proto_tree_add_item(bf_tree, hf_sna_th_vr_pac_cnt_ind, NullTVB, offset, 1, th_byte);
! proto_tree_add_item(bf_tree, hf_sna_th_ntwk_prty, NullTVB, offset, 1, th_byte);
offset += 1;
th_byte = pd[offset];
--- 601,615 ----
th_byte = pd[offset];
/* Create the bitfield tree */
! bf_item = proto_tree_add_uint(tree, hf_sna_th_0, NullTVB, offset, 1, th_byte);
bf_tree = proto_item_add_subtree(bf_item, ett_sna_th_fid);
/* Byte 0 */
! proto_tree_add_uint(bf_tree, hf_sna_th_fid, NullTVB, offset, 1, th_byte);
! proto_tree_add_uint(bf_tree, hf_sna_th_tg_sweep, NullTVB, offset, 1, th_byte);
! proto_tree_add_uint(bf_tree, hf_sna_th_er_vr_supp_ind, NullTVB, offset, 1, th_byte);
! proto_tree_add_uint(bf_tree, hf_sna_th_vr_pac_cnt_ind, NullTVB, offset, 1, th_byte);
! proto_tree_add_uint(bf_tree, hf_sna_th_ntwk_prty, NullTVB, offset, 1, th_byte);
offset += 1;
th_byte = pd[offset];
***************
*** 619,627 ****
bf_tree = proto_item_add_subtree(bf_item, ett_sna_th_fid);
/* Byte 1 */
! proto_tree_add_item(bf_tree, hf_sna_th_tgsf, NullTVB, offset, 1, th_byte);
! proto_tree_add_item(bf_tree, hf_sna_th_mft, NullTVB, offset, 1, th_byte);
! proto_tree_add_item(bf_tree, hf_sna_th_piubf, NullTVB, offset, 1, th_byte);
mft = th_byte & 0x04;
offset += 1;
--- 619,627 ----
bf_tree = proto_item_add_subtree(bf_item, ett_sna_th_fid);
/* Byte 1 */
! proto_tree_add_uint(bf_tree, hf_sna_th_tgsf, NullTVB, offset, 1, th_byte);
! proto_tree_add_boolean(bf_tree, hf_sna_th_mft, NullTVB, offset, 1, th_byte);
! proto_tree_add_uint(bf_tree, hf_sna_th_piubf, NullTVB, offset, 1, th_byte);
mft = th_byte & 0x04;
offset += 1;
***************
*** 633,645 ****
/* Byte 2 */
if (mft) {
! proto_tree_add_item(bf_tree, hf_sna_th_nlpoi, NullTVB, offset, 1, th_byte);
! proto_tree_add_item(bf_tree, hf_sna_th_nlp_cp, NullTVB, offset, 1, th_byte);
}
else {
! proto_tree_add_item(bf_tree, hf_sna_th_iern, NullTVB, offset, 1, th_byte);
}
! proto_tree_add_item(bf_tree, hf_sna_th_ern, NullTVB, offset, 1, th_byte);
offset += 1;
th_byte = pd[offset];
--- 633,645 ----
/* Byte 2 */
if (mft) {
! proto_tree_add_uint(bf_tree, hf_sna_th_nlpoi, NullTVB, offset, 1, th_byte);
! proto_tree_add_uint(bf_tree, hf_sna_th_nlp_cp, NullTVB, offset, 1, th_byte);
}
else {
! proto_tree_add_uint(bf_tree, hf_sna_th_iern, NullTVB, offset, 1, th_byte);
}
! proto_tree_add_uint(bf_tree, hf_sna_th_ern, NullTVB, offset, 1, th_byte);
offset += 1;
th_byte = pd[offset];
***************
*** 649,656 ****
bf_tree = proto_item_add_subtree(bf_item, ett_sna_th_fid);
/* Byte 3 */
! proto_tree_add_item(bf_tree, hf_sna_th_vrn, NullTVB, offset, 1, th_byte);
! proto_tree_add_item(bf_tree, hf_sna_th_tpf, NullTVB, offset, 1, th_byte);
offset += 1;
th_word = pntohs(&pd[offset]);
--- 649,656 ----
bf_tree = proto_item_add_subtree(bf_item, ett_sna_th_fid);
/* Byte 3 */
! proto_tree_add_uint(bf_tree, hf_sna_th_vrn, NullTVB, offset, 1, th_byte);
! proto_tree_add_uint(bf_tree, hf_sna_th_tpf, NullTVB, offset, 1, th_byte);
offset += 1;
th_word = pntohs(&pd[offset]);
***************
*** 660,671 ****
bf_tree = proto_item_add_subtree(bf_item, ett_sna_th_fid);
/* Bytes 4-5 */
! proto_tree_add_item(bf_tree, hf_sna_th_vr_cwi, NullTVB, offset, 2, th_word);
! proto_tree_add_item(bf_tree, hf_sna_th_tg_nonfifo_ind, NullTVB, offset, 2, th_word);
! proto_tree_add_item(bf_tree, hf_sna_th_vr_sqti, NullTVB, offset, 2, th_word);
/* I'm not sure about byte-order on this one... */
! proto_tree_add_item(bf_tree, hf_sna_th_tg_snf, NullTVB, offset, 2, th_word);
offset += 2;
th_word = pntohs(&pd[offset]);
--- 660,671 ----
bf_tree = proto_item_add_subtree(bf_item, ett_sna_th_fid);
/* Bytes 4-5 */
! proto_tree_add_uint(bf_tree, hf_sna_th_vr_cwi, NullTVB, offset, 2, th_word);
! proto_tree_add_boolean(bf_tree, hf_sna_th_tg_nonfifo_ind, NullTVB, offset, 2, th_word);
! proto_tree_add_uint(bf_tree, hf_sna_th_vr_sqti, NullTVB, offset, 2, th_word);
/* I'm not sure about byte-order on this one... */
! proto_tree_add_uint(bf_tree, hf_sna_th_tg_snf, NullTVB, offset, 2, th_word);
offset += 2;
th_word = pntohs(&pd[offset]);
***************
*** 675,697 ****
bf_tree = proto_item_add_subtree(bf_item, ett_sna_th_fid);
/* Bytes 6-7 */
! proto_tree_add_item(bf_tree, hf_sna_th_vrprq, NullTVB, offset, 2, th_word);
! proto_tree_add_item(bf_tree, hf_sna_th_vrprs, NullTVB, offset, 2, th_word);
! proto_tree_add_item(bf_tree, hf_sna_th_vr_cwri, NullTVB, offset, 2, th_word);
! proto_tree_add_item(bf_tree, hf_sna_th_vr_rwi, NullTVB, offset, 2, th_word);
/* I'm not sure about byte-order on this one... */
! proto_tree_add_item(bf_tree, hf_sna_th_vr_snf_send, NullTVB, offset, 2, th_word);
offset += 2;
/* Bytes 8-11 */
! proto_tree_add_item(tree, hf_sna_th_dsaf, NullTVB, offset, 4, dsaf);
offset += 4;
/* Bytes 12-15 */
! proto_tree_add_item(tree, hf_sna_th_osaf, NullTVB, offset, 4, osaf);
offset += 4;
th_byte = pd[offset];
--- 675,697 ----
bf_tree = proto_item_add_subtree(bf_item, ett_sna_th_fid);
/* Bytes 6-7 */
! proto_tree_add_boolean(bf_tree, hf_sna_th_vrprq, NullTVB, offset, 2, th_word);
! proto_tree_add_boolean(bf_tree, hf_sna_th_vrprs, NullTVB, offset, 2, th_word);
! proto_tree_add_uint(bf_tree, hf_sna_th_vr_cwri, NullTVB, offset, 2, th_word);
! proto_tree_add_boolean(bf_tree, hf_sna_th_vr_rwi, NullTVB, offset, 2, th_word);
/* I'm not sure about byte-order on this one... */
! proto_tree_add_uint(bf_tree, hf_sna_th_vr_snf_send, NullTVB, offset, 2, th_word);
offset += 2;
/* Bytes 8-11 */
! proto_tree_add_uint(tree, hf_sna_th_dsaf, NullTVB, offset, 4, dsaf);
offset += 4;
/* Bytes 12-15 */
! proto_tree_add_uint(tree, hf_sna_th_osaf, NullTVB, offset, 4, osaf);
offset += 4;
th_byte = pd[offset];
***************
*** 701,722 ****
bf_tree = proto_item_add_subtree(bf_item, ett_sna_th_fid);
/* Byte 16 */
! proto_tree_add_item(tree, hf_sna_th_snai, NullTVB, offset, 1, th_byte);
/* We luck out here because in their infinite wisdom the SNA
* architects placed the MPF and EFI fields in the same bitfield
* locations, even though for FID4 they're not in byte 0.
* Thank you IBM! */
! proto_tree_add_item(tree, hf_sna_th_mpf, NullTVB, offset, 1, th_byte);
! proto_tree_add_item(tree, hf_sna_th_efi, NullTVB, offset, 1, th_byte);
offset += 2; /* 1 for byte 16, 1 for byte 17 which is reserved */
/* Bytes 18-25 */
! proto_tree_add_item(tree, hf_sna_th_def, NullTVB, offset+0, 2, def);
! proto_tree_add_item(tree, hf_sna_th_oef, NullTVB, offset+2, 2, oef);
! proto_tree_add_item(tree, hf_sna_th_snf, NullTVB, offset+4, 2, snf);
! proto_tree_add_item(tree, hf_sna_th_snf, NullTVB, offset+6, 2, dcf);
return bytes_in_header;
}
--- 701,722 ----
bf_tree = proto_item_add_subtree(bf_item, ett_sna_th_fid);
/* Byte 16 */
! proto_tree_add_boolean(tree, hf_sna_th_snai, NullTVB, offset, 1, th_byte);
/* We luck out here because in their infinite wisdom the SNA
* architects placed the MPF and EFI fields in the same bitfield
* locations, even though for FID4 they're not in byte 0.
* Thank you IBM! */
! proto_tree_add_uint(tree, hf_sna_th_mpf, NullTVB, offset, 1, th_byte);
! proto_tree_add_uint(tree, hf_sna_th_efi, NullTVB, offset, 1, th_byte);
offset += 2; /* 1 for byte 16, 1 for byte 17 which is reserved */
/* Bytes 18-25 */
! proto_tree_add_uint(tree, hf_sna_th_def, NullTVB, offset+0, 2, def);
! proto_tree_add_uint(tree, hf_sna_th_oef, NullTVB, offset+2, 2, oef);
! proto_tree_add_uint(tree, hf_sna_th_snf, NullTVB, offset+4, 2, snf);
! proto_tree_add_uint(tree, hf_sna_th_snf, NullTVB, offset+6, 2, dcf);
return bytes_in_header;
}
***************
*** 744,760 ****
}
/* Create the bitfield tree */
! bf_item = proto_tree_add_item(tree, hf_sna_th_0, NullTVB, offset, 1, th_0);
bf_tree = proto_item_add_subtree(bf_item, ett_sna_th_fid);
! proto_tree_add_item(bf_tree, hf_sna_th_fid, NullTVB, offset, 1, th_0);
! proto_tree_add_item(bf_tree, hf_sna_th_mpf, NullTVB, offset, 1, th_0);
! proto_tree_add_item(bf_tree, hf_sna_th_efi, NullTVB, offset, 1, th_0);
proto_tree_add_text(tree, NullTVB, offset+1, 1, "Reserved");
! proto_tree_add_item(tree, hf_sna_th_snf, NullTVB, offset+2, 2, snf);
! proto_tree_add_item(tree, hf_sna_th_sa, NullTVB, offset+4, 8, &pd[offset+4]);
return bytes_in_header;
--- 744,760 ----
}
/* Create the bitfield tree */
! bf_item = proto_tree_add_uint(tree, hf_sna_th_0, NullTVB, offset, 1, th_0);
bf_tree = proto_item_add_subtree(bf_item, ett_sna_th_fid);
! proto_tree_add_uint(bf_tree, hf_sna_th_fid, NullTVB, offset, 1, th_0);
! proto_tree_add_uint(bf_tree, hf_sna_th_mpf, NullTVB, offset, 1, th_0);
! proto_tree_add_uint(bf_tree, hf_sna_th_efi, NullTVB, offset, 1, th_0);
proto_tree_add_text(tree, NullTVB, offset+1, 1, "Reserved");
! proto_tree_add_uint(tree, hf_sna_th_snf, NullTVB, offset+2, 2, snf);
! proto_tree_add_bytes(tree, hf_sna_th_sa, NullTVB, offset+4, 8, &pd[offset+4]);
return bytes_in_header;
***************
*** 788,806 ****
}
/* Create the bitfield tree */
! bf_item = proto_tree_add_item(tree, hf_sna_th_0, NullTVB, offset, 1, th_0);
bf_tree = proto_item_add_subtree(bf_item, ett_sna_th_fid);
! proto_tree_add_item(bf_tree, hf_sna_th_fid, NullTVB, offset, 1, th_0);
proto_tree_add_text(tree, NullTVB, offset+1, 1, "Reserved");
! proto_tree_add_item(tree, hf_sna_th_cmd_fmt, NullTVB, offset+2, 1, cmd_fmt);
! proto_tree_add_item(tree, hf_sna_th_cmd_type, NullTVB, offset+3, 1, cmd_type);
! proto_tree_add_item(tree, hf_sna_th_cmd_sn, NullTVB, offset+4, 2, cmd_sn);
proto_tree_add_text(tree, NullTVB, offset+6, 18, "Reserved");
! proto_tree_add_item(tree, hf_sna_th_dcf, NullTVB, offset+24, 8, dcf);
return bytes_in_header;
}
--- 788,806 ----
}
/* Create the bitfield tree */
! bf_item = proto_tree_add_uint(tree, hf_sna_th_0, NullTVB, offset, 1, th_0);
bf_tree = proto_item_add_subtree(bf_item, ett_sna_th_fid);
! proto_tree_add_uint(bf_tree, hf_sna_th_fid, NullTVB, offset, 1, th_0);
proto_tree_add_text(tree, NullTVB, offset+1, 1, "Reserved");
! proto_tree_add_uint(tree, hf_sna_th_cmd_fmt, NullTVB, offset+2, 1, cmd_fmt);
! proto_tree_add_uint(tree, hf_sna_th_cmd_type, NullTVB, offset+3, 1, cmd_type);
! proto_tree_add_uint(tree, hf_sna_th_cmd_sn, NullTVB, offset+4, 2, cmd_sn);
proto_tree_add_text(tree, NullTVB, offset+6, 18, "Reserved");
! proto_tree_add_uint(tree, hf_sna_th_dcf, NullTVB, offset+24, 8, dcf);
return bytes_in_header;
}
***************
*** 822,877 ****
is_response = (rh_0 & 0x80);
/* Create the bitfield tree for byte 0*/
! bf_item = proto_tree_add_item(tree, hf_sna_rh_0, NullTVB, offset, 1, rh_0);
bf_tree = proto_item_add_subtree(bf_item, ett_sna_rh_0);
! proto_tree_add_item(bf_tree, hf_sna_rh_rri, NullTVB, offset, 1, rh_0);
! proto_tree_add_item(bf_tree, hf_sna_rh_ru_category, NullTVB, offset, 1, rh_0);
! proto_tree_add_item(bf_tree, hf_sna_rh_fi, NullTVB, offset, 1, rh_0);
! proto_tree_add_item(bf_tree, hf_sna_rh_sdi, NullTVB, offset, 1, rh_0);
! proto_tree_add_item(bf_tree, hf_sna_rh_bci, NullTVB, offset, 1, rh_0);
! proto_tree_add_item(bf_tree, hf_sna_rh_eci, NullTVB, offset, 1, rh_0);
offset += 1;
/* Create the bitfield tree for byte 1*/
! bf_item = proto_tree_add_item(tree, hf_sna_rh_1, NullTVB, offset, 1, rh_1);
bf_tree = proto_item_add_subtree(bf_item, ett_sna_rh_1);
! proto_tree_add_item(bf_tree, hf_sna_rh_dr1, NullTVB, offset, 1, rh_1);
if (!is_response) {
! proto_tree_add_item(bf_tree, hf_sna_rh_lcci, NullTVB, offset, 1, rh_1);
}
! proto_tree_add_item(bf_tree, hf_sna_rh_dr2, NullTVB, offset, 1, rh_1);
if (is_response) {
! proto_tree_add_item(bf_tree, hf_sna_rh_rti, NullTVB, offset, 1, rh_1);
}
else {
! proto_tree_add_item(bf_tree, hf_sna_rh_eri, NullTVB, offset, 1, rh_1);
! proto_tree_add_item(bf_tree, hf_sna_rh_rlwi, NullTVB, offset, 1, rh_1);
}
! proto_tree_add_item(bf_tree, hf_sna_rh_qri, NullTVB, offset, 1, rh_1);
! proto_tree_add_item(bf_tree, hf_sna_rh_pi, NullTVB, offset, 1, rh_1);
offset += 1;
/* Create the bitfield tree for byte 2*/
! bf_item = proto_tree_add_item(tree, hf_sna_rh_2, NullTVB, offset, 1, rh_2);
if (!is_response) {
bf_tree = proto_item_add_subtree(bf_item, ett_sna_rh_2);
! proto_tree_add_item(bf_tree, hf_sna_rh_bbi, NullTVB, offset, 1, rh_2);
! proto_tree_add_item(bf_tree, hf_sna_rh_ebi, NullTVB, offset, 1, rh_2);
! proto_tree_add_item(bf_tree, hf_sna_rh_cdi, NullTVB, offset, 1, rh_2);
! proto_tree_add_item(bf_tree, hf_sna_rh_csi, NullTVB, offset, 1, rh_2);
! proto_tree_add_item(bf_tree, hf_sna_rh_edi, NullTVB, offset, 1, rh_2);
! proto_tree_add_item(bf_tree, hf_sna_rh_pdi, NullTVB, offset, 1, rh_2);
! proto_tree_add_item(bf_tree, hf_sna_rh_cebi, NullTVB, offset, 1, rh_2);
}
/* XXX - check for sdi. If TRUE, the next 4 bytes will be sense data */
--- 822,877 ----
is_response = (rh_0 & 0x80);
/* Create the bitfield tree for byte 0*/
! bf_item = proto_tree_add_uint(tree, hf_sna_rh_0, NullTVB, offset, 1, rh_0);
bf_tree = proto_item_add_subtree(bf_item, ett_sna_rh_0);
! proto_tree_add_uint(bf_tree, hf_sna_rh_rri, NullTVB, offset, 1, rh_0);
! proto_tree_add_uint(bf_tree, hf_sna_rh_ru_category, NullTVB, offset, 1, rh_0);
! proto_tree_add_boolean(bf_tree, hf_sna_rh_fi, NullTVB, offset, 1, rh_0);
! proto_tree_add_boolean(bf_tree, hf_sna_rh_sdi, NullTVB, offset, 1, rh_0);
! proto_tree_add_boolean(bf_tree, hf_sna_rh_bci, NullTVB, offset, 1, rh_0);
! proto_tree_add_boolean(bf_tree, hf_sna_rh_eci, NullTVB, offset, 1, rh_0);
offset += 1;
/* Create the bitfield tree for byte 1*/
! bf_item = proto_tree_add_uint(tree, hf_sna_rh_1, NullTVB, offset, 1, rh_1);
bf_tree = proto_item_add_subtree(bf_item, ett_sna_rh_1);
! proto_tree_add_boolean(bf_tree, hf_sna_rh_dr1, NullTVB, offset, 1, rh_1);
if (!is_response) {
! proto_tree_add_boolean(bf_tree, hf_sna_rh_lcci, NullTVB, offset, 1, rh_1);
}
! proto_tree_add_boolean(bf_tree, hf_sna_rh_dr2, NullTVB, offset, 1, rh_1);
if (is_response) {
! proto_tree_add_boolean(bf_tree, hf_sna_rh_rti, NullTVB, offset, 1, rh_1);
}
else {
! proto_tree_add_boolean(bf_tree, hf_sna_rh_eri, NullTVB, offset, 1, rh_1);
! proto_tree_add_boolean(bf_tree, hf_sna_rh_rlwi, NullTVB, offset, 1, rh_1);
}
! proto_tree_add_boolean(bf_tree, hf_sna_rh_qri, NullTVB, offset, 1, rh_1);
! proto_tree_add_boolean(bf_tree, hf_sna_rh_pi, NullTVB, offset, 1, rh_1);
offset += 1;
/* Create the bitfield tree for byte 2*/
! bf_item = proto_tree_add_uint(tree, hf_sna_rh_2, NullTVB, offset, 1, rh_2);
if (!is_response) {
bf_tree = proto_item_add_subtree(bf_item, ett_sna_rh_2);
! proto_tree_add_boolean(bf_tree, hf_sna_rh_bbi, NullTVB, offset, 1, rh_2);
! proto_tree_add_boolean(bf_tree, hf_sna_rh_ebi, NullTVB, offset, 1, rh_2);
! proto_tree_add_boolean(bf_tree, hf_sna_rh_cdi, NullTVB, offset, 1, rh_2);
! proto_tree_add_boolean(bf_tree, hf_sna_rh_csi, NullTVB, offset, 1, rh_2);
! proto_tree_add_boolean(bf_tree, hf_sna_rh_edi, NullTVB, offset, 1, rh_2);
! proto_tree_add_boolean(bf_tree, hf_sna_rh_pdi, NullTVB, offset, 1, rh_2);
! proto_tree_add_boolean(bf_tree, hf_sna_rh_cebi, NullTVB, offset, 1, rh_2);
}
/* XXX - check for sdi. If TRUE, the next 4 bytes will be sense data */
Index: packet-snmp.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-snmp.c,v
retrieving revision 1.35
diff -c -r1.35 packet-snmp.c
*** packet-snmp.c 2000/05/30 03:35:54 1.35
--- packet-snmp.c 2000/05/30 10:39:20
***************
*** 1217,1223 ****
if (tree) {
item = proto_tree_add_item(tree, proto, NullTVB, offset,
! END_OF_FRAME, NULL);
snmp_tree = proto_item_add_subtree(item, ett);
}
--- 1217,1223 ----
if (tree) {
item = proto_tree_add_item(tree, proto, NullTVB, offset,
! END_OF_FRAME, FALSE);
snmp_tree = proto_item_add_subtree(item, ett);
}
***************
*** 1325,1335 ****
hf_snmpv3_flags, NullTVB, offset, length,
msgflags[0], "Flags: 0x%02x", msgflags[0]);
flags_tree = proto_item_add_subtree(item, ett_flags);
! proto_tree_add_item(flags_tree, hf_snmpv3_flags_report,
NullTVB, offset, length, msgflags[0]);
! proto_tree_add_item(flags_tree, hf_snmpv3_flags_crypt,
NullTVB, offset, length, msgflags[0]);
! proto_tree_add_item(flags_tree, hf_snmpv3_flags_auth,
NullTVB, offset, length, msgflags[0]);
}
encrypted = msgflags[0] & TH_CRYPT;
--- 1325,1335 ----
hf_snmpv3_flags, NullTVB, offset, length,
msgflags[0], "Flags: 0x%02x", msgflags[0]);
flags_tree = proto_item_add_subtree(item, ett_flags);
! proto_tree_add_boolean(flags_tree, hf_snmpv3_flags_report,
NullTVB, offset, length, msgflags[0]);
! proto_tree_add_boolean(flags_tree, hf_snmpv3_flags_crypt,
NullTVB, offset, length, msgflags[0]);
! proto_tree_add_boolean(flags_tree, hf_snmpv3_flags_auth,
NullTVB, offset, length, msgflags[0]);
}
encrypted = msgflags[0] & TH_CRYPT;
***************
*** 1610,1616 ****
if (tree) {
item = proto_tree_add_item(tree, proto, NullTVB, offset,
! END_OF_FRAME, NULL);
smux_tree = proto_item_add_subtree(item, ett);
}
--- 1610,1616 ----
if (tree) {
item = proto_tree_add_item(tree, proto, NullTVB, offset,
! END_OF_FRAME, FALSE);
smux_tree = proto_item_add_subtree(item, ett);
}
Index: packet-socks.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-socks.c,v
retrieving revision 1.4
diff -c -r1.4 packet-socks.c
*** packet-socks.c 2000/05/11 08:15:49 1.4
--- packet-socks.c 2000/05/30 10:39:23
***************
*** 308,314 ****
if ( (offset + 4) > fd->cap_len)
proto_tree_add_text(tree, NullTVB, offset, 0, "*** FRAME TOO SHORT ***");
! proto_tree_add_item( tree, hf_socks_ip_dst, NullTVB, offset,
4, GWORD( pd, offset));
offset += 4;
}
--- 308,314 ----
if ( (offset + 4) > fd->cap_len)
proto_tree_add_text(tree, NullTVB, offset, 0, "*** FRAME TOO SHORT ***");
! proto_tree_add_ipv4( tree, hf_socks_ip_dst, NullTVB, offset,
4, GWORD( pd, offset));
offset += 4;
}
***************
*** 321,328 ****
if ((offset + 16) > fd->cap_len)
proto_tree_add_text(tree, NullTVB, offset, 0, "*** FRAME TOO SHORT ***");
! proto_tree_add_item( tree, hf_socks_ip6_dst, NullTVB, offset,
! 4, GWORD( pd, offset));
offset += 16;
}
--- 321,328 ----
if ((offset + 16) > fd->cap_len)
proto_tree_add_text(tree, NullTVB, offset, 0, "*** FRAME TOO SHORT ***");
! proto_tree_add_ipv6( tree, hf_socks_ip6_dst, NullTVB, offset,
! 4, &pd[offset]);
offset += 16;
}
***************
*** 385,392 ****
col_add_fstr(fd, COL_INFO, "Version: 5, UDP Associated packet");
if ( tree) {
! ti = proto_tree_add_item( tree, proto_socks, NullTVB, offset,
! END_OF_FRAME, NULL, "Socks:" );
socks_tree = proto_item_add_subtree(ti, ett_socks);
--- 385,392 ----
col_add_fstr(fd, COL_INFO, "Version: 5, UDP Associated packet");
if ( tree) {
! ti = proto_tree_add_protocol_format( tree, proto_socks, NullTVB, offset,
! END_OF_FRAME, "Socks" );
socks_tree = proto_item_add_subtree(ti, ett_socks);
***************
*** 403,409 ****
hash_info->udp_remote_port = pntohs( &pd[ offset]);
CHECK_PACKET_LENGTH( 2);
! proto_tree_add_item( socks_tree, hf_socks_dstport, NullTVB,
offset, 2, hash_info->udp_remote_port);
offset += 2;
--- 403,409 ----
hash_info->udp_remote_port = pntohs( &pd[ offset]);
CHECK_PACKET_LENGTH( 2);
! proto_tree_add_uint( socks_tree, hf_socks_dstport, NullTVB,
offset, 2, hash_info->udp_remote_port);
offset += 2;
***************
*** 475,493 ****
++offset;
/* Do remote port */
! proto_tree_add_item( tree, hf_socks_dstport, NullTVB, offset, 2,
pntohs( &pd[ offset]));
offset += 2;
/* Do destination address */
! proto_tree_add_item( tree, hf_socks_ip_dst, NullTVB, offset,
4, GWORD( pd, offset));
offset += 4;
/*$$ check this, needs to do length checking */
/* display user name */
! proto_tree_add_item( tree, hf_user_name, NullTVB, offset,
strlen( &pd[offset]) + 1,
&pd[offset]);
--- 475,493 ----
++offset;
/* Do remote port */
! proto_tree_add_uint( tree, hf_socks_dstport, NullTVB, offset, 2,
pntohs( &pd[ offset]));
offset += 2;
/* Do destination address */
! proto_tree_add_ipv4( tree, hf_socks_ip_dst, NullTVB, offset,
4, GWORD( pd, offset));
offset += 4;
/*$$ check this, needs to do length checking */
/* display user name */
! proto_tree_add_string( tree, hf_user_name, NullTVB, offset,
strlen( &pd[offset]) + 1,
&pd[offset]);
***************
*** 507,517 ****
++offset;
/* Do remote port */
! proto_tree_add_item( tree, hf_socks_dstport, NullTVB, offset, 2,
pntohs( &pd[ offset]));
offset += 2;;
/* Do remote address */
! proto_tree_add_item( tree, hf_socks_ip_dst, NullTVB, offset, 4,
GWORD( pd, offset));
}
--- 507,517 ----
++offset;
/* Do remote port */
! proto_tree_add_uint( tree, hf_socks_dstport, NullTVB, offset, 2,
pntohs( &pd[ offset]));
offset += 2;;
/* Do remote address */
! proto_tree_add_ipv4( tree, hf_socks_ip_dst, NullTVB, offset, 4,
GWORD( pd, offset));
}
***************
*** 546,552 ****
CHECK_PACKET_LENGTH( 2);
/* Do version */
! proto_tree_add_item( tree, hf_socks_ver, NullTVB, offset, 1,
hash_info->version);
++offset;
--- 546,552 ----
CHECK_PACKET_LENGTH( 2);
/* Do version */
! proto_tree_add_uint( tree, hf_socks_ver, NullTVB, offset, 1,
hash_info->version);
++offset;
***************
*** 1025,1031 ****
if (tree) {
ti = proto_tree_add_item( tree, proto_socks, NullTVB, offset,
! END_OF_FRAME, NULL, "Socks:" );
socks_tree = proto_item_add_subtree(ti, ett_socks);
--- 1025,1031 ----
if (tree) {
ti = proto_tree_add_item( tree, proto_socks, NullTVB, offset,
! END_OF_FRAME, FALSE );
socks_tree = proto_item_add_subtree(ti, ett_socks);
***************
*** 1044,1057 ****
"Command: %d (%s)", hash_info->command,
get_command_name(hash_info->command));
! proto_tree_add_item( socks_tree, hf_socks_ip_dst, NullTVB,
offset, 0, hash_info->dst_addr);
/* no fake address for ping & traceroute */
if (( hash_info->command != PING_COMMAND) &&
( hash_info->command != TRACERT_COMMAND)){
! proto_tree_add_item( socks_tree, hf_socks_dstport, NullTVB,
offset, 0, hash_info->port);
}
}
--- 1044,1057 ----
"Command: %d (%s)", hash_info->command,
get_command_name(hash_info->command));
! proto_tree_add_ipv4( socks_tree, hf_socks_ip_dst, NullTVB,
offset, 0, hash_info->dst_addr);
/* no fake address for ping & traceroute */
if (( hash_info->command != PING_COMMAND) &&
( hash_info->command != TRACERT_COMMAND)){
! proto_tree_add_uint( socks_tree, hf_socks_dstport, NullTVB,
offset, 0, hash_info->port);
}
}
***************
*** 1152,1156 ****
dissector_add("tcp.port", TCP_PORT_SOCKS, dissect_socks);
}
-
-
--- 1152,1154 ----
Index: packet-srvloc.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-srvloc.c,v
retrieving revision 1.8
diff -c -r1.8 packet-srvloc.c
*** packet-srvloc.c 2000/05/11 08:15:52 1.8
--- packet-srvloc.c 2000/05/30 10:39:24
***************
*** 192,198 ****
col_add_str(fd, COL_INFO, val_to_str(pd[offset + 1], srvloc_functions, "Unknown Function (%d)"));
if (tree) {
! ti = proto_tree_add_item(tree, proto_srvloc, NullTVB, offset, END_OF_FRAME, NULL);
srvloc_tree = proto_item_add_subtree(ti, ett_srvloc);
if ( END_OF_FRAME > sizeof(srvloc_hdr) ) {
--- 192,198 ----
col_add_str(fd, COL_INFO, val_to_str(pd[offset + 1], srvloc_functions, "Unknown Function (%d)"));
if (tree) {
! ti = proto_tree_add_item(tree, proto_srvloc, NullTVB, offset, END_OF_FRAME, FALSE);
srvloc_tree = proto_item_add_subtree(ti, ett_srvloc);
if ( END_OF_FRAME > sizeof(srvloc_hdr) ) {
***************
*** 200,209 ****
srvloc_hdr.length = pntohs(&srvloc_hdr.length);
srvloc_hdr.encoding = pntohs(&srvloc_hdr.encoding);
srvloc_hdr.xid = pntohs(&srvloc_hdr.xid);
! proto_tree_add_item(srvloc_tree, hf_srvloc_version, NullTVB, offset, 1, srvloc_hdr.version);
! proto_tree_add_item(srvloc_tree, hf_srvloc_function, NullTVB, offset + 1, 1, srvloc_hdr.function);
proto_tree_add_text(srvloc_tree, NullTVB, offset + 2, 2, "Length: %d",srvloc_hdr.length);
! tf = proto_tree_add_item(srvloc_tree, hf_srvloc_flags, NullTVB, offset + 4, 1, srvloc_hdr.flags);
srvloc_flags = proto_item_add_subtree(tf, ett_srvloc_flags);
proto_tree_add_text(srvloc_flags, NullTVB, offset + 4, 0, "Overflow %d... .xxx", (srvloc_hdr.flags & FLAG_O) >> 7 );
proto_tree_add_text(srvloc_flags, NullTVB, offset + 4, 0, "Monolingual .%d.. .xxx", (srvloc_hdr.flags & FLAG_M) >> 6 );
--- 200,209 ----
srvloc_hdr.length = pntohs(&srvloc_hdr.length);
srvloc_hdr.encoding = pntohs(&srvloc_hdr.encoding);
srvloc_hdr.xid = pntohs(&srvloc_hdr.xid);
! proto_tree_add_uint(srvloc_tree, hf_srvloc_version, NullTVB, offset, 1, srvloc_hdr.version);
! proto_tree_add_uint(srvloc_tree, hf_srvloc_function, NullTVB, offset + 1, 1, srvloc_hdr.function);
proto_tree_add_text(srvloc_tree, NullTVB, offset + 2, 2, "Length: %d",srvloc_hdr.length);
! tf = proto_tree_add_uint(srvloc_tree, hf_srvloc_flags, NullTVB, offset + 4, 1, srvloc_hdr.flags);
srvloc_flags = proto_item_add_subtree(tf, ett_srvloc_flags);
proto_tree_add_text(srvloc_flags, NullTVB, offset + 4, 0, "Overflow %d... .xxx", (srvloc_hdr.flags & FLAG_O) >> 7 );
proto_tree_add_text(srvloc_flags, NullTVB, offset + 4, 0, "Monolingual .%d.. .xxx", (srvloc_hdr.flags & FLAG_M) >> 6 );
***************
*** 237,243 ****
case SRVRPLY:
proto_tree_add_text(srvloc_tree, NullTVB, offset, 0, "Service Reply");
! proto_tree_add_item(srvloc_tree, hf_srvloc_error, NullTVB, offset, 2, pd[offset]);;
offset += 2;
proto_tree_add_text(srvloc_tree, NullTVB, offset, 2, "URL Count: %d", pntohs(&pd[offset]));
offset += 2;
--- 237,243 ----
case SRVRPLY:
proto_tree_add_text(srvloc_tree, NullTVB, offset, 0, "Service Reply");
! proto_tree_add_uint(srvloc_tree, hf_srvloc_error, NullTVB, offset, 2, pd[offset]);;
offset += 2;
proto_tree_add_text(srvloc_tree, NullTVB, offset, 2, "URL Count: %d", pntohs(&pd[offset]));
offset += 2;
***************
*** 294,300 ****
case SRVACK:
proto_tree_add_text(srvloc_tree, NullTVB, offset, 0, "Service Acknowledge");
! proto_tree_add_item(srvloc_tree, hf_srvloc_error, NullTVB, offset, 2, pd[offset]);;
offset += 2;
break;
--- 294,300 ----
case SRVACK:
proto_tree_add_text(srvloc_tree, NullTVB, offset, 0, "Service Acknowledge");
! proto_tree_add_uint(srvloc_tree, hf_srvloc_error, NullTVB, offset, 2, pd[offset]);;
offset += 2;
break;
***************
*** 324,330 ****
case ATTRRPLY:
proto_tree_add_text(srvloc_tree, NullTVB, offset, 0, "Attribute Reply");
! proto_tree_add_item(srvloc_tree, hf_srvloc_error, NullTVB, offset, 2, pd[offset]);;
offset += 2;
length = pntohs(&pd[offset]);
proto_tree_add_text(srvloc_tree, NullTVB, offset, 2, "Attribute List length: %d", length);
--- 324,330 ----
case ATTRRPLY:
proto_tree_add_text(srvloc_tree, NullTVB, offset, 0, "Attribute Reply");
! proto_tree_add_uint(srvloc_tree, hf_srvloc_error, NullTVB, offset, 2, pd[offset]);;
offset += 2;
length = pntohs(&pd[offset]);
proto_tree_add_text(srvloc_tree, NullTVB, offset, 2, "Attribute List length: %d", length);
***************
*** 337,343 ****
case DAADVERT:
proto_tree_add_text(srvloc_tree, NullTVB, offset, 0, "DA Advertisement");
! proto_tree_add_item(srvloc_tree, hf_srvloc_error, NullTVB, offset, 2, pd[offset]);;
offset += 2;
length = pntohs(&pd[offset]);
proto_tree_add_text(srvloc_tree, NullTVB, offset, 2, "URL length: %d", length);
--- 337,343 ----
case DAADVERT:
proto_tree_add_text(srvloc_tree, NullTVB, offset, 0, "DA Advertisement");
! proto_tree_add_uint(srvloc_tree, hf_srvloc_error, NullTVB, offset, 2, pd[offset]);;
offset += 2;
length = pntohs(&pd[offset]);
proto_tree_add_text(srvloc_tree, NullTVB, offset, 2, "URL length: %d", length);
***************
*** 372,378 ****
case SRVTYPERPLY:
proto_tree_add_text(srvloc_tree, NullTVB, offset, 0, "Service Type Reply");
! proto_tree_add_item(srvloc_tree, hf_srvloc_error, NullTVB, offset, 2, pd[offset]);;
offset += 2;
proto_tree_add_text(srvloc_tree, NullTVB, offset, 2, "Service Type Count: %d", pntohs(&pd[offset]));
offset += 2;
--- 372,378 ----
case SRVTYPERPLY:
proto_tree_add_text(srvloc_tree, NullTVB, offset, 0, "Service Type Reply");
! proto_tree_add_uint(srvloc_tree, hf_srvloc_error, NullTVB, offset, 2, pd[offset]);;
offset += 2;
proto_tree_add_text(srvloc_tree, NullTVB, offset, 2, "Service Type Count: %d", pntohs(&pd[offset]));
offset += 2;
Index: packet-tacacs.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-tacacs.c,v
retrieving revision 1.4
diff -c -r1.4 packet-tacacs.c
*** packet-tacacs.c 2000/05/11 08:15:52 1.4
--- packet-tacacs.c 2000/05/30 10:39:25
***************
*** 68,88 ****
if (tree)
{
! ti = proto_tree_add_item(tree, proto_tacacs, NullTVB, offset, END_OF_FRAME, NULL);
tacacs_tree = proto_item_add_subtree(ti, ett_tacacs);
! proto_tree_add_item(tacacs_tree, hf_tacacs_version, NullTVB, 0, 0, "XTacacs");
if (pi.match_port == pi.destport)
{
! proto_tree_add_item_hidden(tacacs_tree, hf_tacacs_request, NullTVB,
offset, END_OF_FRAME, TRUE);
proto_tree_add_text(tacacs_tree, NullTVB, offset,
END_OF_FRAME, "Request: <opaque data>" );
}
else
{
! proto_tree_add_item_hidden(tacacs_tree, hf_tacacs_response, NullTVB,
offset, END_OF_FRAME, TRUE);
proto_tree_add_text(tacacs_tree, NullTVB, offset,
END_OF_FRAME, "Response: <opaque data>");
--- 68,88 ----
if (tree)
{
! ti = proto_tree_add_item(tree, proto_tacacs, NullTVB, offset, END_OF_FRAME, FALSE);
tacacs_tree = proto_item_add_subtree(ti, ett_tacacs);
! proto_tree_add_string(tacacs_tree, hf_tacacs_version, NullTVB, 0, 0, "XTacacs");
if (pi.match_port == pi.destport)
{
! proto_tree_add_boolean_hidden(tacacs_tree, hf_tacacs_request, NullTVB,
offset, END_OF_FRAME, TRUE);
proto_tree_add_text(tacacs_tree, NullTVB, offset,
END_OF_FRAME, "Request: <opaque data>" );
}
else
{
! proto_tree_add_boolean_hidden(tacacs_tree, hf_tacacs_response, NullTVB,
offset, END_OF_FRAME, TRUE);
proto_tree_add_text(tacacs_tree, NullTVB, offset,
END_OF_FRAME, "Response: <opaque data>");
***************
*** 106,126 ****
if (tree)
{
! ti = proto_tree_add_item(tree, proto_tacacs, NullTVB, offset, END_OF_FRAME, NULL);
tacacs_tree = proto_item_add_subtree(ti, ett_tacacs);
! proto_tree_add_item(tacacs_tree, hf_tacacs_version, NullTVB, 0, 0, "Tacacs+");
if (pi.match_port == pi.destport)
{
! proto_tree_add_item_hidden(tacacs_tree, hf_tacacs_request, NullTVB,
offset, END_OF_FRAME, TRUE);
proto_tree_add_text(tacacs_tree, NullTVB, offset,
END_OF_FRAME, "Request: <opaque data>" );
}
else
{
! proto_tree_add_item_hidden(tacacs_tree, hf_tacacs_response, NullTVB,
offset, END_OF_FRAME, TRUE);
proto_tree_add_text(tacacs_tree, NullTVB, offset,
END_OF_FRAME, "Response: <opaque data>");
--- 106,126 ----
if (tree)
{
! ti = proto_tree_add_item(tree, proto_tacacs, NullTVB, offset, END_OF_FRAME, FALSE);
tacacs_tree = proto_item_add_subtree(ti, ett_tacacs);
! proto_tree_add_string(tacacs_tree, hf_tacacs_version, NullTVB, 0, 0, "Tacacs+");
if (pi.match_port == pi.destport)
{
! proto_tree_add_boolean_hidden(tacacs_tree, hf_tacacs_request, NullTVB,
offset, END_OF_FRAME, TRUE);
proto_tree_add_text(tacacs_tree, NullTVB, offset,
END_OF_FRAME, "Request: <opaque data>" );
}
else
{
! proto_tree_add_boolean_hidden(tacacs_tree, hf_tacacs_response, NullTVB,
offset, END_OF_FRAME, TRUE);
proto_tree_add_text(tacacs_tree, NullTVB, offset,
END_OF_FRAME, "Response: <opaque data>");
Index: packet-tcp.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-tcp.c,v
retrieving revision 1.74
diff -c -r1.74 packet-tcp.c
*** packet-tcp.c 2000/05/11 08:15:52 1.74
--- packet-tcp.c 2000/05/30 10:39:26
***************
*** 480,505 ****
"Source port: %s (%u)", get_tcp_port(th.th_sport), th.th_sport);
proto_tree_add_uint_format(tcp_tree, hf_tcp_dstport, NullTVB, offset + 2, 2, th.th_dport,
"Destination port: %s (%u)", get_tcp_port(th.th_dport), th.th_dport);
! proto_tree_add_item_hidden(tcp_tree, hf_tcp_port, NullTVB, offset, 2, th.th_sport);
! proto_tree_add_item_hidden(tcp_tree, hf_tcp_port, NullTVB, offset + 2, 2, th.th_dport);
! proto_tree_add_item(tcp_tree, hf_tcp_seq, NullTVB, offset + 4, 4, th.th_seq);
if (th.th_flags & TH_ACK)
! proto_tree_add_item(tcp_tree, hf_tcp_ack, NullTVB, offset + 8, 4, th.th_ack);
proto_tree_add_uint_format(tcp_tree, hf_tcp_hdr_len, NullTVB, offset + 12, 1, hlen,
"Header length: %u bytes", hlen);
tf = proto_tree_add_uint_format(tcp_tree, hf_tcp_flags, NullTVB, offset + 13, 1,
th.th_flags, "Flags: 0x%04x (%s)", th.th_flags, flags);
field_tree = proto_item_add_subtree(tf, ett_tcp_flags);
! proto_tree_add_item(field_tree, hf_tcp_flags_urg, NullTVB, offset + 13, 1, th.th_flags);
! proto_tree_add_item(field_tree, hf_tcp_flags_ack, NullTVB, offset + 13, 1, th.th_flags);
! proto_tree_add_item(field_tree, hf_tcp_flags_push, NullTVB, offset + 13, 1, th.th_flags);
! proto_tree_add_item(field_tree, hf_tcp_flags_reset, NullTVB, offset + 13, 1, th.th_flags);
! proto_tree_add_item(field_tree, hf_tcp_flags_syn, NullTVB, offset + 13, 1, th.th_flags);
! proto_tree_add_item(field_tree, hf_tcp_flags_fin, NullTVB, offset + 13, 1, th.th_flags);
! proto_tree_add_item(tcp_tree, hf_tcp_window_size, NullTVB, offset + 14, 2, th.th_win);
! proto_tree_add_item(tcp_tree, hf_tcp_checksum, NullTVB, offset + 16, 2, th.th_sum);
if (th.th_flags & TH_URG)
! proto_tree_add_item(tcp_tree, hf_tcp_urgent_pointer, NullTVB, offset + 18, 2, th.th_urp);
}
/* Decode TCP options, if any. */
--- 480,505 ----
"Source port: %s (%u)", get_tcp_port(th.th_sport), th.th_sport);
proto_tree_add_uint_format(tcp_tree, hf_tcp_dstport, NullTVB, offset + 2, 2, th.th_dport,
"Destination port: %s (%u)", get_tcp_port(th.th_dport), th.th_dport);
! proto_tree_add_uint_hidden(tcp_tree, hf_tcp_port, NullTVB, offset, 2, th.th_sport);
! proto_tree_add_uint_hidden(tcp_tree, hf_tcp_port, NullTVB, offset + 2, 2, th.th_dport);
! proto_tree_add_uint(tcp_tree, hf_tcp_seq, NullTVB, offset + 4, 4, th.th_seq);
if (th.th_flags & TH_ACK)
! proto_tree_add_uint(tcp_tree, hf_tcp_ack, NullTVB, offset + 8, 4, th.th_ack);
proto_tree_add_uint_format(tcp_tree, hf_tcp_hdr_len, NullTVB, offset + 12, 1, hlen,
"Header length: %u bytes", hlen);
tf = proto_tree_add_uint_format(tcp_tree, hf_tcp_flags, NullTVB, offset + 13, 1,
th.th_flags, "Flags: 0x%04x (%s)", th.th_flags, flags);
field_tree = proto_item_add_subtree(tf, ett_tcp_flags);
! proto_tree_add_boolean(field_tree, hf_tcp_flags_urg, NullTVB, offset + 13, 1, th.th_flags);
! proto_tree_add_boolean(field_tree, hf_tcp_flags_ack, NullTVB, offset + 13, 1, th.th_flags);
! proto_tree_add_boolean(field_tree, hf_tcp_flags_push, NullTVB, offset + 13, 1, th.th_flags);
! proto_tree_add_boolean(field_tree, hf_tcp_flags_reset, NullTVB, offset + 13, 1, th.th_flags);
! proto_tree_add_boolean(field_tree, hf_tcp_flags_syn, NullTVB, offset + 13, 1, th.th_flags);
! proto_tree_add_boolean(field_tree, hf_tcp_flags_fin, NullTVB, offset + 13, 1, th.th_flags);
! proto_tree_add_uint(tcp_tree, hf_tcp_window_size, NullTVB, offset + 14, 2, th.th_win);
! proto_tree_add_uint(tcp_tree, hf_tcp_checksum, NullTVB, offset + 16, 2, th.th_sum);
if (th.th_flags & TH_URG)
! proto_tree_add_uint(tcp_tree, hf_tcp_urgent_pointer, NullTVB, offset + 18, 2, th.th_urp);
}
/* Decode TCP options, if any. */
Index: packet-telnet.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-telnet.c,v
retrieving revision 1.12
diff -c -r1.12 packet-telnet.c
*** packet-telnet.c 2000/05/11 08:15:52 1.12
--- packet-telnet.c 2000/05/30 10:39:26
***************
*** 307,313 ****
int data_offset;
int data_len;
! ti = proto_tree_add_item(tree, proto_telnet, NullTVB, offset, END_OF_FRAME, NULL);
telnet_tree = proto_item_add_subtree(ti, ett_telnet);
data_offset = offset;
--- 307,313 ----
int data_offset;
int data_len;
! ti = proto_tree_add_item(tree, proto_telnet, NullTVB, offset, END_OF_FRAME, FALSE);
telnet_tree = proto_item_add_subtree(ti, ett_telnet);
data_offset = offset;
Index: packet-tftp.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-tftp.c,v
retrieving revision 1.11
diff -c -r1.11 packet-tftp.c
*** packet-tftp.c 2000/05/11 08:15:53 1.11
--- packet-tftp.c 2000/05/30 10:39:27
***************
*** 97,107 ****
if (tree) {
! ti = proto_tree_add_item(tree, proto_tftp, NullTVB, offset, END_OF_FRAME, NULL);
tftp_tree = proto_item_add_subtree(ti, ett_tftp);
i1 = pntohs(pd+offset);
! proto_tree_add_item_hidden(tftp_tree, hf_tftp_type, NullTVB, offset, 2, i1);
switch (i1) {
case RRQ:
--- 97,107 ----
if (tree) {
! ti = proto_tree_add_item(tree, proto_tftp, NullTVB, offset, END_OF_FRAME, FALSE);
tftp_tree = proto_item_add_subtree(ti, ett_tftp);
i1 = pntohs(pd+offset);
! proto_tree_add_uint_hidden(tftp_tree, hf_tftp_type, NullTVB, offset, 2, i1);
switch (i1) {
case RRQ:
***************
*** 159,165 ****
proto_tree_add_text(tftp_tree, NullTVB, offset, 2, "Error Code");
offset += 2;
i1 = pntohs(pd+offset);
! proto_tree_add_item_hidden(tftp_tree, hf_tftp_error_code, NullTVB, offset, 2, i1);
proto_tree_add_text(tftp_tree, NullTVB, offset, 2, "Code = %s", tftp_errors[i1 % 8]);
offset += 2;
proto_tree_add_text(tftp_tree, NullTVB, offset, END_OF_FRAME, "Error Message: %s", pd + offset);
--- 159,165 ----
proto_tree_add_text(tftp_tree, NullTVB, offset, 2, "Error Code");
offset += 2;
i1 = pntohs(pd+offset);
! proto_tree_add_uint_hidden(tftp_tree, hf_tftp_error_code, NullTVB, offset, 2, i1);
proto_tree_add_text(tftp_tree, NullTVB, offset, 2, "Code = %s", tftp_errors[i1 % 8]);
offset += 2;
proto_tree_add_text(tftp_tree, NullTVB, offset, END_OF_FRAME, "Error Message: %s", pd + offset);
Index: packet-time.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-time.c,v
retrieving revision 1.5
diff -c -r1.5 packet-time.c
*** packet-time.c 2000/05/11 08:15:53 1.5
--- packet-time.c 2000/05/30 10:39:28
***************
*** 56,62 ****
if (tree) {
! ti = proto_tree_add_item(tree, proto_time, NullTVB, offset, END_OF_FRAME, NULL);
time_tree = proto_item_add_subtree(ti, ett_time);
proto_tree_add_text(time_tree, NullTVB, offset, 0,
--- 56,62 ----
if (tree) {
! ti = proto_tree_add_item(tree, proto_time, NullTVB, offset, END_OF_FRAME, FALSE);
time_tree = proto_item_add_subtree(ti, ett_time);
proto_tree_add_text(time_tree, NullTVB, offset, 0,
Index: packet-tns.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-tns.c,v
retrieving revision 1.6
diff -c -r1.6 packet-tns.c
*** packet-tns.c 2000/05/11 08:15:53 1.6
--- packet-tns.c 2000/05/30 10:39:28
***************
*** 88,94 ****
ti = proto_tree_add_text(tns_tree, NullTVB, offset, END_OF_FRAME, "Secure Network Services");
sns_tree = proto_item_add_subtree(ti, ett_tns_sns);
! proto_tree_add_item_hidden(tns_tree, hf_tns_sns, NullTVB, 0, 0, TRUE);
}
if ( check_col(fd, COL_INFO) )
--- 88,94 ----
ti = proto_tree_add_text(tns_tree, NullTVB, offset, END_OF_FRAME, "Secure Network Services");
sns_tree = proto_item_add_subtree(ti, ett_tns_sns);
! proto_tree_add_boolean_hidden(tns_tree, hf_tns_sns, NullTVB, 0, 0, TRUE);
}
if ( check_col(fd, COL_INFO) )
***************
*** 109,115 ****
TRUNC(2);
if ( tree )
{
! proto_tree_add_item(tns_tree, hf_tns_data_flag, NullTVB,
offset, 2, pntohs(&pd[offset]));
}
offset += 2;
--- 109,115 ----
TRUNC(2);
if ( tree )
{
! proto_tree_add_uint(tns_tree, hf_tns_data_flag, NullTVB,
offset, 2, pntohs(&pd[offset]));
}
offset += 2;
***************
*** 138,144 ****
ti = proto_tree_add_text(tns_tree, NullTVB, offset, END_OF_FRAME, "Connect");
connect_tree = proto_item_add_subtree(ti, ett_tns_connect);
! proto_tree_add_item_hidden(tns_tree, hf_tns_connect, NullTVB, 0, 0, TRUE);
}
if ( check_col(fd, COL_INFO) )
--- 138,144 ----
ti = proto_tree_add_text(tns_tree, NullTVB, offset, END_OF_FRAME, "Connect");
connect_tree = proto_item_add_subtree(ti, ett_tns_connect);
! proto_tree_add_boolean_hidden(tns_tree, hf_tns_connect, NullTVB, 0, 0, TRUE);
}
if ( check_col(fd, COL_INFO) )
***************
*** 149,155 ****
TRUNC(2);
if ( connect_tree )
{
! proto_tree_add_item(connect_tree, hf_tns_version, NullTVB,
offset, 2, pntohs(&pd[offset]));
}
offset += 2;
--- 149,155 ----
TRUNC(2);
if ( connect_tree )
{
! proto_tree_add_uint(connect_tree, hf_tns_version, NullTVB,
offset, 2, pntohs(&pd[offset]));
}
offset += 2;
***************
*** 157,163 ****
TRUNC(2);
if ( connect_tree )
{
! proto_tree_add_item(connect_tree, hf_tns_compat_version, NullTVB,
offset, 2, pntohs(&pd[offset]));
}
offset += 2;
--- 157,163 ----
TRUNC(2);
if ( connect_tree )
{
! proto_tree_add_uint(connect_tree, hf_tns_compat_version, NullTVB,
offset, 2, pntohs(&pd[offset]));
}
offset += 2;
***************
*** 166,172 ****
if ( connect_tree )
{
/* need to break down w/ bitfield */
! proto_tree_add_item(connect_tree, hf_tns_service_options, NullTVB,
offset, 2, pntohs(&pd[offset]));
}
offset += 2;
--- 166,172 ----
if ( connect_tree )
{
/* need to break down w/ bitfield */
! proto_tree_add_uint(connect_tree, hf_tns_service_options, NullTVB,
offset, 2, pntohs(&pd[offset]));
}
offset += 2;
***************
*** 204,222 ****
if (tree)
{
! ti = proto_tree_add_item(tree, proto_tns, NullTVB, offset, END_OF_FRAME, NULL);
tns_tree = proto_item_add_subtree(ti, ett_tns);
if (pi.match_port == pi.destport)
{
! proto_tree_add_item_hidden(tns_tree, hf_tns_request, NullTVB,
offset, END_OF_FRAME, TRUE);
proto_tree_add_text(tns_tree, NullTVB, offset,
END_OF_FRAME, "Request: <opaque data>" );
}
else
{
! proto_tree_add_item_hidden(tns_tree, hf_tns_response, NullTVB,
offset, END_OF_FRAME, TRUE);
proto_tree_add_text(tns_tree, NullTVB, offset,
END_OF_FRAME, "Response: <opaque data>");
--- 204,222 ----
if (tree)
{
! ti = proto_tree_add_item(tree, proto_tns, NullTVB, offset, END_OF_FRAME, FALSE);
tns_tree = proto_item_add_subtree(ti, ett_tns);
if (pi.match_port == pi.destport)
{
! proto_tree_add_boolean_hidden(tns_tree, hf_tns_request, NullTVB,
offset, END_OF_FRAME, TRUE);
proto_tree_add_text(tns_tree, NullTVB, offset,
END_OF_FRAME, "Request: <opaque data>" );
}
else
{
! proto_tree_add_boolean_hidden(tns_tree, hf_tns_response, NullTVB,
offset, END_OF_FRAME, TRUE);
proto_tree_add_text(tns_tree, NullTVB, offset,
END_OF_FRAME, "Response: <opaque data>");
***************
*** 229,235 ****
length = pntohs(&pd[offset]);
if (tree)
{
! proto_tree_add_item(tns_tree, hf_tns_length, NullTVB,
offset, 2, length);
}
TRUNC(length);
--- 229,235 ----
length = pntohs(&pd[offset]);
if (tree)
{
! proto_tree_add_uint(tns_tree, hf_tns_length, NullTVB,
offset, 2, length);
}
TRUNC(length);
***************
*** 238,244 ****
TRUNC(2);
if ( tree )
{
! proto_tree_add_item(tns_tree, hf_tns_packet_checksum, NullTVB,
offset, 2, pntohs(&pd[offset]));
}
offset += 2;
--- 238,244 ----
TRUNC(2);
if ( tree )
{
! proto_tree_add_uint(tns_tree, hf_tns_packet_checksum, NullTVB,
offset, 2, pntohs(&pd[offset]));
}
offset += 2;
***************
*** 247,253 ****
type = pd[offset];
if ( tree )
{
! proto_tree_add_item(tns_tree, hf_tns_packet_type, NullTVB,
offset, 1, type);
}
offset += 1;
--- 247,253 ----
type = pd[offset];
if ( tree )
{
! proto_tree_add_uint(tns_tree, hf_tns_packet_type, NullTVB,
offset, 1, type);
}
offset += 1;
***************
*** 261,267 ****
TRUNC(1);
if ( tree )
{
! proto_tree_add_item(tns_tree, hf_tns_reserved_byte, NullTVB,
offset, 1, &pd[offset]);
}
offset += 1;
--- 261,267 ----
TRUNC(1);
if ( tree )
{
! proto_tree_add_bytes(tns_tree, hf_tns_reserved_byte, NullTVB,
offset, 1, &pd[offset]);
}
offset += 1;
***************
*** 269,275 ****
TRUNC(2);
if ( tree )
{
! proto_tree_add_item(tns_tree, hf_tns_header_checksum, NullTVB,
offset, 2, pntohs(&pd[offset]));
}
offset += 2;
--- 269,275 ----
TRUNC(2);
if ( tree )
{
! proto_tree_add_uint(tns_tree, hf_tns_header_checksum, NullTVB,
offset, 2, pntohs(&pd[offset]));
}
offset += 2;
Index: packet-tr.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-tr.c,v
retrieving revision 1.42
diff -c -r1.42 packet-tr.c
*** packet-tr.c 2000/05/19 05:29:43 1.42
--- packet-tr.c 2000/05/30 10:39:29
***************
*** 451,495 ****
/* protocol analysis tree */
if (tree) {
/* Create Token-Ring Tree */
! ti = proto_tree_add_item(tree, proto_tr, tr_tvb, 0, TR_MIN_HEADER_LEN + actual_rif_bytes, NULL);
tr_tree = proto_item_add_subtree(ti, ett_token_ring);
/* Create the Access Control bitfield tree */
trn_ac = tvb_get_guint8(tr_tvb, 0);
! ti = proto_tree_add_item(tr_tree, hf_tr_ac, tr_tvb, 0, 1, trn_ac);
bf_tree = proto_item_add_subtree(ti, ett_token_ring_ac);
! proto_tree_add_item(bf_tree, hf_tr_priority, tr_tvb, 0, 1, trn_ac);
! proto_tree_add_item(bf_tree, hf_tr_frame, tr_tvb, 0, 1, trn_ac);
! proto_tree_add_item(bf_tree, hf_tr_monitor_cnt, tr_tvb, 0, 1, trn_ac);
! proto_tree_add_item(bf_tree, hf_tr_priority_reservation, tr_tvb, 0, 1, trn_ac);
/* Create the Frame Control bitfield tree */
! ti = proto_tree_add_item(tr_tree, hf_tr_fc, tr_tvb, 1, 1, trn_fc);
bf_tree = proto_item_add_subtree(ti, ett_token_ring_fc);
! proto_tree_add_item(bf_tree, hf_tr_fc_type, tr_tvb, 1, 1, trn_fc);
! proto_tree_add_item(bf_tree, hf_tr_fc_pcf, tr_tvb, 1, 1, trn_fc);
! proto_tree_add_item(tr_tree, hf_tr_dst, tr_tvb, 2, 6, trn_dhost);
! proto_tree_add_item(tr_tree, hf_tr_src, tr_tvb, 8, 6, trn_shost);
! proto_tree_add_item_hidden(tr_tree, hf_tr_addr, tr_tvb, 2, 6, trn_dhost);
! proto_tree_add_item_hidden(tr_tree, hf_tr_addr, tr_tvb, 8, 6, trn_shost);
! proto_tree_add_item(tr_tree, hf_tr_sr, tr_tvb, 8, 1, source_routed);
/* non-source-routed version of src addr */
! proto_tree_add_item_hidden(tr_tree, hf_tr_src, tr_tvb, 8, 6, trn_shost_nonsr);
if (source_routed) {
/* RCF Byte 1 */
rcf1 = tvb_get_guint8(tr_tvb, 14);
! proto_tree_add_item(tr_tree, hf_tr_rif_bytes, tr_tvb, 14, 1, trn_rif_bytes);
! proto_tree_add_item(tr_tree, hf_tr_broadcast, tr_tvb, 14, 1, rcf1 & 224);
/* RCF Byte 2 */
rcf2 = tvb_get_guint8(tr_tvb, 15);
! proto_tree_add_item(tr_tree, hf_tr_max_frame_size, tr_tvb, 15, 1, rcf2 & 112);
! proto_tree_add_item(tr_tree, hf_tr_direction, tr_tvb, 15, 1, rcf2 & 128);
/* if we have more than 2 bytes of RIF, then we have
ring/bridge pairs */
--- 451,495 ----
/* protocol analysis tree */
if (tree) {
/* Create Token-Ring Tree */
! ti = proto_tree_add_item(tree, proto_tr, tr_tvb, 0, TR_MIN_HEADER_LEN + actual_rif_bytes, FALSE);
tr_tree = proto_item_add_subtree(ti, ett_token_ring);
/* Create the Access Control bitfield tree */
trn_ac = tvb_get_guint8(tr_tvb, 0);
! ti = proto_tree_add_uint(tr_tree, hf_tr_ac, tr_tvb, 0, 1, trn_ac);
bf_tree = proto_item_add_subtree(ti, ett_token_ring_ac);
! proto_tree_add_uint(bf_tree, hf_tr_priority, tr_tvb, 0, 1, trn_ac);
! proto_tree_add_boolean(bf_tree, hf_tr_frame, tr_tvb, 0, 1, trn_ac);
! proto_tree_add_uint(bf_tree, hf_tr_monitor_cnt, tr_tvb, 0, 1, trn_ac);
! proto_tree_add_uint(bf_tree, hf_tr_priority_reservation, tr_tvb, 0, 1, trn_ac);
/* Create the Frame Control bitfield tree */
! ti = proto_tree_add_uint(tr_tree, hf_tr_fc, tr_tvb, 1, 1, trn_fc);
bf_tree = proto_item_add_subtree(ti, ett_token_ring_fc);
! proto_tree_add_uint(bf_tree, hf_tr_fc_type, tr_tvb, 1, 1, trn_fc);
! proto_tree_add_uint(bf_tree, hf_tr_fc_pcf, tr_tvb, 1, 1, trn_fc);
! proto_tree_add_ether(tr_tree, hf_tr_dst, tr_tvb, 2, 6, trn_dhost);
! proto_tree_add_ether(tr_tree, hf_tr_src, tr_tvb, 8, 6, trn_shost);
! proto_tree_add_ether_hidden(tr_tree, hf_tr_addr, tr_tvb, 2, 6, trn_dhost);
! proto_tree_add_ether_hidden(tr_tree, hf_tr_addr, tr_tvb, 8, 6, trn_shost);
! proto_tree_add_boolean(tr_tree, hf_tr_sr, tr_tvb, 8, 1, source_routed);
/* non-source-routed version of src addr */
! proto_tree_add_ether_hidden(tr_tree, hf_tr_src, tr_tvb, 8, 6, trn_shost_nonsr);
if (source_routed) {
/* RCF Byte 1 */
rcf1 = tvb_get_guint8(tr_tvb, 14);
! proto_tree_add_uint(tr_tree, hf_tr_rif_bytes, tr_tvb, 14, 1, trn_rif_bytes);
! proto_tree_add_uint(tr_tree, hf_tr_broadcast, tr_tvb, 14, 1, rcf1 & 224);
/* RCF Byte 2 */
rcf2 = tvb_get_guint8(tr_tvb, 15);
! proto_tree_add_uint(tr_tree, hf_tr_max_frame_size, tr_tvb, 15, 1, rcf2 & 112);
! proto_tree_add_uint(tr_tree, hf_tr_direction, tr_tvb, 15, 1, rcf2 & 128);
/* if we have more than 2 bytes of RIF, then we have
ring/bridge pairs */
***************
*** 564,580 ****
if (j==1) {
segment = tvb_get_ntohs(tvb, RIF_OFFSET) >> 4;
size = sprintf(buffer, "%03X",segment);
! proto_tree_add_item_hidden(tree, hf_tr_rif_ring, tvb, TR_MIN_HEADER_LEN + 2, 2, segment);
buff_offset += size;
}
segment = tvb_get_ntohs(tvb, RIF_OFFSET + 1 + j) >> 4;
brdgnmb = tvb_get_guint8(tvb, RIF_OFFSET + j) & 0x0f;
size = sprintf(buffer+buff_offset, "-%01X-%03X",brdgnmb,segment);
! proto_tree_add_item_hidden(tree, hf_tr_rif_ring, tvb, TR_MIN_HEADER_LEN + 3 + j, 2, segment);
! proto_tree_add_item_hidden(tree, hf_tr_rif_bridge, tvb, TR_MIN_HEADER_LEN + 2 + j, 1, brdgnmb);
buff_offset += size;
}
! proto_tree_add_item(tree, hf_tr_rif, tvb, TR_MIN_HEADER_LEN + 2, rcf_len, buffer);
if (unprocessed_rif > 0) {
proto_tree_add_text(tree, tvb, TR_MIN_HEADER_LEN + RIF_BYTES_TO_PROCESS, unprocessed_rif,
--- 564,580 ----
if (j==1) {
segment = tvb_get_ntohs(tvb, RIF_OFFSET) >> 4;
size = sprintf(buffer, "%03X",segment);
! proto_tree_add_uint_hidden(tree, hf_tr_rif_ring, tvb, TR_MIN_HEADER_LEN + 2, 2, segment);
buff_offset += size;
}
segment = tvb_get_ntohs(tvb, RIF_OFFSET + 1 + j) >> 4;
brdgnmb = tvb_get_guint8(tvb, RIF_OFFSET + j) & 0x0f;
size = sprintf(buffer+buff_offset, "-%01X-%03X",brdgnmb,segment);
! proto_tree_add_uint_hidden(tree, hf_tr_rif_ring, tvb, TR_MIN_HEADER_LEN + 3 + j, 2, segment);
! proto_tree_add_uint_hidden(tree, hf_tr_rif_bridge, tvb, TR_MIN_HEADER_LEN + 2 + j, 1, brdgnmb);
buff_offset += size;
}
! proto_tree_add_string(tree, hf_tr_rif, tvb, TR_MIN_HEADER_LEN + 2, rcf_len, buffer);
if (unprocessed_rif > 0) {
proto_tree_add_text(tree, tvb, TR_MIN_HEADER_LEN + RIF_BYTES_TO_PROCESS, unprocessed_rif,
Index: packet-trmac.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-trmac.c,v
retrieving revision 1.21
diff -c -r1.21 packet-trmac.c
*** packet-trmac.c 2000/05/11 08:15:54 1.21
--- packet-trmac.c 2000/05/30 10:39:31
***************
*** 119,125 ****
proto_tree_add_text(tree, NullTVB, pkt_offset, 1,
"Subvector Length: %d bytes", sv_length);*/
! proto_tree_add_item_hidden(tree, hf_trmac_sv, NullTVB, pkt_offset+1, 1, pd[1]);
switch(pd[1]) {
case 0x01: /* Beacon Type */
--- 119,125 ----
proto_tree_add_text(tree, NullTVB, pkt_offset, 1,
"Subvector Length: %d bytes", sv_length);*/
! proto_tree_add_uint_hidden(tree, hf_trmac_sv, NullTVB, pkt_offset+1, 1, pd[1]);
switch(pd[1]) {
case 0x01: /* Beacon Type */
***************
*** 134,140 ****
break;
case 0x02: /* NAUN */
! proto_tree_add_item(tree, hf_trmac_naun, NullTVB, pkt_offset+1, sv_length-1, (guint8*)&pd[2]);
break;
case 0x03: /* Local Ring Number */
--- 134,140 ----
break;
case 0x02: /* NAUN */
! proto_tree_add_ether(tree, hf_trmac_naun, NullTVB, pkt_offset+1, sv_length-1, (guint8*)&pd[2]);
break;
case 0x03: /* Local Ring Number */
***************
*** 232,260 ****
case 0x2D: /* Isolating Error Counts */
memcpy(errors, &pd[2], 6);
! ti = proto_tree_add_item(tree, hf_trmac_errors_iso, NullTVB, pkt_offset+1, sv_length-1,
errors[0] + errors[1] + errors[2] + errors[3] + errors[4]);
sv_tree = proto_item_add_subtree(ti, ett_tr_ierr_cnt);
! proto_tree_add_item(sv_tree, hf_trmac_errors_line, NullTVB, pkt_offset+2, 1, errors[0]);
! proto_tree_add_item(sv_tree, hf_trmac_errors_internal, NullTVB, pkt_offset+3, 1, errors[1]);
! proto_tree_add_item(sv_tree, hf_trmac_errors_burst, NullTVB, pkt_offset+4, 1, errors[2]);
! proto_tree_add_item(sv_tree, hf_trmac_errors_ac, NullTVB, pkt_offset+5, 1, errors[3]);
! proto_tree_add_item(sv_tree, hf_trmac_errors_abort, NullTVB, pkt_offset+6, 1, errors[4]);
break;
case 0x2E: /* Non-Isolating Error Counts */
memcpy(errors, &pd[2], 6);
! ti = proto_tree_add_item(tree, hf_trmac_errors_noniso, NullTVB, pkt_offset+1, sv_length-1,
errors[0] + errors[1] + errors[2] + errors[3] + errors[4]);
sv_tree = proto_item_add_subtree(ti, ett_tr_nerr_cnt);
! proto_tree_add_item(sv_tree, hf_trmac_errors_lost, NullTVB, pkt_offset+2, 1, errors[0]);
! proto_tree_add_item(sv_tree, hf_trmac_errors_congestion, NullTVB, pkt_offset+3, 1, errors[1]);
! proto_tree_add_item(sv_tree, hf_trmac_errors_fc, NullTVB, pkt_offset+4, 1, errors[2]);
! proto_tree_add_item(sv_tree, hf_trmac_errors_freq, NullTVB, pkt_offset+5, 1, errors[3]);
! proto_tree_add_item(sv_tree, hf_trmac_errors_token, NullTVB, pkt_offset+6, 1, errors[4]);
break;
case 0x30: /* Error Code */
--- 232,260 ----
case 0x2D: /* Isolating Error Counts */
memcpy(errors, &pd[2], 6);
! ti = proto_tree_add_uint(tree, hf_trmac_errors_iso, NullTVB, pkt_offset+1, sv_length-1,
errors[0] + errors[1] + errors[2] + errors[3] + errors[4]);
sv_tree = proto_item_add_subtree(ti, ett_tr_ierr_cnt);
! proto_tree_add_uint(sv_tree, hf_trmac_errors_line, NullTVB, pkt_offset+2, 1, errors[0]);
! proto_tree_add_uint(sv_tree, hf_trmac_errors_internal, NullTVB, pkt_offset+3, 1, errors[1]);
! proto_tree_add_uint(sv_tree, hf_trmac_errors_burst, NullTVB, pkt_offset+4, 1, errors[2]);
! proto_tree_add_uint(sv_tree, hf_trmac_errors_ac, NullTVB, pkt_offset+5, 1, errors[3]);
! proto_tree_add_uint(sv_tree, hf_trmac_errors_abort, NullTVB, pkt_offset+6, 1, errors[4]);
break;
case 0x2E: /* Non-Isolating Error Counts */
memcpy(errors, &pd[2], 6);
! ti = proto_tree_add_uint(tree, hf_trmac_errors_noniso, NullTVB, pkt_offset+1, sv_length-1,
errors[0] + errors[1] + errors[2] + errors[3] + errors[4]);
sv_tree = proto_item_add_subtree(ti, ett_tr_nerr_cnt);
! proto_tree_add_uint(sv_tree, hf_trmac_errors_lost, NullTVB, pkt_offset+2, 1, errors[0]);
! proto_tree_add_uint(sv_tree, hf_trmac_errors_congestion, NullTVB, pkt_offset+3, 1, errors[1]);
! proto_tree_add_uint(sv_tree, hf_trmac_errors_fc, NullTVB, pkt_offset+4, 1, errors[2]);
! proto_tree_add_uint(sv_tree, hf_trmac_errors_freq, NullTVB, pkt_offset+5, 1, errors[3]);
! proto_tree_add_uint(sv_tree, hf_trmac_errors_token, NullTVB, pkt_offset+6, 1, errors[4]);
break;
case 0x30: /* Error Code */
***************
*** 292,305 ****
if (tree) {
! ti = proto_tree_add_item(tree, proto_trmac, NullTVB, offset, mv_length, NULL);
mac_tree = proto_item_add_subtree(ti, ett_tr_mac);
! proto_tree_add_item(mac_tree, hf_trmac_mv, NullTVB, offset+3, 1, mv_val);
proto_tree_add_uint_format(mac_tree, hf_trmac_length, NullTVB, offset, 2, mv_length,
"Total Length: %d bytes", mv_length);
! proto_tree_add_item(mac_tree, hf_trmac_srcclass, NullTVB, offset+2, 1, pd[offset+2] & 0x0f);
! proto_tree_add_item(mac_tree, hf_trmac_dstclass, NullTVB, offset+2, 1, pd[offset+2] >> 4 );
/* interpret the subvectors */
sv_offset = 0;
--- 292,305 ----
if (tree) {
! ti = proto_tree_add_item(tree, proto_trmac, NullTVB, offset, mv_length, FALSE);
mac_tree = proto_item_add_subtree(ti, ett_tr_mac);
! proto_tree_add_uint(mac_tree, hf_trmac_mv, NullTVB, offset+3, 1, mv_val);
proto_tree_add_uint_format(mac_tree, hf_trmac_length, NullTVB, offset, 2, mv_length,
"Total Length: %d bytes", mv_length);
! proto_tree_add_uint(mac_tree, hf_trmac_srcclass, NullTVB, offset+2, 1, pd[offset+2] & 0x0f);
! proto_tree_add_uint(mac_tree, hf_trmac_dstclass, NullTVB, offset+2, 1, pd[offset+2] >> 4 );
/* interpret the subvectors */
sv_offset = 0;
Index: packet-udp.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-udp.c,v
retrieving revision 1.71
diff -c -r1.71 packet-udp.c
*** packet-udp.c 2000/05/30 03:35:55 1.71
--- packet-udp.c 2000/05/30 10:39:31
***************
*** 165,171 ****
get_udp_port(uh_sport), get_udp_port(uh_dport));
if (tree) {
! ti = proto_tree_add_item(tree, proto_udp, NullTVB, offset, 8);
udp_tree = proto_item_add_subtree(ti, ett_udp);
proto_tree_add_uint_format(udp_tree, hf_udp_srcport, NullTVB, offset, 2, uh_sport,
--- 165,171 ----
get_udp_port(uh_sport), get_udp_port(uh_dport));
if (tree) {
! ti = proto_tree_add_item(tree, proto_udp, NullTVB, offset, 8, FALSE);
udp_tree = proto_item_add_subtree(ti, ett_udp);
proto_tree_add_uint_format(udp_tree, hf_udp_srcport, NullTVB, offset, 2, uh_sport,
***************
*** 173,182 ****
proto_tree_add_uint_format(udp_tree, hf_udp_dstport, NullTVB, offset + 2, 2, uh_dport,
"Destination port: %s (%u)", get_udp_port(uh_dport), uh_dport);
! proto_tree_add_item_hidden(udp_tree, hf_udp_port, NullTVB, offset, 2, uh_sport);
! proto_tree_add_item_hidden(udp_tree, hf_udp_port, NullTVB, offset+2, 2, uh_dport);
! proto_tree_add_item(udp_tree, hf_udp_length, NullTVB, offset + 4, 2, uh_ulen);
proto_tree_add_uint_format(udp_tree, hf_udp_checksum, NullTVB, offset + 6, 2, uh_sum,
"Checksum: 0x%04x", uh_sum);
}
--- 173,182 ----
proto_tree_add_uint_format(udp_tree, hf_udp_dstport, NullTVB, offset + 2, 2, uh_dport,
"Destination port: %s (%u)", get_udp_port(uh_dport), uh_dport);
! proto_tree_add_uint_hidden(udp_tree, hf_udp_port, NullTVB, offset, 2, uh_sport);
! proto_tree_add_uint_hidden(udp_tree, hf_udp_port, NullTVB, offset+2, 2, uh_dport);
! proto_tree_add_uint(udp_tree, hf_udp_length, NullTVB, offset + 4, 2, uh_ulen);
proto_tree_add_uint_format(udp_tree, hf_udp_checksum, NullTVB, offset + 6, 2, uh_sum,
"Checksum: 0x%04x", uh_sum);
}
Index: packet-vlan.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-vlan.c,v
retrieving revision 1.15
diff -c -r1.15 packet-vlan.c
*** packet-vlan.c 2000/05/19 04:54:34 1.15
--- packet-vlan.c 2000/05/30 10:39:31
***************
*** 90,101 ****
}
if (tree) {
! ti = proto_tree_add_item(tree, proto_vlan, NullTVB, offset, 4);
vlan_tree = proto_item_add_subtree(ti, ett_vlan);
! proto_tree_add_item(vlan_tree, hf_vlan_priority, NullTVB, offset, 2, tci);
! proto_tree_add_item(vlan_tree, hf_vlan_cfi, NullTVB, offset, 2, tci);
! proto_tree_add_item(vlan_tree, hf_vlan_id, NullTVB, offset, 2, tci);
}
next_tvb = tvb_new_subset(pi.compat_top_tvb, offset+4, -1, -1); /* XXX - should TRY() like dissect_eth() */
--- 90,101 ----
}
if (tree) {
! ti = proto_tree_add_item(tree, proto_vlan, NullTVB, offset, 4, FALSE);
vlan_tree = proto_item_add_subtree(ti, ett_vlan);
! proto_tree_add_uint(vlan_tree, hf_vlan_priority, NullTVB, offset, 2, tci);
! proto_tree_add_uint(vlan_tree, hf_vlan_cfi, NullTVB, offset, 2, tci);
! proto_tree_add_uint(vlan_tree, hf_vlan_id, NullTVB, offset, 2, tci);
}
next_tvb = tvb_new_subset(pi.compat_top_tvb, offset+4, -1, -1); /* XXX - should TRY() like dissect_eth() */
Index: packet-vrrp.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-vrrp.c,v
retrieving revision 1.5
diff -c -r1.5 packet-vrrp.c
*** packet-vrrp.c 2000/05/11 08:15:55 1.5
--- packet-vrrp.c 2000/05/30 10:39:32
***************
*** 132,138 ****
return;
}
! ti = proto_tree_add_item(tree, proto_vrrp, NullTVB, offset, END_OF_FRAME, NULL);
vrrp_tree = proto_item_add_subtree(ti, ett_vrrp);
tv = proto_tree_add_uint_format(vrrp_tree, hf_vrrp_ver_type, NullTVB, offset, 1,
--- 132,138 ----
return;
}
! ti = proto_tree_add_item(tree, proto_vrrp, NullTVB, offset, END_OF_FRAME, FALSE);
vrrp_tree = proto_item_add_subtree(ti, ett_vrrp);
tv = proto_tree_add_uint_format(vrrp_tree, hf_vrrp_ver_type, NullTVB, offset, 1,
***************
*** 140,147 ****
hi_nibble(vrh.ver_type), lo_nibble(vrh.ver_type),
val_to_str(lo_nibble(vrh.ver_type), vrrp_type_vals, "Unknown"));
ver_type_tree = proto_item_add_subtree(tv, ett_vrrp_ver_type);
! proto_tree_add_item(ver_type_tree, hf_vrrp_version, NullTVB, offset, 1, vrh.ver_type);
! proto_tree_add_item(ver_type_tree, hf_vrrp_type, NullTVB, offset, 1, vrh.ver_type);
offset++;
proto_tree_add_text(vrrp_tree, NullTVB, offset++, 1, "Virtual Router ID: %u", vrh.vrouter_id);
--- 140,147 ----
hi_nibble(vrh.ver_type), lo_nibble(vrh.ver_type),
val_to_str(lo_nibble(vrh.ver_type), vrrp_type_vals, "Unknown"));
ver_type_tree = proto_item_add_subtree(tv, ett_vrrp_ver_type);
! proto_tree_add_uint(ver_type_tree, hf_vrrp_version, NullTVB, offset, 1, vrh.ver_type);
! proto_tree_add_uint(ver_type_tree, hf_vrrp_type, NullTVB, offset, 1, vrh.ver_type);
offset++;
proto_tree_add_text(vrrp_tree, NullTVB, offset++, 1, "Virtual Router ID: %u", vrh.vrouter_id);
Index: packet-vtp.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-vtp.c,v
retrieving revision 1.4
diff -c -r1.4 packet-vtp.c
*** packet-vtp.c 2000/05/14 07:19:49 1.4
--- packet-vtp.c 2000/05/30 10:39:34
***************
*** 108,134 ****
if (tree) {
ti = proto_tree_add_item(tree, proto_vtp, NullTVB, offset, END_OF_FRAME,
! NULL);
vtp_tree = proto_item_add_subtree(ti, ett_vtp);
! proto_tree_add_item(vtp_tree, hf_vtp_version, NullTVB, offset, 1,
pd[offset]);
offset += 1;
code = pd[offset];
! proto_tree_add_item(vtp_tree, hf_vtp_code, NullTVB, offset, 1,
code);
offset += 1;
switch (code) {
case SUMMARY_ADVERT:
! proto_tree_add_item(vtp_tree, hf_vtp_followers, NullTVB, offset,
1, pd[offset]);
offset += 1;
md_len = pd[offset];
! proto_tree_add_item(vtp_tree, hf_vtp_md_len, NullTVB, offset,
1, md_len);
offset += 1;
--- 108,134 ----
if (tree) {
ti = proto_tree_add_item(tree, proto_vtp, NullTVB, offset, END_OF_FRAME,
! FALSE);
vtp_tree = proto_item_add_subtree(ti, ett_vtp);
! proto_tree_add_uint(vtp_tree, hf_vtp_version, NullTVB, offset, 1,
pd[offset]);
offset += 1;
code = pd[offset];
! proto_tree_add_uint(vtp_tree, hf_vtp_code, NullTVB, offset, 1,
code);
offset += 1;
switch (code) {
case SUMMARY_ADVERT:
! proto_tree_add_uint(vtp_tree, hf_vtp_followers, NullTVB, offset,
1, pd[offset]);
offset += 1;
md_len = pd[offset];
! proto_tree_add_uint(vtp_tree, hf_vtp_md_len, NullTVB, offset,
1, md_len);
offset += 1;
***************
*** 137,148 ****
&pd[offset]);
offset += 32;
! proto_tree_add_item(vtp_tree, hf_vtp_conf_rev_num, NullTVB,
offset, 4, pntohl(&pd[offset]));
offset += 4;
memcpy(&upd_id, &pd[offset], sizeof upd_id);
! proto_tree_add_item(vtp_tree, hf_vtp_upd_id, NullTVB,
offset, 4, upd_id);
offset += 4;
--- 137,148 ----
&pd[offset]);
offset += 32;
! proto_tree_add_uint(vtp_tree, hf_vtp_conf_rev_num, NullTVB,
offset, 4, pntohl(&pd[offset]));
offset += 4;
memcpy(&upd_id, &pd[offset], sizeof upd_id);
! proto_tree_add_ipv4(vtp_tree, hf_vtp_upd_id, NullTVB,
offset, 4, upd_id);
offset += 4;
***************
*** 153,169 ****
&pd[offset+6], &pd[offset+8], &pd[offset+10]);
offset += 12;
! proto_tree_add_item(vtp_tree, hf_vtp_md5_digest, NullTVB,
offset, 16, &pd[offset]);
break;
case SUBSET_ADVERT:
! proto_tree_add_item(vtp_tree, hf_vtp_seq_num, NullTVB, offset,
1, pd[offset]);
offset += 1;
md_len = pd[offset];
! proto_tree_add_item(vtp_tree, hf_vtp_md_len, NullTVB, offset,
1, md_len);
offset += 1;
--- 153,169 ----
&pd[offset+6], &pd[offset+8], &pd[offset+10]);
offset += 12;
! proto_tree_add_bytes(vtp_tree, hf_vtp_md5_digest, NullTVB,
offset, 16, &pd[offset]);
break;
case SUBSET_ADVERT:
! proto_tree_add_uint(vtp_tree, hf_vtp_seq_num, NullTVB, offset,
1, pd[offset]);
offset += 1;
md_len = pd[offset];
! proto_tree_add_uint(vtp_tree, hf_vtp_md_len, NullTVB, offset,
1, md_len);
offset += 1;
***************
*** 172,178 ****
&pd[offset]);
offset += 32;
! proto_tree_add_item(vtp_tree, hf_vtp_conf_rev_num, NullTVB,
offset, 4, pntohl(&pd[offset]));
offset += 4;
--- 172,178 ----
&pd[offset]);
offset += 32;
! proto_tree_add_uint(vtp_tree, hf_vtp_conf_rev_num, NullTVB,
offset, 4, pntohl(&pd[offset]));
offset += 4;
***************
*** 189,199 ****
offset += 1; /* skip reserved field */
md_len = pd[offset];
! proto_tree_add_item(vtp_tree, hf_vtp_md_len, NullTVB, offset,
1, md_len);
offset += 1;
! proto_tree_add_item(vtp_tree, hf_vtp_start_value, NullTVB,
offset, 2, pntohs(&pd[offset]));
break;
--- 189,199 ----
offset += 1; /* skip reserved field */
md_len = pd[offset];
! proto_tree_add_uint(vtp_tree, hf_vtp_md_len, NullTVB, offset,
1, md_len);
offset += 1;
! proto_tree_add_uint(vtp_tree, hf_vtp_start_value, NullTVB,
offset, 2, pntohs(&pd[offset]));
break;
***************
*** 205,211 ****
offset += 1; /* skip unknown field */
md_len = pd[offset];
! proto_tree_add_item(vtp_tree, hf_vtp_md_len, NullTVB, offset,
1, md_len);
offset += 1;
--- 205,211 ----
offset += 1; /* skip unknown field */
md_len = pd[offset];
! proto_tree_add_uint(vtp_tree, hf_vtp_md_len, NullTVB, offset,
1, md_len);
offset += 1;
***************
*** 284,290 ****
vlan_info_tree = proto_item_add_subtree(ti, ett_vtp_vlan_info);
vlan_info_left = vlan_info_len;
! proto_tree_add_item(vlan_info_tree, hf_vtp_vlan_info_len, NullTVB, offset, 1,
vlan_info_len);
offset += 1;
vlan_info_left -= 1;
--- 284,290 ----
vlan_info_tree = proto_item_add_subtree(ti, ett_vtp_vlan_info);
vlan_info_left = vlan_info_len;
! proto_tree_add_uint(vlan_info_tree, hf_vtp_vlan_info_len, NullTVB, offset, 1,
vlan_info_len);
offset += 1;
vlan_info_left -= 1;
***************
*** 296,309 ****
"Status: 0x%02x%s", status,
(status & VLAN_SUSPENDED) ? "(VLAN suspended)" : "");
status_tree = proto_item_add_subtree(ti, ett_vtp_vlan_status);
! proto_tree_add_item(status_tree, hf_vtp_vlan_status_vlan_susp, NullTVB, offset, 1,
status);
offset += 1;
vlan_info_left -= 1;
if (!BYTES_ARE_IN_FRAME(offset, 1) || vlan_info_left < 1)
return -1;
! proto_tree_add_item(vlan_info_tree, hf_vtp_vlan_type, NullTVB, offset, 1,
pd[offset]);
offset += 1;
vlan_info_left -= 1;
--- 296,309 ----
"Status: 0x%02x%s", status,
(status & VLAN_SUSPENDED) ? "(VLAN suspended)" : "");
status_tree = proto_item_add_subtree(ti, ett_vtp_vlan_status);
! proto_tree_add_boolean(status_tree, hf_vtp_vlan_status_vlan_susp, NullTVB, offset, 1,
status);
offset += 1;
vlan_info_left -= 1;
if (!BYTES_ARE_IN_FRAME(offset, 1) || vlan_info_left < 1)
return -1;
! proto_tree_add_uint(vlan_info_tree, hf_vtp_vlan_type, NullTVB, offset, 1,
pd[offset]);
offset += 1;
vlan_info_left -= 1;
***************
*** 311,338 ****
if (!BYTES_ARE_IN_FRAME(offset, 1) || vlan_info_left < 1)
return -1;
vlan_name_len = pd[offset];
! proto_tree_add_item(vlan_info_tree, hf_vtp_vlan_name_len, NullTVB, offset, 1,
vlan_name_len);
offset += 1;
vlan_info_left -= 1;
if (!BYTES_ARE_IN_FRAME(offset, 2) || vlan_info_left < 2)
return -1;
! proto_tree_add_item(vlan_info_tree, hf_vtp_isl_vlan_id, NullTVB, offset, 2,
pntohs(&pd[offset]));
offset += 2;
vlan_info_left -= 2;
if (!BYTES_ARE_IN_FRAME(offset, 2) || vlan_info_left < 2)
return -1;
! proto_tree_add_item(vlan_info_tree, hf_vtp_mtu_size, NullTVB, offset, 2,
pntohs(&pd[offset]));
offset += 2;
vlan_info_left -= 2;
if (!BYTES_ARE_IN_FRAME(offset, 4) || vlan_info_left < 4)
return -1;
! proto_tree_add_item(vlan_info_tree, hf_vtp_802_10_index, NullTVB, offset, 4,
pntohl(&pd[offset]));
offset += 4;
vlan_info_left -= 4;
--- 311,338 ----
if (!BYTES_ARE_IN_FRAME(offset, 1) || vlan_info_left < 1)
return -1;
vlan_name_len = pd[offset];
! proto_tree_add_uint(vlan_info_tree, hf_vtp_vlan_name_len, NullTVB, offset, 1,
vlan_name_len);
offset += 1;
vlan_info_left -= 1;
if (!BYTES_ARE_IN_FRAME(offset, 2) || vlan_info_left < 2)
return -1;
! proto_tree_add_uint(vlan_info_tree, hf_vtp_isl_vlan_id, NullTVB, offset, 2,
pntohs(&pd[offset]));
offset += 2;
vlan_info_left -= 2;
if (!BYTES_ARE_IN_FRAME(offset, 2) || vlan_info_left < 2)
return -1;
! proto_tree_add_uint(vlan_info_tree, hf_vtp_mtu_size, NullTVB, offset, 2,
pntohs(&pd[offset]));
offset += 2;
vlan_info_left -= 2;
if (!BYTES_ARE_IN_FRAME(offset, 4) || vlan_info_left < 4)
return -1;
! proto_tree_add_uint(vlan_info_tree, hf_vtp_802_10_index, NullTVB, offset, 4,
pntohl(&pd[offset]));
offset += 4;
vlan_info_left -= 4;
***************
*** 358,366 ****
ti = proto_tree_add_notext(vlan_info_tree, NullTVB, offset,
2 + length*2);
tlv_tree = proto_item_add_subtree(ti, ett_vtp_tlv);
! proto_tree_add_item(tlv_tree, hf_vtp_vlan_tlvtype, NullTVB, offset,
1, type);
! proto_tree_add_item(tlv_tree, hf_vtp_vlan_tlvlength, NullTVB, offset+1,
1, length);
offset += 2;
vlan_info_left -= 2;
--- 358,366 ----
ti = proto_tree_add_notext(vlan_info_tree, NullTVB, offset,
2 + length*2);
tlv_tree = proto_item_add_subtree(ti, ett_vtp_tlv);
! proto_tree_add_uint(tlv_tree, hf_vtp_vlan_tlvtype, NullTVB, offset,
1, type);
! proto_tree_add_uint(tlv_tree, hf_vtp_vlan_tlvlength, NullTVB, offset+1,
1, length);
offset += 2;
vlan_info_left -= 2;
Index: packet-wccp.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-wccp.c,v
retrieving revision 1.7
diff -c -r1.7 packet-wccp.c
*** packet-wccp.c 2000/05/11 08:15:55 1.7
--- packet-wccp.c 2000/05/30 10:39:34
***************
*** 115,124 ****
if(tree != NULL) {
wccp_tree_item = proto_tree_add_item(tree, proto_wccp, NullTVB, offset,
! END_OF_FRAME, NULL);
wccp_tree = proto_item_add_subtree(wccp_tree_item, ett_wccp);
! proto_tree_add_item(wccp_tree, hf_wccp_message_type, NullTVB, offset,
sizeof(wccp_message_type), wccp_message_type);
offset += sizeof(wccp_message_type);
--- 115,124 ----
if(tree != NULL) {
wccp_tree_item = proto_tree_add_item(tree, proto_wccp, NullTVB, offset,
! END_OF_FRAME, FALSE);
wccp_tree = proto_item_add_subtree(wccp_tree_item, ett_wccp);
! proto_tree_add_uint(wccp_tree, hf_wccp_message_type, NullTVB, offset,
sizeof(wccp_message_type), wccp_message_type);
offset += sizeof(wccp_message_type);
***************
*** 126,150 ****
case WCCP_HERE_I_AM:
wccp_version = pntohl(&pd[offset]);
! proto_tree_add_item(wccp_tree, hf_wccp_version, NullTVB,
offset, 4, wccp_version);
offset += 4;
dissect_hash_data(pd, offset, wccp_tree);
offset += HASH_INFO_SIZE;
! proto_tree_add_item(wccp_tree, hf_recvd_id, NullTVB, offset,
4, pntohl(&pd[offset]));
offset += 4;
break;
case WCCP_I_SEE_YOU:
wccp_version = pntohl(&pd[offset]);
! proto_tree_add_item(wccp_tree, hf_wccp_version, NullTVB,
offset, 4, wccp_version);
offset += 4;
! proto_tree_add_item(wccp_tree, hf_change_num, NullTVB, offset,
4, pntohl(&pd[offset]));
offset += 4;
! proto_tree_add_item(wccp_tree, hf_recvd_id, NullTVB, offset,
4, pntohl(&pd[offset]));
offset += 4;
cache_count = pntohl(&pd[offset]);
--- 126,150 ----
case WCCP_HERE_I_AM:
wccp_version = pntohl(&pd[offset]);
! proto_tree_add_uint(wccp_tree, hf_wccp_version, NullTVB,
offset, 4, wccp_version);
offset += 4;
dissect_hash_data(pd, offset, wccp_tree);
offset += HASH_INFO_SIZE;
! proto_tree_add_uint(wccp_tree, hf_recvd_id, NullTVB, offset,
4, pntohl(&pd[offset]));
offset += 4;
break;
case WCCP_I_SEE_YOU:
wccp_version = pntohl(&pd[offset]);
! proto_tree_add_uint(wccp_tree, hf_wccp_version, NullTVB,
offset, 4, wccp_version);
offset += 4;
! proto_tree_add_uint(wccp_tree, hf_change_num, NullTVB, offset,
4, pntohl(&pd[offset]));
offset += 4;
! proto_tree_add_uint(wccp_tree, hf_recvd_id, NullTVB, offset,
4, pntohl(&pd[offset]));
offset += 4;
cache_count = pntohl(&pd[offset]);
***************
*** 163,169 ****
* This hasn't been tested, since I don't have any
* traces with this in it.
*/
! proto_tree_add_item(wccp_tree, hf_recvd_id, NullTVB, offset,
4, pntohl(&pd[offset]));
offset += 4;
cache_count = pntohl(&pd[offset]);
--- 163,169 ----
* This hasn't been tested, since I don't have any
* traces with this in it.
*/
! proto_tree_add_uint(wccp_tree, hf_recvd_id, NullTVB, offset,
4, pntohl(&pd[offset]));
offset += 4;
cache_count = pntohl(&pd[offset]);
***************
*** 192,198 ****
default:
wccp_version = pntohl(&pd[offset]);
! proto_tree_add_item(wccp_tree, hf_wccp_version, NullTVB,
offset, 4, wccp_version);
offset += 4;
dissect_data(pd, offset, fd, wccp_tree);
--- 192,198 ----
default:
wccp_version = pntohl(&pd[offset]);
! proto_tree_add_uint(wccp_tree, hf_wccp_version, NullTVB,
offset, 4, wccp_version);
offset += 4;
dissect_data(pd, offset, fd, wccp_tree);
***************
*** 213,219 ****
int n;
guint32 flags;
! proto_tree_add_item(wccp_tree, hf_hash_revision, NullTVB, offset, 4,
pntohl(&pd[offset]));
offset += 4;
--- 213,219 ----
int n;
guint32 flags;
! proto_tree_add_uint(wccp_tree, hf_hash_revision, NullTVB, offset, 4,
pntohl(&pd[offset]));
offset += 4;
***************
*** 251,257 ****
"Web-Cache List Entry(%d)", index);
list_entry_tree = proto_item_add_subtree(tl,
ett_cache_info);
! proto_tree_add_item(list_entry_tree, hf_cache_ip, NullTVB, offset, 4,
pntohl(&pd[offset]));
dissect_hash_data(pd, offset + 4, list_entry_tree);
}
--- 251,257 ----
"Web-Cache List Entry(%d)", index);
list_entry_tree = proto_item_add_subtree(tl,
ett_cache_info);
! proto_tree_add_ipv4(list_entry_tree, hf_cache_ip, NullTVB, offset, 4,
pntohl(&pd[offset]));
dissect_hash_data(pd, offset + 4, list_entry_tree);
}
Index: packet-who.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-who.c,v
retrieving revision 1.6
diff -c -r1.6 packet-who.c
*** packet-who.c 2000/05/11 08:15:56 1.6
--- packet-who.c 2000/05/30 10:39:35
***************
*** 137,177 ****
/* We already know that the packet has enough data to fill in
* the summary info. Retrieve that data */
! who_ti = proto_tree_add_item(tree, proto_who, NullTVB, offset, END_OF_FRAME, NULL);
who_tree = proto_item_add_subtree(who_ti, ett_who);
! proto_tree_add_item(who_tree, hf_who_vers, NullTVB, offset, 1, pd[offset]);
offset += 1;
! proto_tree_add_item(who_tree, hf_who_type, NullTVB, offset, 1, pd[offset]);
offset += 1;
/* 2 filler bytes */
offset += 2;
tv.tv_sec = pntohl(&pd[offset]);
! proto_tree_add_item(who_tree, hf_who_sendtime, NullTVB, offset, 4, &tv);
offset += 4;
tv.tv_sec = pntohl(&pd[offset]);
! proto_tree_add_item(who_tree, hf_who_recvtime, NullTVB, offset, 4, &tv);
offset += 4;
! proto_tree_add_item(who_tree, hf_who_hostname, NullTVB, offset, 32, server_name);
offset += 32;
! proto_tree_add_item(who_tree, hf_who_loadav_5, NullTVB, offset, 4, loadav_5);
offset += 4;
! proto_tree_add_item(who_tree, hf_who_loadav_10, NullTVB, offset, 4, loadav_10);
offset += 4;
! proto_tree_add_item(who_tree, hf_who_loadav_15, NullTVB, offset, 4, loadav_15);
offset += 4;
tv.tv_sec = pntohl(&pd[offset]);
! proto_tree_add_item(who_tree, hf_who_boottime, NullTVB, offset, 4, &tv);
offset += 4;
dissect_whoent(pd, offset, fd, who_tree);
--- 137,177 ----
/* We already know that the packet has enough data to fill in
* the summary info. Retrieve that data */
! who_ti = proto_tree_add_item(tree, proto_who, NullTVB, offset, END_OF_FRAME, FALSE);
who_tree = proto_item_add_subtree(who_ti, ett_who);
! proto_tree_add_uint(who_tree, hf_who_vers, NullTVB, offset, 1, pd[offset]);
offset += 1;
! proto_tree_add_uint(who_tree, hf_who_type, NullTVB, offset, 1, pd[offset]);
offset += 1;
/* 2 filler bytes */
offset += 2;
tv.tv_sec = pntohl(&pd[offset]);
! proto_tree_add_time(who_tree, hf_who_sendtime, NullTVB, offset, 4, &tv);
offset += 4;
tv.tv_sec = pntohl(&pd[offset]);
! proto_tree_add_time(who_tree, hf_who_recvtime, NullTVB, offset, 4, &tv);
offset += 4;
! proto_tree_add_string(who_tree, hf_who_hostname, NullTVB, offset, 32, server_name);
offset += 32;
! proto_tree_add_double(who_tree, hf_who_loadav_5, NullTVB, offset, 4, loadav_5);
offset += 4;
! proto_tree_add_double(who_tree, hf_who_loadav_10, NullTVB, offset, 4, loadav_10);
offset += 4;
! proto_tree_add_double(who_tree, hf_who_loadav_15, NullTVB, offset, 4, loadav_15);
offset += 4;
tv.tv_sec = pntohl(&pd[offset]);
! proto_tree_add_time(who_tree, hf_who_boottime, NullTVB, offset, 4, &tv);
offset += 4;
dissect_whoent(pd, offset, fd, who_tree);
***************
*** 203,219 ****
memcpy(out_line, &pd[line_offset], 8);
memcpy(out_name, &pd[line_offset+8], 8);
! whoent_ti = proto_tree_add_item(tree, hf_who_whoent, NullTVB, line_offset, SIZE_OF_WHOENT, NULL);
whoent_tree = proto_item_add_subtree(whoent_ti, ett_whoent);
! proto_tree_add_item(whoent_tree, hf_who_tty, NullTVB, line_offset, 8, out_line);
line_offset += 8;
! proto_tree_add_item(whoent_tree, hf_who_uid, NullTVB, line_offset, 8, out_name);
line_offset += 8;
tv.tv_sec = pntohl(&pd[line_offset]);
! proto_tree_add_item(whoent_tree, hf_who_timeon, NullTVB, line_offset, 4, &tv);
line_offset += 4;
idle_secs = pntohl(&pd[line_offset]);
--- 203,219 ----
memcpy(out_line, &pd[line_offset], 8);
memcpy(out_name, &pd[line_offset+8], 8);
! whoent_ti = proto_tree_add_item(tree, hf_who_whoent, NullTVB, line_offset, SIZE_OF_WHOENT, FALSE);
whoent_tree = proto_item_add_subtree(whoent_ti, ett_whoent);
! proto_tree_add_string(whoent_tree, hf_who_tty, NullTVB, line_offset, 8, out_line);
line_offset += 8;
! proto_tree_add_string(whoent_tree, hf_who_uid, NullTVB, line_offset, 8, out_name);
line_offset += 8;
tv.tv_sec = pntohl(&pd[line_offset]);
! proto_tree_add_time(whoent_tree, hf_who_timeon, NullTVB, line_offset, 4, &tv);
line_offset += 4;
idle_secs = pntohl(&pd[line_offset]);
Index: packet-x25.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-x25.c,v
retrieving revision 1.31
diff -c -r1.31 packet-x25.c
*** packet-x25.c 2000/05/29 22:35:11 1.31
--- packet-x25.c 2000/05/30 10:39:40
***************
*** 1432,1445 ****
"X.25");
x25_tree = proto_item_add_subtree(ti, ett_x25);
if (bytes0_1 & 0x8000)
! proto_tree_add_item(x25_tree,
(modulo == 8) ? hf_x25_qbit : hf_ex25_qbit, tvb, 0, 2,
bytes0_1);
if (bytes0_1 & 0x4000)
! proto_tree_add_item(x25_tree,
(modulo == 8) ? hf_x25_dbit : hf_ex25_dbit, tvb, 0, 2,
bytes0_1);
! proto_tree_add_item(x25_tree, (modulo == 8) ? hf_x25_mod : hf_ex25_mod,
tvb, 0, 2, bytes0_1);
}
--- 1432,1445 ----
"X.25");
x25_tree = proto_item_add_subtree(ti, ett_x25);
if (bytes0_1 & 0x8000)
! proto_tree_add_boolean(x25_tree,
(modulo == 8) ? hf_x25_qbit : hf_ex25_qbit, tvb, 0, 2,
bytes0_1);
if (bytes0_1 & 0x4000)
! proto_tree_add_boolean(x25_tree,
(modulo == 8) ? hf_x25_dbit : hf_ex25_dbit, tvb, 0, 2,
bytes0_1);
! proto_tree_add_uint(x25_tree, (modulo == 8) ? hf_x25_mod : hf_ex25_mod,
tvb, 0, 2, bytes0_1);
}
***************
*** 1452,1458 ****
: "Call req." ,
vc);
if (x25_tree) {
! proto_tree_add_item(x25_tree,
(modulo == 8) ? hf_x25_lcn : hf_ex25_lcn, tvb,
0, 2, bytes0_1);
proto_tree_add_uint_format(x25_tree,
--- 1452,1458 ----
: "Call req." ,
vc);
if (x25_tree) {
! proto_tree_add_uint(x25_tree,
(modulo == 8) ? hf_x25_lcn : hf_ex25_lcn, tvb,
0, 2, bytes0_1);
proto_tree_add_uint_format(x25_tree,
***************
*** 1566,1572 ****
: "Call acc." ,
vc);
if (x25_tree) {
! proto_tree_add_item(x25_tree, (modulo == 8) ? hf_x25_lcn : hf_ex25_lcn,
tvb, 0, 2, bytes0_1);
proto_tree_add_uint_format(x25_tree,
(modulo == 8) ? hf_x25_type : hf_ex25_type,
--- 1566,1572 ----
: "Call acc." ,
vc);
if (x25_tree) {
! proto_tree_add_uint(x25_tree, (modulo == 8) ? hf_x25_lcn : hf_ex25_lcn,
tvb, 0, 2, bytes0_1);
proto_tree_add_uint_format(x25_tree,
(modulo == 8) ? hf_x25_type : hf_ex25_type,
***************
*** 1598,1604 ****
}
x25_hash_add_proto_end(vc, pinfo->fd->abs_secs, pinfo->fd->abs_usecs);
if (x25_tree) {
! proto_tree_add_item(x25_tree, (modulo == 8) ? hf_x25_lcn : hf_ex25_lcn, tvb,
0, 2, bytes0_1);
proto_tree_add_uint_format(x25_tree,
(modulo == 8) ? hf_x25_type : hf_ex25_type,
--- 1598,1604 ----
}
x25_hash_add_proto_end(vc, pinfo->fd->abs_secs, pinfo->fd->abs_usecs);
if (x25_tree) {
! proto_tree_add_uint(x25_tree, (modulo == 8) ? hf_x25_lcn : hf_ex25_lcn, tvb,
0, 2, bytes0_1);
proto_tree_add_uint_format(x25_tree,
(modulo == 8) ? hf_x25_type : hf_ex25_type,
***************
*** 1616,1624 ****
if(check_col(pinfo->fd, COL_INFO))
col_add_fstr(pinfo->fd, COL_INFO, "Clear Conf. VC:%d", vc);
if (x25_tree) {
! proto_tree_add_item(x25_tree, (modulo == 8) ? hf_x25_lcn : hf_ex25_lcn, tvb,
0, 2, bytes0_1);
! proto_tree_add_item(x25_tree, (modulo == 8) ? hf_x25_type : hf_ex25_type, tvb,
2, 1, X25_CLEAR_CONFIRMATION);
}
localoffset = x25_pkt_len;
--- 1616,1624 ----
if(check_col(pinfo->fd, COL_INFO))
col_add_fstr(pinfo->fd, COL_INFO, "Clear Conf. VC:%d", vc);
if (x25_tree) {
! proto_tree_add_uint(x25_tree, (modulo == 8) ? hf_x25_lcn : hf_ex25_lcn, tvb,
0, 2, bytes0_1);
! proto_tree_add_uint(x25_tree, (modulo == 8) ? hf_x25_type : hf_ex25_type, tvb,
2, 1, X25_CLEAR_CONFIRMATION);
}
localoffset = x25_pkt_len;
***************
*** 1635,1641 ****
(int)tvb_get_guint8(tvb, 3));
}
if (x25_tree) {
! proto_tree_add_item(x25_tree, (modulo == 8) ? hf_x25_type : hf_ex25_type, tvb,
2, 1, X25_DIAGNOSTIC);
proto_tree_add_text(x25_tree, tvb, 3, 1,
"Diagnostic : %d", (int)tvb_get_guint8(tvb, 3));
--- 1635,1641 ----
(int)tvb_get_guint8(tvb, 3));
}
if (x25_tree) {
! proto_tree_add_uint(x25_tree, (modulo == 8) ? hf_x25_type : hf_ex25_type, tvb,
2, 1, X25_DIAGNOSTIC);
proto_tree_add_text(x25_tree, tvb, 3, 1,
"Diagnostic : %d", (int)tvb_get_guint8(tvb, 3));
***************
*** 1646,1654 ****
if(check_col(pinfo->fd, COL_INFO))
col_add_fstr(pinfo->fd, COL_INFO, "Interrupt VC:%d", vc);
if (x25_tree) {
! proto_tree_add_item(x25_tree, (modulo == 8) ? hf_x25_lcn : hf_ex25_lcn, tvb,
0, 2, bytes0_1);
! proto_tree_add_item(x25_tree, (modulo == 8) ? hf_x25_type : hf_ex25_type, tvb,
2, 1, X25_INTERRUPT);
}
localoffset = x25_pkt_len;
--- 1646,1654 ----
if(check_col(pinfo->fd, COL_INFO))
col_add_fstr(pinfo->fd, COL_INFO, "Interrupt VC:%d", vc);
if (x25_tree) {
! proto_tree_add_uint(x25_tree, (modulo == 8) ? hf_x25_lcn : hf_ex25_lcn, tvb,
0, 2, bytes0_1);
! proto_tree_add_uint(x25_tree, (modulo == 8) ? hf_x25_type : hf_ex25_type, tvb,
2, 1, X25_INTERRUPT);
}
localoffset = x25_pkt_len;
***************
*** 1657,1665 ****
if(check_col(pinfo->fd, COL_INFO))
col_add_fstr(pinfo->fd, COL_INFO, "Interrupt Conf. VC:%d", vc);
if (x25_tree) {
! proto_tree_add_item(x25_tree, (modulo == 8) ? hf_x25_lcn : hf_ex25_lcn, tvb,
0, 2, bytes0_1);
! proto_tree_add_item(x25_tree, (modulo == 8) ? hf_x25_type : hf_ex25_type, tvb,
2, 1, X25_INTERRUPT_CONFIRMATION);
}
localoffset = x25_pkt_len;
--- 1657,1665 ----
if(check_col(pinfo->fd, COL_INFO))
col_add_fstr(pinfo->fd, COL_INFO, "Interrupt Conf. VC:%d", vc);
if (x25_tree) {
! proto_tree_add_uint(x25_tree, (modulo == 8) ? hf_x25_lcn : hf_ex25_lcn, tvb,
0, 2, bytes0_1);
! proto_tree_add_uint(x25_tree, (modulo == 8) ? hf_x25_type : hf_ex25_type, tvb,
2, 1, X25_INTERRUPT_CONFIRMATION);
}
localoffset = x25_pkt_len;
***************
*** 1674,1680 ****
}
x25_hash_add_proto_end(vc, pinfo->fd->abs_secs, pinfo->fd->abs_usecs);
if (x25_tree) {
! proto_tree_add_item(x25_tree, (modulo == 8) ? hf_x25_lcn : hf_ex25_lcn, tvb,
0, 2, bytes0_1);
proto_tree_add_uint_format(x25_tree,
(modulo == 8) ? hf_x25_type : hf_ex25_type, tvb, 2, 1,
--- 1674,1680 ----
}
x25_hash_add_proto_end(vc, pinfo->fd->abs_secs, pinfo->fd->abs_usecs);
if (x25_tree) {
! proto_tree_add_uint(x25_tree, (modulo == 8) ? hf_x25_lcn : hf_ex25_lcn, tvb,
0, 2, bytes0_1);
proto_tree_add_uint_format(x25_tree,
(modulo == 8) ? hf_x25_type : hf_ex25_type, tvb, 2, 1,
***************
*** 1692,1700 ****
if(check_col(pinfo->fd, COL_INFO))
col_add_fstr(pinfo->fd, COL_INFO, "Reset conf. VC:%d", vc);
if (x25_tree) {
! proto_tree_add_item(x25_tree, (modulo == 8) ? hf_x25_lcn : hf_ex25_lcn, tvb,
0, 2, bytes0_1);
! proto_tree_add_item(x25_tree, (modulo == 8) ? hf_x25_type : hf_ex25_type, tvb,
2, 1, X25_RESET_CONFIRMATION);
}
localoffset = x25_pkt_len;
--- 1692,1700 ----
if(check_col(pinfo->fd, COL_INFO))
col_add_fstr(pinfo->fd, COL_INFO, "Reset conf. VC:%d", vc);
if (x25_tree) {
! proto_tree_add_uint(x25_tree, (modulo == 8) ? hf_x25_lcn : hf_ex25_lcn, tvb,
0, 2, bytes0_1);
! proto_tree_add_uint(x25_tree, (modulo == 8) ? hf_x25_type : hf_ex25_type, tvb,
2, 1, X25_RESET_CONFIRMATION);
}
localoffset = x25_pkt_len;
***************
*** 1724,1730 ****
if(check_col(pinfo->fd, COL_INFO))
col_add_str(pinfo->fd, COL_INFO, "Restart conf.");
if (x25_tree)
! proto_tree_add_item(x25_tree, (modulo == 8) ? hf_x25_type : hf_ex25_type, tvb,
2, 1, X25_RESTART_CONFIRMATION);
localoffset = x25_pkt_len;
break;
--- 1724,1730 ----
if(check_col(pinfo->fd, COL_INFO))
col_add_str(pinfo->fd, COL_INFO, "Restart conf.");
if (x25_tree)
! proto_tree_add_uint(x25_tree, (modulo == 8) ? hf_x25_type : hf_ex25_type, tvb,
2, 1, X25_RESTART_CONFIRMATION);
localoffset = x25_pkt_len;
break;
***************
*** 1732,1738 ****
if(check_col(pinfo->fd, COL_INFO))
col_add_str(pinfo->fd, COL_INFO, "Registration req.");
if (x25_tree)
! proto_tree_add_item(x25_tree, (modulo == 8) ? hf_x25_type : hf_ex25_type, tvb,
2, 1, X25_REGISTRATION_REQUEST);
localoffset = 3;
if (localoffset < x25_pkt_len)
--- 1732,1738 ----
if(check_col(pinfo->fd, COL_INFO))
col_add_str(pinfo->fd, COL_INFO, "Registration req.");
if (x25_tree)
! proto_tree_add_uint(x25_tree, (modulo == 8) ? hf_x25_type : hf_ex25_type, tvb,
2, 1, X25_REGISTRATION_REQUEST);
localoffset = 3;
if (localoffset < x25_pkt_len)
***************
*** 1754,1760 ****
if(check_col(pinfo->fd, COL_INFO))
col_add_str(pinfo->fd, COL_INFO, "Registration conf.");
if (x25_tree) {
! proto_tree_add_item(x25_tree, (modulo == 8) ? hf_x25_type : hf_ex25_type, tvb,
2, 1, X25_REGISTRATION_CONFIRMATION);
proto_tree_add_text(x25_tree, tvb, 3, 1,
"Cause: %s", registration_code(tvb_get_guint8(tvb, 3)));
--- 1754,1760 ----
if(check_col(pinfo->fd, COL_INFO))
col_add_str(pinfo->fd, COL_INFO, "Registration conf.");
if (x25_tree) {
! proto_tree_add_uint(x25_tree, (modulo == 8) ? hf_x25_type : hf_ex25_type, tvb,
2, 1, X25_REGISTRATION_CONFIRMATION);
proto_tree_add_text(x25_tree, tvb, 3, 1,
"Cause: %s", registration_code(tvb_get_guint8(tvb, 3)));
***************
*** 1796,1826 ****
(tvb_get_guint8(tvb, localoffset+1) & 0x01) ? " M" : "");
}
if (x25_tree) {
! proto_tree_add_item(x25_tree, (modulo == 8) ? hf_x25_lcn : hf_ex25_lcn,
tvb, localoffset-2, 2, bytes0_1);
if (modulo == 8) {
! proto_tree_add_item_hidden(x25_tree, hf_x25_type, tvb,
localoffset, 1, X25_DATA);
! proto_tree_add_item(x25_tree, hf_x25_p_r, tvb,
localoffset, 1, pkt_type);
if (pkt_type & 0x10)
! proto_tree_add_item(x25_tree, hf_x25_mbit, tvb, localoffset, 1,
pkt_type);
! proto_tree_add_item(x25_tree, hf_x25_p_s, tvb, localoffset, 1,
pkt_type);
proto_tree_add_text(x25_tree, tvb, localoffset, 1,
decode_boolean_bitfield(pkt_type, 0x01, 1*8,
NULL, "DATA"));
}
else {
! proto_tree_add_item_hidden(x25_tree, hf_ex25_type, tvb,
localoffset, 1, X25_DATA);
! proto_tree_add_item(x25_tree, hf_x25_p_r, tvb,
localoffset, 1, pkt_type);
! proto_tree_add_item(x25_tree, hf_x25_p_s, tvb,
localoffset+1, 1, tvb_get_guint8(tvb, localoffset+1));
if (tvb_get_guint8(tvb, localoffset+1) & 0x01)
! proto_tree_add_item(x25_tree, hf_ex25_mbit, tvb,
localoffset+1, 1, tvb_get_guint8(tvb, localoffset+1));
}
}
--- 1796,1826 ----
(tvb_get_guint8(tvb, localoffset+1) & 0x01) ? " M" : "");
}
if (x25_tree) {
! proto_tree_add_uint(x25_tree, (modulo == 8) ? hf_x25_lcn : hf_ex25_lcn,
tvb, localoffset-2, 2, bytes0_1);
if (modulo == 8) {
! proto_tree_add_uint_hidden(x25_tree, hf_x25_type, tvb,
localoffset, 1, X25_DATA);
! proto_tree_add_uint(x25_tree, hf_x25_p_r, tvb,
localoffset, 1, pkt_type);
if (pkt_type & 0x10)
! proto_tree_add_boolean(x25_tree, hf_x25_mbit, tvb, localoffset, 1,
pkt_type);
! proto_tree_add_uint(x25_tree, hf_x25_p_s, tvb, localoffset, 1,
pkt_type);
proto_tree_add_text(x25_tree, tvb, localoffset, 1,
decode_boolean_bitfield(pkt_type, 0x01, 1*8,
NULL, "DATA"));
}
else {
! proto_tree_add_uint_hidden(x25_tree, hf_ex25_type, tvb,
localoffset, 1, X25_DATA);
! proto_tree_add_uint(x25_tree, hf_x25_p_r, tvb,
localoffset, 1, pkt_type);
! proto_tree_add_uint(x25_tree, hf_x25_p_s, tvb,
localoffset+1, 1, tvb_get_guint8(tvb, localoffset+1));
if (tvb_get_guint8(tvb, localoffset+1) & 0x01)
! proto_tree_add_boolean(x25_tree, hf_ex25_mbit, tvb,
localoffset+1, 1, tvb_get_guint8(tvb, localoffset+1));
}
}
***************
*** 1839,1857 ****
vc, tvb_get_guint8(tvb, localoffset+1) >> 1);
}
if (x25_tree) {
! proto_tree_add_item(x25_tree, (modulo == 8) ? hf_x25_lcn : hf_ex25_lcn,
tvb, localoffset-2, 2, bytes0_1);
if (modulo == 8) {
! proto_tree_add_item(x25_tree, hf_x25_p_r, tvb,
localoffset, 1, pkt_type);
! proto_tree_add_item(x25_tree, hf_x25_type, tvb,
localoffset, 1, X25_RR);
}
else {
! proto_tree_add_item(x25_tree, hf_ex25_type, tvb,
localoffset, 1, X25_RR);
proto_tree_add_item(x25_tree, hf_ex25_p_r, tvb,
! localoffset+1, 1, tvb_get_guint8(tvb, localoffset+1));
}
}
break;
--- 1839,1857 ----
vc, tvb_get_guint8(tvb, localoffset+1) >> 1);
}
if (x25_tree) {
! proto_tree_add_uint(x25_tree, (modulo == 8) ? hf_x25_lcn : hf_ex25_lcn,
tvb, localoffset-2, 2, bytes0_1);
if (modulo == 8) {
! proto_tree_add_uint(x25_tree, hf_x25_p_r, tvb,
localoffset, 1, pkt_type);
! proto_tree_add_uint(x25_tree, hf_x25_type, tvb,
localoffset, 1, X25_RR);
}
else {
! proto_tree_add_uint(x25_tree, hf_ex25_type, tvb,
localoffset, 1, X25_RR);
proto_tree_add_item(x25_tree, hf_ex25_p_r, tvb,
! localoffset+1, 1, FALSE);
}
}
break;
***************
*** 1866,1884 ****
vc, tvb_get_guint8(tvb, localoffset+1) >> 1);
}
if (x25_tree) {
! proto_tree_add_item(x25_tree, (modulo == 8) ? hf_x25_lcn : hf_ex25_lcn,
tvb, localoffset-2, 2, bytes0_1);
if (modulo == 8) {
! proto_tree_add_item(x25_tree, hf_x25_p_r, tvb,
localoffset, 1, pkt_type);
! proto_tree_add_item(x25_tree, hf_x25_type, tvb,
localoffset, 1, X25_RNR);
}
else {
! proto_tree_add_item(x25_tree, hf_ex25_type, tvb,
localoffset, 1, X25_RNR);
proto_tree_add_item(x25_tree, hf_ex25_p_r, tvb,
! localoffset+1, 1, tvb_get_guint8(tvb, localoffset+1));
}
}
break;
--- 1866,1884 ----
vc, tvb_get_guint8(tvb, localoffset+1) >> 1);
}
if (x25_tree) {
! proto_tree_add_uint(x25_tree, (modulo == 8) ? hf_x25_lcn : hf_ex25_lcn,
tvb, localoffset-2, 2, bytes0_1);
if (modulo == 8) {
! proto_tree_add_uint(x25_tree, hf_x25_p_r, tvb,
localoffset, 1, pkt_type);
! proto_tree_add_uint(x25_tree, hf_x25_type, tvb,
localoffset, 1, X25_RNR);
}
else {
! proto_tree_add_uint(x25_tree, hf_ex25_type, tvb,
localoffset, 1, X25_RNR);
proto_tree_add_item(x25_tree, hf_ex25_p_r, tvb,
! localoffset+1, 1, FALSE);
}
}
break;
***************
*** 1893,1911 ****
vc, tvb_get_guint8(tvb, localoffset+1) >> 1);
}
if (x25_tree) {
! proto_tree_add_item(x25_tree, (modulo == 8) ? hf_x25_lcn : hf_ex25_lcn,
tvb, localoffset-2, 2, bytes0_1);
if (modulo == 8) {
! proto_tree_add_item(x25_tree, hf_x25_p_r, tvb,
localoffset, 1, pkt_type);
! proto_tree_add_item(x25_tree, hf_x25_type, tvb,
localoffset, 1, X25_REJ);
}
else {
! proto_tree_add_item(x25_tree, hf_ex25_type, tvb,
localoffset, 1, X25_REJ);
proto_tree_add_item(x25_tree, hf_ex25_p_r, tvb,
! localoffset+1, 1, tvb_get_guint8(tvb, localoffset+1));
}
}
}
--- 1893,1911 ----
vc, tvb_get_guint8(tvb, localoffset+1) >> 1);
}
if (x25_tree) {
! proto_tree_add_uint(x25_tree, (modulo == 8) ? hf_x25_lcn : hf_ex25_lcn,
tvb, localoffset-2, 2, bytes0_1);
if (modulo == 8) {
! proto_tree_add_uint(x25_tree, hf_x25_p_r, tvb,
localoffset, 1, pkt_type);
! proto_tree_add_uint(x25_tree, hf_x25_type, tvb,
localoffset, 1, X25_REJ);
}
else {
! proto_tree_add_uint(x25_tree, hf_ex25_type, tvb,
localoffset, 1, X25_REJ);
proto_tree_add_item(x25_tree, hf_ex25_p_r, tvb,
! localoffset+1, 1, FALSE);
}
}
}
Index: packet-yhoo.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-yhoo.c,v
retrieving revision 1.7
diff -c -r1.7 packet-yhoo.c
*** packet-yhoo.c 2000/05/11 08:15:57 1.7
--- packet-yhoo.c 2000/05/30 10:39:40
***************
*** 143,170 ****
);
if (tree) {
! ti = proto_tree_add_item(tree, proto_yhoo, NullTVB, offset, END_OF_FRAME, NULL);
yhoo_tree = proto_item_add_subtree(ti, ett_yhoo);
! proto_tree_add_item(yhoo_tree, hf_yhoo_version, NullTVB,
offset, 8, pkt->version);
! proto_tree_add_item(yhoo_tree, hf_yhoo_len, NullTVB,
offset+8, 4, pletohl(pkt->len));
! proto_tree_add_item(yhoo_tree, hf_yhoo_service, NullTVB,
offset+12, 4, pletohl(pkt->service));
! proto_tree_add_item(yhoo_tree, hf_yhoo_connection_id, NullTVB,
offset+16, 4, pletohl(pkt->connection_id));
! proto_tree_add_item(yhoo_tree, hf_yhoo_magic_id, NullTVB,
offset+20, 4, pletohl(pkt->magic_id));
! proto_tree_add_item(yhoo_tree, hf_yhoo_unknown1, NullTVB,
offset+24, 4, pletohl(pkt->unknown1));
! proto_tree_add_item(yhoo_tree, hf_yhoo_msgtype, NullTVB,
offset+28, 4, pletohl(pkt->msgtype));
! proto_tree_add_item(yhoo_tree, hf_yhoo_nick1, NullTVB,
offset+32, 36, pkt->nick1);
! proto_tree_add_item(yhoo_tree, hf_yhoo_nick2, NullTVB,
offset+68, 36, pkt->nick2);
! proto_tree_add_item(yhoo_tree, hf_yhoo_content, NullTVB,
offset+104, END_OF_FRAME, pkt->content);
}
--- 143,170 ----
);
if (tree) {
! ti = proto_tree_add_item(tree, proto_yhoo, NullTVB, offset, END_OF_FRAME, FALSE);
yhoo_tree = proto_item_add_subtree(ti, ett_yhoo);
! proto_tree_add_string(yhoo_tree, hf_yhoo_version, NullTVB,
offset, 8, pkt->version);
! proto_tree_add_uint(yhoo_tree, hf_yhoo_len, NullTVB,
offset+8, 4, pletohl(pkt->len));
! proto_tree_add_uint(yhoo_tree, hf_yhoo_service, NullTVB,
offset+12, 4, pletohl(pkt->service));
! proto_tree_add_uint(yhoo_tree, hf_yhoo_connection_id, NullTVB,
offset+16, 4, pletohl(pkt->connection_id));
! proto_tree_add_uint(yhoo_tree, hf_yhoo_magic_id, NullTVB,
offset+20, 4, pletohl(pkt->magic_id));
! proto_tree_add_uint(yhoo_tree, hf_yhoo_unknown1, NullTVB,
offset+24, 4, pletohl(pkt->unknown1));
! proto_tree_add_uint(yhoo_tree, hf_yhoo_msgtype, NullTVB,
offset+28, 4, pletohl(pkt->msgtype));
! proto_tree_add_string(yhoo_tree, hf_yhoo_nick1, NullTVB,
offset+32, 36, pkt->nick1);
! proto_tree_add_string(yhoo_tree, hf_yhoo_nick2, NullTVB,
offset+68, 36, pkt->nick2);
! proto_tree_add_string(yhoo_tree, hf_yhoo_content, NullTVB,
offset+104, END_OF_FRAME, pkt->content);
}
Index: packet-ypserv.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-ypserv.c,v
retrieving revision 1.10
diff -c -r1.10 packet-ypserv.c
*** packet-ypserv.c 2000/05/11 08:15:58 1.10
--- packet-ypserv.c 2000/05/30 10:39:41
***************
*** 66,72 ****
if ( tree )
{
! proto_tree_add_item(tree, hf_ypserv_servesdomain, NullTVB,
offset, 4, pntohl(&pd[offset]));
}
--- 66,72 ----
if ( tree )
{
! proto_tree_add_boolean(tree, hf_ypserv_servesdomain, NullTVB,
offset, 4, pntohl(&pd[offset]));
}
***************
*** 120,126 ****
if ( tree )
{
! proto_tree_add_item(tree, hf_ypserv_status, NullTVB,
offset, 4, pntohl(&pd[offset]));
offset += 4;
--- 120,126 ----
if ( tree )
{
! proto_tree_add_boolean(tree, hf_ypserv_status, NullTVB,
offset, 4, pntohl(&pd[offset]));
offset += 4;
***************
*** 137,143 ****
if ( tree )
{
! proto_tree_add_item(tree, hf_ypserv_status, NullTVB,
offset, 4, pntohl(&pd[offset]));
offset += 4;
--- 137,143 ----
if ( tree )
{
! proto_tree_add_boolean(tree, hf_ypserv_status, NullTVB,
offset, 4, pntohl(&pd[offset]));
offset += 4;
Index: packet.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet.c,v
retrieving revision 1.92
diff -c -r1.92 packet.c
*** packet.c 2000/05/29 08:57:41 1.92
--- packet.c 2000/05/30 10:39:43
***************
*** 1139,1154 ****
tv.tv_sec = fd->abs_secs;
tv.tv_usec = fd->abs_usecs;
! proto_tree_add_item(fh_tree, hf_frame_arrival_time, NullTVB,
0, 0, &tv);
tv.tv_sec = fd->del_secs;
tv.tv_usec = fd->del_usecs;
! proto_tree_add_item(fh_tree, hf_frame_time_delta, NullTVB,
0, 0, &tv);
! proto_tree_add_item(fh_tree, hf_frame_number, NullTVB,
0, 0, fd->num);
proto_tree_add_uint_format(fh_tree, hf_frame_packet_len, NullTVB,
--- 1139,1154 ----
tv.tv_sec = fd->abs_secs;
tv.tv_usec = fd->abs_usecs;
! proto_tree_add_time(fh_tree, hf_frame_arrival_time, NullTVB,
0, 0, &tv);
tv.tv_sec = fd->del_secs;
tv.tv_usec = fd->del_usecs;
! proto_tree_add_time(fh_tree, hf_frame_time_delta, NullTVB,
0, 0, &tv);
! proto_tree_add_uint(fh_tree, hf_frame_number, NullTVB,
0, 0, fd->num);
proto_tree_add_uint_format(fh_tree, hf_frame_packet_len, NullTVB,
Index: proto.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/proto.c,v
retrieving revision 1.66
diff -c -r1.66 proto.c
*** proto.c 2000/05/19 04:54:36 1.66
--- proto.c 2000/05/30 10:39:47
***************
*** 89,120 ****
static gboolean check_for_protocol_or_field_id(GNode *node, gpointer data);
static gboolean check_for_field_within_protocol(GNode *node, gpointer data);
- static field_info*
- proto_tree_add_field_info(int hfindex, tvbuff_t *tvb, gint start, gint length, int visible);
-
static proto_item*
proto_tree_add_node(proto_tree *tree, field_info *fi);
static proto_item *
proto_tree_add_pi(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length,
! const char *format, gboolean visible, field_info **pfi, va_list ap);
static void
proto_tree_set_value(field_info *fi, gint length, va_list ap);
static void
proto_tree_set_bytes(field_info *fi, const guint8* start_ptr, gint length);
static void
proto_tree_set_time(field_info *fi, struct timeval *value_ptr);
static void
proto_tree_set_string(field_info *fi, const char* value);
static void
! proto_tree_set_ether(field_info *fi, guint8* value);
static void
proto_tree_set_ipxnet(field_info *fi, guint32 value);
static void
proto_tree_set_ipv4(field_info *fi, guint32 value);
static void
! proto_tree_set_ipv6(field_info *fi, guint8* value_ptr);
static void
proto_tree_set_boolean(field_info *fi, guint32 value);
static void
--- 89,127 ----
static gboolean check_for_protocol_or_field_id(GNode *node, gpointer data);
static gboolean check_for_field_within_protocol(GNode *node, gpointer data);
static proto_item*
proto_tree_add_node(proto_tree *tree, field_info *fi);
static proto_item *
proto_tree_add_pi(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length,
! field_info **pfi);
! static void
! proto_tree_set_representation(proto_item *pi, const char *format, va_list ap);
static void
proto_tree_set_value(field_info *fi, gint length, va_list ap);
static void
proto_tree_set_bytes(field_info *fi, const guint8* start_ptr, gint length);
static void
+ proto_tree_set_bytes_tvb(field_info *fi, tvbuff_t *tvb, gint offset, gint length);
+ static void
proto_tree_set_time(field_info *fi, struct timeval *value_ptr);
static void
proto_tree_set_string(field_info *fi, const char* value);
+ static void
+ proto_tree_set_string_tvb(field_info *fi, tvbuff_t *tvb, gint start, gint length);
static void
! proto_tree_set_ether(field_info *fi, const guint8* value);
static void
+ proto_tree_set_ether_tvb(field_info *fi, tvbuff_t *tvb, gint start);
+ static void
proto_tree_set_ipxnet(field_info *fi, guint32 value);
static void
proto_tree_set_ipv4(field_info *fi, guint32 value);
+ static void
+ proto_tree_set_ipv6(field_info *fi, const guint8* value_ptr);
static void
! proto_tree_set_ipv6_tvb(field_info *fi, tvbuff_t *tvb, gint start);
static void
proto_tree_set_boolean(field_info *fi, guint32 value);
static void
***************
*** 267,283 ****
proto_item *
proto_tree_add_notext(proto_tree *tree, tvbuff_t *tvb, gint start, gint length)
{
- field_info *fi;
proto_item *pi;
! if (!tree)
return(NULL);
- fi = proto_tree_add_field_info(hf_text_only, tvb, start, length,
- proto_tree_is_visible);
- pi = proto_tree_add_node(tree, fi);
- fi->representation = NULL;
-
return pi;
}
--- 274,285 ----
proto_item *
proto_tree_add_notext(proto_tree *tree, tvbuff_t *tvb, gint start, gint length)
{
proto_item *pi;
! pi = proto_tree_add_pi(tree, hf_text_only, tvb, start, length, NULL);
! if (pi == NULL)
return(NULL);
return pi;
}
***************
*** 286,331 ****
proto_tree_add_text(proto_tree *tree, tvbuff_t *tvb, gint start, gint length,
const char *format, ...)
{
- field_info *fi;
proto_item *pi;
va_list ap;
! if (!tree)
return(NULL);
-
- fi = proto_tree_add_field_info(hf_text_only, tvb, start, length,
- proto_tree_is_visible);
- pi = proto_tree_add_node(tree, fi);
! /* Only add text if we know that proto_tree is to be shown */
! if (proto_tree_is_visible) {
! va_start(ap, format);
! fi->representation = g_mem_chunk_alloc(gmc_item_labels);
! vsnprintf(fi->representation, ITEM_LABEL_LENGTH, format, ap);
! va_end(ap);
! }
! else {
! fi->representation = NULL;
! }
return pi;
}
/* Add an item to a proto_tree, using the text label registered to that item. */
proto_item *
! proto_tree_add_item(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, ...)
{
proto_item *pi;
va_list ap;
field_info *new_fi;
! if (!tree)
return(NULL);
va_start(ap, length);
- /* ap won't be used since format is NULL */
- pi = proto_tree_add_pi(tree, hfindex, tvb, start, length,
- NULL, TRUE, &new_fi, ap);
proto_tree_set_value(new_fi, length, ap);
va_end(ap);
--- 288,320 ----
proto_tree_add_text(proto_tree *tree, tvbuff_t *tvb, gint start, gint length,
const char *format, ...)
{
proto_item *pi;
va_list ap;
! pi = proto_tree_add_notext(tree, tvb, start, length);
! if (pi == NULL)
return(NULL);
! va_start(ap, format);
! proto_tree_set_representation(pi, format, ap);
! va_end(ap);
return pi;
}
/* Add an item to a proto_tree, using the text label registered to that item. */
proto_item *
! proto_tree_add_item_old(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, ...)
{
proto_item *pi;
va_list ap;
field_info *new_fi;
! pi = proto_tree_add_pi(tree, hfindex, tvb, start, length, &new_fi);
! if (pi == NULL)
return(NULL);
va_start(ap, length);
proto_tree_set_value(new_fi, length, ap);
va_end(ap);
***************
*** 335,356 ****
/* Add an item to a proto_tree, but make it invisible in GUI. The field is
* still searchable, though. */
proto_item *
! proto_tree_add_item_hidden(proto_tree *tree, int hfindex, tvbuff_t* tvb, gint start, gint length, ...)
{
proto_item *pi;
! va_list ap;
field_info *new_fi;
! if (!tree)
return(NULL);
! va_start(ap, length);
! /* ap won't be used since format is NULL */
! pi = proto_tree_add_pi(tree, hfindex, tvb, start, length,
! NULL, FALSE, &new_fi, ap);
! proto_tree_set_value(new_fi, length, ap);
! va_end(ap);
return pi;
}
--- 324,512 ----
/* Add an item to a proto_tree, but make it invisible in GUI. The field is
* still searchable, though. */
proto_item *
! proto_tree_add_item_hidden_old(proto_tree *tree, int hfindex, tvbuff_t* tvb, gint start, gint length, ...)
{
proto_item *pi;
! field_info *fi;
!
! pi = proto_tree_add_item_old(tree, hfindex, tvb, start, length);
! if (pi == NULL)
! return(NULL);
!
! fi = (field_info*) (((GNode*)pi)->data);
! fi->visible = FALSE;
!
! return pi;
! }
!
! static guint32
! get_uint_value(tvbuff_t *tvb, gint offset, gint length, gboolean little_endian)
! {
! guint32 value;
!
! switch (length) {
!
! case 1:
! value = tvb_get_guint8(tvb, offset);
! break;
!
! case 2:
! value = little_endian ? tvb_get_letohs(tvb, offset)
! : tvb_get_ntohs(tvb, offset);
! break;
!
! case 3:
! value = little_endian ? tvb_get_letoh24(tvb, offset)
! : tvb_get_ntoh24(tvb, offset);
! break;
!
! case 4:
! value = little_endian ? tvb_get_letohl(tvb, offset)
! : tvb_get_ntohl(tvb, offset);
! break;
!
! default:
! g_assert_not_reached();
! value = 0;
! break;
! }
! return value;
! }
!
! static gint32
! get_int_value(tvbuff_t *tvb, gint offset, gint length, gboolean little_endian)
! {
! gint32 value;
!
! switch (length) {
!
! case 1:
! value = (gint8)tvb_get_guint8(tvb, offset);
! break;
!
! case 2:
! value = (gint16) (little_endian ? tvb_get_letohs(tvb, offset)
! : tvb_get_ntohs(tvb, offset));
! break;
!
! case 3:
! value = little_endian ? tvb_get_letoh24(tvb, offset)
! : tvb_get_ntoh24(tvb, offset);
! if (value & 0x00800000) {
! /* Sign bit is set; sign-extend it. */
! value |= 0xFF000000;
! }
! break;
!
! case 4:
! value = little_endian ? tvb_get_letohl(tvb, offset)
! : tvb_get_ntohl(tvb, offset);
! break;
!
! default:
! g_assert_not_reached();
! value = 0;
! break;
! }
! return value;
! }
!
! /* Add an item to a proto_tree, using the text label registered to that item;
! the item is extracted from the tvbuff handed to it. */
! proto_item *
! proto_tree_add_item(proto_tree *tree, int hfindex, tvbuff_t *tvb,
! gint start, gint length, gboolean little_endian)
! {
! proto_item *pi;
field_info *new_fi;
+ guint32 value;
! pi = proto_tree_add_pi(tree, hfindex, tvb, start, length, &new_fi);
! if (pi == NULL)
return(NULL);
! switch(new_fi->hfinfo->type) {
! case FT_NONE:
! /* no value to set for FT_NONE */
! break;
+ case FT_BYTES:
+ proto_tree_set_bytes_tvb(new_fi, tvb, start, length);
+ break;
+
+ case FT_BOOLEAN:
+ proto_tree_set_boolean(new_fi,
+ get_uint_value(tvb, start, length, little_endian));
+ break;
+
+ /* XXX - make these just FT_UINT? */
+ case FT_UINT8:
+ case FT_UINT16:
+ case FT_UINT24:
+ case FT_UINT32:
+ proto_tree_set_uint(new_fi,
+ get_uint_value(tvb, start, length, little_endian));
+ break;
+
+ /* XXX - make these just FT_INT? */
+ case FT_INT8:
+ case FT_INT16:
+ case FT_INT24:
+ case FT_INT32:
+ proto_tree_set_int(new_fi,
+ get_int_value(tvb, start, length, little_endian));
+ break;
+
+ case FT_IPv4:
+ g_assert(length == 4);
+ tvb_memcpy(tvb, (guint8 *)&value, start, 4);
+ proto_tree_set_ipv4(new_fi, value);
+ break;
+
+ case FT_IPXNET:
+ g_assert(length == 4); /* 2? */
+ tvb_memcpy(tvb, (guint8 *)&value, start, 4);
+ proto_tree_set_ipxnet(new_fi, value);
+ break;
+
+ case FT_IPv6:
+ g_assert(length == 16);
+ proto_tree_set_ipv6_tvb(new_fi, tvb, start);
+ break;
+
+ case FT_ETHER:
+ g_assert(length == 6);
+ proto_tree_set_ether_tvb(new_fi, tvb, start);
+ break;
+
+ case FT_STRING:
+ /* This g_strdup'ed memory is freed in proto_tree_free_node() */
+ proto_tree_set_string_tvb(new_fi, tvb, start, length);
+ break;
+
+ default:
+ g_error("new_fi->hfinfo->type %d not handled\n", new_fi->hfinfo->type);
+ g_assert_not_reached();
+ break;
+ }
+
+ return pi;
+ }
+
+ proto_item *
+ proto_tree_add_item_hidden(proto_tree *tree, int hfindex, tvbuff_t *tvb,
+ gint start, gint length, gboolean little_endian)
+ {
+ proto_item *pi;
+ field_info *fi;
+
+ pi = proto_tree_add_item(tree, hfindex, tvb, start, length, little_endian);
+ if (pi == NULL)
+ return(NULL);
+
+ fi = (field_info*) (((GNode*)pi)->data);
+ fi->visible = FALSE;
+
return pi;
}
***************
*** 458,479 ****
hfinfo = proto_registrar_get_nth(hfindex);
g_assert(hfinfo->type == FT_NONE);
va_start(ap, format);
! pi = proto_tree_add_pi(tree, hfindex, tvb, start, length,
! format, TRUE, NULL, ap);
! /* no value to set for FT_NONE */
va_end(ap);
return pi;
}
/* Add a FT_BYTES to a proto_tree */
proto_item *
! proto_tree_add_bytes_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
! gint length, const guint8 *start_ptr, const char *format, ...)
{
proto_item *pi;
- va_list ap;
field_info *new_fi;
header_field_info *hfinfo;
--- 614,636 ----
hfinfo = proto_registrar_get_nth(hfindex);
g_assert(hfinfo->type == FT_NONE);
+ pi = proto_tree_add_pi(tree, hfindex, tvb, start, length, NULL);
+
va_start(ap, format);
! proto_tree_set_representation(pi, format, ap);
va_end(ap);
+ /* no value to set for FT_NONE */
+
return pi;
}
/* Add a FT_BYTES to a proto_tree */
proto_item *
! proto_tree_add_bytes(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
! gint length, const guint8 *start_ptr)
{
proto_item *pi;
field_info *new_fi;
header_field_info *hfinfo;
***************
*** 483,492 ****
hfinfo = proto_registrar_get_nth(hfindex);
g_assert(hfinfo->type == FT_BYTES);
! va_start(ap, format);
! pi = proto_tree_add_pi(tree, hfindex, tvb, start, length,
! format, TRUE, &new_fi, ap);
proto_tree_set_bytes(new_fi, start_ptr, length);
va_end(ap);
return pi;
--- 640,681 ----
hfinfo = proto_registrar_get_nth(hfindex);
g_assert(hfinfo->type == FT_BYTES);
! pi = proto_tree_add_pi(tree, hfindex, tvb, start, length, &new_fi);
proto_tree_set_bytes(new_fi, start_ptr, length);
+
+ return pi;
+ }
+
+ proto_item *
+ proto_tree_add_bytes_hidden(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
+ gint length, const guint8 *start_ptr)
+ {
+ proto_item *pi;
+ field_info *fi;
+
+ pi = proto_tree_add_bytes(tree, hfindex, tvb, start, length, start_ptr);
+ if (pi == NULL)
+ return (NULL);
+
+ fi = (field_info*) (((GNode*)pi)->data);
+ fi->visible = FALSE;
+
+ return pi;
+ }
+
+ proto_item *
+ proto_tree_add_bytes_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
+ gint length, const guint8 *start_ptr, const char *format, ...)
+ {
+ proto_item *pi;
+ va_list ap;
+
+ pi = proto_tree_add_bytes(tree, hfindex, tvb, start, length, start_ptr);
+ if (pi == NULL)
+ return (NULL);
+
+ va_start(ap, format);
+ proto_tree_set_representation(pi, format, ap);
va_end(ap);
return pi;
***************
*** 509,521 ****
}
}
/* Add a FT_*TIME to a proto_tree */
proto_item *
! proto_tree_add_time_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length,
! struct timeval *value_ptr, const char *format, ...)
{
proto_item *pi;
- va_list ap;
field_info *new_fi;
header_field_info *hfinfo;
--- 698,722 ----
}
}
+ static void
+ proto_tree_set_bytes_tvb(field_info *fi, tvbuff_t *tvb, gint offset, gint length)
+ {
+ if (length > 0) {
+ /* This g_malloc'ed memory is freed in
+ proto_tree_free_node() */
+ fi->value.bytes = tvb_memdup(tvb, offset, length);
+ }
+ else {
+ fi->value.bytes = NULL;
+ }
+ }
+
/* Add a FT_*TIME to a proto_tree */
proto_item *
! proto_tree_add_time(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length,
! struct timeval *value_ptr)
{
proto_item *pi;
field_info *new_fi;
header_field_info *hfinfo;
***************
*** 526,535 ****
g_assert(hfinfo->type == FT_ABSOLUTE_TIME ||
hfinfo->type == FT_RELATIVE_TIME);
! va_start(ap, format);
! pi = proto_tree_add_pi(tree, hfindex, tvb, start, length,
! format, TRUE, &new_fi, ap);
proto_tree_set_time(new_fi, value_ptr);
va_end(ap);
return pi;
--- 727,768 ----
g_assert(hfinfo->type == FT_ABSOLUTE_TIME ||
hfinfo->type == FT_RELATIVE_TIME);
! pi = proto_tree_add_pi(tree, hfindex, tvb, start, length, &new_fi);
proto_tree_set_time(new_fi, value_ptr);
+
+ return pi;
+ }
+
+ proto_item *
+ proto_tree_add_time_hidden(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length,
+ struct timeval *value_ptr)
+ {
+ proto_item *pi;
+ field_info *fi;
+
+ pi = proto_tree_add_time(tree, hfindex, tvb, start, length, value_ptr);
+ if (pi == NULL)
+ return (NULL);
+
+ fi = (field_info*) (((GNode*)pi)->data);
+ fi->visible = FALSE;
+
+ return pi;
+ }
+
+ proto_item *
+ proto_tree_add_time_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length,
+ struct timeval *value_ptr, const char *format, ...)
+ {
+ proto_item *pi;
+ va_list ap;
+
+ pi = proto_tree_add_time(tree, hfindex, tvb, start, length, value_ptr);
+ if (pi == NULL)
+ return (NULL);
+
+ va_start(ap, format);
+ proto_tree_set_representation(pi, format, ap);
va_end(ap);
return pi;
***************
*** 544,554 ****
/* Add a FT_IPXNET to a proto_tree */
proto_item *
! proto_tree_add_ipxnet_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length,
! guint32 value, const char *format, ...)
{
proto_item *pi;
- va_list ap;
field_info *new_fi;
header_field_info *hfinfo;
--- 777,786 ----
/* Add a FT_IPXNET to a proto_tree */
proto_item *
! proto_tree_add_ipxnet(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length,
! guint32 value)
{
proto_item *pi;
field_info *new_fi;
header_field_info *hfinfo;
***************
*** 558,567 ****
hfinfo = proto_registrar_get_nth(hfindex);
g_assert(hfinfo->type == FT_IPXNET);
! va_start(ap, format);
! pi = proto_tree_add_pi(tree, hfindex, tvb, start, length,
! format, TRUE, &new_fi, ap);
proto_tree_set_ipxnet(new_fi, value);
va_end(ap);
return pi;
--- 790,831 ----
hfinfo = proto_registrar_get_nth(hfindex);
g_assert(hfinfo->type == FT_IPXNET);
! pi = proto_tree_add_pi(tree, hfindex, tvb, start, length, &new_fi);
proto_tree_set_ipxnet(new_fi, value);
+
+ return pi;
+ }
+
+ proto_item *
+ proto_tree_add_ipxnet_hidden(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length,
+ guint32 value)
+ {
+ proto_item *pi;
+ field_info *fi;
+
+ pi = proto_tree_add_ipxnet(tree, hfindex, tvb, start, length, value);
+ if (pi == NULL)
+ return (NULL);
+
+ fi = (field_info*) (((GNode*)pi)->data);
+ fi->visible = FALSE;
+
+ return pi;
+ }
+
+ proto_item *
+ proto_tree_add_ipxnet_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length,
+ guint32 value, const char *format, ...)
+ {
+ proto_item *pi;
+ va_list ap;
+
+ pi = proto_tree_add_ipxnet(tree, hfindex, tvb, start, length, value);
+ if (pi == NULL)
+ return (NULL);
+
+ va_start(ap, format);
+ proto_tree_set_representation(pi, format, ap);
va_end(ap);
return pi;
***************
*** 576,586 ****
/* Add a FT_IPv4 to a proto_tree */
proto_item *
! proto_tree_add_ipv4_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length,
! guint32 value, const char *format, ...)
{
proto_item *pi;
- va_list ap;
field_info *new_fi;
header_field_info *hfinfo;
--- 840,849 ----
/* Add a FT_IPv4 to a proto_tree */
proto_item *
! proto_tree_add_ipv4(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length,
! guint32 value)
{
proto_item *pi;
field_info *new_fi;
header_field_info *hfinfo;
***************
*** 590,599 ****
hfinfo = proto_registrar_get_nth(hfindex);
g_assert(hfinfo->type == FT_IPv4);
! va_start(ap, format);
! pi = proto_tree_add_pi(tree, hfindex, tvb, start, length,
! format, TRUE, &new_fi, ap);
proto_tree_set_ipv4(new_fi, value);
va_end(ap);
return pi;
--- 853,894 ----
hfinfo = proto_registrar_get_nth(hfindex);
g_assert(hfinfo->type == FT_IPv4);
! pi = proto_tree_add_pi(tree, hfindex, tvb, start, length, &new_fi);
proto_tree_set_ipv4(new_fi, value);
+
+ return pi;
+ }
+
+ proto_item *
+ proto_tree_add_ipv4_hidden(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length,
+ guint32 value)
+ {
+ proto_item *pi;
+ field_info *fi;
+
+ pi = proto_tree_add_ipv4(tree, hfindex, tvb, start, length, value);
+ if (pi == NULL)
+ return (NULL);
+
+ fi = (field_info*) (((GNode*)pi)->data);
+ fi->visible = FALSE;
+
+ return pi;
+ }
+
+ proto_item *
+ proto_tree_add_ipv4_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length,
+ guint32 value, const char *format, ...)
+ {
+ proto_item *pi;
+ va_list ap;
+
+ pi = proto_tree_add_ipv4(tree, hfindex, tvb, start, length, value);
+ if (pi == NULL)
+ return (NULL);
+
+ va_start(ap, format);
+ proto_tree_set_representation(pi, format, ap);
va_end(ap);
return pi;
***************
*** 609,619 ****
/* Add a FT_IPv6 to a proto_tree */
proto_item *
! proto_tree_add_ipv6_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length,
! guint8* value_ptr, const char *format, ...)
{
proto_item *pi;
- va_list ap;
field_info *new_fi;
header_field_info *hfinfo;
--- 904,913 ----
/* Add a FT_IPv6 to a proto_tree */
proto_item *
! proto_tree_add_ipv6(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length,
! const guint8* value_ptr)
{
proto_item *pi;
field_info *new_fi;
header_field_info *hfinfo;
***************
*** 623,651 ****
hfinfo = proto_registrar_get_nth(hfindex);
g_assert(hfinfo->type == FT_IPv6);
! va_start(ap, format);
! pi = proto_tree_add_pi(tree, hfindex, tvb, start, length,
! format, TRUE, &new_fi, ap);
proto_tree_set_ipv6(new_fi, value_ptr);
va_end(ap);
return pi;
}
! /* Set the FT_IPv4 value */
static void
! proto_tree_set_ipv6(field_info *fi, guint8* value_ptr)
{
memcpy(fi->value.ipv6, value_ptr, 16);
}
/* Add a FT_STRING to a proto_tree */
proto_item *
! proto_tree_add_string_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
! gint length, const char* value, const char *format, ...)
{
proto_item *pi;
- va_list ap;
field_info *new_fi;
header_field_info *hfinfo;
--- 917,982 ----
hfinfo = proto_registrar_get_nth(hfindex);
g_assert(hfinfo->type == FT_IPv6);
! pi = proto_tree_add_pi(tree, hfindex, tvb, start, length, &new_fi);
proto_tree_set_ipv6(new_fi, value_ptr);
+
+ return pi;
+ }
+
+ proto_item *
+ proto_tree_add_ipv6_hidden(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length,
+ const guint8* value_ptr)
+ {
+ proto_item *pi;
+ field_info *fi;
+
+ pi = proto_tree_add_ipv6(tree, hfindex, tvb, start, length, value_ptr);
+ if (pi == NULL)
+ return (NULL);
+
+ fi = (field_info*) (((GNode*)pi)->data);
+ fi->visible = FALSE;
+
+ return pi;
+ }
+
+ proto_item *
+ proto_tree_add_ipv6_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length,
+ const guint8* value_ptr, const char *format, ...)
+ {
+ proto_item *pi;
+ va_list ap;
+
+ pi = proto_tree_add_ipv6(tree, hfindex, tvb, start, length, value_ptr);
+ if (pi == NULL)
+ return (NULL);
+
+ va_start(ap, format);
+ proto_tree_set_representation(pi, format, ap);
va_end(ap);
return pi;
}
! /* Set the FT_IPv6 value */
static void
! proto_tree_set_ipv6(field_info *fi, const guint8* value_ptr)
{
memcpy(fi->value.ipv6, value_ptr, 16);
}
+ static void
+ proto_tree_set_ipv6_tvb(field_info *fi, tvbuff_t *tvb, gint start)
+ {
+ tvb_memcpy(tvb, fi->value.ipv6, start, 16);
+ }
+
/* Add a FT_STRING to a proto_tree */
proto_item *
! proto_tree_add_string(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
! gint length, const char* value)
{
proto_item *pi;
field_info *new_fi;
header_field_info *hfinfo;
***************
*** 655,664 ****
hfinfo = proto_registrar_get_nth(hfindex);
g_assert(hfinfo->type == FT_STRING);
! va_start(ap, format);
! pi = proto_tree_add_pi(tree, hfindex, tvb, start, length,
! format, TRUE, &new_fi, ap);
proto_tree_set_string(new_fi, value);
va_end(ap);
return pi;
--- 986,1027 ----
hfinfo = proto_registrar_get_nth(hfindex);
g_assert(hfinfo->type == FT_STRING);
! pi = proto_tree_add_pi(tree, hfindex, tvb, start, length, &new_fi);
proto_tree_set_string(new_fi, value);
+
+ return pi;
+ }
+
+ proto_item *
+ proto_tree_add_string_hidden(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
+ gint length, const char* value)
+ {
+ proto_item *pi;
+ field_info *fi;
+
+ pi = proto_tree_add_string(tree, hfindex, tvb, start, length, value);
+ if (pi == NULL)
+ return (NULL);
+
+ fi = (field_info*) (((GNode*)pi)->data);
+ fi->visible = FALSE;
+
+ return pi;
+ }
+
+ proto_item *
+ proto_tree_add_string_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
+ gint length, const char* value, const char *format, ...)
+ {
+ proto_item *pi;
+ va_list ap;
+
+ pi = proto_tree_add_string(tree, hfindex, tvb, start, length, value);
+ if (pi == NULL)
+ return (NULL);
+
+ va_start(ap, format);
+ proto_tree_set_representation(pi, format, ap);
va_end(ap);
return pi;
***************
*** 672,684 ****
fi->value.string = g_strdup(value);
}
/* Add a FT_ETHER to a proto_tree */
proto_item *
! proto_tree_add_ether_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length,
! guint8* value, const char *format, ...)
{
proto_item *pi;
- va_list ap;
field_info *new_fi;
header_field_info *hfinfo;
--- 1035,1053 ----
fi->value.string = g_strdup(value);
}
+ static void
+ proto_tree_set_string_tvb(field_info *fi, tvbuff_t *tvb, gint start, gint length)
+ {
+ /* This g_strdup'ed memory is freed in proto_tree_free_node() */
+ fi->value.string = tvb_memdup(tvb, start, length);
+ }
+
/* Add a FT_ETHER to a proto_tree */
proto_item *
! proto_tree_add_ether(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length,
! const guint8* value)
{
proto_item *pi;
field_info *new_fi;
header_field_info *hfinfo;
***************
*** 688,697 ****
hfinfo = proto_registrar_get_nth(hfindex);
g_assert(hfinfo->type == FT_ETHER);
! va_start(ap, format);
! pi = proto_tree_add_pi(tree, hfindex, tvb, start, length,
! format, TRUE, &new_fi, ap);
proto_tree_set_ether(new_fi, value);
va_end(ap);
return pi;
--- 1057,1098 ----
hfinfo = proto_registrar_get_nth(hfindex);
g_assert(hfinfo->type == FT_ETHER);
! pi = proto_tree_add_pi(tree, hfindex, tvb, start, length, &new_fi);
proto_tree_set_ether(new_fi, value);
+
+ return pi;
+ }
+
+ proto_item *
+ proto_tree_add_ether_hidden(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length,
+ const guint8* value)
+ {
+ proto_item *pi;
+ field_info *fi;
+
+ pi = proto_tree_add_ether(tree, hfindex, tvb, start, length, value);
+ if (pi == NULL)
+ return (NULL);
+
+ fi = (field_info*) (((GNode*)pi)->data);
+ fi->visible = FALSE;
+
+ return pi;
+ }
+
+ proto_item *
+ proto_tree_add_ether_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length,
+ const guint8* value, const char *format, ...)
+ {
+ proto_item *pi;
+ va_list ap;
+
+ pi = proto_tree_add_ether(tree, hfindex, tvb, start, length, value);
+ if (pi == NULL)
+ return (NULL);
+
+ va_start(ap, format);
+ proto_tree_set_representation(pi, format, ap);
va_end(ap);
return pi;
***************
*** 699,716 ****
/* Set the FT_ETHER value */
static void
! proto_tree_set_ether(field_info *fi, guint8* value)
{
memcpy(fi->value.ether, value, 6);
}
/* Add a FT_BOOLEAN to a proto_tree */
proto_item *
! proto_tree_add_boolean_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length,
! guint32 value, const char *format, ...)
{
proto_item *pi;
- va_list ap;
field_info *new_fi;
header_field_info *hfinfo;
--- 1100,1122 ----
/* Set the FT_ETHER value */
static void
! proto_tree_set_ether(field_info *fi, const guint8* value)
{
memcpy(fi->value.ether, value, 6);
}
+ static void
+ proto_tree_set_ether_tvb(field_info *fi, tvbuff_t *tvb, gint start)
+ {
+ tvb_memcpy(tvb, fi->value.ether, start, 6);
+ }
+
/* Add a FT_BOOLEAN to a proto_tree */
proto_item *
! proto_tree_add_boolean(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length,
! guint32 value)
{
proto_item *pi;
field_info *new_fi;
header_field_info *hfinfo;
***************
*** 720,729 ****
hfinfo = proto_registrar_get_nth(hfindex);
g_assert(hfinfo->type == FT_BOOLEAN);
! va_start(ap, format);
! pi = proto_tree_add_pi(tree, hfindex, tvb, start, length,
! format, TRUE, &new_fi, ap);
proto_tree_set_boolean(new_fi, value);
va_end(ap);
return pi;
--- 1126,1167 ----
hfinfo = proto_registrar_get_nth(hfindex);
g_assert(hfinfo->type == FT_BOOLEAN);
! pi = proto_tree_add_pi(tree, hfindex, tvb, start, length, &new_fi);
proto_tree_set_boolean(new_fi, value);
+
+ return pi;
+ }
+
+ proto_item *
+ proto_tree_add_boolean_hidden(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length,
+ guint32 value)
+ {
+ proto_item *pi;
+ field_info *fi;
+
+ pi = proto_tree_add_boolean(tree, hfindex, tvb, start, length, value);
+ if (pi == NULL)
+ return (NULL);
+
+ fi = (field_info*) (((GNode*)pi)->data);
+ fi->visible = FALSE;
+
+ return pi;
+ }
+
+ proto_item *
+ proto_tree_add_boolean_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length,
+ guint32 value, const char *format, ...)
+ {
+ proto_item *pi;
+ va_list ap;
+
+ pi = proto_tree_add_boolean(tree, hfindex, tvb, start, length, value);
+ if (pi == NULL)
+ return (NULL);
+
+ va_start(ap, format);
+ proto_tree_set_representation(pi, format, ap);
va_end(ap);
return pi;
***************
*** 738,748 ****
/* Add a FT_DOUBLE to a proto_tree */
proto_item *
! proto_tree_add_double_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length,
! double value, const char *format, ...)
{
proto_item *pi;
- va_list ap;
field_info *new_fi;
header_field_info *hfinfo;
--- 1176,1185 ----
/* Add a FT_DOUBLE to a proto_tree */
proto_item *
! proto_tree_add_double(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length,
! double value)
{
proto_item *pi;
field_info *new_fi;
header_field_info *hfinfo;
***************
*** 752,761 ****
hfinfo = proto_registrar_get_nth(hfindex);
g_assert(hfinfo->type == FT_DOUBLE);
! va_start(ap, format);
! pi = proto_tree_add_pi(tree, hfindex, tvb, start, length,
! format, TRUE, &new_fi, ap);
proto_tree_set_double(new_fi, value);
va_end(ap);
return pi;
--- 1189,1230 ----
hfinfo = proto_registrar_get_nth(hfindex);
g_assert(hfinfo->type == FT_DOUBLE);
! pi = proto_tree_add_pi(tree, hfindex, tvb, start, length, &new_fi);
proto_tree_set_double(new_fi, value);
+
+ return pi;
+ }
+
+ proto_item *
+ proto_tree_add_double_hidden(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length,
+ double value)
+ {
+ proto_item *pi;
+ field_info *fi;
+
+ pi = proto_tree_add_double(tree, hfindex, tvb, start, length, value);
+ if (pi == NULL)
+ return (NULL);
+
+ fi = (field_info*) (((GNode*)pi)->data);
+ fi->visible = FALSE;
+
+ return pi;
+ }
+
+ proto_item *
+ proto_tree_add_double_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length,
+ double value, const char *format, ...)
+ {
+ proto_item *pi;
+ va_list ap;
+
+ pi = proto_tree_add_double(tree, hfindex, tvb, start, length, value);
+ if (pi == NULL)
+ return (NULL);
+
+ va_start(ap, format);
+ proto_tree_set_representation(pi, format, ap);
va_end(ap);
return pi;
***************
*** 770,780 ****
/* Add any FT_UINT* to a proto_tree */
proto_item *
! proto_tree_add_uint_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length,
! guint32 value, const char *format, ...)
{
proto_item *pi = NULL;
- va_list ap;
field_info *new_fi;
header_field_info *hfinfo;
--- 1239,1248 ----
/* Add any FT_UINT* to a proto_tree */
proto_item *
! proto_tree_add_uint(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length,
! guint32 value)
{
proto_item *pi = NULL;
field_info *new_fi;
header_field_info *hfinfo;
***************
*** 787,797 ****
case FT_UINT16:
case FT_UINT24:
case FT_UINT32:
- va_start(ap, format);
pi = proto_tree_add_pi(tree, hfindex, tvb, start, length,
! format, TRUE, &new_fi, ap);
proto_tree_set_uint(new_fi, value);
- va_end(ap);
break;
default:
--- 1255,1263 ----
case FT_UINT16:
case FT_UINT24:
case FT_UINT32:
pi = proto_tree_add_pi(tree, hfindex, tvb, start, length,
! &new_fi);
proto_tree_set_uint(new_fi, value);
break;
default:
***************
*** 801,806 ****
--- 1267,1307 ----
return pi;
}
+ proto_item *
+ proto_tree_add_uint_hidden(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length,
+ guint32 value)
+ {
+ proto_item *pi;
+ field_info *fi;
+
+ pi = proto_tree_add_uint(tree, hfindex, tvb, start, length, value);
+ if (pi == NULL)
+ return (NULL);
+
+ fi = (field_info*) (((GNode*)pi)->data);
+ fi->visible = FALSE;
+
+ return pi;
+ }
+
+ proto_item *
+ proto_tree_add_uint_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length,
+ guint32 value, const char *format, ...)
+ {
+ proto_item *pi;
+ va_list ap;
+
+ pi = proto_tree_add_uint(tree, hfindex, tvb, start, length, value);
+ if (pi == NULL)
+ return (NULL);
+
+ va_start(ap, format);
+ proto_tree_set_representation(pi, format, ap);
+ va_end(ap);
+
+ return pi;
+ }
+
/* Set the FT_UINT* value */
static void
proto_tree_set_uint(field_info *fi, guint32 value)
***************
*** 822,832 ****
/* Add any FT_INT* to a proto_tree */
proto_item *
! proto_tree_add_int_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length,
! gint32 value, const char *format, ...)
{
proto_item *pi = NULL;
- va_list ap;
field_info *new_fi;
header_field_info *hfinfo;
--- 1323,1332 ----
/* Add any FT_INT* to a proto_tree */
proto_item *
! proto_tree_add_int(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length,
! gint32 value)
{
proto_item *pi = NULL;
field_info *new_fi;
header_field_info *hfinfo;
***************
*** 839,849 ****
case FT_INT16:
case FT_INT24:
case FT_INT32:
- va_start(ap, format);
pi = proto_tree_add_pi(tree, hfindex, tvb, start, length,
! format, TRUE, &new_fi, ap);
proto_tree_set_int(new_fi, value);
- va_end(ap);
break;
default:
--- 1339,1347 ----
case FT_INT16:
case FT_INT24:
case FT_INT32:
pi = proto_tree_add_pi(tree, hfindex, tvb, start, length,
! &new_fi);
proto_tree_set_int(new_fi, value);
break;
default:
***************
*** 853,858 ****
--- 1351,1391 ----
return pi;
}
+ proto_item *
+ proto_tree_add_int_hidden(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length,
+ gint32 value)
+ {
+ proto_item *pi;
+ field_info *fi;
+
+ pi = proto_tree_add_int(tree, hfindex, tvb, start, length, value);
+ if (pi == NULL)
+ return (NULL);
+
+ fi = (field_info*) (((GNode*)pi)->data);
+ fi->visible = FALSE;
+
+ return pi;
+ }
+
+ proto_item *
+ proto_tree_add_int_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length,
+ gint32 value, const char *format, ...)
+ {
+ proto_item *pi = NULL;
+ va_list ap;
+
+ pi = proto_tree_add_int(tree, hfindex, tvb, start, length, value);
+ if (pi == NULL)
+ return (NULL);
+
+ va_start(ap, format);
+ proto_tree_set_representation(pi, format, ap);
+ va_end(ap);
+
+ return pi;
+ }
+
/* Set the FT_INT* value */
static void
proto_tree_set_int(field_info *fi, gint32 value)
***************
*** 873,900 ****
}
- /* Create a new field_info struct, and initialize it */
- static field_info *
- proto_tree_add_field_info(int hfindex, tvbuff_t *tvb, gint start, gint length, int visible)
- {
- field_info *fi;
-
- fi = g_mem_chunk_alloc(gmc_field_info);
-
- g_assert(hfindex >= 0 && hfindex < gpa_hfinfo->len);
- fi->hfinfo = proto_registrar_get_nth(hfindex);
- g_assert(fi->hfinfo != NULL);
- fi->start = start;
- if (tvb) {
- fi->start += tvb_raw_offset(tvb);
- }
- fi->length = length;
- fi->tree_type = ETT_NONE;
- fi->visible = visible;
-
- return fi;
- }
-
/* Add a field_info struct to the proto_tree, encapsulating it in a GNode (proto_item) */
static proto_item *
proto_tree_add_node(proto_tree *tree, field_info *fi)
--- 1406,1411 ----
***************
*** 908,918 ****
}
! /* Generic way to allocate field_info, add to proto_tree, and set representation.
* Sets *pfi to address of newly-allocated field_info struct, if pfi is non-NULL. */
static proto_item *
proto_tree_add_pi(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length,
! const char *format, gboolean visible, field_info **pfi, va_list ap)
{
proto_item *pi;
field_info *fi;
--- 1419,1429 ----
}
! /* Generic way to allocate field_info and add to proto_tree.
* Sets *pfi to address of newly-allocated field_info struct, if pfi is non-NULL. */
static proto_item *
proto_tree_add_pi(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length,
! field_info **pfi)
{
proto_item *pi;
field_info *fi;
***************
*** 920,941 ****
if (!tree)
return(NULL);
! /* either visibility flag can nullify the other */
! visible = proto_tree_is_visible && visible;
! fi = proto_tree_add_field_info(hfindex, tvb, start, length, visible);
pi = proto_tree_add_node(tree, fi);
- /* are there any formatting arguments? */
- if (visible && format) {
- fi->representation = g_mem_chunk_alloc(gmc_item_labels);
- vsnprintf(fi->representation, ITEM_LABEL_LENGTH, format, ap);
- }
- else {
- fi->representation = NULL;
- }
-
if (pfi) {
*pfi = fi;
}
--- 1431,1452 ----
if (!tree)
return(NULL);
! fi = g_mem_chunk_alloc(gmc_field_info);
! g_assert(hfindex >= 0 && hfindex < gpa_hfinfo->len);
! fi->hfinfo = proto_registrar_get_nth(hfindex);
! g_assert(fi->hfinfo != NULL);
! fi->start = start;
! if (tvb) {
! fi->start += tvb_raw_offset(tvb);
! }
! fi->length = length;
! fi->tree_type = ETT_NONE;
! fi->visible = proto_tree_is_visible;
! fi->representation = NULL;
pi = proto_tree_add_node(tree, fi);
if (pfi) {
*pfi = fi;
}
***************
*** 943,948 ****
--- 1454,1471 ----
return pi;
}
+ /* Set representation of a proto_tree entry, if the protocol tree is to
+ be visible. */
+ static void
+ proto_tree_set_representation(proto_item *pi, const char *format, va_list ap)
+ {
+ field_info *fi = (field_info*) (((GNode*)pi)->data);
+
+ if (fi->visible) {
+ fi->representation = g_mem_chunk_alloc(gmc_item_labels);
+ vsnprintf(fi->representation, ITEM_LABEL_LENGTH, format, ap);
+ }
+ }
void
proto_item_set_text(proto_item *pi, const char *format, ...)
***************
*** 953,962 ****
if (fi->representation)
g_mem_chunk_free(gmc_item_labels, fi->representation);
- fi->representation = g_mem_chunk_alloc(gmc_item_labels);
va_start(ap, format);
! vsnprintf(fi->representation, ITEM_LABEL_LENGTH,
! format, ap);
va_end(ap);
}
--- 1476,1483 ----
if (fi->representation)
g_mem_chunk_free(gmc_item_labels, fi->representation);
va_start(ap, format);
! proto_tree_set_representation(pi, format, ap);
va_end(ap);
}
Index: proto.h
===================================================================
RCS file: /usr/local/cvsroot/ethereal/proto.h,v
retrieving revision 1.31
diff -c -r1.31 proto.h
*** proto.h 2000/05/30 09:52:30 1.31
--- proto.h 2000/05/30 10:39:49
***************
*** 197,209 ****
/* Add item's value to proto_tree, using label registered to that field */
proto_item *
! proto_tree_add_item(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
gint length, ...);
proto_item *
! proto_tree_add_item_hidden(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
gint length, ...);
#if __GNUC__ == 2
proto_item *
proto_tree_add_protocol_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
--- 197,220 ----
/* Add item's value to proto_tree, using label registered to that field */
proto_item *
! proto_tree_add_item_old(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
gint length, ...);
proto_item *
! proto_tree_add_item_hidden_old(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
gint length, ...);
+ /* Add an item to a proto_tree, using the text label registered to that item;
+ the item is extracted from the tvbuff handed to it. */
+ proto_item *
+ proto_tree_add_item(proto_tree *tree, int hfindex, tvbuff_t *tvb,
+ gint start, gint length, gboolean little_endian);
+
+ proto_item *
+ proto_tree_add_item_hidden(proto_tree *tree, int hfindex, tvbuff_t *tvb,
+ gint start, gint length, gboolean little_endian);
+
+ /* Add a FT_NONE to a proto_tree */
#if __GNUC__ == 2
proto_item *
proto_tree_add_protocol_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
***************
*** 215,220 ****
--- 226,239 ----
gint length, const char *format, ...);
#endif
+ /* Add a FT_BYTES to a proto_tree */
+ proto_item *
+ proto_tree_add_bytes(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
+ gint length, const guint8* start_ptr);
+
+ proto_item *
+ proto_tree_add_bytes_hidden(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
+ gint length, const guint8* start_ptr);
#if __GNUC__ == 2
proto_item *
***************
*** 227,232 ****
--- 246,260 ----
gint length, const guint8* start_ptr, const char *format, ...);
#endif
+ /* Add a FT_*TIME to a proto_tree */
+ proto_item *
+ proto_tree_add_time(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
+ gint length, struct timeval* value_ptr);
+
+ proto_item *
+ proto_tree_add_time_hidden(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
+ gint length, struct timeval* value_ptr);
+
#if __GNUC__ == 2
proto_item *
proto_tree_add_time_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
***************
*** 238,243 ****
--- 266,280 ----
gint length, struct timeval* value_ptr, const char *format, ...);
#endif
+ /* Add a FT_IPXNET to a proto_tree */
+ proto_item *
+ proto_tree_add_ipxnet(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
+ gint length, guint32 value);
+
+ proto_item *
+ proto_tree_add_ipxnet_hidden(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
+ gint length, guint32 value);
+
#if __GNUC__ == 2
proto_item *
proto_tree_add_ipxnet_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
***************
*** 249,254 ****
--- 286,300 ----
gint length, guint32 value, const char *format, ...);
#endif
+ /* Add a FT_IPv4 to a proto_tree */
+ proto_item *
+ proto_tree_add_ipv4(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
+ gint length, guint32 value);
+
+ proto_item *
+ proto_tree_add_ipv4_hidden(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
+ gint length, guint32 value);
+
#if __GNUC__ == 2
proto_item *
proto_tree_add_ipv4_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
***************
*** 260,280 ****
gint length, guint32 value, const char *format, ...);
#endif
#if __GNUC__ == 2
proto_item *
proto_tree_add_ipv6_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
! gint length, guint8* value_ptr, const char *format, ...)
__attribute__((format (printf, 7, 8)));
#else
proto_item *
proto_tree_add_ipv6_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
! gint length, guint8* value_ptr, const char *format, ...);
#endif
#if __GNUC__ == 2
proto_item *
proto_tree_add_ether_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
! gint length, guint8* value, const char *format, ...)
__attribute__((format (printf, 7, 8)));
#else
proto_item *
--- 306,344 ----
gint length, guint32 value, const char *format, ...);
#endif
+ /* Add a FT_IPv6 to a proto_tree */
+ proto_item *
+ proto_tree_add_ipv6(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
+ gint length, const guint8* value_ptr);
+
+ proto_item *
+ proto_tree_add_ipv6_hidden(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
+ gint length, const guint8* value_ptr);
+
#if __GNUC__ == 2
proto_item *
proto_tree_add_ipv6_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
! gint length, const guint8* value_ptr, const char *format, ...)
__attribute__((format (printf, 7, 8)));
#else
proto_item *
proto_tree_add_ipv6_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
! gint length, const guint8* value_ptr, const char *format, ...);
#endif
+ /* Add a FT_ETHER to a proto_tree */
+ proto_item *
+ proto_tree_add_ether(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
+ gint length, const guint8* value);
+
+ proto_item *
+ proto_tree_add_ether_hidden(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
+ gint length, const guint8* value);
+
#if __GNUC__ == 2
proto_item *
proto_tree_add_ether_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
! gint length, const guint8* value, const char *format, ...)
__attribute__((format (printf, 7, 8)));
#else
proto_item *
***************
*** 282,287 ****
--- 346,360 ----
gint length, guint8* value, const char *format, ...);
#endif
+ /* Add a FT_STRING to a proto_tree */
+ proto_item *
+ proto_tree_add_string(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
+ gint length, const char* value);
+
+ proto_item *
+ proto_tree_add_string_hidden(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
+ gint length, const char* value);
+
#if __GNUC__ == 2
proto_item *
proto_tree_add_string_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
***************
*** 293,298 ****
--- 366,380 ----
gint length, const char* value, const char *format, ...);
#endif
+ /* Add a FT_BOOLEAN to a proto_tree */
+ proto_item *
+ proto_tree_add_boolean(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
+ gint length, guint32 value);
+
+ proto_item *
+ proto_tree_add_boolean_hidden(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
+ gint length, guint32 value);
+
#if __GNUC__ == 2
proto_item *
proto_tree_add_boolean_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
***************
*** 304,311 ****
--- 386,422 ----
gint length, guint32 value, const char *format, ...);
#endif
+ /* Add a FT_DOUBLE to a proto_tree */
+ proto_item *
+ proto_tree_add_double(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
+ gint length, double value);
+
+ proto_item *
+ proto_tree_add_double_hidden(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
+ gint length, double value);
+
#if __GNUC__ == 2
proto_item *
+ proto_tree_add_double_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
+ gint length, double value, const char *format, ...)
+ __attribute__((format (printf, 7, 8)));
+ #else
+ proto_item *
+ proto_tree_add_double_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
+ gint length, double value, const char *format, ...);
+ #endif
+
+ /* Add any FT_UINT* to a proto_tree */
+ proto_item *
+ proto_tree_add_uint(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
+ gint length, guint32 value);
+
+ proto_item *
+ proto_tree_add_uint_hidden(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
+ gint length, guint32 value);
+
+ #if __GNUC__ == 2
+ proto_item *
proto_tree_add_uint_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
gint length, guint32 value, const char *format, ...)
__attribute__((format (printf, 7, 8)));
***************
*** 315,320 ****
--- 426,440 ----
gint length, guint32 value, const char *format, ...);
#endif
+ /* Add any FT_INT* to a proto_tree */
+ proto_item *
+ proto_tree_add_int(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
+ gint length, gint32 value);
+
+ proto_item *
+ proto_tree_add_int_hidden(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
+ gint length, gint32 value);
+
#if __GNUC__ == 2
proto_item *
proto_tree_add_int_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
***************
*** 327,332 ****
--- 447,453 ----
#endif
+ /* Add a text-only node to the proto_tree */
#if __GNUC__ == 2
proto_item *
proto_tree_add_text(proto_tree *tree, tvbuff_t *tvb, gint start, gint length, const char *,
***************
*** 338,343 ****
--- 459,465 ----
#endif
+ /* Add a node with no text */
proto_item *
proto_tree_add_notext(proto_tree *tree, tvbuff_t *tvb, gint start, gint length);
Index: plugins/gryphon/packet-gryphon.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/plugins/gryphon/packet-gryphon.c,v
retrieving revision 1.9
diff -c -r1.9 packet-gryphon.c
*** packet-gryphon.c 2000/05/11 08:18:09 1.9
--- packet-gryphon.c 2000/05/30 10:39:53
***************
*** 141,147 ****
if (tree) {
if (fd) {
ti = proto_tree_add_item(tree, proto_gryphon, NullTVB, offset,
! end_of_frame, NULL);
gryphon_tree = proto_item_add_subtree(ti, ett_gryphon);
} else
gryphon_tree = tree;
--- 141,147 ----
if (tree) {
if (fd) {
ti = proto_tree_add_item(tree, proto_gryphon, NullTVB, offset,
! end_of_frame, FALSE);
gryphon_tree = proto_item_add_subtree(ti, ett_gryphon);
} else
gryphon_tree = tree;
***************
*** 164,171 ****
i = SIZEOF(src_dest) - 1;
proto_tree_add_text(header_tree, NullTVB, offset, 2,
"Source: %s, channel %hd", src_dest[i].strptr, data[1]);
! proto_tree_add_item_hidden(header_tree, hf_gryph_src, NullTVB, offset, 1, src);
! proto_tree_add_item_hidden(header_tree, hf_gryph_srcchan, NullTVB, offset+1, 1, data[1]);
for (i = 0; i < SIZEOF(src_dest); i++) {
if (src_dest[i].value == dest)
--- 164,171 ----
i = SIZEOF(src_dest) - 1;
proto_tree_add_text(header_tree, NullTVB, offset, 2,
"Source: %s, channel %hd", src_dest[i].strptr, data[1]);
! proto_tree_add_uint_hidden(header_tree, hf_gryph_src, NullTVB, offset, 1, src);
! proto_tree_add_uint_hidden(header_tree, hf_gryph_srcchan, NullTVB, offset+1, 1, data[1]);
for (i = 0; i < SIZEOF(src_dest); i++) {
if (src_dest[i].value == dest)
***************
*** 175,182 ****
i = SIZEOF(src_dest) - 1;
proto_tree_add_text(header_tree, NullTVB, offset+2, 2,
"Destination: %s, channel %hd", src_dest[i].strptr, data[3]);
! proto_tree_add_item_hidden(header_tree, hf_gryph_dest, NullTVB, offset+2, 1, dest);
! proto_tree_add_item_hidden(header_tree, hf_gryph_destchan, NullTVB, offset+3, 1, data[3]);
proto_tree_add_text(header_tree, NullTVB, offset+4, 2,
"Data length: %d bytes", msglen);
--- 175,182 ----
i = SIZEOF(src_dest) - 1;
proto_tree_add_text(header_tree, NullTVB, offset+2, 2,
"Destination: %s, channel %hd", src_dest[i].strptr, data[3]);
! proto_tree_add_uint_hidden(header_tree, hf_gryph_dest, NullTVB, offset+2, 1, dest);
! proto_tree_add_uint_hidden(header_tree, hf_gryph_destchan, NullTVB, offset+3, 1, data[3]);
proto_tree_add_text(header_tree, NullTVB, offset+4, 2,
"Data length: %d bytes", msglen);
***************
*** 184,190 ****
"Frame type: %s", frame_type[frmtyp]);
proto_tree_add_text(header_tree, NullTVB, offset+7, 1, "reserved");
! proto_tree_add_item_hidden(header_tree, hf_gryph_type, NullTVB, offset+6, 1, frmtyp);
msgpad = 3 - (msglen + 3) % 4;
msgend = data + msglen + msgpad + MSG_HDR_SZ;
--- 184,190 ----
"Frame type: %s", frame_type[frmtyp]);
proto_tree_add_text(header_tree, NullTVB, offset+7, 1, "reserved");
! proto_tree_add_uint_hidden(header_tree, hf_gryph_type, NullTVB, offset+6, 1, frmtyp);
msgpad = 3 - (msglen + 3) % 4;
msgend = data + msglen + msgpad + MSG_HDR_SZ;
***************
*** 446,452 ****
proto_item *ti;
cmd = (*data)[0];
! proto_tree_add_item_hidden(pt, hf_gryph_cmd, NullTVB, *offset, 1, cmd);
if (cmd > 0x3F)
cmd += dst * 256;
--- 446,452 ----
proto_item *ti;
cmd = (*data)[0];
! proto_tree_add_uint_hidden(pt, hf_gryph_cmd, NullTVB, *offset, 1, cmd);
if (cmd > 0x3F)
cmd += dst * 256;
- Prev by Date: Re: [ethereal-dev] Ethereal C++ compatability
- Next by Date: Re: [ethereal-dev] Replacing "proto_tree_add_item()" with type-specific versions
- Previous by thread: Re: [ethereal-dev] Ethereal C++ compatability
- Next by thread: Re: [ethereal-dev] Replacing "proto_tree_add_item()" with type-specific versions
- Index(es):





