Add routines for adding items to a protocol tree that take arguments of

a particular type, rather than taking a varargs list, along the lines of
the "proto_tree_add_XXX_format()" routines.

Replace most calls to "proto_tree_add_item()" and
"proto_tree_add_item_hidden()" with calls to those routines.

Rename "proto_tree_add_item()" and "proto_tree_add_item_hidden()" to
"proto_tree_add_item_old()" and "proto_tree_add_item_hidden_old()", and
add new "proto_tree_add_item()" and "proto_tree_add_item_hidden()"
routines that don't take the item to be added as an argument - instead,
they fetch the argument from the packet whose tvbuff was handed to them,
from the offset handed to them.

svn path=/trunk/; revision=2031
This commit is contained in:
Guy Harris 2000-05-31 05:09:07 +00:00
parent aa553f63ec
commit 283ce59938
109 changed files with 1980 additions and 1307 deletions

View File

@ -1,7 +1,7 @@
/* packet-aarp.c
* Routines for Appletalk ARP packet disassembly
*
* $Id: packet-aarp.c,v 1.19 2000/05/11 08:14:49 gram Exp $
* $Id: packet-aarp.c,v 1.20 2000/05/31 05:06:48 guy Exp $
*
* Simon Wilkinson <sxw@dcs.ed.ac.uk>
*
@ -200,15 +200,15 @@ dissect_aarp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
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,
proto_tree_add_uint(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,
proto_tree_add_uint(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,
proto_tree_add_uint(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,
proto_tree_add_uint(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,
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],

View File

@ -1,12 +1,12 @@
/* packet-rx.c
* Routines for RX packet dissection
/* packet-afs.c
* Routines for AFS packet dissection
* Copyright 1999, Nathan Neulinger <nneul@umr.edu>
* Based on routines from tcpdump patches by
* Ken Hornstein <kenh@cmf.nrl.navy.mil>
* Portions based on information retrieved from the RX definitions
* in Arla, the free AFS client at http://www.stacken.kth.se/project/arla/
*
* $Id: packet-afs.c,v 1.10 2000/05/11 08:14:49 gram Exp $
* $Id: packet-afs.c,v 1.11 2000/05/31 05:06:48 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -886,7 +886,7 @@ dissect_afs(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
}
if (tree) {
ti = proto_tree_add_item(tree, proto_afs, NullTVB, doffset, END_OF_FRAME);
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,13 +910,13 @@ dissect_afs(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
ti = NULL;
if ( !reply && node != 0 )
{
ti = proto_tree_add_item(afs_tree,
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_item(afs_tree,
ti = proto_tree_add_uint(afs_tree,
node, NullTVB, doffset, 0, opcode);
}
else
@ -931,7 +931,7 @@ dissect_afs(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
if ( typenode != 0 )
{
/* indicate the type of request */
proto_tree_add_item_hidden(afs_tree, typenode, NullTVB, doffset, 0, 1);
proto_tree_add_boolean_hidden(afs_tree, typenode, NullTVB, doffset, 0, 1);
}
/* Process the packet according to what service it is */
@ -972,34 +972,33 @@ dissect_afs(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
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()); \
proto_tree_add_uint(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 */
/* Output an IPv4 address, stored into field 'field' */
#define IPOUT(field) \
TRUNC(sizeof(gint32)) \
proto_tree_add_item(tree,field, NullTVB,curoffset,sizeof(gint32),\
proto_tree_add_ipv4(tree,field, NullTVB,curoffset,sizeof(gint32),\
*((int*)&pd[curoffset]));\
curoffset += 4;
/* Output a unix timestamp, after converting to a timeval */
/* 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_item(tree,field, NullTVB,curoffset,2*sizeof(guint32),&tv); \
proto_tree_add_time(tree,field, NullTVB,curoffset,2*sizeof(guint32),&tv); \
curoffset += 8; \
}
/* Output a unix timestamp, after converting to a timeval */
/* 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_item(tree,field, NullTVB,curoffset,sizeof(guint32),&tv); \
proto_tree_add_time(tree,field, NullTVB,curoffset,sizeof(guint32),&tv); \
curoffset += 4; \
}
@ -1075,16 +1074,16 @@ dissect_afs(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
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);\
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_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);\
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,7 +1098,7 @@ dissect_afs(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
/* Raw data */
#define BYTESOUT(field, bytes) \
TRUNC(bytes); \
proto_tree_add_item(tree,field, NullTVB,curoffset,bytes,\
proto_tree_add_bytes(tree,field, NullTVB,curoffset,bytes,\
(void *)&pd[curoffset]); \
curoffset += bytes;
@ -1112,10 +1111,10 @@ dissect_afs(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
curoffset += 4; \
TRUNC(i); \
if ( i > 0 ) { \
proto_tree_add_item(tree, field, NullTVB, curoffset-4, i+4, \
proto_tree_add_string(tree, field, NullTVB, curoffset-4, i+4, \
(void *)&pd[curoffset]); \
} else { \
proto_tree_add_item(tree, field, NullTVB, curoffset-4, 4, \
proto_tree_add_string(tree, field, NullTVB, curoffset-4, 4, \
""); \
} \
curoffset += i; \
@ -1133,7 +1132,7 @@ dissect_afs(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
curoffset += sizeof(guint32);\
}\
tmp[length] = '\0';\
proto_tree_add_item(tree, field, NullTVB, soff, length, tmp);\
proto_tree_add_string(tree, field, NullTVB, soff, length, tmp);\
}
/* Output a UBIK version code */
@ -1152,9 +1151,9 @@ dissect_afs(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
"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, \
proto_tree_add_time(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, \
proto_tree_add_uint(tree,hf_afs_ubik_version_counter, NullTVB,curoffset-4, \
sizeof(guint32),counter); \
tree = save; \
}
@ -1203,14 +1202,14 @@ static void dissect_acl(const u_char *pd, int offset, frame_data *fd, proto_tree
return;
s += n;
TRUNC(1);
proto_tree_add_item(tree, hf_afs_fs_acl_count_positive, NullTVB, curoffset, n, pos);
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_item(tree, hf_afs_fs_acl_count_negative, NullTVB, curoffset, n, neg);
proto_tree_add_uint(tree, hf_afs_fs_acl_count_negative, NullTVB, curoffset, n, neg);
curoffset += n;
@ -1887,7 +1886,7 @@ dissect_vldb_reply(const u_char *pd, int offset, frame_data *fd, proto_tree *tre
if ( i<nservers && j<=26 )
{
part[6] = (char) j;
proto_tree_add_item(tree, hf_afs_vldb_partition, NullTVB,
proto_tree_add_string(tree, hf_afs_vldb_partition, NullTVB,
curoffset, 4, part);
}
SKIP(4);
@ -1934,7 +1933,7 @@ dissect_vldb_reply(const u_char *pd, int offset, frame_data *fd, proto_tree *tre
if ( i<nservers && j<=26 )
{
part[6] = (char) j;
proto_tree_add_item(tree, hf_afs_vldb_partition, NullTVB,
proto_tree_add_string(tree, hf_afs_vldb_partition, NullTVB,
curoffset, 4, part);
}
SKIP(4);
@ -1973,7 +1972,7 @@ dissect_vldb_reply(const u_char *pd, int offset, frame_data *fd, proto_tree *tre
if ( i<nservers && j<=26 )
{
part[6] = (char) j;
proto_tree_add_item(tree, hf_afs_vldb_partition, NullTVB,
proto_tree_add_string(tree, hf_afs_vldb_partition, NullTVB,
curoffset, 4, part);
}
SKIP(4);
@ -2064,7 +2063,7 @@ dissect_ubik_reply(const u_char *pd, int offset, frame_data *fd, proto_tree *tre
switch ( opcode )
{
case 10000: /* beacon */
proto_tree_add_item(tree,hf_afs_ubik_votetype, NullTVB,0,0,0);
proto_tree_add_boolean(tree,hf_afs_ubik_votetype, NullTVB,0,0,0);
break;
case 20004: /* get version */
UBIK_VERSIONOUT("DB Version");
@ -2076,7 +2075,7 @@ dissect_ubik_reply(const u_char *pd, int offset, frame_data *fd, proto_tree *tre
switch ( opcode )
{
case 10000:
proto_tree_add_item(tree,hf_afs_ubik_votetype, NullTVB,0,0,1);
proto_tree_add_boolean(tree,hf_afs_ubik_votetype, NullTVB,0,0,1);
DATEOUT(hf_afs_ubik_voteend);
break;
default:

View File

@ -1,7 +1,7 @@
/* packet-arp.c
* Routines for ARP packet disassembly
*
* $Id: packet-arp.c,v 1.29 2000/05/11 08:14:51 gram Exp $
* $Id: packet-arp.c,v 1.30 2000/05/31 05:06:50 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -285,9 +285,9 @@ dissect_atm_number(const u_char *pd, int offset, int tl, int hf_e164,
proto_tree *nsap_tree;
if (tl & ATMARP_IS_E164)
proto_tree_add_item(tree, hf_e164, NullTVB, offset, len, &pd[offset]);
proto_tree_add_string(tree, hf_e164, NullTVB, offset, len, &pd[offset]);
else {
ti = proto_tree_add_item(tree, hf_nsap, NullTVB, offset, len,
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,23 +503,23 @@ dissect_atmarp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
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,
proto_tree_add_uint(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,
proto_tree_add_uint(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,
proto_tree_add_uint(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,
proto_tree_add_uint(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,
proto_tree_add_uint(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,
proto_tree_add_uint(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,
proto_tree_add_uint(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,
proto_tree_add_uint(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,
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,15 +645,15 @@ dissect_arp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
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,
proto_tree_add_uint(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,
proto_tree_add_uint(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,
proto_tree_add_uint(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,
proto_tree_add_uint(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,
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,

View File

@ -1,7 +1,7 @@
/* packet-ascend.c
* Routines for decoding Lucent/Ascend packet traces
*
* $Id: packet-ascend.c,v 1.15 2000/05/25 07:42:24 gram Exp $
* $Id: packet-ascend.c,v 1.16 2000/05/31 05:06:51 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -77,22 +77,22 @@ dissect_ascend(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
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,
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_item(fh_tree, hf_called_number, tvb, 0, 0,
proto_tree_add_string(fh_tree, hf_called_number, tvb, 0, 0,
pseudo_header->ascend.call_num);
proto_tree_add_item(fh_tree, hf_chunk, tvb, 0, 0,
proto_tree_add_uint(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);
proto_tree_add_uint_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,
proto_tree_add_string(fh_tree, hf_user_name, tvb, 0, 0,
pseudo_header->ascend.user);
proto_tree_add_item(fh_tree, hf_session_id, tvb, 0, 0,
proto_tree_add_uint(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_uint_hidden(fh_tree, hf_chunk, tvb, 0, 0, 0);
}
proto_tree_add_item(fh_tree, hf_task, tvb, 0, 0, pseudo_header->ascend.task);
proto_tree_add_uint(fh_tree, hf_task, tvb, 0, 0, pseudo_header->ascend.task);
}
switch (pseudo_header->ascend.type) {

View File

@ -1,7 +1,7 @@
/* packet-atalk.c
* Routines for Appletalk packet disassembly (DDP, currently).
*
* $Id: packet-atalk.c,v 1.37 2000/05/30 03:35:51 guy Exp $
* $Id: packet-atalk.c,v 1.38 2000/05/31 05:06:51 guy Exp $
*
* Simon Wilkinson <sxw@dcs.ed.ac.uk>
*
@ -168,7 +168,7 @@ int dissect_pascal_string(const u_char *pd, int offset, frame_data *fd,
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);
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,12 +219,12 @@ dissect_rtmp_data(const u_char *pd, int offset, frame_data *fd, proto_tree *tree
net, nodelen_bits, node);
if (tree) {
ti = proto_tree_add_item(tree, proto_rtmp, NullTVB, offset, END_OF_FRAME, NULL);
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_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);
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,9 +248,9 @@ dissect_rtmp_data(const u_char *pd, int offset, frame_data *fd, proto_tree *tree
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,
proto_tree_add_uint(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,
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,9 +264,9 @@ dissect_rtmp_data(const u_char *pd, int offset, frame_data *fd, proto_tree *tree
tuple_net2 = pntohs(&pd[offset+3]);
tuple_dist2 = pd[offset+5];
proto_tree_add_item(tuple_tree, hf_rtmp_tuple_net, NullTVB, offset, 2,
proto_tree_add_uint(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,
proto_tree_add_uint(tuple_tree, hf_rtmp_tuple_dist, NullTVB, offset+2, 1,
tuple_dist2);
proto_item_set_len(tuple_item, 6);
@ -308,7 +308,7 @@ dissect_nbp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
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);
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,9 +317,9 @@ dissect_nbp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
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]);
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,13 +343,13 @@ dissect_nbp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
/* 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);
proto_tree_add_uint(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);
proto_tree_add_uint(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);
proto_tree_add_uint(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]);
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,20 +398,20 @@ dissect_ddp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
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);
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_item(ddp_tree, hf_ddp_hopcount, NullTVB, offset, 1,
proto_tree_add_uint(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,
proto_tree_add_uint(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);
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;

View File

@ -1,7 +1,7 @@
/* packet-atm.c
* Routines for ATM packet disassembly
*
* $Id: packet-atm.c,v 1.21 2000/05/29 08:57:36 guy Exp $
* $Id: packet-atm.c,v 1.22 2000/05/31 05:06:52 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -668,9 +668,9 @@ dissect_atm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
break;
}
}
proto_tree_add_item(atm_tree, hf_atm_vpi, tvb, 0, 0,
proto_tree_add_uint(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,
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) {

View File

@ -4,7 +4,7 @@
*
* Heikki Vatiainen <hessu@cs.tut.fi>
*
* $Id: packet-auto_rp.c,v 1.5 2000/05/11 08:14:57 gram Exp $
* $Id: packet-auto_rp.c,v 1.6 2000/05/31 05:06:53 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -151,7 +151,7 @@ static void dissect_auto_rp(const u_char *pd, int offset, frame_data *fd, proto_
return;
}
ti = proto_tree_add_item(tree, proto_auto_rp, NullTVB, offset, END_OF_FRAME, NULL);
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,8 +159,8 @@ static void dissect_auto_rp(const u_char *pd, int offset, frame_data *fd, proto_
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);
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,7 +270,7 @@ static int do_auto_rp_map(const u_char *pd, int offset, frame_data *fd, proto_tr
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]);
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,7 +287,7 @@ static int do_auto_rp_map(const u_char *pd, int offset, frame_data *fd, proto_tr
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]);
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++;

View File

@ -2,7 +2,7 @@
* Routines for BOOTP/DHCP packet disassembly
* Gilbert Ramirez <gram@xiexie.org>
*
* $Id: packet-bootp.c,v 1.33 2000/05/19 04:54:32 gram Exp $
* $Id: packet-bootp.c,v 1.34 2000/05/31 05:06:54 guy Exp $
*
* The information used comes from:
* RFC 2132: DHCP Options and BOOTP Vendor Extensions
@ -583,7 +583,7 @@ dissect_bootp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
}
if (tree) {
ti = proto_tree_add_item(tree, proto_bootp, NullTVB, offset, END_OF_FRAME, NULL);
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,28 +597,28 @@ dissect_bootp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
"Hardware type: %s",
arphrdtype_to_str(pd[offset+1],
"Unknown (0x%02x)"));
proto_tree_add_item(bp_tree, hf_bootp_hw_len, NullTVB,
proto_tree_add_uint(bp_tree, hf_bootp_hw_len, NullTVB,
offset + 2, 1, pd[offset+2]);
proto_tree_add_item(bp_tree, hf_bootp_hops, NullTVB,
proto_tree_add_uint(bp_tree, hf_bootp_hops, NullTVB,
offset + 3, 1, pd[offset+3]);
proto_tree_add_item(bp_tree, hf_bootp_id, NullTVB,
proto_tree_add_uint(bp_tree, hf_bootp_id, NullTVB,
offset + 4, 4, pntohl(&pd[offset+4]));
proto_tree_add_item(bp_tree, hf_bootp_secs, NullTVB,
proto_tree_add_uint(bp_tree, hf_bootp_secs, NullTVB,
offset + 8, 2, pntohs(&pd[offset+8]));
proto_tree_add_item(bp_tree, hf_bootp_flag, NullTVB,
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_item(bp_tree, hf_bootp_ip_client, NullTVB,
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_item(bp_tree, hf_bootp_ip_your, NullTVB,
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_item(bp_tree, hf_bootp_ip_server, NullTVB,
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_item(bp_tree, hf_bootp_ip_relay, NullTVB,
proto_tree_add_ipv4(bp_tree, hf_bootp_ip_relay, NullTVB,
offset + 24, 4, ip_addr);
if (pd[offset+2] > 0) {
@ -630,7 +630,7 @@ dissect_bootp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
pd[offset+2], pd[offset+1]));
}
else {
proto_tree_add_item(bp_tree, hf_bootp_hw_addr, NullTVB,
proto_tree_add_bytes(bp_tree, hf_bootp_hw_addr, NullTVB,
offset + 28, 0, NULL);
}
@ -672,7 +672,7 @@ dissect_bootp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
}
else {
memcpy(&ip_addr, &pd[offset + 236], sizeof(ip_addr));
proto_tree_add_item(bp_tree, hf_bootp_cookie, NullTVB,
proto_tree_add_ipv4(bp_tree, hf_bootp_cookie, NullTVB,
offset + 236, 4, ip_addr);
}
@ -687,7 +687,7 @@ dissect_bootp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
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);
proto_tree_add_boolean_hidden(bp_tree, hf_bootp_dhcp, NullTVB, 0, 0, 1);
}
}
}

View File

@ -1,7 +1,7 @@
/* packet-bootparams.c
* Routines for bootparams dissection
*
* $Id: packet-bootparams.c,v 1.10 2000/05/11 08:15:03 gram Exp $
* $Id: packet-bootparams.c,v 1.11 2000/05/31 05:06:55 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -61,10 +61,11 @@ int dissect_bp_address(const u_char *pd, int offset, frame_data *fd,
/* get the address type */
if ( !BYTES_ARE_IN_FRAME(offset, 1)) return offset;
type = pntohl(&pd[offset]); /* type of address */
#if 0
/*
ZZZZZZZZZZZZZZZZZZZ Check type:
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 */
@ -76,7 +77,7 @@ int dissect_bp_address(const u_char *pd, int offset, frame_data *fd,
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,
proto_tree_add_ipv4(tree, hfindex, NullTVB,
offset, 16, ntohl(ipaddr));
offset += 16;

View File

@ -1,7 +1,7 @@
/* packet-bpdu.c
* Routines for BPDU (Spanning Tree Protocol) disassembly
*
* $Id: packet-bpdu.c,v 1.10 2000/05/11 08:15:03 gram Exp $
* $Id: packet-bpdu.c,v 1.11 2000/05/31 05:06:56 guy Exp $
*
* Copyright 1999 Christophe Tronche <ch.tronche@computer.org>
*
@ -132,7 +132,7 @@ void dissect_bpdu(const u_char *pd, int offset, frame_data *fd, proto_tree *tree
protocol_identifier == 0 ?
"Spanning Tree" : "Unknown Protocol");
proto_tree_add_item(bpdu_tree, hf_bpdu_version_id, NullTVB,
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,14 +157,14 @@ void dissect_bpdu(const u_char *pd, int offset, frame_data *fd, proto_tree *tree
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,
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_item_hidden(bpdu_tree, hf_bpdu_root_mac, NullTVB,
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,7 +172,7 @@ void dissect_bpdu(const u_char *pd, int offset, frame_data *fd, proto_tree *tree
"Root Identifier: %d / %s",
root_identifier_bridge_priority,
root_identifier_mac);
proto_tree_add_item(bpdu_tree, hf_bpdu_root_cost, NullTVB,
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,22 +180,22 @@ void dissect_bpdu(const u_char *pd, int offset, frame_data *fd, proto_tree *tree
"Bridge Identifier: %d / %s",
bridge_identifier_bridge_priority,
bridge_identifier_mac);
proto_tree_add_item_hidden(bpdu_tree, hf_bpdu_bridge_mac, NullTVB,
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_item(bpdu_tree, hf_bpdu_port_id, NullTVB,
proto_tree_add_uint(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,
proto_tree_add_double(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,
proto_tree_add_double(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,
proto_tree_add_double(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,
proto_tree_add_double(bpdu_tree, hf_bpdu_forward_delay, NullTVB,
offset + BPDU_FORWARD_DELAY, 2,
forward_delay);
}

View File

@ -2,7 +2,7 @@
* Routines for the disassembly of the "Cisco Discovery Protocol"
* (c) Copyright Hannes R. Boehm <hannes@boehm.org>
*
* $Id: packet-cdp.c,v 1.22 2000/05/11 08:15:04 gram Exp $
* $Id: packet-cdp.c,v 1.23 2000/05/31 05:06:56 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -107,11 +107,11 @@ dissect_cdp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
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);
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_item(cdp_tree, hf_cdp_version, NullTVB, offset, 1, pd[offset]);
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,9 +136,9 @@ dissect_cdp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
&pd[offset+4]);
tlv_tree = proto_item_add_subtree(tlvi,
ett_cdp_tlv);
proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, NullTVB,
proto_tree_add_uint(tlv_tree, hf_cdp_tlvtype, NullTVB,
offset + TLV_TYPE, 2, type);
proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, NullTVB,
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,9 +151,9 @@ dissect_cdp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
length, "Addresses");
tlv_tree = proto_item_add_subtree(tlvi,
ett_cdp_tlv);
proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, NullTVB,
proto_tree_add_uint(tlv_tree, hf_cdp_tlvtype, NullTVB,
offset + TLV_TYPE, 2, type);
proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, NullTVB,
proto_tree_add_uint(tlv_tree, hf_cdp_tlvlength, NullTVB,
offset + TLV_LENGTH, 2, length);
offset += 4;
length -= 4;
@ -194,9 +194,9 @@ dissect_cdp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
&pd[offset+4]);
tlv_tree = proto_item_add_subtree(tlvi,
ett_cdp_tlv);
proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, NullTVB,
proto_tree_add_uint(tlv_tree, hf_cdp_tlvtype, NullTVB,
offset + TLV_TYPE, 2, type);
proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, NullTVB,
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,9 +209,9 @@ dissect_cdp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
length, "Capabilities");
tlv_tree = proto_item_add_subtree(tlvi,
ett_cdp_tlv);
proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, NullTVB,
proto_tree_add_uint(tlv_tree, hf_cdp_tlvtype, NullTVB,
offset + TLV_TYPE, 2, type);
proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, NullTVB,
proto_tree_add_uint(tlv_tree, hf_cdp_tlvlength, NullTVB,
offset + TLV_LENGTH, 2, length);
offset += 4;
length -= 4;
@ -224,9 +224,9 @@ dissect_cdp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
length, "Software Version");
tlv_tree = proto_item_add_subtree(tlvi,
ett_cdp_tlv);
proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, NullTVB,
proto_tree_add_uint(tlv_tree, hf_cdp_tlvtype, NullTVB,
offset + TLV_TYPE, 2, type);
proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, NullTVB,
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,9 +243,9 @@ dissect_cdp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
stringmem);
tlv_tree = proto_item_add_subtree(tlvi,
ett_cdp_tlv);
proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, NullTVB,
proto_tree_add_uint(tlv_tree, hf_cdp_tlvtype, NullTVB,
offset + TLV_TYPE, 2, type);
proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, NullTVB,
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,9 +258,9 @@ dissect_cdp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
type_str, length);
tlv_tree = proto_item_add_subtree(tlvi,
ett_cdp_tlv);
proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, NullTVB,
proto_tree_add_uint(tlv_tree, hf_cdp_tlvtype, NullTVB,
offset + TLV_TYPE, 2, type);
proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, NullTVB,
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,

View File

@ -1,7 +1,7 @@
/* packet-cgmp.c
* Routines for the disassembly of the Cisco Group Management Protocol
*
* $Id: packet-cgmp.c,v 1.2 2000/05/11 08:15:04 gram Exp $
* $Id: packet-cgmp.c,v 1.3 2000/05/31 05:06:58 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -71,32 +71,32 @@ dissect_cgmp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
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);
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_item(cgmp_tree, hf_cgmp_version, NullTVB, offset, 1,
proto_tree_add_uint(cgmp_tree, hf_cgmp_version, NullTVB, offset, 1,
pd[offset]);
proto_tree_add_item(cgmp_tree, hf_cgmp_type, NullTVB, offset, 1,
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_item(cgmp_tree, hf_cgmp_count, NullTVB, offset, 1,
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_item(cgmp_tree, hf_cgmp_gda, NullTVB, offset, 6,
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_item(cgmp_tree, hf_cgmp_usa, NullTVB, offset, 6,
proto_tree_add_ether(cgmp_tree, hf_cgmp_usa, NullTVB, offset, 6,
&pd[offset]);
offset += 6;

View File

@ -1,7 +1,7 @@
/* packet-clnp.c
* Routines for ISO/OSI network and transport protocol packet disassembly
*
* $Id: packet-clnp.c,v 1.7 2000/05/11 08:15:04 gram Exp $
* $Id: packet-clnp.c,v 1.8 2000/05/31 05:06:58 guy Exp $
* Laurent Deniel <deniel@worldnet.fr>
* Ralf Schneider <Ralf.Schneider@t-online.de>
*
@ -272,7 +272,7 @@ static int osi_decode_DR(const u_char *pd, int offset,
src_ref, dst_ref);
if (tree) {
ti = proto_tree_add_item(tree, proto_cotp, NullTVB, offset, li + 1, NULL);
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,7 +364,7 @@ static gboolean osi_decode_DT(const u_char *pd, int offset,
(fragment)? "(fragment)" : "");
if (tree) {
ti = proto_tree_add_item(tree, proto_cotp, NullTVB, offset, li + 1, NULL);
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,7 +506,7 @@ static int osi_decode_ED(const u_char *pd, int offset,
tpdu_nr, dst_ref);
if (tree) {
ti = proto_tree_add_item(tree, proto_cotp, NullTVB, offset, li + 1, NULL);
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,7 +587,7 @@ static int osi_decode_RJ(const u_char *pd, int offset,
tpdu_nr, dst_ref);
if (tree) {
ti = proto_tree_add_item(tree, proto_cotp, NullTVB, offset, li + 1, NULL);
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,7 +686,7 @@ static int osi_decode_CC(const u_char *pd, int offset,
dst_ref);
if (tree) {
ti = proto_tree_add_item(tree, proto_cotp, NullTVB, offset, li + 1, NULL);
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,7 +970,7 @@ static int osi_decode_DC(const u_char *pd, int offset,
dst_ref);
if (tree) {
ti = proto_tree_add_item(tree, proto_cotp, NullTVB, offset, li + 1, NULL);
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,7 +1020,7 @@ static int osi_decode_AK(const u_char *pd, int offset,
tpdu_nr, dst_ref);
if (tree) {
ti = proto_tree_add_item(tree, proto_cotp, NullTVB, offset, li + 1, NULL);
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,7 +1124,7 @@ static int osi_decode_AK(const u_char *pd, int offset,
tpdu_nr, dst_ref);
if (tree) {
ti = proto_tree_add_item(tree, proto_cotp, NullTVB, offset, li + 1, NULL);
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,7 +1274,7 @@ static int osi_decode_EA(const u_char *pd, int offset,
"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);
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,7 +1356,7 @@ static int osi_decode_ER(const u_char *pd, int offset,
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);
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,7 +1509,7 @@ static void dissect_clnp(const u_char *pd, int offset, frame_data *fd,
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);
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,13 +1544,13 @@ static void dissect_clnp(const u_char *pd, int offset, frame_data *fd,
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);
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_item(clnp_tree, hf_clnp_id, NullTVB, offset, 1,
proto_tree_add_uint(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,
proto_tree_add_uint(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,
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,7 +1562,7 @@ static void dissect_clnp(const u_char *pd, int offset, frame_data *fd,
clnp.cnf_type,
flag_string,
pdu_type_string);
proto_tree_add_item(clnp_tree, hf_clnp_pdu_length, NullTVB, offset + 5, 2,
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,13 +1588,13 @@ static void dissect_clnp(const u_char *pd, int offset, frame_data *fd,
src_len = pd[offset + dst_len + 1];
if (tree) {
proto_tree_add_item(clnp_tree, hf_clnp_dest_length, NullTVB, offset, 1,
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_item(clnp_tree, hf_clnp_src_length, NullTVB,
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,

View File

@ -3,7 +3,7 @@
* see http://ddt.sourceforge.net/
* Olivier Abad <oabad@cybercable.fr>
*
* $Id: packet-ddtp.c,v 1.4 2000/05/28 17:04:09 oabad Exp $
* $Id: packet-ddtp.c,v 1.5 2000/05/31 05:07:00 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -111,32 +111,32 @@ dissect_ddtp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
}
if (tree) {
ti = proto_tree_add_item(tree, proto_ddtp, NullTVB, offset,
END_OF_FRAME - offset, NULL);
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_item(ddtp_tree, hf_ddtp_version, NullTVB, offset, 4, pntohl(pd+offset));
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_item(ddtp_tree, hf_ddtp_encrypt, NullTVB, offset, 4, pntohl(pd+offset));
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_item(ddtp_tree, hf_ddtp_hostid, NullTVB, offset+4, 4, pntohl(pd+offset+4));
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_item(ddtp_tree, hf_ddtp_msgtype, NullTVB, offset, 4, pntohl(pd+offset));
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,13 +149,13 @@ dissect_ddtp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
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));
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_item(ddtp_tree, hf_ddtp_ipaddr, NullTVB, offset, 4, pntohl(pd+offset));
proto_tree_add_ipv4(ddtp_tree, hf_ddtp_ipaddr, NullTVB, offset, 4, pntohl(pd+offset));
break;
case DDTP_UPDATE_REPLY :
offset += 4;
@ -164,7 +164,7 @@ dissect_ddtp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
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));
proto_tree_add_uint(ddtp_tree, hf_ddtp_status, NullTVB, offset, 4, pntohl(pd+offset));
break;
case DDTP_ALIVE_QUERY :
offset += 4;

View File

@ -1,7 +1,7 @@
/* packet-dns.c
* Routines for DNS packet disassembly
*
* $Id: packet-dns.c,v 1.44 2000/05/11 08:15:05 gram Exp $
* $Id: packet-dns.c,v 1.45 2000/05/31 05:07:00 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -1573,11 +1573,11 @@ dissect_dns(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
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);
proto_tree_add_boolean_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_boolean_hidden(dns_tree, hf_dns_query, NullTVB, offset, 4, 1);
proto_tree_add_item(dns_tree, hf_dns_transaction_id, NullTVB,
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,13 +1640,13 @@ dissect_dns(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
decode_enumerated_bitfield(flags, F_RCODE,
2*8, rcode_vals, "%s"));
}
proto_tree_add_item(dns_tree, hf_dns_count_questions, NullTVB,
proto_tree_add_uint(dns_tree, hf_dns_count_questions, NullTVB,
offset + DNS_QUEST, 2, quest);
proto_tree_add_item(dns_tree, hf_dns_count_answers, NullTVB,
proto_tree_add_uint(dns_tree, hf_dns_count_answers, NullTVB,
offset + DNS_ANS, 2, ans);
proto_tree_add_item(dns_tree, hf_dns_count_auth_rr, NullTVB,
proto_tree_add_uint(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,
proto_tree_add_uint(dns_tree, hf_dns_count_add_rr, NullTVB,
offset + DNS_ADD, 2, add);
}

View File

@ -1,6 +1,6 @@
/* packet-eigrp.c
*
* $Id: packet-eigrp.c,v 1.3 2000/05/30 03:35:51 guy Exp $
* $Id: packet-eigrp.c,v 1.4 2000/05/31 05:07:02 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -104,7 +104,7 @@ dissect_eigrp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
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);
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);

View File

@ -2,7 +2,7 @@
* Routines for ISO/OSI End System to Intermediate System
* Routeing Exchange Protocol ISO 9542.
*
* $Id: packet-esis.c,v 1.3 2000/05/11 08:15:07 gram Exp $
* $Id: packet-esis.c,v 1.4 2000/05/31 05:07:02 guy Exp $
* Ralf Schneider <Ralf.Schneider@t-online.de>
*
* Ethereal - Network traffic analyzer
@ -319,15 +319,15 @@ dissect_esis(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
}
if (tree) {
ti = proto_tree_add_item(tree, proto_esis, NullTVB, offset, END_OF_FRAME, NULL );
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_item( esis_tree, hf_esis_nlpi, NullTVB, offset, 1, ehdr->esis_nlpi );
proto_tree_add_item( esis_tree, hf_esis_length, NullTVB,
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_item( esis_tree, hf_esis_version, NullTVB, offset + 2, 1,
proto_tree_add_uint( 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,
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,

View File

@ -1,7 +1,7 @@
/* packet-eth.c
* Routines for ethernet packet disassembly
*
* $Id: packet-eth.c,v 1.41 2000/05/19 05:29:44 guy Exp $
* $Id: packet-eth.c,v 1.42 2000/05/31 05:07:03 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -223,14 +223,14 @@ dissect_eth(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
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);
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_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_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_item(fh_tree, hf_eth_len, tvb, 12, 2, length);
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,11 +254,11 @@ dissect_eth(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
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);
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_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_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,7 +298,7 @@ dissect_eth(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
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,
proto_tree_add_bytes(fh_tree, hf_eth_trailer, tvb, ETH_HEADER_SIZE + etype,
trailer_length, ptr);
}
}

View File

@ -1,7 +1,7 @@
/* ethertype.c
* Routines for calling the right protocol for the ethertype.
*
* $Id: packet-ethertype.c,v 1.4 2000/05/19 04:54:33 gram Exp $
* $Id: packet-ethertype.c,v 1.5 2000/05/31 05:07:03 guy Exp $
*
* Gilbert Ramirez <gram@xiexie.org>
*
@ -97,7 +97,7 @@ ethertype(guint16 etype, tvbuff_t *tvb, int offset_after_etype, packet_info *pin
/* Add to proto_tree */
if (tree) {
proto_tree_add_item(fh_tree, item_id, tvb, offset_after_etype - 2, 2, etype);
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);

View File

@ -3,7 +3,7 @@
*
* Laurent Deniel <deniel@worldnet.fr>
*
* $Id: packet-fddi.c,v 1.35 2000/05/28 22:02:16 guy Exp $
* $Id: packet-fddi.c,v 1.36 2000/05/31 05:07:03 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -279,7 +279,7 @@ dissect_fddi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
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);
proto_tree_add_uint(fh_tree, hf_fddi_fc, tvb, FDDI_P_FC, 1, fc);
}
/* Extract the destination address, possibly bit-swapping it. */
@ -295,12 +295,12 @@ dissect_fddi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
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);
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_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);
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,12 +316,12 @@ dissect_fddi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
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);
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_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);
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);

View File

@ -2,7 +2,7 @@
* Routines for ftp packet dissection
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
*
* $Id: packet-ftp.c,v 1.15 2000/05/11 08:15:08 gram Exp $
* $Id: packet-ftp.c,v 1.16 2000/05/31 05:07:04 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -108,14 +108,14 @@ dissect_ftp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
if (tree) {
ti = proto_tree_add_item(tree, proto_ftp, NullTVB, offset, END_OF_FRAME, NULL);
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_item_hidden(ftp_tree, hf_ftp_request, NullTVB,
proto_tree_add_boolean_hidden(ftp_tree, hf_ftp_request, NullTVB,
offset, i1, TRUE);
proto_tree_add_item_hidden(ftp_tree, hf_ftp_response, NullTVB,
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,9 +125,9 @@ dissect_ftp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
}
else {
proto_tree_add_item_hidden(ftp_tree, hf_ftp_request, NullTVB,
proto_tree_add_boolean_hidden(ftp_tree, hf_ftp_request, NullTVB,
offset, i1, FALSE);
proto_tree_add_item_hidden(ftp_tree, hf_ftp_response, NullTVB,
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,

View File

@ -3,7 +3,7 @@
*
* Laurent Deniel <deniel@worldnet.fr>
*
* $Id: packet-giop.c,v 1.13 2000/05/11 08:15:09 gram Exp $
* $Id: packet-giop.c,v 1.14 2000/05/31 05:07:04 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -271,7 +271,7 @@ dissect_giop(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
if (tree) {
ti = proto_tree_add_item(tree, proto_giop, NullTVB, offset,
GIOP_HEADER_SIZE + message_size, NULL);
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,7 +310,7 @@ dissect_giop(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
(header.message_type == MessageError) ? "MessageError" :
(header.message_type == Fragment) ? "Fragment" : "?");
proto_tree_add_item(clnp_tree,
proto_tree_add_uint(clnp_tree,
hf_giop_message_size,
NullTVB, offset + 8, 4,
message_size);

View File

@ -2,7 +2,7 @@
* Routines for the Generic Routing Encapsulation (GRE) protocol
* Brad Robel-Forrest <brad.robel-forrest@watchguard.com>
*
* $Id: packet-gre.c,v 1.21 2000/05/25 07:42:24 gram Exp $
* $Id: packet-gre.c,v 1.22 2000/05/31 05:07:05 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -132,7 +132,7 @@ dissect_gre(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
offset += sizeof(flags_and_ver);
proto_tree_add_item(gre_tree, hf_gre_proto, NullTVB, offset, sizeof(type), type);
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) {

View File

@ -2,7 +2,7 @@
* Routines for Sinec H1 packet disassembly
* Gerrit Gehnen <G.Gehnen@atrie.de>
*
* $Id: packet-h1.c,v 1.8 2000/05/11 08:15:09 gram Exp $
* $Id: packet-h1.c,v 1.9 2000/05/31 05:07:05 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -122,11 +122,11 @@ dissect_h1 (const u_char * pd, int offset, frame_data * fd, proto_tree * tree)
col_add_str (fd, COL_INFO, "S5: ");
if (tree)
{
ti = proto_tree_add_item (tree, proto_h1, NullTVB, offset, 16, NULL);
ti = proto_tree_add_item (tree, proto_h1, NullTVB, offset, 16, FALSE);
h1_tree = proto_item_add_subtree (ti, ett_h1);
proto_tree_add_item (h1_tree, hf_h1_header, NullTVB, offset, 2,
proto_tree_add_uint (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,
proto_tree_add_uint (h1_tree, hf_h1_len, NullTVB, offset + 2, 1,
pd[offset + 2]);
}
@ -137,15 +137,15 @@ dissect_h1 (const u_char * pd, int offset, frame_data * fd, proto_tree * tree)
case OPCODE_BLOCK:
if (h1_tree)
{
ti = proto_tree_add_item (h1_tree, hf_h1_opfield, NullTVB,
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_item (opcode_tree, hf_h1_oplen, NullTVB,
proto_tree_add_uint (opcode_tree, hf_h1_oplen, NullTVB,
offset + position + 1, 1,
pd[offset + position + 1]);
proto_tree_add_item (opcode_tree, hf_h1_opcode, NullTVB,
proto_tree_add_uint (opcode_tree, hf_h1_opcode, NullTVB,
offset + position + 2, 1,
pd[offset + position + 2]);
}
@ -159,25 +159,25 @@ dissect_h1 (const u_char * pd, int offset, frame_data * fd, proto_tree * tree)
case REQUEST_BLOCK:
if (h1_tree)
{
ti = proto_tree_add_item (h1_tree, hf_h1_requestblock, NullTVB,
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_item (org_tree, hf_h1_requestlen, NullTVB,
proto_tree_add_uint (org_tree, hf_h1_requestlen, NullTVB,
offset + position + 1, 1,
pd[offset + position + 1]);
proto_tree_add_item (org_tree, hf_h1_org, NullTVB,
proto_tree_add_uint (org_tree, hf_h1_org, NullTVB,
offset + position + 2, 1,
pd[offset + position + 2]);
proto_tree_add_item (org_tree, hf_h1_dbnr, NullTVB,
proto_tree_add_uint (org_tree, hf_h1_dbnr, NullTVB,
offset + position + 3, 1,
pd[offset + position + 3]);
proto_tree_add_item (org_tree, hf_h1_dwnr, NullTVB,
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_item (org_tree, hf_h1_dlen, NullTVB,
proto_tree_add_int (org_tree, hf_h1_dlen, NullTVB,
offset + position + 6, 2,
pd[offset + position + 6] * 0x100 +
pd[offset + position + 7]);
@ -199,15 +199,15 @@ dissect_h1 (const u_char * pd, int offset, frame_data * fd, proto_tree * tree)
case RESPONSE_BLOCK:
if (h1_tree)
{
ti = proto_tree_add_item (h1_tree, hf_h1_response, NullTVB,
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_item (response_tree, hf_h1_response_len, NullTVB,
proto_tree_add_uint (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,
proto_tree_add_uint (response_tree, hf_h1_response_value, NullTVB,
offset + position + 2, 1,
pd[offset + position + 2]);
}
@ -221,13 +221,13 @@ dissect_h1 (const u_char * pd, int offset, frame_data * fd, proto_tree * tree)
case EMPTY_BLOCK:
if (h1_tree)
{
ti = proto_tree_add_item (h1_tree, hf_h1_empty, NullTVB,
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_item (empty_tree, hf_h1_empty_len, NullTVB,
proto_tree_add_uint (empty_tree, hf_h1_empty_len, NullTVB,
offset + position + 1, 1,
pd[offset + position + 1]);
}

View File

@ -4,7 +4,7 @@
*
* Heikki Vatiainen <hessu@cs.tut.fi>
*
* $Id: packet-hsrp.c,v 1.4 2000/05/11 08:15:10 gram Exp $
* $Id: packet-hsrp.c,v 1.5 2000/05/31 05:07:05 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -120,7 +120,7 @@ dissect_hsrp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
return;
}
ti = proto_tree_add_item(tree, proto_hsrp, NullTVB, offset, END_OF_FRAME, NULL);
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);

View File

@ -3,7 +3,7 @@
*
* Guy Harris <guy@alum.mit.edu>
*
* $Id: packet-http.c,v 1.18 2000/05/11 08:15:10 gram Exp $
* $Id: packet-http.c,v 1.19 2000/05/31 05:07:06 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -92,7 +92,7 @@ void dissect_http(const u_char *pd, int offset, frame_data *fd, proto_tree *tree
}
if (tree) {
ti = proto_tree_add_item(tree, proto_http, NullTVB, offset, END_OF_FRAME, NULL);
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,12 +189,12 @@ void dissect_http(const u_char *pd, int offset, frame_data *fd, proto_tree *tree
switch (http_type) {
case HTTP_RESPONSE:
proto_tree_add_item_hidden(http_tree,
proto_tree_add_boolean_hidden(http_tree,
hf_http_response, NullTVB, 0, 0, 1);
break;
case HTTP_REQUEST:
proto_tree_add_item_hidden(http_tree,
proto_tree_add_boolean_hidden(http_tree,
hf_http_request, NullTVB, 0, 0, 1);
break;

View File

@ -1,7 +1,7 @@
/* packet-icmpv6.c
* Routines for ICMPv6 packet disassembly
*
* $Id: packet-icmpv6.c,v 1.16 2000/05/11 08:15:10 gram Exp $
* $Id: packet-icmpv6.c,v 1.17 2000/05/31 05:07:06 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -345,7 +345,7 @@ dissect_icmpv6(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
if (tree) {
/* !!! specify length */
ti = proto_tree_add_item(tree, proto_icmpv6, NullTVB, offset, len, NULL);
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,7 +358,7 @@ dissect_icmpv6(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
dp->icmp6_code,
"Code: 0x%02x (%s)", dp->icmp6_code, codename);
}
proto_tree_add_item(icmp6_tree, hf_icmpv6_checksum, NullTVB,
proto_tree_add_uint(icmp6_tree, hf_icmpv6_checksum, NullTVB,
offset + offsetof(struct icmp6_hdr, icmp6_cksum), 2,
(guint16)htons(dp->icmp6_cksum));

View File

@ -2,7 +2,7 @@
* Routines for ICP (internet cache protocol) packet disassembly
* RFC 2186 && RFC 2187
*
* $Id: packet-icp.c,v 1.7 2000/05/11 08:15:10 gram Exp $
* $Id: packet-icp.c,v 1.8 2000/05/31 05:07:06 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Peter Torvals
@ -209,8 +209,7 @@ static void dissect_icp(const u_char *pd, int offset, frame_data *fd,
if (tree)
{
ti = proto_tree_add_item(tree,proto_icp , NullTVB,offset,fd->pkt_len-offset,
NULL);
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,

View File

@ -2,7 +2,7 @@
* Routines for imap packet dissection
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
*
* $Id: packet-imap.c,v 1.6 2000/05/11 08:15:11 gram Exp $
* $Id: packet-imap.c,v 1.7 2000/05/31 05:07:07 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -91,12 +91,12 @@ dissect_imap(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
if (tree) {
ti = proto_tree_add_item(tree, proto_imap, NullTVB, offset, END_OF_FRAME, NULL);
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_item_hidden(imap_tree, hf_imap_request, NullTVB, offset, i1, TRUE);
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,7 +104,7 @@ dissect_imap(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
}
else {
proto_tree_add_item_hidden(imap_tree, hf_imap_response, NullTVB, offset, i1, TRUE);
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);

View File

@ -1,7 +1,7 @@
/* packet-ip.c
* Routines for IP and miscellaneous IP protocol packet disassembly
*
* $Id: packet-ip.c,v 1.89 2000/05/28 22:59:18 guy Exp $
* $Id: packet-ip.c,v 1.90 2000/05/31 05:07:08 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -861,10 +861,10 @@ dissect_ip(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
break;
}
ti = proto_tree_add_item(tree, proto_ip, NullTVB, offset, hlen, NULL);
ti = proto_tree_add_item(tree, proto_ip, NullTVB, offset, hlen, FALSE);
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(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,40 +875,40 @@ dissect_ip(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
"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);
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_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_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_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);
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_item(ip_tree, hf_ip_flags, NullTVB, offset + 6, 1, flags);
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_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_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_item(ip_tree, hf_ip_frag_offset, NullTVB, offset + 6, 2,
proto_tree_add_uint(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(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);
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,7 +1093,7 @@ dissect_icmp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
col_add_str(fd, COL_INFO, type_str);
if (tree) {
ti = proto_tree_add_item(tree, proto_icmp, NullTVB, offset, 4, NULL);
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,7 +1103,7 @@ dissect_icmp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
ih.icmp_code,
"Code: %u %s",
ih.icmp_code, code_str);
proto_tree_add_item(icmp_tree, hf_icmp_checksum, NullTVB, offset + 2, 2,
proto_tree_add_uint(icmp_tree, hf_icmp_checksum, NullTVB, offset + 2, 2,
cksum);
/* Decode the second 4 bytes of the packet. */
@ -1252,9 +1252,9 @@ dissect_igmp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
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);
ti = proto_tree_add_item(tree, proto_igmp, NullTVB, offset, 8, FALSE);
igmp_tree = proto_item_add_subtree(ti, ett_igmp);
proto_tree_add_item(igmp_tree, hf_igmp_version, NullTVB, offset, 1,
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,9 +1264,9 @@ dissect_igmp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
ih.igmp_unused,
"Unused: 0x%02x",
ih.igmp_unused);
proto_tree_add_item(igmp_tree, hf_igmp_checksum, NullTVB, offset + 2, 2,
proto_tree_add_uint(igmp_tree, hf_igmp_checksum, NullTVB, offset + 2, 2,
cksum);
proto_tree_add_item(igmp_tree, hf_igmp_group, NullTVB, offset + 4, 4,
proto_tree_add_ipv4(igmp_tree, hf_igmp_group, NullTVB, offset + 4, 4,
ih.igmp_gaddr);
}
}

View File

@ -3,7 +3,7 @@
*
* Guy Harris <guy@alum.mit.edu>
*
* $Id: packet-ipp.c,v 1.9 2000/05/11 08:15:13 gram Exp $
* $Id: packet-ipp.c,v 1.10 2000/05/31 05:07:09 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -177,7 +177,7 @@ void dissect_ipp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
}
if (tree) {
ti = proto_tree_add_item(tree, proto_ipp, NullTVB, offset, END_OF_FRAME, NULL);
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",

View File

@ -1,7 +1,7 @@
/* packet-ipsec.c
* Routines for IPsec/IPComp packet disassembly
*
* $Id: packet-ipsec.c,v 1.15 2000/05/11 08:15:14 gram Exp $
* $Id: packet-ipsec.c,v 1.16 2000/05/31 05:07:09 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -120,17 +120,17 @@ dissect_ah(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
if (tree) {
/* !!! specify length */
ti = proto_tree_add_item(tree, proto_ah, NullTVB, offset, advance, NULL);
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_item(ah_tree, hf_ah_spi, NullTVB,
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_item(ah_tree, hf_ah_sequence, NullTVB,
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,12 +166,12 @@ dissect_esp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
* (ie none)
*/
if(tree) {
ti = proto_tree_add_item(tree, proto_esp, NullTVB, offset, END_OF_FRAME, NULL);
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_item(esp_tree, hf_esp_spi, NullTVB,
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_item(esp_tree, hf_esp_sequence, NullTVB,
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,19 +209,19 @@ dissect_ipcomp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
*/
if (tree) {
ti = proto_tree_add_item(tree, proto_ipcomp, NullTVB, offset, END_OF_FRAME,
NULL);
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_item(ipcomp_tree, hf_ipcomp_flags, NullTVB,
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_item(ipcomp_tree, hf_ipcomp_cpi, NullTVB,
proto_tree_add_uint(ipcomp_tree, hf_ipcomp_cpi, NullTVB,
offset + offsetof(struct ipcomp, comp_cpi), 2,
ntohs(ipcomp.comp_cpi));
} else {

View File

@ -1,7 +1,7 @@
/* packet-ipv6.c
* Routines for IPv6 packet disassembly
*
* $Id: packet-ipv6.c,v 1.37 2000/05/24 07:52:31 guy Exp $
* $Id: packet-ipv6.c,v 1.38 2000/05/31 05:07:09 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -268,16 +268,16 @@ dissect_ipv6(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
if (tree) {
/* !!! specify length */
ti = proto_tree_add_item(tree, proto_ipv6, NullTVB, offset, 40, NULL);
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_item(ipv6_tree, hf_ipv6_version, NullTVB,
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_item(ipv6_tree, hf_ipv6_class, NullTVB,
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,7 +291,7 @@ dissect_ipv6(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
"Flowlabel: 0x%05lx",
(unsigned long)(ntohl(ipv6.ip6_flow & IPV6_FLOWLABEL_MASK)));
proto_tree_add_item(ipv6_tree, hf_ipv6_plen, NullTVB,
proto_tree_add_uint(ipv6_tree, hf_ipv6_plen, NullTVB,
offset + offsetof(struct ip6_hdr, ip6_plen), 2,
ntohs(ipv6.ip6_plen));
@ -301,7 +301,7 @@ dissect_ipv6(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
"Next header: %s (0x%02x)",
ipprotostr(ipv6.ip6_nxt), ipv6.ip6_nxt);
proto_tree_add_item(ipv6_tree, hf_ipv6_hlim, NullTVB,
proto_tree_add_uint(ipv6_tree, hf_ipv6_hlim, NullTVB,
offset + offsetof(struct ip6_hdr, ip6_hlim), 1,
ipv6.ip6_hlim);
@ -363,7 +363,7 @@ again:
}
#ifdef TEST_FINALHDR
proto_tree_add_item_hidden(ipv6_tree, hf_ipv6_final, NullTVB, poffset, 1, nxt);
proto_tree_add_uint_hidden(ipv6_tree, hf_ipv6_final, NullTVB, poffset, 1, nxt);
#endif
if (frag) {
/* fragmented */

View File

@ -2,7 +2,7 @@
* Routines for NetWare's IPX
* Gilbert Ramirez <gram@xiexie.org>
*
* $Id: packet-ipx.c,v 1.60 2000/05/30 03:35:51 guy Exp $
* $Id: packet-ipx.c,v 1.61 2000/05/31 05:07:10 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -333,21 +333,21 @@ dissect_ipx(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
ipx_checksum = pntohs(&pd[offset]);
ipx_hops = pd[offset+4];
ti = proto_tree_add_item(tree, proto_ipx, NullTVB, offset, 30, NULL);
ti = proto_tree_add_item(tree, proto_ipx, NullTVB, offset, 30, FALSE);
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(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(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_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_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,7 +430,7 @@ dissect_spx(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
col_add_str(fd, COL_INFO, "SPX");
if (tree) {
ti = proto_tree_add_item(tree, proto_spx, NullTVB, offset, 12, NULL);
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,23 +447,23 @@ dissect_spx(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
spx_datastream(pd[offset+1]),
pd[offset+1]);
proto_tree_add_item(spx_tree, hf_spx_src_id, NullTVB,
proto_tree_add_uint(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,
proto_tree_add_uint(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,
proto_tree_add_uint(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,
proto_tree_add_uint(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,
proto_tree_add_uint(spx_tree, hf_spx_all_nr, NullTVB,
offset+10, 2,
pntohs( &pd[offset+10] ) );
@ -498,11 +498,11 @@ dissect_ipxmsg(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
}
if (tree) {
ti = proto_tree_add_item(tree, proto_ipxmsg, NullTVB, offset, END_OF_FRAME, NULL);
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_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);
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,7 +534,7 @@ dissect_ipxrip(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
}
if (tree) {
ti = proto_tree_add_item(tree, proto_ipxrip, NullTVB, offset, END_OF_FRAME, NULL);
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,11 +542,11 @@ dissect_ipxrip(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
"RIP packet type: %s", rip_type[operation]);
if (operation == 0) {
proto_tree_add_item_hidden(rip_tree,
proto_tree_add_boolean_hidden(rip_tree,
hf_ipxrip_request,
NullTVB, offset, 2, 1);
} else {
proto_tree_add_item_hidden(rip_tree,
proto_tree_add_boolean_hidden(rip_tree,
hf_ipxrip_response,
NullTVB, offset, 2, 1);
}
@ -682,17 +682,17 @@ dissect_ipxsap(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
}
if (tree) {
ti = proto_tree_add_item(tree, proto_sap, NullTVB, offset, END_OF_FRAME, NULL);
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_item_hidden(sap_tree,
proto_tree_add_boolean_hidden(sap_tree,
hf_sap_response,
NullTVB, offset, 2, 1);
} else {
proto_tree_add_item_hidden(sap_tree,
proto_tree_add_boolean_hidden(sap_tree,
hf_sap_request,
NullTVB, offset, 2, 1);
}

View File

@ -1,7 +1,7 @@
/* packet-irc.c
* Routines for MSX irc packet dissection
*
* $Id: packet-irc.c,v 1.5 2000/05/11 08:15:15 gram Exp $
* $Id: packet-irc.c,v 1.6 2000/05/31 05:07:11 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -55,7 +55,7 @@ static gint ett_irc = -1;
static void
dissect_irc_request(proto_tree *tree, char *line, int offset, int len)
{
proto_tree_add_item_hidden(tree, hf_irc_request, NullTVB,
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,7 +64,7 @@ dissect_irc_request(proto_tree *tree, char *line, int offset, int len)
static void
dissect_irc_response(proto_tree *tree, char *line, int offset, int len)
{
proto_tree_add_item_hidden(tree, hf_irc_response, NullTVB,
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,7 +89,7 @@ dissect_irc(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
if (tree)
{
ti = proto_tree_add_item(tree, proto_irc, NullTVB, offset, END_OF_FRAME, NULL);
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 );

View File

@ -2,7 +2,7 @@
* Routines for the Internet Security Association and Key Management Protocol (ISAKMP)
* Brad Robel-Forrest <brad.robel-forrest@watchguard.com>
*
* $Id: packet-isakmp.c,v 1.21 2000/05/22 17:59:53 guy Exp $
* $Id: packet-isakmp.c,v 1.22 2000/05/31 05:07:11 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -366,7 +366,7 @@ dissect_isakmp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
proto_item * ti;
proto_tree * isakmp_tree;
ti = proto_tree_add_item(tree, proto_isakmp, NullTVB, offset, len, NULL);
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),

View File

@ -1,7 +1,7 @@
/* packet-isis-clv.c
* Common CLV decode routines.
*
* $Id: packet-isis-clv.c,v 1.4 2000/05/11 08:15:16 gram Exp $
* $Id: packet-isis-clv.c,v 1.5 2000/05/31 05:07:12 guy Exp $
* Stuart Stanley <stuarts@mxmail.net>
*
* Ethereal - Network traffic analyzer
@ -212,7 +212,7 @@ isis_dissect_ip_int_clv(const u_char *pd, int offset,
}
memcpy(&addr, &pd[offset], sizeof(addr));
if ( tree ) {
proto_tree_add_item(tree, tree_id, NullTVB, offset, 4, addr);
proto_tree_add_ipv4(tree, tree_id, NullTVB, offset, 4, addr);
}
offset += 4;
length -= 4;

View File

@ -1,7 +1,7 @@
/* packet-isis-hello.c
* Routines for decoding isis hello packets and their CLVs
*
* $Id: packet-isis-hello.c,v 1.7 2000/05/11 08:15:16 gram Exp $
* $Id: packet-isis-hello.c,v 1.8 2000/05/31 05:07:12 guy Exp $
* Stuart Stanley <stuarts@mxmail.net>
*
* Ethereal - Network traffic analyzer
@ -437,7 +437,7 @@ isis_dissect_isis_hello(int hello_type, int header_length,
if (tree) {
ti = proto_tree_add_item(tree, proto_isis_hello, NullTVB,
offset, END_OF_FRAME, NULL);
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,16 +453,16 @@ isis_dissect_isis_hello(int hello_type, int header_length,
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,
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_item(hello_tree, hf_isis_hello_pdu_length, NullTVB,
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_item(hello_tree, hf_isis_hello_local_circuit_id, NullTVB,
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,

View File

@ -1,7 +1,7 @@
/* packet-isis-lsp.c
* Routines for decoding isis lsp packets and their CLVs
*
* $Id: packet-isis-lsp.c,v 1.6 2000/05/11 08:15:16 gram Exp $
* $Id: packet-isis-lsp.c,v 1.7 2000/05/31 05:07:12 guy Exp $
* Stuart Stanley <stuarts@mxmail.net>
*
* Ethereal - Network traffic analyzer
@ -791,20 +791,20 @@ isis_dissect_isis_lsp(int lsp_type, int header_length,
if (tree) {
ti = proto_tree_add_item(tree, proto_isis_lsp, NullTVB,
offset, END_OF_FRAME, NULL);
offset, END_OF_FRAME, FALSE);
lsp_tree = proto_item_add_subtree(ti, ett_isis_lsp);
proto_tree_add_item(lsp_tree, hf_isis_lsp_pdu_length, NullTVB,
proto_tree_add_uint(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,
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_item(lsp_tree, hf_isis_lsp_sequence_number, NullTVB,
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_item(lsp_tree, hf_isis_lsp_checksum, NullTVB,
proto_tree_add_uint(lsp_tree, hf_isis_lsp_checksum, NullTVB,
offset + 16, 2, pntohs(&ilp->isis_lsp_checksum));
/*

View File

@ -1,7 +1,7 @@
/* packet-isis-snp.c
* Routines for decoding isis complete & partial SNP and their payload
*
* $Id: packet-isis-snp.c,v 1.4 2000/05/11 08:15:17 gram Exp $
* $Id: packet-isis-snp.c,v 1.5 2000/05/31 05:07:14 guy Exp $
* Stuart Stanley <stuarts@mxmail.net>
*
* Ethereal - Network traffic analyzer
@ -254,9 +254,9 @@ isis_dissect_isis_csnp(int type, int header_length, const u_char *pd,
if (tree) {
ti = proto_tree_add_item(tree, proto_isis_csnp, NullTVB,
offset, END_OF_FRAME, NULL);
offset, END_OF_FRAME, FALSE);
csnp_tree = proto_item_add_subtree(ti, ett_isis_csnp);
proto_tree_add_item(csnp_tree, hf_isis_csnp_pdu_length, NullTVB,
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,9 +322,9 @@ isis_dissect_isis_psnp(int type, int header_length, const u_char *pd,
if (tree) {
ti = proto_tree_add_item(tree, proto_isis_psnp, NullTVB,
offset, END_OF_FRAME, NULL);
offset, END_OF_FRAME, FALSE);
psnp_tree = proto_item_add_subtree(ti, ett_isis_psnp);
proto_tree_add_item(psnp_tree, hf_isis_psnp_pdu_length, NullTVB,
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",

View File

@ -2,7 +2,7 @@
* Routines for ISO/OSI network and transport protocol packet disassembly, core
* bits.
*
* $Id: packet-isis.c,v 1.9 2000/05/11 08:15:17 gram Exp $
* $Id: packet-isis.c,v 1.10 2000/05/31 05:07:15 guy Exp $
* Stuart Stanley <stuarts@mxmail.net>
*
* Ethereal - Network traffic analyzer
@ -160,15 +160,15 @@ dissect_isis(const u_char *pd, int offset, frame_data *fd,
if (tree) {
ti = proto_tree_add_item(tree, proto_isis, NullTVB, offset,
END_OF_FRAME, NULL );
END_OF_FRAME, FALSE );
isis_tree = proto_item_add_subtree(ti, ett_isis);
proto_tree_add_item(isis_tree, hf_isis_irpd, NullTVB, offset, 1,
proto_tree_add_uint(isis_tree, hf_isis_irpd, NullTVB, offset, 1,
ihdr->isis_irpd );
proto_tree_add_item(isis_tree, hf_isis_header_length, NullTVB,
proto_tree_add_uint(isis_tree, hf_isis_header_length, NullTVB,
offset + 1, 1, ihdr->isis_header_length );
proto_tree_add_item(isis_tree, hf_isis_version, NullTVB,
proto_tree_add_uint(isis_tree, hf_isis_version, NullTVB,
offset + 2, 1, ihdr->isis_version );
proto_tree_add_item(isis_tree, hf_isis_system_id_length, NullTVB,
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,11 +178,11 @@ dissect_isis(const u_char *pd, int offset, frame_data *fd,
(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,
proto_tree_add_uint(isis_tree, hf_isis_version2, NullTVB,
offset + 5, 1, ihdr->isis_version2 );
proto_tree_add_item(isis_tree, hf_isis_reserved, NullTVB,
proto_tree_add_uint(isis_tree, hf_isis_reserved, NullTVB,
offset + 6, 1, ihdr->isis_reserved );
proto_tree_add_item(isis_tree, hf_isis_max_area_adr, NullTVB,
proto_tree_add_uint(isis_tree, hf_isis_max_area_adr, NullTVB,
offset + 7, 1, ihdr->isis_max_area_adr );
}

View File

@ -1,7 +1,7 @@
/* packet-isl.c
* Routines for Cisco ISL Ethernet header disassembly
*
* $Id: packet-isl.c,v 1.11 2000/05/16 06:21:32 gram Exp $
* $Id: packet-isl.c,v 1.12 2000/05/31 05:07:15 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -162,26 +162,26 @@ dissect_isl(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
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]);
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_item(fh_tree, hf_isl_user_eth, NullTVB, offset+5, 1,
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_item(fh_tree, hf_isl_user, NullTVB, offset+5, 1, pd[offset+5]);
proto_tree_add_uint(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]);
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_item(fh_tree, hf_isl_len, NullTVB, offset+12, 2, length);
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,18 +190,18 @@ dissect_isl(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
/* ...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,
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_item(fh_tree, hf_isl_vlan_id, NullTVB, offset+20, 2,
proto_tree_add_uint(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,
proto_tree_add_boolean(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,
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_item(fh_tree, hf_isl_crc, NullTVB, 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,17 +214,17 @@ dissect_isl(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
break;
case TYPE_TR:
proto_tree_add_item(fh_tree, hf_isl_src_vlan_id, NullTVB, offset+24, 2,
proto_tree_add_uint(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,
proto_tree_add_boolean(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,
proto_tree_add_uint(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,
proto_tree_add_uint(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,
proto_tree_add_boolean(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,
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);

View File

@ -7,7 +7,7 @@
* Laurent Cazalet <laurent.cazalet@mailclub.net>
* Thomas Parvais <thomas.parvais@advalvas.be>
*
* $Id: packet-l2tp.c,v 1.9 2000/05/11 08:15:17 gram Exp $
* $Id: packet-l2tp.c,v 1.10 2000/05/31 05:07:15 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -336,7 +336,7 @@ dissect_l2tp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
col_add_fstr(fd,COL_INFO,textbuffer);
}
if (tree) {
ti = proto_tree_add_item(tree,proto_l2tp, NullTVB, offset, length , NULL);
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);

View File

@ -2,7 +2,7 @@
* Routines for LAPD frame disassembly
* Gilbert Ramirez <gram@xiexie.org>
*
* $Id: packet-lapd.c,v 1.10 2000/05/31 03:58:54 gram Exp $
* $Id: packet-lapd.c,v 1.11 2000/05/31 05:07:16 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -121,17 +121,17 @@ dissect_lapd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (tree) {
ti = proto_tree_add_item(tree, proto_lapd, tvb, 0, 3, NULL);
ti = proto_tree_add_item(tree, proto_lapd, tvb, 0, 3, FALSE);
lapd_tree = proto_item_add_subtree(ti, ett_lapd);
ti = proto_tree_add_item(lapd_tree, hf_lapd_address, tvb, 0, 2, address);
ti = proto_tree_add_uint(lapd_tree, hf_lapd_address, tvb, 0, 2, address);
addr_tree = proto_item_add_subtree(ti, ett_lapd_address);
proto_tree_add_item(addr_tree, hf_lapd_sapi,tvb, 0, 1, address);
proto_tree_add_item(addr_tree, hf_lapd_cr, tvb, 0, 1, address);
proto_tree_add_item(addr_tree, hf_lapd_ea1, tvb, 0, 1, address);
proto_tree_add_item(addr_tree, hf_lapd_tei, tvb, 1, 1, address);
proto_tree_add_item(addr_tree, hf_lapd_ea2, tvb, 1, 1, address);
proto_tree_add_uint(addr_tree, hf_lapd_sapi,tvb, 0, 1, address);
proto_tree_add_uint(addr_tree, hf_lapd_cr, tvb, 0, 1, address);
proto_tree_add_uint(addr_tree, hf_lapd_ea1, tvb, 0, 1, address);
proto_tree_add_uint(addr_tree, hf_lapd_tei, tvb, 1, 1, address);
proto_tree_add_uint(addr_tree, hf_lapd_ea2, tvb, 1, 1, address);
}
else {
lapd_tree = NULL;

View File

@ -1,7 +1,7 @@
/* packet-ldap.c
* Routines for ldap packet dissection
*
* $Id: packet-ldap.c,v 1.11 2000/05/12 08:04:29 guy Exp $
* $Id: packet-ldap.c,v 1.12 2000/05/31 05:07:16 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -152,7 +152,7 @@ static int read_length(ASN1_SCK *a, proto_tree *tree, int hf_id, guint *len)
*len = length;
if (tree)
proto_tree_add_item(tree, hf_id, NullTVB, start-a->begin, a->pointer-start, length);
proto_tree_add_uint(tree, hf_id, NullTVB, start-a->begin, a->pointer-start, length);
return 0;
}
@ -204,7 +204,7 @@ static int read_integer_value(ASN1_SCK *a, proto_tree *tree, int hf_id,
if (tree)
{
proto_tree *temp_tree = 0;
temp_tree = proto_tree_add_item(tree, hf_id, NullTVB, start-a->begin, a->pointer-start, integer);
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,6 +228,43 @@ static int read_integer(ASN1_SCK *a, proto_tree *tree, int hf_id,
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,7 +282,7 @@ static void read_string_value(ASN1_SCK *a, proto_tree *tree, int hf_id,
if (tree)
{
proto_tree *temp_tree;
temp_tree = proto_tree_add_item(tree, hf_id, NullTVB, start - a->begin, a->pointer - start, string);
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,7 +572,7 @@ static int read_filter(ASN1_SCK *a, proto_tree *tree, int hf_id)
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);
proto_tree_add_string(tree, hf_id, NullTVB, start-a->begin, a->pointer-start, filter);
}
g_free(filter);
@ -586,7 +623,7 @@ static int dissect_ldap_request_bind(ASN1_SCK *a, proto_tree *tree)
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,
proto_tree_add_uint(tree, hf_ldap_message_bind_auth, NullTVB, start - a->begin,
a->pointer - start, tag);
switch (tag)
{
@ -620,7 +657,7 @@ static int dissect_ldap_request_search(ASN1_SCK *a, proto_tree *tree)
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);
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,7 +741,7 @@ static int dissect_ldap_request_modifyrdn(ASN1_SCK *a, proto_tree *tree,
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);
read_boolean(a, tree, hf_ldap_message_modrdn_delete, 0, 0);
if (a->pointer < (start + length)) {
/* LDAP V3 Modify DN operation, with newSuperior */
@ -732,7 +769,7 @@ static int dissect_ldap_request_compare(ASN1_SCK *a, proto_tree *tree)
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);
proto_tree_add_string(tree, hf_ldap_message_compare, NullTVB, start-a->begin, a->pointer-start, compare);
g_free(string1);
g_free(string2);
@ -807,7 +844,7 @@ dissect_ldap(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
if (tree)
{
ti = proto_tree_add_item(tree, proto_ldap, NullTVB, offset, END_OF_FRAME, NULL);
ti = proto_tree_add_item(tree, proto_ldap, NullTVB, offset, END_OF_FRAME, FALSE);
ldap_tree = proto_item_add_subtree(ti, ett_ldap);
}
@ -862,8 +899,8 @@ dissect_ldap(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
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,
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,12 +1022,12 @@ proto_register_ldap(void)
static hf_register_info hf[] = {
{ &hf_ldap_length,
{ "Length", "ldap.length",
FT_INT32, BASE_DEC, NULL, 0x0,
FT_UINT32, BASE_DEC, NULL, 0x0,
"LDAP Length" }},
{ &hf_ldap_message_id,
{ "Message Id", "ldap.message_id",
FT_INT32, BASE_DEC, NULL, 0x0,
FT_UINT32, BASE_DEC, NULL, 0x0,
"LDAP Message Id" }},
{ &hf_ldap_message_type,
{ "Message Type", "ldap.message_type",
@ -998,12 +1035,12 @@ proto_register_ldap(void)
"LDAP Message Type" }},
{ &hf_ldap_message_length,
{ "Message Length", "ldap.message_length",
FT_INT32, BASE_DEC, NULL, 0x0,
FT_UINT32, BASE_DEC, NULL, 0x0,
"LDAP Message Length" }},
{ &hf_ldap_message_result,
{ "Result Code", "ldap.result.code",
FT_INT8, BASE_HEX, result_codes, 0x0,
FT_UINT8, BASE_HEX, result_codes, 0x0,
"LDAP Result Code" }},
{ &hf_ldap_message_result_matcheddn,
{ "Matched DN", "ldap.result.matcheddn",
@ -1020,7 +1057,7 @@ proto_register_ldap(void)
{ &hf_ldap_message_bind_version,
{ "Version", "ldap.bind.version",
FT_INT32, BASE_DEC, NULL, 0x0,
FT_UINT32, BASE_DEC, NULL, 0x0,
"LDAP Bind Version" }},
{ &hf_ldap_message_bind_dn,
{ "DN", "ldap.bind.dn",
@ -1049,11 +1086,11 @@ proto_register_ldap(void)
"LDAP Search Dereference" }},
{ &hf_ldap_message_search_sizeLimit,
{ "Size Limit", "ldap.search.sizelimit",
FT_INT32, BASE_DEC, NULL, 0x0,
FT_UINT32, BASE_DEC, NULL, 0x0,
"LDAP Search Size Limit" }},
{ &hf_ldap_message_search_timeLimit,
{ "Time Limit", "ldap.search.timelimit",
FT_INT32, BASE_DEC, NULL, 0x0,
FT_UINT32, BASE_DEC, NULL, 0x0,
"LDAP Search Time Limit" }},
{ &hf_ldap_message_search_typesOnly,
{ "Attributes Only", "ldap.search.typesonly",
@ -1109,7 +1146,7 @@ proto_register_ldap(void)
{ &hf_ldap_message_abandon_msgid,
{ "Abandon Msg Id", "ldap.abandon.msgid",
FT_INT32, BASE_DEC, NULL, 0x0,
FT_UINT32, BASE_DEC, NULL, 0x0,
"LDAP Abandon Msg Id" }},
};
@ -1130,4 +1167,3 @@ proto_reg_handoff_ldap(void)
{
dissector_add("tcp.port", TCP_PORT_LDAP, dissect_ldap);
}

View File

@ -2,7 +2,7 @@
* Routines for IEEE 802.2 LLC layer
* Gilbert Ramirez <gram@xiexie.org>
*
* $Id: packet-llc.c,v 1.64 2000/05/31 03:58:54 gram Exp $
* $Id: packet-llc.c,v 1.65 2000/05/31 05:07:17 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -286,20 +286,20 @@ dissect_llc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
dsap = tvb_get_guint8(tvb, 0);
if (tree) {
ti = proto_tree_add_item(tree, proto_llc, tvb, 0, 0, NULL);
ti = proto_tree_add_item(tree, proto_llc, tvb, 0, 0, FALSE);
llc_tree = proto_item_add_subtree(ti, ett_llc);
proto_tree_add_item(llc_tree, hf_llc_dsap, tvb, 0,
proto_tree_add_uint(llc_tree, hf_llc_dsap, tvb, 0,
1, dsap & SAP_MASK);
proto_tree_add_item(llc_tree, hf_llc_dsap_ig, tvb, 0,
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_item(llc_tree, hf_llc_ssap, tvb, 1,
proto_tree_add_uint(llc_tree, hf_llc_ssap, tvb, 1,
1, ssap & SAP_MASK);
proto_tree_add_item(llc_tree, hf_llc_ssap_cr, tvb, 1,
proto_tree_add_boolean(llc_tree, hf_llc_ssap_cr, tvb, 1,
1, ssap & SSAP_CR_BIT);
} else
llc_tree = NULL;
@ -315,7 +315,7 @@ dissect_llc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
*/
control = dissect_xdlc_control(tvb, 2, pinfo, llc_tree,
hf_llc_ctrl, ett_llc_ctrl,
tvb_get_guint8(tvb, 1) & SSAP_CR_BIT, TRUE);
ssap & SSAP_CR_BIT, TRUE);
llc_header_len += XDLC_CONTROL_LEN(control, TRUE);
if (is_snap)
llc_header_len += 5; /* 3 bytes of OUI, 2 bytes of protocol ID */
@ -338,7 +338,7 @@ dissect_llc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
etype);
}
if (tree) {
proto_tree_add_item(llc_tree, hf_llc_oui, tvb, 3, 3,
proto_tree_add_uint(llc_tree, hf_llc_oui, tvb, 3, 3,
oui);
}
@ -370,7 +370,7 @@ dissect_llc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
are some of them raw or encapsulated
Ethernet? */
if (tree) {
proto_tree_add_item(llc_tree,
proto_tree_add_uint(llc_tree,
hf_llc_pid, tvb, 6, 2, etype);
}
if (XDLC_IS_INFORMATION(control)) {
@ -404,7 +404,7 @@ dissect_llc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
case OUI_CABLE_BPDU: /* DOCSIS cable modem spanning tree BPDU */
if (tree) {
proto_tree_add_item(llc_tree,
proto_tree_add_uint(llc_tree,
hf_llc_pid, tvb, 6, 2, etype);
}
dissect_bpdu(pd, offset, pinfo->fd, tree);
@ -412,7 +412,7 @@ dissect_llc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
default:
if (tree) {
proto_tree_add_item(llc_tree,
proto_tree_add_uint(llc_tree,
hf_llc_pid, tvb, 6, 2, etype);
}
dissect_data_tvb(next_tvb, pinfo, tree);

View File

@ -2,7 +2,7 @@
* Routines for LPR and LPRng packet disassembly
* Gilbert Ramirez <gram@xiexie.org>
*
* $Id: packet-lpd.c,v 1.19 2000/05/11 08:15:23 gram Exp $
* $Id: packet-lpd.c,v 1.20 2000/05/31 05:07:17 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -105,13 +105,13 @@ dissect_lpd(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
if (tree) {
ti = proto_tree_add_item(tree, proto_lpd, NullTVB, offset,
END_OF_FRAME, NULL);
END_OF_FRAME, FALSE);
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);
proto_tree_add_boolean_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);
proto_tree_add_boolean_hidden(lpd_tree, hf_lpd_request, NullTVB, 0, 0, TRUE);
}
if (lpr_packet_type == request) {

View File

@ -1,7 +1,7 @@
/* packet-mapi.c
* Routines for MSX mapi packet dissection
*
* $Id: packet-mapi.c,v 1.6 2000/05/11 08:15:23 gram Exp $
* $Id: packet-mapi.c,v 1.7 2000/05/31 05:07:18 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -66,19 +66,19 @@ dissect_mapi(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
if (tree)
{
ti = proto_tree_add_item(tree, proto_mapi, NullTVB, offset, END_OF_FRAME, NULL);
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_item_hidden(mapi_tree, hf_mapi_request, NullTVB,
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_item_hidden(mapi_tree, hf_mapi_response, NullTVB,
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>");

View File

@ -2,7 +2,7 @@
* Routines for Mobile IP dissection
* Copyright 2000, Stefan Raab <Stefan.Raab@nextel.com>
*
* $Id: packet-mip.c,v 1.3 2000/05/27 17:51:15 guy Exp $
* $Id: packet-mip.c,v 1.4 2000/05/31 05:07:18 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@unicom.net>
@ -165,23 +165,23 @@ dissect_mip(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
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);
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_item(mip_tree, hf_mip_type, 0, 1, type);
proto_tree_add_int(mip_tree, hf_mip_type, tvb, 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_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_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));
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,16 +191,16 @@ dissect_mip(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
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);
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_item(mip_tree, hf_mip_type, tvb, 0, 1, type);
proto_tree_add_int(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));
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));
}
}
}

View File

@ -1,7 +1,7 @@
/* packet-mount.c
* Routines for mount dissection
*
* $Id: packet-mount.c,v 1.14 2000/05/11 08:15:23 gram Exp $
* $Id: packet-mount.c,v 1.15 2000/05/31 05:07:18 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -86,7 +86,7 @@ dissect_fhstatus(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
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);
proto_tree_add_uint(tree, hf_mount_status, NullTVB, offset, 4, status);
}
offset += 4;
@ -140,7 +140,7 @@ dissect_mountlist(const u_char *pd, int offset, frame_data *fd, proto_tree *tree
if (tree) {
mountlist_item = proto_tree_add_item(tree, hf_mount_mountlist, NullTVB,
offset+0, END_OF_FRAME, NULL);
offset+0, END_OF_FRAME, FALSE);
if (mountlist_item)
mountlist_tree = proto_item_add_subtree(mountlist_item, ett_mount_mountlist);
}
@ -199,7 +199,7 @@ dissect_exportlist(const u_char *pd, int offset, frame_data *fd, proto_tree *tre
if (tree) {
exportlist_item = proto_tree_add_item(tree, hf_mount_exportlist, NullTVB,
offset+0, END_OF_FRAME, NULL);
offset+0, END_OF_FRAME, FALSE);
if (exportlist_item)
exportlist_tree = proto_item_add_subtree(exportlist_item, ett_mount_exportlist);
}
@ -208,7 +208,7 @@ dissect_exportlist(const u_char *pd, int offset, frame_data *fd, proto_tree *tre
groups_offset = offset;
if (tree) {
groups_item = proto_tree_add_item(exportlist_tree, hf_mount_groups, NullTVB,
offset+0, END_OF_FRAME, NULL);
offset+0, END_OF_FRAME, FALSE);
if (groups_item)
groups_tree = proto_item_add_subtree(groups_item, ett_mount_groups);
}
@ -330,7 +330,7 @@ dissect_mount_pathconf_reply(const u_char *pd, int offset, frame_data *fd,
return offset;
if (!(pc_mask & (PC_ERROR_LINK_MAX|PC_ERROR_ALL))) {
if (tree) {
proto_tree_add_item(tree,
proto_tree_add_uint(tree,
hf_mount_pathconf_link_max, NullTVB, offset, 4,
EXTRACT_UINT(pd, offset+0));
}
@ -341,7 +341,7 @@ dissect_mount_pathconf_reply(const u_char *pd, int offset, frame_data *fd,
return offset;
if (!(pc_mask & (PC_ERROR_MAX_CANON|PC_ERROR_ALL))) {
if (tree) {
proto_tree_add_item(tree,
proto_tree_add_uint(tree,
hf_mount_pathconf_max_canon, NullTVB, offset + 2, 2,
(EXTRACT_UINT(pd, offset+0)) & 0xFFFF);
}
@ -353,7 +353,7 @@ dissect_mount_pathconf_reply(const u_char *pd, int offset, frame_data *fd,
return offset;
if (!(pc_mask & (PC_ERROR_MAX_INPUT|PC_ERROR_ALL))) {
if (tree) {
proto_tree_add_item(tree,
proto_tree_add_uint(tree,
hf_mount_pathconf_max_input, NullTVB, offset + 2, 2,
(EXTRACT_UINT(pd, offset+0)) & 0xFFFF);
}
@ -364,7 +364,7 @@ dissect_mount_pathconf_reply(const u_char *pd, int offset, frame_data *fd,
return offset;
if (!(pc_mask & (PC_ERROR_NAME_MAX|PC_ERROR_ALL))) {
if (tree) {
proto_tree_add_item(tree,
proto_tree_add_uint(tree,
hf_mount_pathconf_name_max, NullTVB, offset + 2, 2,
(EXTRACT_UINT(pd, offset+0)) & 0xFFFF);
}
@ -375,7 +375,7 @@ dissect_mount_pathconf_reply(const u_char *pd, int offset, frame_data *fd,
return offset;
if (!(pc_mask & (PC_ERROR_PATH_MAX|PC_ERROR_ALL))) {
if (tree) {
proto_tree_add_item(tree,
proto_tree_add_uint(tree,
hf_mount_pathconf_path_max, NullTVB, offset + 2, 2,
(EXTRACT_UINT(pd, offset+0)) & 0xFFFF);
}
@ -386,7 +386,7 @@ dissect_mount_pathconf_reply(const u_char *pd, int offset, frame_data *fd,
return offset;
if (!(pc_mask & (PC_ERROR_PIPE_BUF|PC_ERROR_ALL))) {
if (tree) {
proto_tree_add_item(tree,
proto_tree_add_uint(tree,
hf_mount_pathconf_pipe_buf, NullTVB, offset + 2, 2,
(EXTRACT_UINT(pd, offset+0)) & 0xFFFF);
}
@ -399,7 +399,7 @@ dissect_mount_pathconf_reply(const u_char *pd, int offset, frame_data *fd,
return offset;
if (!(pc_mask & (PC_ERROR_VDISABLE|PC_ERROR_ALL))) {
if (tree) {
proto_tree_add_item(tree,
proto_tree_add_uint(tree,
hf_mount_pathconf_vdisable, NullTVB, offset + 3, 1,
(EXTRACT_UINT(pd, offset+0)) & 0xFF);
}
@ -407,28 +407,28 @@ dissect_mount_pathconf_reply(const u_char *pd, int offset, frame_data *fd,
offset += 4;
if (tree) {
ti = proto_tree_add_item(tree, hf_mount_pathconf_mask, NullTVB,
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_item(mask_tree, hf_mount_pathconf_error_all, NullTVB,
proto_tree_add_boolean(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,
proto_tree_add_boolean(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,
proto_tree_add_boolean(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,
proto_tree_add_boolean(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,
proto_tree_add_boolean(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,
proto_tree_add_boolean(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,
proto_tree_add_boolean(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,
proto_tree_add_boolean(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,
proto_tree_add_boolean(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,
proto_tree_add_boolean(mask_tree, hf_mount_pathconf_error_vdisable, NullTVB,
offset + 2, 2, pc_mask);
}
offset += 4;
@ -510,7 +510,7 @@ dissect_mountstat3(const u_char *pd, int offset, frame_data *fd, proto_tree *tre
mountstat3 = EXTRACT_UINT(pd, offset+0);
if (tree) {
proto_tree_add_item(tree, hfindex, NullTVB, offset, 4, mountstat3);
proto_tree_add_uint(tree, hfindex, NullTVB, offset, 4, mountstat3);
}
offset += 4;
@ -535,13 +535,13 @@ dissect_mount3_mnt_reply(const u_char *pd, int offset, frame_data *fd,
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,
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_item(tree,hf_mount_flavor, NullTVB,
proto_tree_add_uint(tree,hf_mount_flavor, NullTVB,
offset, 4, auth_flavor);
offset += 4;
}

View File

@ -3,7 +3,7 @@
*
* (c) Copyright Ashok Narayanan <ashokn@cisco.com>
*
* $Id: packet-mpls.c,v 1.6 2000/05/11 08:15:23 gram Exp $
* $Id: packet-mpls.c,v 1.7 2000/05/31 05:07:19 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -153,7 +153,7 @@ dissect_mpls(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
if (tree) {
ti = proto_tree_add_item(tree, proto_mpls, NullTVB, offset, 4, NULL);
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,14 +162,14 @@ dissect_mpls(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
label, val_to_str(label, special_labels,
"Reserved - Unknown"));
else
proto_tree_add_item(mpls_tree, mpls_filter[MPLSF_LABEL], NullTVB,
proto_tree_add_uint(mpls_tree, mpls_filter[MPLSF_LABEL], NullTVB,
offset, 3, label);
proto_tree_add_item(mpls_tree,mpls_filter[MPLSF_EXP], NullTVB,
proto_tree_add_uint(mpls_tree,mpls_filter[MPLSF_EXP], NullTVB,
offset+2,1, exp);
proto_tree_add_item(mpls_tree,mpls_filter[MPLSF_BOTTOM_OF_STACK], NullTVB,
proto_tree_add_uint(mpls_tree,mpls_filter[MPLSF_BOTTOM_OF_STACK], NullTVB,
offset+2,1, bos);
proto_tree_add_item(mpls_tree,mpls_filter[MPLSF_TTL], NullTVB,
proto_tree_add_uint(mpls_tree,mpls_filter[MPLSF_TTL], NullTVB,
offset+3,1, ttl);
}
offset += 4;

View File

@ -2,7 +2,7 @@
* Routines for Microsoft Proxy packet dissection
* Copyright 2000, Jeffrey C. Foster <jfoste@woodward.com>
*
* $Id: packet-msproxy.c,v 1.2 2000/05/11 08:15:23 gram Exp $
* $Id: packet-msproxy.c,v 1.3 2000/05/31 05:07:20 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -243,14 +243,14 @@ static void msproxy_sub_dissector( const u_char *pd, int offset, frame_data *fd,
if ( tree) {
ti = proto_tree_add_item( tree, proto_msproxy, NullTVB, offset, 0,
NULL, "MS Proxy:" );
FALSE );
msp_tree = proto_item_add_subtree(ti, ett_msproxy);
proto_tree_add_item( msp_tree, hf_msproxy_dstport, NullTVB,
proto_tree_add_uint( msp_tree, hf_msproxy_dstport, NullTVB,
offset, 0, redirect_info->remote_port);
proto_tree_add_item( msp_tree, hf_msproxy_dstaddr, NullTVB, offset, 0,
proto_tree_add_ipv4( msp_tree, hf_msproxy_dstaddr, NullTVB, offset, 0,
redirect_info->remote_addr);
}
@ -434,19 +434,19 @@ static void dissect_bind(const u_char *pd, int offset, frame_data *fd,
CHECK_PACKET_LENGTH( 4);
if ( tree)
proto_tree_add_item( tree, hf_msproxy_bindaddr, NullTVB, offset, 4,
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_item( tree, hf_msproxy_bindport, NullTVB, offset, 2,
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_item( tree, hf_msproxy_clntport, NullTVB, offset, 2,
proto_tree_add_uint( tree, hf_msproxy_clntport, NullTVB, offset, 2,
pntohs( &pd[ offset]));
offset += 2;
@ -455,7 +455,7 @@ static void dissect_bind(const u_char *pd, int offset, frame_data *fd,
if ( tree){
CHECK_PACKET_LENGTH( 2);
proto_tree_add_item( tree, hf_msproxy_boundport, NullTVB, offset, 2,
proto_tree_add_uint( tree, hf_msproxy_boundport, NullTVB, offset, 2,
pntohs( &pd[ offset]));
offset += 82;
@ -499,11 +499,11 @@ static void dissect_tcp_bind(const u_char *pd, int offset,
offset += 6;
CHECK_PACKET_LENGTH( 4);
proto_tree_add_item( tree, hf_msproxy_bind_id, NullTVB, offset, 4, pntohl( &pd[ offset]));
proto_tree_add_uint( 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,
proto_tree_add_uint( tree, hf_msproxy_boundport, NullTVB, offset, 2,
pntohs( &pd[ offset]));
offset += 96;
@ -523,7 +523,7 @@ static void dissect_request_connect(const u_char *pd, int offset, frame_data *fd
CHECK_PACKET_LENGTH( 2);
if ( tree)
proto_tree_add_item( tree, hf_msproxy_dstport, NullTVB, offset, 2,
proto_tree_add_uint( tree, hf_msproxy_dstport, NullTVB, offset, 2,
pntohs( &pd[ offset]));
conv_info->dst_port = pntohs( &pd[ offset]);
@ -531,7 +531,7 @@ static void dissect_request_connect(const u_char *pd, int offset, frame_data *fd
CHECK_PACKET_LENGTH( 4);
if ( tree)
proto_tree_add_item( tree, hf_msproxy_dstaddr, NullTVB, offset, 4,
proto_tree_add_ipv4( tree, hf_msproxy_dstaddr, NullTVB, offset, 4,
GWORD( pd, offset));
memcpy( &conv_info->dst_addr, &pd[ offset], sizeof( guint32));
@ -542,7 +542,7 @@ static void dissect_request_connect(const u_char *pd, int offset, frame_data *fd
conv_info->clnt_port = pntohs( &pd[ offset]);
if ( tree){
proto_tree_add_item( tree, hf_msproxy_clntport, NullTVB, offset, 2,
proto_tree_add_uint( tree, hf_msproxy_clntport, NullTVB, offset, 2,
pntohs( &pd[ offset]));
offset += 84;
@ -562,31 +562,31 @@ static void dissect_bind_info_ack(const u_char *pd, int offset, frame_data *fd,
offset += 6;
CHECK_PACKET_LENGTH( 4);
proto_tree_add_item( tree, hf_msproxy_bind_id, NullTVB, offset, 4, pntohl( &pd[ offset]));
proto_tree_add_uint( 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,
proto_tree_add_uint( 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,
proto_tree_add_ipv4( 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,
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_item( tree, hf_msproxy_server_ext_port, NullTVB, offset,
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_item( tree, hf_msproxy_server_ext_addr, NullTVB, offset,
proto_tree_add_ipv4( tree, hf_msproxy_server_ext_addr, NullTVB, offset,
4, GWORD( pd, offset));
offset += 78;
@ -644,19 +644,19 @@ static void dissect_udp_bind(const u_char *pd, int offset,
CHECK_PACKET_LENGTH( 4);
if ( tree)
proto_tree_add_item( tree, hf_msproxy_bind_id, NullTVB, offset, 4, pntohl( &pd[ offset]));
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_item( tree, hf_msproxy_dstport, NullTVB, offset, 2,
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_item( tree, hf_msproxy_dstaddr, NullTVB, offset, 4,
proto_tree_add_ipv4( tree, hf_msproxy_dstaddr, NullTVB, offset, 4,
GWORD( pd, offset));
offset += 96;
@ -677,7 +677,7 @@ static void dissect_udp_assoc(const u_char *pd, int offset,
CHECK_PACKET_LENGTH( 2);
if ( tree)
proto_tree_add_item( tree, hf_msproxy_clntport, NullTVB, offset, 2,
proto_tree_add_uint( tree, hf_msproxy_clntport, NullTVB, offset, 2,
pntohs( &pd[ offset]));
conv_info->clnt_port = pntohs( &pd[ offset]);
@ -800,12 +800,12 @@ static void dissect_hello_ack(const u_char *pd, int offset, frame_data *fd,
if ( tree) {
CHECK_PACKET_LENGTH( 2);
proto_tree_add_item( tree, hf_msproxy_serverport, NullTVB, offset, 2,
proto_tree_add_uint( 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,
proto_tree_add_ipv4( tree, hf_msproxy_serveraddr, NullTVB, offset, 4,
GWORD( pd, offset));
offset += 4;
}
@ -834,15 +834,15 @@ static void dissect_udpassociate_ack( const u_char *pd, int offset,
if ( tree) {
CHECK_PACKET_LENGTH( 4);
proto_tree_add_item( tree, hf_msproxy_bind_id, NullTVB, offset, 4, pntohl( &pd[ offset]));
proto_tree_add_uint( 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]));
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_item( tree, hf_msproxy_server_ext_addr, NullTVB, offset, 4, GWORD( pd, offset));
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,7 +893,7 @@ static void dissect_connect_ack( const u_char *pd, int offset, frame_data *fd,
CHECK_PACKET_LENGTH( 2);
if ( tree)
proto_tree_add_item( tree, hf_msproxy_server_int_port, NullTVB, offset, 2, pntohs( &pd[ offset]));
proto_tree_add_uint( tree, hf_msproxy_server_int_port, NullTVB, offset, 2, pntohs( &pd[ offset]));
conv_info->proto = PT_TCP;
@ -902,15 +902,15 @@ static void dissect_connect_ack( const u_char *pd, int offset, frame_data *fd,
if ( tree){
CHECK_PACKET_LENGTH( 2);
proto_tree_add_item( tree, hf_msproxy_server_int_addr, NullTVB, offset, 2, GWORD( pd, offset));
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_item( tree, hf_msproxy_server_ext_port, NullTVB, offset, 2, pntohs( &pd[ offset]));
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_item( tree, hf_msproxy_server_ext_addr, NullTVB, offset, 4, GWORD( pd, offset));
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,21 +930,21 @@ static void dissect_tcp_bind_ack( const u_char *pd, int offset, frame_data *fd,
offset += 6;
CHECK_PACKET_LENGTH( 4);
proto_tree_add_item( tree, hf_msproxy_bind_id, NullTVB, offset, 4, pntohl( &pd[ offset]));
proto_tree_add_uint( 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,
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_item( tree, hf_msproxy_server_ext_port, NullTVB, offset,
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_item( tree, hf_msproxy_server_ext_addr, NullTVB, offset,
proto_tree_add_ipv4( tree, hf_msproxy_server_ext_addr, NullTVB, offset,
4, GWORD( pd, offset));
offset += 88;
@ -964,20 +964,20 @@ static void dissect_bind_info( const u_char *pd, int offset, frame_data *fd,
CHECK_PACKET_LENGTH( 4);
if ( tree)
proto_tree_add_item( tree, hf_msproxy_bind_id, NullTVB, offset, 4, pntohl( &pd[ offset]));
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_item( tree, hf_msproxy_dstport, NullTVB, offset, 2,
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_item( tree, hf_msproxy_dstaddr, NullTVB, offset, 4,
proto_tree_add_ipv4( tree, hf_msproxy_dstaddr, NullTVB, offset, 4,
GWORD( pd, offset));
memcpy( &conv_info->dst_addr, &pd[ offset], sizeof( guint32));
@ -986,7 +986,7 @@ static void dissect_bind_info( const u_char *pd, int offset, frame_data *fd,
CHECK_PACKET_LENGTH( 2);
if ( tree)
proto_tree_add_item( tree, hf_msproxy_server_int_port, NullTVB, offset,
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,12 +994,12 @@ static void dissect_bind_info( const u_char *pd, int offset, frame_data *fd,
if ( tree) {
CHECK_PACKET_LENGTH( 2);
proto_tree_add_item( tree, hf_msproxy_server_ext_port, NullTVB, offset,
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_item( tree, hf_msproxy_server_ext_addr, NullTVB, offset,
proto_tree_add_ipv4( tree, hf_msproxy_server_ext_addr, NullTVB, offset,
4, GWORD( pd, offset));
offset += 78;
@ -1034,7 +1034,7 @@ static void dissect_resolve(const u_char *pd, int offset, frame_data *fd,
offset += addr_offset;
CHECK_PACKET_LENGTH( 4);
proto_tree_add_item( tree, hf_msproxy_resolvaddr, NullTVB, offset, 4,
proto_tree_add_ipv4( tree, hf_msproxy_resolvaddr, NullTVB, offset, 4,
GWORD( pd, offset));
}
}
@ -1203,7 +1203,7 @@ static void dissect_msproxy(const u_char *pd, int offset, frame_data *fd, proto_
if (tree) { /* if proto tree, decode data */
ti = proto_tree_add_item( tree, proto_msproxy, NullTVB, offset,
END_OF_FRAME, NULL, "MSproxy:" );
END_OF_FRAME, FALSE );
msproxy_tree = proto_item_add_subtree(ti, ett_msproxy);
}
@ -1356,6 +1356,3 @@ proto_reg_handoff_msproxy(void) {
dissector_add("udp.port", UDP_PORT_MSPROXY, dissect_msproxy);
}

View File

@ -2,7 +2,7 @@
* Routines for NetBIOS over IPX packet disassembly
* Gilbert Ramirez <gram@xiexie.org>
*
* $Id: packet-nbipx.c,v 1.20 2000/05/30 03:35:52 guy Exp $
* $Id: packet-nbipx.c,v 1.21 2000/05/31 05:07:21 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -187,7 +187,7 @@ dissect_nbipx_ns(const u_char *pd, int offset, frame_data *fd, proto_tree *tree,
}
if (tree) {
ti = proto_tree_add_item(tree, proto_nbipx, NullTVB, offset, 50, NULL);
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,7 +239,7 @@ dissect_nbipx_dg(const u_char *pd, int offset, frame_data *fd, proto_tree *tree,
if (tree) {
ti = proto_tree_add_item(tree, proto_nbipx, NullTVB, offset,
2+NETBIOS_NAME_LEN+NETBIOS_NAME_LEN, NULL);
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,7 +341,7 @@ dissect_nwlink_dg(const u_char *pd, int offset, frame_data *fd, proto_tree *tree
}
if (tree) {
ti = proto_tree_add_item(tree, proto_nbipx, NullTVB, offset, 68, NULL);
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);

View File

@ -4,7 +4,7 @@
* Gilbert Ramirez <gram@xiexie.org>
* Much stuff added by Guy Harris <guy@alum.mit.edu>
*
* $Id: packet-nbns.c,v 1.42 2000/05/11 08:15:24 gram Exp $
* $Id: packet-nbns.c,v 1.43 2000/05/31 05:07:21 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -1167,28 +1167,28 @@ dissect_nbns(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
}
if (tree) {
ti = proto_tree_add_item(tree, proto_nbns, NullTVB, offset, END_OF_FRAME, NULL);
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_item_hidden(nbns_tree, hf_nbns_response, NullTVB,
proto_tree_add_boolean_hidden(nbns_tree, hf_nbns_response, NullTVB,
0, 0, TRUE);
} else {
proto_tree_add_item_hidden(nbns_tree, hf_nbns_query, NullTVB,
proto_tree_add_boolean_hidden(nbns_tree, hf_nbns_query, NullTVB,
0, 0, TRUE);
}
proto_tree_add_item(nbns_tree, hf_nbns_transaction_id, NullTVB,
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_item(nbns_tree, hf_nbns_count_questions, NullTVB,
proto_tree_add_uint(nbns_tree, hf_nbns_count_questions, NullTVB,
offset + NBNS_QUEST, 2, quest);
proto_tree_add_item(nbns_tree, hf_nbns_count_answers, NullTVB,
proto_tree_add_uint(nbns_tree, hf_nbns_count_answers, NullTVB,
offset + NBNS_ANS, 2, ans);
proto_tree_add_item(nbns_tree, hf_nbns_count_auth_rr, NullTVB,
proto_tree_add_uint(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,
proto_tree_add_uint(nbns_tree, hf_nbns_count_add_rr, NullTVB,
offset + NBNS_ADD, 2, add);
}
@ -1325,7 +1325,7 @@ dissect_nbdgm(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
}
if (tree) {
ti = proto_tree_add_item(tree, proto_nbdgm, NullTVB, offset, header.dgm_length, NULL);
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,11 +1349,11 @@ dissect_nbdgm(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
"Node Type: %s",
node[header.flags.node_type]);
proto_tree_add_item(nbdgm_tree, hf_nbdgm_datagram_id, NullTVB,
proto_tree_add_uint(nbdgm_tree, hf_nbdgm_datagram_id, NullTVB,
offset+2, 2, header.dgm_id);
proto_tree_add_item(nbdgm_tree, hf_nbdgm_src_ip, NullTVB,
proto_tree_add_ipv4(nbdgm_tree, hf_nbdgm_src_ip, NullTVB,
offset+4, 4, header.src_ip);
proto_tree_add_item(nbdgm_tree, hf_nbdgm_src_port, NullTVB,
proto_tree_add_uint(nbdgm_tree, hf_nbdgm_src_port, NullTVB,
offset+8, 2, header.src_port);
}
@ -1490,7 +1490,7 @@ dissect_nbss_packet(const u_char *pd, int offset, frame_data *fd, proto_tree *tr
}
if (tree) {
ti = proto_tree_add_item(tree, proto_nbss, NullTVB, offset, length + 4, NULL);
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,7 +1510,7 @@ dissect_nbss_packet(const u_char *pd, int offset, frame_data *fd, proto_tree *tr
offset += 3;
} else {
if (tree) {
tf = proto_tree_add_item(nbss_tree, hf_nbss_flags, NullTVB, offset, 1, flags);
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,

View File

@ -3,7 +3,7 @@
* Gilbert Ramirez <gram@xiexie.org>
* Modified to allow NCP over TCP/IP decodes by James Coe <jammer@cin.net>
*
* $Id: packet-ncp.c,v 1.36 2000/05/30 03:35:53 guy Exp $
* $Id: packet-ncp.c,v 1.37 2000/05/31 05:07:22 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -575,14 +575,14 @@ dissect_ncp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
nw_ncp_type = header.type;
if (tree) {
ti = proto_tree_add_item(tree, proto_ncp, NullTVB, offset, END_OF_FRAME, NULL);
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_item(ncp_tree, hf_ncp_ip_sig, NullTVB, offset - 16, 4, ncpiph.signature);
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_item(ncp_tree, hf_ncp_ip_ver, NullTVB, offset - 8, 4, ncpiphrq.version);
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,13 +594,13 @@ dissect_ncp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
request_reply_values,
"Unknown (%04X)"));
proto_tree_add_item(ncp_tree, hf_ncp_seq, NullTVB,
proto_tree_add_uint(ncp_tree, hf_ncp_seq, NullTVB,
offset+2, 1, header.sequence);
proto_tree_add_item(ncp_tree, hf_ncp_connection, NullTVB,
proto_tree_add_uint(ncp_tree, hf_ncp_connection, NullTVB,
offset+3, 3, nw_connection);
proto_tree_add_item(ncp_tree, hf_ncp_task, NullTVB,
proto_tree_add_uint(ncp_tree, hf_ncp_task, NullTVB,
offset+4, 1, header.task);
}

View File

@ -5,7 +5,7 @@
*
* derived from the packet-nbns.c
*
* $Id: packet-netbios.c,v 1.19 2000/05/11 08:15:28 gram Exp $
* $Id: packet-netbios.c,v 1.20 2000/05/31 05:07:23 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -986,7 +986,7 @@ static void dissect_netbios(const u_char *pd, int offset, frame_data *fd,
if (tree) {
ti = proto_tree_add_item(tree, proto_netbios, NullTVB,
offset, END_OF_FRAME, NULL);
offset, END_OF_FRAME, FALSE);
netb_tree = proto_item_add_subtree(ti, ett_netb);
proto_tree_add_text( netb_tree, NullTVB, offset,
@ -1030,7 +1030,7 @@ static void dissect_netbios(const u_char *pd, int offset, frame_data *fd,
if (tree) {
ti = proto_tree_add_item(tree, proto_netbios, NullTVB, offset, END_OF_FRAME, NULL);
ti = proto_tree_add_item(tree, proto_netbios, NullTVB, offset, END_OF_FRAME, FALSE);
netb_tree = proto_item_add_subtree(ti, ett_netb);

View File

@ -2,7 +2,7 @@
* Routines for nfs dissection
* Copyright 1999, Uwe Girlich <Uwe.Girlich@philosys.de>
*
* $Id: packet-nfs.c,v 1.27 2000/05/11 08:15:28 gram Exp $
* $Id: packet-nfs.c,v 1.28 2000/05/31 05:07:24 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -663,11 +663,11 @@ dissect_nfs2_read_call(const u_char *pd, int offset, frame_data *fd, proto_tree
count = EXTRACT_UINT(pd, offset+4);
totalcount = EXTRACT_UINT(pd, offset+8);
if (tree) {
proto_tree_add_item(tree, hf_nfs_read_offset, NullTVB,
proto_tree_add_uint(tree, hf_nfs_read_offset, NullTVB,
offset+0, 4, offset_value);
proto_tree_add_item(tree, hf_nfs_read_count, NullTVB,
proto_tree_add_uint(tree, hf_nfs_read_count, NullTVB,
offset+4, 4, count);
proto_tree_add_item(tree, hf_nfs_read_totalcount, NullTVB,
proto_tree_add_uint(tree, hf_nfs_read_totalcount, NullTVB,
offset+8, 4, totalcount);
}
offset += 12;
@ -711,11 +711,11 @@ dissect_nfs2_write_call(const u_char *pd, int offset, frame_data *fd, proto_tree
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,
proto_tree_add_uint(tree, hf_nfs_write_beginoffset, NullTVB,
offset+0, 4, beginoffset);
proto_tree_add_item(tree, hf_nfs_write_offset, NullTVB,
proto_tree_add_uint(tree, hf_nfs_write_offset, NullTVB,
offset+4, 4, offset_value);
proto_tree_add_item(tree, hf_nfs_write_totalcount, NullTVB,
proto_tree_add_uint(tree, hf_nfs_write_totalcount, NullTVB,
offset+8, 4, totalcount);
}
offset += 12;
@ -783,9 +783,9 @@ dissect_nfs2_readdir_call(const u_char *pd, int offset, frame_data *fd, proto_tr
cookie = EXTRACT_UINT(pd, offset+ 0);
count = EXTRACT_UINT(pd, offset+ 4);
if (tree) {
proto_tree_add_item(tree, hf_nfs_readdir_cookie, NullTVB,
proto_tree_add_uint(tree, hf_nfs_readdir_cookie, NullTVB,
offset+ 0, 4, cookie);
proto_tree_add_item(tree, hf_nfs_readdir_count, NullTVB,
proto_tree_add_uint(tree, hf_nfs_readdir_count, NullTVB,
offset+ 4, 4, count);
}
offset += 8;
@ -807,7 +807,7 @@ dissect_readdir_entry(const u_char* pd, int offset, frame_data* fd, proto_tree*
if (tree) {
entry_item = proto_tree_add_item(tree, hf_nfs_readdir_entry, NullTVB,
offset+0, END_OF_FRAME, NULL);
offset+0, END_OF_FRAME, FALSE);
if (entry_item)
entry_tree = proto_item_add_subtree(entry_item, ett_nfs_readdir_entry);
}
@ -818,7 +818,7 @@ dissect_readdir_entry(const u_char* pd, int offset, frame_data* fd, proto_tree*
}
fileid = EXTRACT_UINT(pd, offset + 0);
if (entry_tree)
proto_tree_add_item(entry_tree, hf_nfs_readdir_entry_fileid, NullTVB,
proto_tree_add_uint(entry_tree, hf_nfs_readdir_entry_fileid, NullTVB,
offset+0, 4, fileid);
offset += 4;
@ -832,7 +832,7 @@ dissect_readdir_entry(const u_char* pd, int offset, frame_data* fd, proto_tree*
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,
proto_tree_add_uint(entry_tree, hf_nfs_readdir_entry_cookie, NullTVB,
offset+0, 4, cookie);
offset += 4;
@ -858,7 +858,7 @@ dissect_nfs2_readdir_reply(const u_char* pd, int offset, frame_data* fd, proto_t
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,
proto_tree_add_boolean(tree,hf_nfs_readdir_value_follows, NullTVB,
offset+0, 4, value_follows);
offset += 4;
if (value_follows == 1) {
@ -871,7 +871,7 @@ dissect_nfs2_readdir_reply(const u_char* pd, int offset, frame_data* fd, proto_t
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,
proto_tree_add_uint(tree, hf_nfs_readdir_eof, NullTVB,
offset+ 0, 4, eof_value);
offset += 4;
break;
@ -905,15 +905,15 @@ dissect_nfs2_statfs_reply(const u_char* pd, int offset, frame_data* fd, proto_tr
bfree = EXTRACT_UINT(pd, offset+12);
bavail = EXTRACT_UINT(pd, offset+16);
if (tree) {
proto_tree_add_item(tree, hf_nfs_statfs_tsize, NullTVB,
proto_tree_add_uint(tree, hf_nfs_statfs_tsize, NullTVB,
offset+ 0, 4, tsize);
proto_tree_add_item(tree, hf_nfs_statfs_bsize, NullTVB,
proto_tree_add_uint(tree, hf_nfs_statfs_bsize, NullTVB,
offset+ 4, 4, bsize);
proto_tree_add_item(tree, hf_nfs_statfs_blocks, NullTVB,
proto_tree_add_uint(tree, hf_nfs_statfs_blocks, NullTVB,
offset+ 8, 4, blocks);
proto_tree_add_item(tree, hf_nfs_statfs_bfree, NullTVB,
proto_tree_add_uint(tree, hf_nfs_statfs_bfree, NullTVB,
offset+12, 4, bfree);
proto_tree_add_item(tree, hf_nfs_statfs_bavail, NullTVB,
proto_tree_add_uint(tree, hf_nfs_statfs_bavail, NullTVB,
offset+16, 4, bavail);
}
offset += 20;
@ -1219,7 +1219,7 @@ dissect_nfsstat3(const u_char *pd, int offset, frame_data *fd, proto_tree *tree,
nfsstat3 = EXTRACT_UINT(pd, offset+0);
if (tree) {
proto_tree_add_item(tree, hf_nfs_nfsstat3, NullTVB,
proto_tree_add_uint(tree, hf_nfs_nfsstat3, NullTVB,
offset, 4, nfsstat3);
}
@ -1253,7 +1253,7 @@ int hf, guint32* ftype3)
type = EXTRACT_UINT(pd, offset+0);
if (tree) {
proto_tree_add_item(tree, hf, NullTVB, offset, 4, type);
proto_tree_add_uint(tree, hf, NullTVB, offset, 4, type);
}
offset += 4;
@ -2249,7 +2249,7 @@ dissect_stable_how(const u_char* pd, int offset, frame_data* fd, proto_tree* tre
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,
proto_tree_add_uint(tree, hfindex, NullTVB,
offset, 4, stable_how);
}
offset += 4;
@ -2313,7 +2313,7 @@ dissect_createmode3(const u_char* pd, int offset, frame_data* fd, proto_tree* tr
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,
proto_tree_add_uint(tree, hf_nfs_createmode3, NullTVB,
offset+0, 4, mode_value);
}
offset += 4;
@ -2527,7 +2527,7 @@ dissect_entry3(const u_char* pd, int offset, frame_data* fd, proto_tree* tree)
if (tree) {
entry_item = proto_tree_add_item(tree, hf_nfs_readdir_entry, NullTVB,
offset+0, END_OF_FRAME, NULL);
offset+0, END_OF_FRAME, FALSE);
if (entry_item)
entry_tree = proto_item_add_subtree(entry_item, ett_nfs_readdir_entry);
}
@ -2567,7 +2567,7 @@ dissect_nfs3_readdir_reply(const u_char* pd, int offset, frame_data* fd, proto_t
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,
proto_tree_add_boolean(tree,hf_nfs_readdir_value_follows, NullTVB,
offset+0, 4, value_follows);
offset += 4;
if (value_follows == 1) {
@ -2580,7 +2580,7 @@ dissect_nfs3_readdir_reply(const u_char* pd, int offset, frame_data* fd, proto_t
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,
proto_tree_add_uint(tree, hf_nfs_readdir_eof, NullTVB,
offset+ 0, 4, eof_value);
offset += 4;
break;
@ -2618,7 +2618,7 @@ dissect_entryplus3(const u_char* pd, int offset, frame_data* fd, proto_tree* tre
if (tree) {
entry_item = proto_tree_add_item(tree, hf_nfs_readdir_entry, NullTVB,
offset+0, END_OF_FRAME, NULL);
offset+0, END_OF_FRAME, FALSE);
if (entry_item)
entry_tree = proto_item_add_subtree(entry_item, ett_nfs_readdir_entry);
}
@ -2661,7 +2661,7 @@ dissect_nfs3_readdirplus_reply(const u_char* pd, int offset, frame_data* fd, pro
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,
proto_tree_add_boolean(tree,hf_nfs_readdir_value_follows, NullTVB,
offset+0, 4, value_follows);
offset += 4;
if (value_follows == 1) {
@ -2674,7 +2674,7 @@ dissect_nfs3_readdirplus_reply(const u_char* pd, int offset, frame_data* fd, pro
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,
proto_tree_add_uint(tree, hf_nfs_readdir_eof, NullTVB,
offset+ 0, 4, eof_value);
offset += 4;
break;
@ -2707,7 +2707,7 @@ dissect_nfs3_fsstat_reply(const u_char* pd, int offset, frame_data* fd, proto_tr
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,
proto_tree_add_uint(tree, hf_nfs_fsstat_invarsec, NullTVB,
offset+0, 4, invarsec);
offset += 4;
break;
@ -2749,43 +2749,43 @@ dissect_nfs3_fsinfo_reply(const u_char* pd, int offset, frame_data* fd, proto_tr
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,
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_item(tree, hf_nfs_fsinfo_rtpref, NullTVB,
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_item(tree, hf_nfs_fsinfo_rtmult, NullTVB,
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_item(tree, hf_nfs_fsinfo_wtmax, NullTVB,
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_item(tree, hf_nfs_fsinfo_wtpref, NullTVB,
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_item(tree, hf_nfs_fsinfo_wtmult, NullTVB,
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_item(tree, hf_nfs_fsinfo_dtpref, NullTVB,
proto_tree_add_uint(tree, hf_nfs_fsinfo_dtpref, NullTVB,
offset+0, 4, dtpref);
offset += 4;
@ -2794,7 +2794,7 @@ dissect_nfs3_fsinfo_reply(const u_char* pd, int offset, frame_data* fd, proto_tr
if (!BYTES_ARE_IN_FRAME(offset,4)) return offset;
properties = EXTRACT_UINT(pd, offset+0);
if (tree) {
properties_item = proto_tree_add_item(tree,
properties_item = proto_tree_add_uint(tree,
hf_nfs_fsinfo_properties,
NullTVB, offset+0, 4, properties);
if (properties_item)
@ -2855,13 +2855,13 @@ dissect_nfs3_pathconf_reply(const u_char* pd, int offset, frame_data* fd, proto_
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,
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_item(tree, hf_nfs_pathconf_name_max, NullTVB,
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);

View File

@ -2,7 +2,7 @@
* Routines for nntp packet dissection
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
*
* $Id: packet-nntp.c,v 1.9 2000/05/11 08:15:30 gram Exp $
* $Id: packet-nntp.c,v 1.10 2000/05/31 05:07:26 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -84,13 +84,13 @@ dissect_nntp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
if (tree) {
ti = proto_tree_add_item(tree, proto_nntp, NullTVB, offset, END_OF_FRAME, NULL);
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_item_hidden(nntp_tree, hf_nntp_request, NullTVB, 0, 0, TRUE);
proto_tree_add_boolean_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);
proto_tree_add_boolean_hidden(nntp_tree, hf_nntp_response, NullTVB, 0, 0, TRUE);
}
/*

View File

@ -2,7 +2,7 @@
* Routines for NTP packet dissection
* Copyright 1999, Nathan Neulinger <nneul@umr.edu>
*
* $Id: packet-ntp.c,v 1.12 2000/05/11 08:15:30 gram Exp $
* $Id: packet-ntp.c,v 1.13 2000/05/31 05:07:26 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -255,9 +255,9 @@ dissect_ntp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
if (tree) {
/* Adding NTP item and subtree */
ti = proto_tree_add_item(tree, proto_ntp, NullTVB, offset, END_OF_FRAME, NULL);
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_item(ntp_tree, hf_ntp_flags, NullTVB, offset, 1, pkt->flags);
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,9 +368,9 @@ dissect_ntp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
* 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);
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_item(ntp_tree, hf_ntp_mac, NullTVB, offset+52, END_OF_FRAME, pkt->mac);
proto_tree_add_bytes(ntp_tree, hf_ntp_mac, NullTVB, offset+52, END_OF_FRAME, pkt->mac);
}
}

View File

@ -1,7 +1,7 @@
/* packet-null.c
* Routines for null packet disassembly
*
* $Id: packet-null.c,v 1.24 2000/05/25 07:42:24 gram Exp $
* $Id: packet-null.c,v 1.25 2000/05/31 05:07:27 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -272,7 +272,7 @@ dissect_null(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
*/
if (null_header > IEEE_802_3_MAX_LEN) {
if (tree) {
ti = proto_tree_add_item(tree, proto_null, tvb, 0, 4, NULL);
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,9 +281,9 @@ dissect_null(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* 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);
ti = proto_tree_add_item(tree, proto_null, tvb, 0, 4, FALSE);
fh_tree = proto_item_add_subtree(ti, ett_null);
proto_tree_add_item(fh_tree, hf_null_family, tvb, 0, 4, null_header);
proto_tree_add_uint(fh_tree, hf_null_family, tvb, 0, 4, null_header);
}
next_tvb = tvb_new_subset(tvb, 4, -1, -1);

View File

@ -2,7 +2,7 @@
* Routines for OSPF packet disassembly
* (c) Copyright Hannes R. Boehm <hannes@boehm.org>
*
* $Id: packet-ospf.c,v 1.23 2000/05/11 08:15:32 gram Exp $
* $Id: packet-ospf.c,v 1.24 2000/05/31 05:07:28 guy Exp $
*
* At this time, this module is able to analyze OSPF
* packets as specified in RFC2328. MOSPF (RFC1584) and other
@ -111,7 +111,7 @@ dissect_ospf(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
}
if (tree) {
ti = proto_tree_add_item(tree, proto_ospf, NullTVB, offset, ntohs(ospfh.length), NULL);
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");

View File

@ -2,7 +2,7 @@
* Routines for PIM disassembly
* (c) Copyright Jun-ichiro itojun Hagino <itojun@itojun.org>
*
* $Id: packet-pim.c,v 1.13 2000/05/11 08:15:33 gram Exp $
* $Id: packet-pim.c,v 1.14 2000/05/31 05:07:28 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -218,16 +218,16 @@ dissect_pim(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
col_add_fstr(fd, COL_INFO, "%s", typestr);
if (tree) {
ti = proto_tree_add_item(tree, proto_pim, NullTVB, offset, END_OF_FRAME, NULL);
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_item(pim_tree, hf_pim_version, NullTVB, offset, 1,
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_item(pim_tree, hf_pim_cksum, NullTVB,
proto_tree_add_uint(pim_tree, hf_pim_cksum, NullTVB,
offset + offsetof(struct pim, pim_cksum), sizeof(pim.pim_cksum),
ntohs(pim.pim_cksum));

View File

@ -2,7 +2,7 @@
* Routines for pop packet dissection
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
*
* $Id: packet-pop.c,v 1.14 2000/05/11 08:15:33 gram Exp $
* $Id: packet-pop.c,v 1.15 2000/05/31 05:07:29 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -101,11 +101,11 @@ dissect_pop(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
if (tree) {
ti = proto_tree_add_item(tree, proto_pop, NullTVB, offset, END_OF_FRAME, NULL);
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_item_hidden(pop_tree, hf_pop_request, NullTVB, offset, i1, TRUE);
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,7 +113,7 @@ dissect_pop(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
}
else {
proto_tree_add_item_hidden(pop_tree, hf_pop_response, NullTVB, offset, i1, TRUE);
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);

View File

@ -1,7 +1,7 @@
/* packet-portmap.c
* Routines for portmap dissection
*
* $Id: packet-portmap.c,v 1.15 2000/05/11 08:15:34 gram Exp $
* $Id: packet-portmap.c,v 1.16 2000/05/31 05:07:29 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -77,14 +77,14 @@ int dissect_getport_call(const u_char *pd, int offset, frame_data *fd,
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,
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_item(tree, hf_portmap_port, NullTVB,
proto_tree_add_uint(tree, hf_portmap_port, NullTVB,
offset+12, 4, pntohl(&pd[offset+12]));
}
@ -97,7 +97,7 @@ int dissect_getport_reply(const u_char *pd, int offset, frame_data *fd,
if ( !BYTES_ARE_IN_FRAME(offset, 4)) return offset;
if ( tree )
{
proto_tree_add_item(tree, hf_portmap_port, NullTVB,
proto_tree_add_uint(tree, hf_portmap_port, NullTVB,
offset, 4, pntohl(&pd[offset+0]));
}
return offset+=4;
@ -117,14 +117,14 @@ int dissect_set_call(const u_char *pd, int offset, frame_data *fd,
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,
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_item(tree, hf_portmap_port, NullTVB,
proto_tree_add_uint(tree, hf_portmap_port, NullTVB,
offset+12, 4, pntohl(&pd[offset+12]));
}
@ -145,14 +145,14 @@ int dissect_unset_call(const u_char *pd, int offset, frame_data *fd,
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,
proto_tree_add_uint(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,
proto_tree_add_uint(tree, hf_portmap_proto, NullTVB,
offset+8, 4, proto);
proto_tree_add_item(tree, hf_portmap_port, NullTVB,
proto_tree_add_uint(tree, hf_portmap_port, NullTVB,
offset+12, 4, pntohl(&pd[offset+12]));
}
@ -166,7 +166,7 @@ int dissect_set_reply(const u_char *pd, int offset, frame_data *fd,
{
if ( !BYTES_ARE_IN_FRAME(offset, 4)) return offset;
proto_tree_add_item(tree, hf_portmap_answer, NullTVB,
proto_tree_add_boolean(tree, hf_portmap_answer, NullTVB,
offset, 4, pntohl(&pd[offset+0]));
offset += 4;
}
@ -184,7 +184,7 @@ int dissect_dump_reply(const u_char *pd, int offset, frame_data *fd,
value_follows = pntohl(&pd[offset+0]);
if ( tree )
{
proto_tree_add_item(tree, hf_portmap_value_follows, NullTVB,
proto_tree_add_boolean(tree, hf_portmap_value_follows, NullTVB,
offset, 4, value_follows);
}
offset += 4;
@ -209,12 +209,12 @@ int dissect_dump_reply(const u_char *pd, int offset, frame_data *fd,
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,
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_item(subtree, hf_portmap_port, NullTVB,
proto_tree_add_uint(subtree, hf_portmap_port, NullTVB,
offset+12, 4, port);
}
offset += 16;
@ -265,7 +265,7 @@ int dissect_rpcb(const u_char *pd, int offset, frame_data *fd, proto_tree *tree,
if (tree) {
rpcb_item = proto_tree_add_item(tree, hfindex, NullTVB,
offset+0, END_OF_FRAME, NULL);
offset+0, END_OF_FRAME, FALSE);
if (rpcb_item)
rpcb_tree = proto_item_add_subtree(rpcb_item, ett_portmap_rpcb);
}
@ -281,7 +281,7 @@ int dissect_rpcb(const u_char *pd, int offset, frame_data *fd, proto_tree *tree,
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,
proto_tree_add_uint(rpcb_tree, hf_portmap_rpcb_version, NullTVB,
offset+0, 4, version);
offset += 4;
@ -328,7 +328,7 @@ int dissect_rpcb3_dump_reply(const u_char *pd, int offset, frame_data *fd,
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,
proto_tree_add_boolean(tree,hf_portmap_value_follows, NullTVB,
offset+0, 4, value_follows);
offset += 4;
if (value_follows == 1) {

View File

@ -1,7 +1,7 @@
/* packet-ppp.c
* Routines for ppp packet disassembly
*
* $Id: packet-ppp.c,v 1.35 2000/05/25 07:42:25 gram Exp $
* $Id: packet-ppp.c,v 1.36 2000/05/31 05:07:29 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -1069,7 +1069,7 @@ dissect_mp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
flag_str = "Unknown";
break;
}
ti = proto_tree_add_item(tree, proto_mp, tvb, 0, 4, NULL);
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,14 +1083,14 @@ dissect_mp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
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);
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, NULL);
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,7 +1106,7 @@ dissect_payload_ppp( const u_char *pd, int offset, frame_data *fd, proto_tree *t
/* 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);
ti = proto_tree_add_item(tree, proto_ppp, NullTVB, 0+offset, 2, FALSE);
fh_tree = proto_item_add_subtree(ti, ett_ppp);
}
@ -1151,7 +1151,7 @@ dissect_ppp( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree ) {
/* 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);
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);

View File

@ -2,7 +2,7 @@
* Routines for Q.2931 frame disassembly
* Guy Harris <guy@alum.mit.edu>
*
* $Id: packet-q2931.c,v 1.9 2000/05/29 08:57:37 guy Exp $
* $Id: packet-q2931.c,v 1.10 2000/05/31 05:07:30 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -1995,21 +1995,21 @@ dissect_q2931(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (tree) {
ti = proto_tree_add_item(tree, proto_q2931, tvb, offset,
tvb_length(tvb), NULL);
tvb_length(tvb), FALSE);
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));
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_item(q2931_tree, hf_q2931_call_ref_len, tvb, offset, 1, call_ref_len);
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_item(q2931_tree, hf_q2931_call_ref, tvb, offset, call_ref_len, call_ref);
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,18 +2019,18 @@ dissect_q2931(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
"Unknown message type (0x%02X)"));
}
if (q2931_tree != NULL)
proto_tree_add_item(q2931_tree, hf_q2931_message_type, tvb, offset, 1, message_type);
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_item(q2931_tree, hf_q2931_message_type_ext, tvb,
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_item(ext_tree, hf_q2931_message_flag, tvb,
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_item(ext_tree, hf_q2931_message_action_indicator, tvb,
proto_tree_add_uint(ext_tree, hf_q2931_message_action_indicator, tvb,
offset, 1, message_type_ext);
}
}
@ -2038,7 +2038,7 @@ dissect_q2931(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
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);
proto_tree_add_uint(q2931_tree, hf_q2931_message_len, tvb, offset, 2, message_len);
offset += 2;
/*

View File

@ -2,7 +2,7 @@
* Routines for Q.931 frame disassembly
* Guy Harris <guy@alum.mit.edu>
*
* $Id: packet-q931.c,v 1.15 2000/05/29 08:57:38 guy Exp $
* $Id: packet-q931.c,v 1.16 2000/05/31 05:07:31 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -2074,21 +2074,21 @@ dissect_q931(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (tree) {
ti = proto_tree_add_item(tree, proto_q931, tvb, offset,
END_OF_FRAME, NULL);
tvb_length(tvb), FALSE);
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));
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_item(q931_tree, hf_q931_call_ref_len, tvb, offset, 1, call_ref_len);
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_item(q931_tree, hf_q931_call_ref, tvb, offset, call_ref_len, call_ref);
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,7 +2098,7 @@ dissect_q931(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
"Unknown message type (0x%02X)"));
}
if (q931_tree != NULL)
proto_tree_add_item(q931_tree, hf_q931_message_type, tvb, offset, 1, message_type);
proto_tree_add_uint(q931_tree, hf_q931_message_type, tvb, offset, 1, message_type);
offset += 1;
/*

View File

@ -1,7 +1,7 @@
/* packet-radius.c
* Routines for RADIUS packet disassembly
*
* $Id: packet-radius.c,v 1.12 2000/05/11 08:15:40 gram Exp $
* $Id: packet-radius.c,v 1.13 2000/05/31 05:07:33 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Johan Feyaerts
@ -704,7 +704,7 @@ proto_tree
{
ti = proto_tree_add_item(tree,proto_radius, NullTVB, offset, rhlength,
NULL);
FALSE);
radius_tree = proto_item_add_subtree(ti, ett_radius);

View File

@ -2,7 +2,7 @@
* Routines for RIPv1 and RIPv2 packet disassembly
* (c) Copyright Hannes R. Boehm <hannes@boehm.org>
*
* $Id: packet-rip.c,v 1.15 2000/05/11 08:15:40 gram Exp $
* $Id: packet-rip.c,v 1.16 2000/05/31 05:07:34 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -97,7 +97,7 @@ dissect_rip(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
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);
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]);

View File

@ -3,7 +3,7 @@
* (c) Copyright Jun-ichiro itojun Hagino <itojun@itojun.org>
* derived from packet-rip.c
*
* $Id: packet-ripng.c,v 1.11 2000/05/17 04:09:32 gram Exp $
* $Id: packet-ripng.c,v 1.12 2000/05/31 05:07:34 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -78,13 +78,13 @@ dissect_ripng(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
col_add_fstr(fd, COL_INFO, "%s", cmd);
if (tree) {
ti = proto_tree_add_item(tree, proto_ripng, NullTVB, offset, END_OF_FRAME, NULL);
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_item(ripng_tree, hf_ripng_version, NullTVB, offset + 1, 1,
proto_tree_add_uint(ripng_tree, hf_ripng_version, NullTVB, offset + 1, 1,
rip6.rip6_vers);
offset += 4;

View File

@ -2,7 +2,7 @@
* Routines for unix rlogin packet dissection
* Copyright 2000, Jeffrey C. Foster <jfoste@woodward.com>
*
* $Id: packet-rlogin.c,v 1.2 2000/05/11 08:15:41 gram Exp $
* $Id: packet-rlogin.c,v 1.3 2000/05/31 05:07:34 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -211,7 +211,7 @@ static void rlogin_display( rlogin_hash_entry_t *hash_info, const u_char *pd,
proto_item *user_info_item, *window_info_item;
ti = proto_tree_add_item( tree, proto_rlogin, NullTVB, offset,
END_OF_FRAME, NULL, "Rlogin:" );
END_OF_FRAME, FALSE);
rlogin_tree = proto_item_add_subtree(ti, ett_rlogin);
@ -252,7 +252,7 @@ static void rlogin_display( rlogin_hash_entry_t *hash_info, const u_char *pd,
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 );
offset, END_OF_FRAME, FALSE);
str = &pd[ offset]; /* do server user name */
@ -297,7 +297,7 @@ static void rlogin_display( rlogin_hash_entry_t *hash_info, const u_char *pd,
CHECK_PACKET_LENGTH( 12);
window_info_item = proto_tree_add_item( rlogin_tree,
hf_window_info, NullTVB, offset, 12, NULL );
hf_window_info, NullTVB, offset, 12, FALSE );
window_tree = proto_item_add_subtree( window_info_item,
ett_rlogin_window);
@ -313,22 +313,22 @@ static void rlogin_display( rlogin_hash_entry_t *hash_info, const u_char *pd,
offset += 2;
CHECK_PACKET_LENGTH( 2);
proto_tree_add_item( window_tree, hf_window_info_rows, NullTVB, offset,
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_item( window_tree, hf_window_info_cols, NullTVB, offset,
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_item( window_tree, hf_window_info_x_pixels, NullTVB,
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_item( window_tree, hf_window_info_y_pixels, NullTVB,
proto_tree_add_uint( window_tree, hf_window_info_y_pixels, NullTVB,
offset, 2, pntohs( &pd[offset]) );
offset += 2;
}

View File

@ -2,7 +2,7 @@
* Routines for rpc dissection
* Copyright 1999, Uwe Girlich <Uwe.Girlich@philosys.de>
*
* $Id: packet-rpc.c,v 1.30 2000/05/11 08:15:41 gram Exp $
* $Id: packet-rpc.c,v 1.31 2000/05/31 05:07:35 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -338,7 +338,7 @@ int hfindex)
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);
proto_tree_add_boolean(tree, hfindex, NullTVB, offset, 4, value);
offset += 4;
return offset;
@ -499,7 +499,7 @@ dissect_rpc_opaque_data(const u_char *pd, int offset, frame_data *fd,
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,
proto_tree_add_string_hidden(tree, hfindex, NullTVB, offset+4,
string_length_copy, string_buffer);
}
if (string_item) {
@ -585,7 +585,7 @@ dissect_rpc_list(const u_char *pd, int offset, frame_data *fd,
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,
proto_tree_add_boolean(tree,hf_rpc_value_follows, NullTVB,
offset+0, 4, value_follows);
offset += 4;
if (value_follows == 1) {
@ -615,9 +615,9 @@ dissect_rpc_auth( const u_char *pd, int offset, frame_data *fd, proto_tree *tree
/* 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,
proto_tree_add_uint(tree, hf_rpc_auth_flavor, NullTVB, offset+0, 4,
flavor);
proto_tree_add_item(tree, hf_rpc_auth_length, NullTVB, offset+4, 4,
proto_tree_add_uint(tree, hf_rpc_auth_length, NullTVB, offset+4, 4,
length);
}
@ -637,7 +637,7 @@ dissect_rpc_auth( const u_char *pd, int offset, frame_data *fd, proto_tree *tree
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,
proto_tree_add_uint(tree, hf_rpc_auth_stamp, NullTVB,
offset+0, 4, stamp);
offset += 4;
@ -647,14 +647,14 @@ dissect_rpc_auth( const u_char *pd, int offset, frame_data *fd, proto_tree *tree
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,
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_item(tree, hf_rpc_auth_gid, NullTVB,
proto_tree_add_uint(tree, hf_rpc_auth_gid, NullTVB,
offset+0, 4, gid);
offset += 4;
@ -670,7 +670,7 @@ dissect_rpc_auth( const u_char *pd, int offset, frame_data *fd, proto_tree *tree
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,
proto_tree_add_uint(gtree, hf_rpc_auth_gid, NullTVB,
offset, 4, gids_entry);
offset+=4;
}
@ -882,16 +882,16 @@ dissect_rpc( const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
col_add_str(fd, COL_PROTOCOL, "RPC");
if (tree) {
rpc_item = proto_tree_add_item(tree, proto_rpc, NullTVB, offset, END_OF_FRAME, NULL);
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_item(rpc_tree,hf_rpc_lastfrag, NullTVB,
proto_tree_add_boolean(rpc_tree,hf_rpc_lastfrag, NullTVB,
offset-4, 4, (rpc_rm >> 31) & 0x1);
proto_tree_add_item(rpc_tree,hf_rpc_fraglen, NullTVB,
proto_tree_add_uint(rpc_tree,hf_rpc_fraglen, NullTVB,
offset-4, 4, rpc_rm & RPC_RM_FRAGLEN);
}
@ -903,7 +903,7 @@ dissect_rpc( const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
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,
proto_tree_add_uint(rpc_tree, hf_rpc_msgtype, NullTVB,
offset+4, 4, msg_type);
}
@ -918,7 +918,7 @@ dissect_rpc( const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
rpcvers = EXTRACT_UINT(pd,offset+0);
if (rpc_tree) {
proto_tree_add_item(rpc_tree,
proto_tree_add_uint(rpc_tree,
hf_rpc_version, NullTVB, offset+0, 4, rpcvers);
}
@ -940,7 +940,7 @@ dissect_rpc( const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
return TRUE;
vers = EXTRACT_UINT(pd,offset+8);
if (rpc_tree) {
proto_tree_add_item(rpc_tree,
proto_tree_add_uint(rpc_tree,
hf_rpc_programversion, NullTVB, offset+8, 4, vers);
}
@ -1003,9 +1003,9 @@ dissect_rpc( const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
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,
proto_tree_add_uint_hidden(rpc_tree,
hf_rpc_dup, NullTVB, 0,0, xid);
proto_tree_add_item_hidden(rpc_tree,
proto_tree_add_uint_hidden(rpc_tree,
hf_rpc_call_dup, NullTVB, 0,0, xid);
}
}
@ -1085,7 +1085,7 @@ dissect_rpc( const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
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,
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,9 +1096,9 @@ dissect_rpc( const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
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,
proto_tree_add_uint_hidden(rpc_tree,
hf_rpc_dup, NullTVB, 0,0, xid);
proto_tree_add_item_hidden(rpc_tree,
proto_tree_add_uint_hidden(rpc_tree,
hf_rpc_reply_dup, NullTVB, 0,0, xid);
}
}
@ -1108,7 +1108,7 @@ dissect_rpc( const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
return TRUE;
reply_state = EXTRACT_UINT(pd,offset+0);
if (rpc_tree) {
proto_tree_add_item(rpc_tree, hf_rpc_state_reply, NullTVB,
proto_tree_add_uint(rpc_tree, hf_rpc_state_reply, NullTVB,
offset+0, 4, reply_state);
}
offset += 4;
@ -1119,7 +1119,7 @@ dissect_rpc( const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
return TRUE;
accept_state = EXTRACT_UINT(pd,offset+0);
if (rpc_tree) {
proto_tree_add_item(rpc_tree, hf_rpc_state_accept, NullTVB,
proto_tree_add_uint(rpc_tree, hf_rpc_state_accept, NullTVB,
offset+0, 4, accept_state);
}
offset += 4;
@ -1134,10 +1134,10 @@ dissect_rpc( const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
vers_low = EXTRACT_UINT(pd,offset+0);
vers_high = EXTRACT_UINT(pd,offset+4);
if (rpc_tree) {
proto_tree_add_item(rpc_tree,
proto_tree_add_uint(rpc_tree,
hf_rpc_programversion_min,
NullTVB, offset+0, 4, vers_low);
proto_tree_add_item(rpc_tree,
proto_tree_add_uint(rpc_tree,
hf_rpc_programversion_max,
NullTVB, offset+4, 4, vers_high);
}
@ -1152,7 +1152,7 @@ dissect_rpc( const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
return TRUE;
reject_state = EXTRACT_UINT(pd,offset+0);
if (rpc_tree) {
proto_tree_add_item(rpc_tree,
proto_tree_add_uint(rpc_tree,
hf_rpc_state_reject, NullTVB, offset+0, 4,
reject_state);
}
@ -1164,10 +1164,10 @@ dissect_rpc( const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
vers_low = EXTRACT_UINT(pd,offset+0);
vers_high = EXTRACT_UINT(pd,offset+4);
if (rpc_tree) {
proto_tree_add_item(rpc_tree,
proto_tree_add_uint(rpc_tree,
hf_rpc_version_min,
NullTVB, offset+0, 4, vers_low);
proto_tree_add_item(rpc_tree,
proto_tree_add_uint(rpc_tree,
hf_rpc_version_max,
NullTVB, offset+4, 4, vers_high);
}
@ -1177,7 +1177,7 @@ dissect_rpc( const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
return TRUE;
auth_state = EXTRACT_UINT(pd,offset+0);
if (rpc_tree) {
proto_tree_add_item(rpc_tree,
proto_tree_add_uint(rpc_tree,
hf_rpc_state_auth, NullTVB, offset+0, 4,
auth_state);
}
@ -1196,13 +1196,13 @@ dissect_rpc_prog:
/* create here the program specific sub-tree */
if (tree) {
pitem = proto_tree_add_item(tree, proto, NullTVB, offset, END_OF_FRAME);
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_item(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,

View File

@ -3,7 +3,7 @@
*
* (c) Copyright Ashok Narayanan <ashokn@cisco.com>
*
* $Id: packet-rsvp.c,v 1.21 2000/05/11 08:15:41 gram Exp $
* $Id: packet-rsvp.c,v 1.22 2000/05/31 05:07:36 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -857,7 +857,7 @@ dissect_rsvp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
if (tree) {
msg_length = pntohs(pd+offset+6);
ti = proto_tree_add_item(tree, proto_rsvp, NullTVB, offset, msg_length, NULL);
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,14 +868,14 @@ dissect_rsvp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
(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,
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(rsvp_header_tree, rsvp_filter[RSVPF_MSG + hdr->message_type], NullTVB,
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,9 +896,9 @@ dissect_rsvp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
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,
ti = proto_tree_add_uint_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,
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,14 +917,14 @@ dissect_rsvp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
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,
proto_tree_add_ipv4(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,
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_item(rsvp_object_tree, rsvp_filter[RSVPF_SESSION_PORT], NullTVB,
proto_tree_add_uint(rsvp_object_tree, rsvp_filter[RSVPF_SESSION_PORT], NullTVB,
offset2+6, 2, pntohs(pd+offset2+6));
break;
}
@ -950,10 +950,10 @@ dissect_rsvp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
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,
proto_tree_add_ipv4(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,
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,7 +961,7 @@ dissect_rsvp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
"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,
proto_tree_add_uint_hidden(rsvp_object_tree, rsvp_filter[RSVPF_SESSION_EXT_TUNNEL_ID], NullTVB,
offset2+8, 4, ip_addr);
break;
}
@ -1253,10 +1253,10 @@ dissect_rsvp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
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,
proto_tree_add_ipv4(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,
proto_tree_add_uint(rsvp_object_tree, rsvp_filter[RSVPF_SENDER_PORT], NullTVB,
offset2+6, 2, pntohs(pd+offset2+6));
break;
}
@ -1277,10 +1277,10 @@ dissect_rsvp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
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,
proto_tree_add_ipv4(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,
proto_tree_add_uint(rsvp_object_tree, rsvp_filter[RSVPF_SENDER_LSP_ID], NullTVB,
offset2+6, 2, pntohs(pd+offset2+6));
break;
}

View File

@ -3,7 +3,7 @@
*
* Jason Lango <jal@netapp.com>
*
* $Id: packet-rtcp.c,v 1.2 2000/05/11 08:15:42 gram Exp $
* $Id: packet-rtcp.c,v 1.3 2000/05/31 05:07:37 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -342,7 +342,7 @@ dissect_one_rtcp(const u_char *pd, int offset, frame_data *fd,
start_packet = offset;
end_offset = offset + END_OF_FRAME;
ti = proto_tree_add_item(tree, proto_rtcp, NullTVB, offset, END_OF_FRAME, NULL);
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) ?

View File

@ -3,7 +3,7 @@
*
* Jason Lango <jal@netapp.com>
*
* $Id: packet-rtp.c,v 1.3 2000/05/11 08:15:43 gram Exp $
* $Id: packet-rtp.c,v 1.4 2000/05/31 05:07:37 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -108,7 +108,7 @@ dissect_rtp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
if (tree) {
ti = proto_tree_add_item(tree, proto_rtp, NullTVB, offset, END_OF_FRAME,
NULL);
FALSE);
rtp_tree = proto_item_add_subtree(ti, ett_rtp);
}

View File

@ -4,7 +4,7 @@
* Jason Lango <jal@netapp.com>
* Liberally copied from packet-http.c, by Guy Harris <guy@alum.mit.edu>
*
* $Id: packet-rtsp.c,v 1.13 2000/05/11 08:15:43 gram Exp $
* $Id: packet-rtsp.c,v 1.14 2000/05/31 05:07:37 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -154,7 +154,7 @@ static void dissect_rtsp(const u_char *pd, int offset, frame_data *fd,
rtsp_tree = NULL;
if (tree) {
ti = proto_tree_add_item(tree, proto_rtsp, NullTVB, offset,
END_OF_FRAME, NULL);
END_OF_FRAME, FALSE);
rtsp_tree = proto_item_add_subtree(ti, ett_rtsp);
}
@ -318,7 +318,7 @@ process_rtsp_request_or_reply(const u_char *data, int offset, int linelen,
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,
proto_tree_add_uint_hidden(tree, hf_rtsp_status, NullTVB,
offset + (status_start - data),
status - status_start, status_i);
}
@ -340,7 +340,7 @@ process_rtsp_request_or_reply(const u_char *data, int offset, int linelen,
u_char *tmp_url;
/* method name */
proto_tree_add_item_hidden(tree, hf_rtsp_method, NullTVB, offset,
proto_tree_add_string_hidden(tree, hf_rtsp_method, NullTVB, offset,
strlen(rtsp_methods[ii]), rtsp_methods[ii]);
/* URL */
@ -355,7 +355,7 @@ process_rtsp_request_or_reply(const u_char *data, int offset, int linelen,
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,
proto_tree_add_string_hidden(tree, hf_rtsp_url, NullTVB,
offset + (url_start - data), url - url_start, tmp_url);
g_free(tmp_url);
}

View File

@ -4,7 +4,7 @@
* Based on routines from tcpdump patches by
* Ken Hornstein <kenh@cmf.nrl.navy.mil>
*
* $Id: packet-rx.c,v 1.11 2000/05/11 08:15:43 gram Exp $
* $Id: packet-rx.c,v 1.12 2000/05/31 05:07:38 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -119,41 +119,41 @@ dissect_rx(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
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,
proto_tree_add_uint(rx_tree, hf_rx_epoch, NullTVB,
offset, 4, pntohl(&rxh->epoch));
proto_tree_add_item(rx_tree, hf_rx_cid, NullTVB,
proto_tree_add_uint(rx_tree, hf_rx_cid, NullTVB,
offset+4, 4, pntohl(&rxh->cid));
proto_tree_add_item(rx_tree, hf_rx_callnumber, NullTVB,
proto_tree_add_uint(rx_tree, hf_rx_callnumber, NullTVB,
offset+8, 4, pntohl(&rxh->callNumber));
proto_tree_add_item(rx_tree, hf_rx_seq, NullTVB,
proto_tree_add_uint(rx_tree, hf_rx_seq, NullTVB,
offset+12, 4, pntohl(&rxh->seq));
proto_tree_add_item(rx_tree, hf_rx_serial, NullTVB,
proto_tree_add_uint(rx_tree, hf_rx_serial, NullTVB,
offset+16, 4, pntohl(&rxh->serial));
proto_tree_add_item(rx_tree, hf_rx_type, NullTVB,
proto_tree_add_uint(rx_tree, hf_rx_type, NullTVB,
offset+20, 1, rxh->type);
rx_flags = proto_tree_add_item(rx_tree, hf_rx_flags, NullTVB,
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_item(rx_tree_flags, hf_rx_flags_free_packet, NullTVB,
proto_tree_add_uint(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,
proto_tree_add_uint(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,
proto_tree_add_uint(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,
proto_tree_add_uint(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,
proto_tree_add_uint(rx_tree_flags, hf_rx_flags_clientinit, NullTVB,
offset+21, 1, rxh->flags);
proto_tree_add_item(rx_tree, hf_rx_userstatus, NullTVB,
proto_tree_add_uint(rx_tree, hf_rx_userstatus, NullTVB,
offset+22, 1, rxh->userStatus);
proto_tree_add_item(rx_tree, hf_rx_securityindex, NullTVB,
proto_tree_add_uint(rx_tree, hf_rx_securityindex, NullTVB,
offset+23, 1, rxh->securityIndex);
proto_tree_add_item(rx_tree, hf_rx_spare, NullTVB,
proto_tree_add_uint(rx_tree, hf_rx_spare, NullTVB,
offset+24, 2, pntohs(&rxh->spare));
proto_tree_add_item(rx_tree, hf_rx_serviceid, NullTVB,
proto_tree_add_uint(rx_tree, hf_rx_serviceid, NullTVB,
offset+26, 2, pntohs(&rxh->serviceId));
}

View File

@ -4,7 +4,7 @@
*
* Heikki Vatiainen <hessu@cs.tut.fi>
*
* $Id: packet-sap.c,v 1.7 2000/05/11 08:15:43 gram Exp $
* $Id: packet-sap.c,v 1.8 2000/05/31 05:07:39 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -154,17 +154,17 @@ dissect_sap(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
}
if (tree) {
si = proto_tree_add_item(tree, proto_sap, NullTVB, offset, END_OF_FRAME, NULL);
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_item(sap_tree, hf_sap_flags, NullTVB, offset, 1, pd[offset]);
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_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]);
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,14 +189,14 @@ dissect_sap(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
auth_data_len = auth_len * sizeof(guint32);
sdi = proto_tree_add_item(sap_tree, hf_auth_data, NullTVB, offset, auth_data_len, pd[offset]);
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_item(sa_tree, hf_auth_flags, NullTVB, offset, 1, pd[offset]);
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_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]);
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);

View File

@ -4,7 +4,7 @@
* Jason Lango <jal@netapp.com>
* Liberally copied from packet-http.c, by Guy Harris <guy@alum.mit.edu>
*
* $Id: packet-sdp.c,v 1.7 2000/05/11 08:15:43 gram Exp $
* $Id: packet-sdp.c,v 1.8 2000/05/31 05:07:40 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -72,7 +72,7 @@ void dissect_sdp(const u_char *pd, int offset, frame_data *fd,
if (!tree)
return;
ti = proto_tree_add_item(tree, proto_sdp, NullTVB, offset, END_OF_FRAME, NULL);
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;

View File

@ -2,7 +2,7 @@
* Routines for smb packet dissection
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
*
* $Id: packet-smb-browse.c,v 1.3 2000/05/11 08:15:44 gram Exp $
* $Id: packet-smb-browse.c,v 1.4 2000/05/31 05:07:40 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -167,7 +167,7 @@ dissect_mailslot_browse(const u_char *pd, int offset, frame_data *fd, proto_tree
if (tree) { /* Add the browse tree */
ti = proto_tree_add_item(parent, proto_smb_browse, NullTVB, DataOffset, DataCount, NULL);
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]);

View File

@ -2,7 +2,7 @@
* Routines for smb net logon packet dissection
* Copyright 2000, Jeffrey C. Foster <jfoste@woodward.com>
*
* $Id: packet-smb-logon.c,v 1.4 2000/05/11 08:15:45 gram Exp $
* $Id: packet-smb-logon.c,v 1.5 2000/05/31 05:07:41 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -531,7 +531,7 @@ static void (*dissect_smb_logon_cmds[])(const u_char *, int, frame_data *,
if (tree) {
ti = proto_tree_add_item( parent, proto_smb_logon, NullTVB, offset,
END_OF_FRAME, NULL);
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,

View File

@ -2,7 +2,7 @@
* Routines for smb mailslot packet dissection
* Copyright 2000, Jeffrey C. Foster <jfoste@woodward.com>
*
* $Id: packet-smb-mailslot.c,v 1.4 2000/05/11 08:15:45 gram Exp $
* $Id: packet-smb-mailslot.c,v 1.5 2000/05/31 05:07:41 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -92,7 +92,7 @@ dissect_mailslot_smb(const u_char *pd, int offset, frame_data *fd,
if (tree) {
ti = proto_tree_add_item( parent, proto_smb_msp, NullTVB, offset,
END_OF_FRAME, NULL);
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)",

View File

@ -2,7 +2,7 @@
* Routines for smb packet dissection
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
*
* $Id: packet-smb-pipe.c,v 1.8 2000/05/14 20:50:03 guy Exp $
* $Id: packet-smb-pipe.c,v 1.9 2000/05/31 05:07:41 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -593,7 +593,7 @@ dissect_pipe_lanman(const u_char *pd, int offset, frame_data *fd,
if (tree) {
ti = proto_tree_add_item(parent, proto_smb_lanman, NullTVB, SMB_offset + ParameterOffset, ParameterCount, NULL);
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,7 +666,7 @@ dissect_pipe_lanman(const u_char *pd, int offset, frame_data *fd,
if (tree) {
ti = proto_tree_add_item(parent, proto_smb_lanman, NullTVB, SMB_offset + ParameterOffset, ParameterCount, NULL);
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,7 +762,7 @@ dissect_pipe_lanman(const u_char *pd, int offset, frame_data *fd,
if (tree) {
ti = proto_tree_add_item(parent, proto_smb_lanman, NullTVB, SMB_offset + ParameterOffset, ParameterCount, NULL);
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,7 +851,7 @@ dissect_pipe_lanman(const u_char *pd, int offset, frame_data *fd,
if (tree) {
ti = proto_tree_add_item(parent, proto_smb_lanman, NullTVB, SMB_offset + DataOffset, END_OF_FRAME, NULL);
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,7 +878,7 @@ dissect_pipe_lanman(const u_char *pd, int offset, frame_data *fd,
if (tree) {
ti = proto_tree_add_item(parent, proto_smb_lanman, NullTVB, SMB_offset + ParameterOffset, END_OF_FRAME, NULL);
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,7 +1003,7 @@ dissect_pipe_lanman(const u_char *pd, int offset, frame_data *fd,
if (tree) {
ti = proto_tree_add_item(parent, proto_smb_lanman, NullTVB, SMB_offset + ParameterOffset, END_OF_FRAME, NULL);
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,7 +1166,7 @@ dissect_pipe_lanman(const u_char *pd, int offset, frame_data *fd,
if (tree) {
ti = proto_tree_add_item(parent, proto_smb_lanman, NullTVB, SMB_offset + ParameterOffset, END_OF_FRAME, NULL);
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);

View File

@ -2,7 +2,7 @@
* Routines for smb packet dissection
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
*
* $Id: packet-smb.c,v 1.67 2000/05/25 08:38:54 guy Exp $
* $Id: packet-smb.c,v 1.68 2000/05/31 05:07:42 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -10351,7 +10351,7 @@ dissect_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *tree, int
if (tree) {
ti = proto_tree_add_item(tree, proto_smb, NullTVB, offset, END_OF_FRAME, NULL);
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

View File

@ -2,7 +2,7 @@
* Routines for SNA
* Gilbert Ramirez <gram@xiexie.org>
*
* $Id: packet-sna.c,v 1.15 2000/05/11 08:15:48 gram Exp $
* $Id: packet-sna.c,v 1.16 2000/05/31 05:07:44 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -332,13 +332,13 @@ dissect_sna(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
/* Don't bother setting length. We'll set it later after we find
* the lengths of TH/RH/RU */
sna_ti = proto_tree_add_item(tree, proto_sna, NullTVB, offset, 0, NULL);
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, NULL);
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,7 +375,7 @@ dissect_sna(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
/* --- RH --- */
if (BYTES_ARE_IN_FRAME(offset, 3)) {
rh_ti = proto_tree_add_item(sna_tree, hf_sna_rh, NullTVB, offset, 3, NULL);
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,18 +432,18 @@ dissect_fid0_1 (const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
}
/* Create the bitfield tree */
bf_item = proto_tree_add_item(tree, hf_sna_th_0, NullTVB, offset, 1, th_0);
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_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_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_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);
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,13 +482,13 @@ dissect_fid2 (const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
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_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_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);
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,7 +496,7 @@ dissect_fid2 (const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
"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);
proto_tree_add_uint(tree, hf_sna_th_snf , NullTVB,offset+4, 2, snf);
return bytes_in_header;
}
@ -524,14 +524,14 @@ dissect_fid3 (const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
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_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_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_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_item(tree, hf_sna_th_lsid , NullTVB,offset+1, 1, lsid);
proto_tree_add_uint(tree, hf_sna_th_lsid , NullTVB,offset+1, 1, lsid);
return bytes_in_header;
}
@ -601,15 +601,15 @@ dissect_fid4 (const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
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_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_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);
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,9 +619,9 @@ dissect_fid4 (const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
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);
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,13 +633,13 @@ dissect_fid4 (const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
/* 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);
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_item(bf_tree, hf_sna_th_iern, NullTVB, offset, 1, th_byte);
proto_tree_add_uint(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);
proto_tree_add_uint(bf_tree, hf_sna_th_ern, NullTVB, offset, 1, th_byte);
offset += 1;
th_byte = pd[offset];
@ -649,8 +649,8 @@ dissect_fid4 (const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
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);
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,12 +660,12 @@ dissect_fid4 (const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
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);
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_item(bf_tree, hf_sna_th_tg_snf, NullTVB, offset, 2, th_word);
proto_tree_add_uint(bf_tree, hf_sna_th_tg_snf, NullTVB, offset, 2, th_word);
offset += 2;
th_word = pntohs(&pd[offset]);
@ -675,23 +675,23 @@ dissect_fid4 (const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
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);
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_item(bf_tree, hf_sna_th_vr_snf_send, NullTVB, offset, 2, th_word);
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_item(tree, hf_sna_th_dsaf, NullTVB, offset, 4, dsaf);
proto_tree_add_uint(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);
proto_tree_add_uint(tree, hf_sna_th_osaf, NullTVB, offset, 4, osaf);
offset += 4;
th_byte = pd[offset];
@ -701,22 +701,22 @@ dissect_fid4 (const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
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);
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_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);
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_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);
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,17 +744,17 @@ dissect_fid5 (const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
}
/* Create the bitfield tree */
bf_item = proto_tree_add_item(tree, hf_sna_th_0, NullTVB, offset, 1, th_0);
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_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_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_item(tree, hf_sna_th_snf, NullTVB, offset+2, 2, snf);
proto_tree_add_uint(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]);
proto_tree_add_bytes(tree, hf_sna_th_sa, NullTVB, offset+4, 8, &pd[offset+4]);
return bytes_in_header;
@ -788,19 +788,19 @@ dissect_fidf (const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
}
/* Create the bitfield tree */
bf_item = proto_tree_add_item(tree, hf_sna_th_0, NullTVB, offset, 1, th_0);
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_item(bf_tree, hf_sna_th_fid, NullTVB, offset, 1, th_0);
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_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_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_item(tree, hf_sna_th_dcf, NullTVB, offset+24, 8, dcf);
proto_tree_add_uint(tree, hf_sna_th_dcf, NullTVB, offset+24, 8, dcf);
return bytes_in_header;
}
@ -822,56 +822,56 @@ dissect_rh (const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
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_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_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);
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_item(tree, hf_sna_rh_1, NullTVB, offset, 1, rh_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_item(bf_tree, hf_sna_rh_dr1, NullTVB, offset, 1, rh_1);
proto_tree_add_boolean(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_boolean(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);
proto_tree_add_boolean(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);
proto_tree_add_boolean(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_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_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);
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_item(tree, hf_sna_rh_2, NullTVB, offset, 1, rh_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_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);
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 */

View File

@ -2,7 +2,7 @@
* Routines for SNMP (simple network management protocol)
* D.Jorand (c) 1998
*
* $Id: packet-snmp.c,v 1.35 2000/05/30 03:35:54 guy Exp $
* $Id: packet-snmp.c,v 1.36 2000/05/31 05:07:46 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -1217,7 +1217,7 @@ dissect_snmp_pdu(const u_char *pd, int offset, frame_data *fd,
if (tree) {
item = proto_tree_add_item(tree, proto, NullTVB, offset,
END_OF_FRAME, NULL);
END_OF_FRAME, FALSE);
snmp_tree = proto_item_add_subtree(item, ett);
}
@ -1325,11 +1325,11 @@ dissect_snmp_pdu(const u_char *pd, int offset, frame_data *fd,
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,
proto_tree_add_boolean(flags_tree, hf_snmpv3_flags_report,
NullTVB, offset, length, msgflags[0]);
proto_tree_add_item(flags_tree, hf_snmpv3_flags_crypt,
proto_tree_add_boolean(flags_tree, hf_snmpv3_flags_crypt,
NullTVB, offset, length, msgflags[0]);
proto_tree_add_item(flags_tree, hf_snmpv3_flags_auth,
proto_tree_add_boolean(flags_tree, hf_snmpv3_flags_auth,
NullTVB, offset, length, msgflags[0]);
}
encrypted = msgflags[0] & TH_CRYPT;
@ -1610,7 +1610,7 @@ dissect_smux_pdu(const u_char *pd, int offset, frame_data *fd,
if (tree) {
item = proto_tree_add_item(tree, proto, NullTVB, offset,
END_OF_FRAME, NULL);
END_OF_FRAME, FALSE);
smux_tree = proto_item_add_subtree(item, ett);
}

View File

@ -2,7 +2,7 @@
* Routines for socks versions 4 &5 packet dissection
* Copyright 2000, Jeffrey C. Foster <jfoste@woodward.com>
*
* $Id: packet-socks.c,v 1.4 2000/05/11 08:15:49 gram Exp $
* $Id: packet-socks.c,v 1.5 2000/05/31 05:07:48 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -308,7 +308,7 @@ static int display_address( const u_char *pd, int offset,
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,
proto_tree_add_ipv4( tree, hf_socks_ip_dst, NullTVB, offset,
4, GWORD( pd, offset));
offset += 4;
}
@ -321,8 +321,8 @@ static int display_address( const u_char *pd, int offset,
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));
proto_tree_add_ipv6( tree, hf_socks_ip6_dst, NullTVB, offset,
4, &pd[offset]);
offset += 16;
}
@ -385,8 +385,8 @@ static void socks_udp_dissector( const u_char *pd, int offset, frame_data *fd,
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:" );
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,7 +403,7 @@ static void socks_udp_dissector( const u_char *pd, int offset, frame_data *fd,
hash_info->udp_remote_port = pntohs( &pd[ offset]);
CHECK_PACKET_LENGTH( 2);
proto_tree_add_item( socks_tree, hf_socks_dstport, NullTVB,
proto_tree_add_uint( socks_tree, hf_socks_dstport, NullTVB,
offset, 2, hash_info->udp_remote_port);
offset += 2;
@ -475,19 +475,19 @@ void display_socks_v4( const u_char *pd, int offset, frame_data *fd,
++offset;
/* Do remote port */
proto_tree_add_item( tree, hf_socks_dstport, NullTVB, offset, 2,
proto_tree_add_uint( 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,
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_item( tree, hf_user_name, NullTVB, offset,
proto_tree_add_string( tree, hf_user_name, NullTVB, offset,
strlen( &pd[offset]) + 1,
&pd[offset]);
@ -507,11 +507,11 @@ void display_socks_v4( const u_char *pd, int offset, frame_data *fd,
++offset;
/* Do remote port */
proto_tree_add_item( tree, hf_socks_dstport, NullTVB, offset, 2,
proto_tree_add_uint( 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,
proto_tree_add_ipv4( tree, hf_socks_ip_dst, NullTVB, offset, 4,
GWORD( pd, offset));
}
@ -546,7 +546,7 @@ void display_socks_v5( const u_char *pd, int offset, frame_data *fd,
CHECK_PACKET_LENGTH( 2);
/* Do version */
proto_tree_add_item( tree, hf_socks_ver, NullTVB, offset, 1,
proto_tree_add_uint( tree, hf_socks_ver, NullTVB, offset, 1,
hash_info->version);
++offset;
@ -1025,7 +1025,7 @@ dissect_socks(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
if (tree) {
ti = proto_tree_add_item( tree, proto_socks, NullTVB, offset,
END_OF_FRAME, NULL, "Socks:" );
END_OF_FRAME, FALSE );
socks_tree = proto_item_add_subtree(ti, ett_socks);
@ -1044,14 +1044,14 @@ dissect_socks(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
"Command: %d (%s)", hash_info->command,
get_command_name(hash_info->command));
proto_tree_add_item( socks_tree, hf_socks_ip_dst, NullTVB,
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_item( socks_tree, hf_socks_dstport, NullTVB,
proto_tree_add_uint( socks_tree, hf_socks_dstport, NullTVB,
offset, 0, hash_info->port);
}
}
@ -1152,5 +1152,3 @@ proto_reg_handoff_socks(void) {
dissector_add("tcp.port", TCP_PORT_SOCKS, dissect_socks);
}

View File

@ -6,7 +6,7 @@
* In particular I have not had an opportunity to see how it
* responds to SRVLOC over TCP.
*
* $Id: packet-srvloc.c,v 1.8 2000/05/11 08:15:52 gram Exp $
* $Id: packet-srvloc.c,v 1.9 2000/05/31 05:07:48 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -192,7 +192,7 @@ dissect_srvloc(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
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);
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,10 +200,10 @@ dissect_srvloc(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
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_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_item(srvloc_tree, hf_srvloc_flags, NullTVB, offset + 4, 1, srvloc_hdr.flags);
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,7 +237,7 @@ dissect_srvloc(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
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]);;
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,7 +294,7 @@ dissect_srvloc(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
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]);;
proto_tree_add_uint(srvloc_tree, hf_srvloc_error, NullTVB, offset, 2, pd[offset]);;
offset += 2;
break;
@ -324,7 +324,7 @@ dissect_srvloc(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
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]);;
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,7 +337,7 @@ dissect_srvloc(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
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]);;
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,7 +372,7 @@ dissect_srvloc(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
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]);;
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;

View File

@ -1,7 +1,7 @@
/* packet-tacacs.c
* Routines for cisco tacacs/tacplus/AAA packet dissection
*
* $Id: packet-tacacs.c,v 1.4 2000/05/11 08:15:52 gram Exp $
* $Id: packet-tacacs.c,v 1.5 2000/05/31 05:07:49 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -68,21 +68,21 @@ dissect_tacacs(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
if (tree)
{
ti = proto_tree_add_item(tree, proto_tacacs, NullTVB, offset, END_OF_FRAME, NULL);
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_item(tacacs_tree, hf_tacacs_version, NullTVB, 0, 0, "XTacacs");
proto_tree_add_string(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,
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_item_hidden(tacacs_tree, hf_tacacs_response, NullTVB,
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,21 +106,21 @@ dissect_tacplus(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
if (tree)
{
ti = proto_tree_add_item(tree, proto_tacacs, NullTVB, offset, END_OF_FRAME, NULL);
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_item(tacacs_tree, hf_tacacs_version, NullTVB, 0, 0, "Tacacs+");
proto_tree_add_string(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,
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_item_hidden(tacacs_tree, hf_tacacs_response, NullTVB,
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>");

View File

@ -1,7 +1,7 @@
/* packet-tcp.c
* Routines for TCP packet disassembly
*
* $Id: packet-tcp.c,v 1.74 2000/05/11 08:15:52 gram Exp $
* $Id: packet-tcp.c,v 1.75 2000/05/31 05:07:49 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -480,26 +480,26 @@ dissect_tcp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
"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);
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_item(tcp_tree, hf_tcp_ack, NullTVB, offset + 8, 4, th.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_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);
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_item(tcp_tree, hf_tcp_urgent_pointer, NullTVB, offset + 18, 2, th.th_urp);
proto_tree_add_uint(tcp_tree, hf_tcp_urgent_pointer, NullTVB, offset + 18, 2, th.th_urp);
}
/* Decode TCP options, if any. */

View File

@ -2,7 +2,7 @@
* Routines for telnet packet dissection
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
*
* $Id: packet-telnet.c,v 1.12 2000/05/11 08:15:52 gram Exp $
* $Id: packet-telnet.c,v 1.13 2000/05/31 05:07:50 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -307,7 +307,7 @@ dissect_telnet(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
int data_offset;
int data_len;
ti = proto_tree_add_item(tree, proto_telnet, NullTVB, offset, END_OF_FRAME, NULL);
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;

View File

@ -5,7 +5,7 @@
* Craig Newell <CraigN@cheque.uq.edu.au>
* RFC2347 TFTP Option Extension
*
* $Id: packet-tftp.c,v 1.11 2000/05/11 08:15:53 gram Exp $
* $Id: packet-tftp.c,v 1.12 2000/05/31 05:07:50 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -97,11 +97,11 @@ dissect_tftp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
if (tree) {
ti = proto_tree_add_item(tree, proto_tftp, NullTVB, offset, END_OF_FRAME, NULL);
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_item_hidden(tftp_tree, hf_tftp_type, NullTVB, offset, 2, i1);
proto_tree_add_uint_hidden(tftp_tree, hf_tftp_type, NullTVB, offset, 2, i1);
switch (i1) {
case RRQ:
@ -159,7 +159,7 @@ dissect_tftp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
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_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);

View File

@ -5,7 +5,7 @@
* Craig Newell <CraigN@cheque.uq.edu.au>
* RFC2347 TIME Option Extension
*
* $Id: packet-time.c,v 1.5 2000/05/11 08:15:53 gram Exp $
* $Id: packet-time.c,v 1.6 2000/05/31 05:07:50 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -56,7 +56,7 @@ dissect_time(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
if (tree) {
ti = proto_tree_add_item(tree, proto_time, NullTVB, offset, END_OF_FRAME, NULL);
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,

View File

@ -1,7 +1,7 @@
/* packet-tns.c
* Routines for MSX tns packet dissection
*
* $Id: packet-tns.c,v 1.6 2000/05/11 08:15:53 gram Exp $
* $Id: packet-tns.c,v 1.7 2000/05/31 05:07:50 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -88,7 +88,7 @@ static void dissect_tns_sns(const u_char *pd, int offset, frame_data *fd,
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);
proto_tree_add_boolean_hidden(tns_tree, hf_tns_sns, NullTVB, 0, 0, TRUE);
}
if ( check_col(fd, COL_INFO) )
@ -109,7 +109,7 @@ static void dissect_tns_data(const u_char *pd, int offset, frame_data *fd,
TRUNC(2);
if ( tree )
{
proto_tree_add_item(tns_tree, hf_tns_data_flag, NullTVB,
proto_tree_add_uint(tns_tree, hf_tns_data_flag, NullTVB,
offset, 2, pntohs(&pd[offset]));
}
offset += 2;
@ -138,7 +138,7 @@ static void dissect_tns_connect(const u_char *pd, int offset, frame_data *fd,
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);
proto_tree_add_boolean_hidden(tns_tree, hf_tns_connect, NullTVB, 0, 0, TRUE);
}
if ( check_col(fd, COL_INFO) )
@ -149,7 +149,7 @@ static void dissect_tns_connect(const u_char *pd, int offset, frame_data *fd,
TRUNC(2);
if ( connect_tree )
{
proto_tree_add_item(connect_tree, hf_tns_version, NullTVB,
proto_tree_add_uint(connect_tree, hf_tns_version, NullTVB,
offset, 2, pntohs(&pd[offset]));
}
offset += 2;
@ -157,7 +157,7 @@ static void dissect_tns_connect(const u_char *pd, int offset, frame_data *fd,
TRUNC(2);
if ( connect_tree )
{
proto_tree_add_item(connect_tree, hf_tns_compat_version, NullTVB,
proto_tree_add_uint(connect_tree, hf_tns_compat_version, NullTVB,
offset, 2, pntohs(&pd[offset]));
}
offset += 2;
@ -166,7 +166,7 @@ static void dissect_tns_connect(const u_char *pd, int offset, frame_data *fd,
if ( connect_tree )
{
/* need to break down w/ bitfield */
proto_tree_add_item(connect_tree, hf_tns_service_options, NullTVB,
proto_tree_add_uint(connect_tree, hf_tns_service_options, NullTVB,
offset, 2, pntohs(&pd[offset]));
}
offset += 2;
@ -204,19 +204,19 @@ dissect_tns(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
if (tree)
{
ti = proto_tree_add_item(tree, proto_tns, NullTVB, offset, END_OF_FRAME, NULL);
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_item_hidden(tns_tree, hf_tns_request, NullTVB,
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_item_hidden(tns_tree, hf_tns_response, NullTVB,
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,7 +229,7 @@ dissect_tns(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
length = pntohs(&pd[offset]);
if (tree)
{
proto_tree_add_item(tns_tree, hf_tns_length, NullTVB,
proto_tree_add_uint(tns_tree, hf_tns_length, NullTVB,
offset, 2, length);
}
TRUNC(length);
@ -238,7 +238,7 @@ dissect_tns(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
TRUNC(2);
if ( tree )
{
proto_tree_add_item(tns_tree, hf_tns_packet_checksum, NullTVB,
proto_tree_add_uint(tns_tree, hf_tns_packet_checksum, NullTVB,
offset, 2, pntohs(&pd[offset]));
}
offset += 2;
@ -247,7 +247,7 @@ dissect_tns(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
type = pd[offset];
if ( tree )
{
proto_tree_add_item(tns_tree, hf_tns_packet_type, NullTVB,
proto_tree_add_uint(tns_tree, hf_tns_packet_type, NullTVB,
offset, 1, type);
}
offset += 1;
@ -261,7 +261,7 @@ dissect_tns(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
TRUNC(1);
if ( tree )
{
proto_tree_add_item(tns_tree, hf_tns_reserved_byte, NullTVB,
proto_tree_add_bytes(tns_tree, hf_tns_reserved_byte, NullTVB,
offset, 1, &pd[offset]);
}
offset += 1;
@ -269,7 +269,7 @@ dissect_tns(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
TRUNC(2);
if ( tree )
{
proto_tree_add_item(tns_tree, hf_tns_header_checksum, NullTVB,
proto_tree_add_uint(tns_tree, hf_tns_header_checksum, NullTVB,
offset, 2, pntohs(&pd[offset]));
}
offset += 2;

View File

@ -2,7 +2,7 @@
* Routines for Token-Ring packet disassembly
* Gilbert Ramirez <gram@xiexie.org>
*
* $Id: packet-tr.c,v 1.42 2000/05/19 05:29:43 guy Exp $
* $Id: packet-tr.c,v 1.43 2000/05/31 05:07:51 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -451,45 +451,45 @@ dissect_tr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* 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);
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_item(tr_tree, hf_tr_ac, tr_tvb, 0, 1, trn_ac);
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_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);
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_item(tr_tree, hf_tr_fc, tr_tvb, 1, 1, trn_fc);
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_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_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_item(tr_tree, hf_tr_sr, tr_tvb, 8, 1, source_routed);
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_item_hidden(tr_tree, hf_tr_src, tr_tvb, 8, 6, trn_shost_nonsr);
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_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);
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_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);
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,17 +564,17 @@ add_ring_bridge_pairs(int rcf_len, tvbuff_t *tvb, proto_tree *tree)
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);
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_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);
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_item(tree, hf_tr_rif, tvb, TR_MIN_HEADER_LEN + 2, rcf_len, buffer);
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,

View File

@ -2,7 +2,7 @@
* Routines for Token-Ring Media Access Control
* Gilbert Ramirez <gram@xiexie.org>
*
* $Id: packet-trmac.c,v 1.21 2000/05/11 08:15:54 gram Exp $
* $Id: packet-trmac.c,v 1.22 2000/05/31 05:07:52 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -119,7 +119,7 @@ sv_text(const u_char *pd, int pkt_offset, proto_tree *tree)
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]);
proto_tree_add_uint_hidden(tree, hf_trmac_sv, NullTVB, pkt_offset+1, 1, pd[1]);
switch(pd[1]) {
case 0x01: /* Beacon Type */
@ -134,7 +134,7 @@ sv_text(const u_char *pd, int pkt_offset, proto_tree *tree)
break;
case 0x02: /* NAUN */
proto_tree_add_item(tree, hf_trmac_naun, NullTVB, pkt_offset+1, sv_length-1, (guint8*)&pd[2]);
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,29 +232,29 @@ sv_text(const u_char *pd, int pkt_offset, proto_tree *tree)
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,
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_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]);
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_item(tree, hf_trmac_errors_noniso, NullTVB, pkt_offset+1, sv_length-1,
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_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]);
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,14 +292,14 @@ dissect_trmac(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
if (tree) {
ti = proto_tree_add_item(tree, proto_trmac, NullTVB, offset, mv_length, NULL);
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_item(mac_tree, hf_trmac_mv, NullTVB, offset+3, 1, mv_val);
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_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 );
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;

View File

@ -1,7 +1,7 @@
/* packet-udp.c
* Routines for UDP packet disassembly
*
* $Id: packet-udp.c,v 1.71 2000/05/30 03:35:55 guy Exp $
* $Id: packet-udp.c,v 1.72 2000/05/31 05:07:52 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -165,7 +165,7 @@ dissect_udp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
get_udp_port(uh_sport), get_udp_port(uh_dport));
if (tree) {
ti = proto_tree_add_item(tree, proto_udp, NullTVB, offset, 8);
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,10 +173,10 @@ dissect_udp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
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_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_item(udp_tree, hf_udp_length, NullTVB, offset + 4, 2, uh_ulen);
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);
}

View File

@ -1,7 +1,7 @@
/* packet-vlan.c
* Routines for VLAN 802.1Q ethernet header disassembly
*
* $Id: packet-vlan.c,v 1.15 2000/05/19 04:54:34 gram Exp $
* $Id: packet-vlan.c,v 1.16 2000/05/31 05:07:53 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -90,12 +90,12 @@ dissect_vlan(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
}
if (tree) {
ti = proto_tree_add_item(tree, proto_vlan, NullTVB, offset, 4);
ti = proto_tree_add_item(tree, proto_vlan, NullTVB, offset, 4, FALSE);
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);
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() */

View File

@ -4,7 +4,7 @@
*
* Heikki Vatiainen <hessu@cs.tut.fi>
*
* $Id: packet-vrrp.c,v 1.5 2000/05/11 08:15:55 gram Exp $
* $Id: packet-vrrp.c,v 1.6 2000/05/31 05:07:53 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -132,7 +132,7 @@ dissect_vrrp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
return;
}
ti = proto_tree_add_item(tree, proto_vrrp, NullTVB, offset, END_OF_FRAME, NULL);
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,8 +140,8 @@ dissect_vrrp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
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);
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);

View File

@ -1,7 +1,7 @@
/* packet-vtp.c
* Routines for the disassembly of Cisco's Virtual Trunking Protocol
*
* $Id: packet-vtp.c,v 1.4 2000/05/14 07:19:49 guy Exp $
* $Id: packet-vtp.c,v 1.5 2000/05/31 05:07:53 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -108,27 +108,27 @@ dissect_vtp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
if (tree) {
ti = proto_tree_add_item(tree, proto_vtp, NullTVB, offset, END_OF_FRAME,
NULL);
FALSE);
vtp_tree = proto_item_add_subtree(ti, ett_vtp);
proto_tree_add_item(vtp_tree, hf_vtp_version, NullTVB, offset, 1,
proto_tree_add_uint(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,
proto_tree_add_uint(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,
proto_tree_add_uint(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,
proto_tree_add_uint(vtp_tree, hf_vtp_md_len, NullTVB, offset,
1, md_len);
offset += 1;
@ -137,12 +137,12 @@ dissect_vtp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
&pd[offset]);
offset += 32;
proto_tree_add_item(vtp_tree, hf_vtp_conf_rev_num, NullTVB,
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_item(vtp_tree, hf_vtp_upd_id, NullTVB,
proto_tree_add_ipv4(vtp_tree, hf_vtp_upd_id, NullTVB,
offset, 4, upd_id);
offset += 4;
@ -153,17 +153,17 @@ dissect_vtp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
&pd[offset+6], &pd[offset+8], &pd[offset+10]);
offset += 12;
proto_tree_add_item(vtp_tree, hf_vtp_md5_digest, NullTVB,
proto_tree_add_bytes(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,
proto_tree_add_uint(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,
proto_tree_add_uint(vtp_tree, hf_vtp_md_len, NullTVB, offset,
1, md_len);
offset += 1;
@ -172,7 +172,7 @@ dissect_vtp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
&pd[offset]);
offset += 32;
proto_tree_add_item(vtp_tree, hf_vtp_conf_rev_num, NullTVB,
proto_tree_add_uint(vtp_tree, hf_vtp_conf_rev_num, NullTVB,
offset, 4, pntohl(&pd[offset]));
offset += 4;
@ -189,11 +189,11 @@ dissect_vtp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
offset += 1; /* skip reserved field */
md_len = pd[offset];
proto_tree_add_item(vtp_tree, hf_vtp_md_len, NullTVB, offset,
proto_tree_add_uint(vtp_tree, hf_vtp_md_len, NullTVB, offset,
1, md_len);
offset += 1;
proto_tree_add_item(vtp_tree, hf_vtp_start_value, NullTVB,
proto_tree_add_uint(vtp_tree, hf_vtp_start_value, NullTVB,
offset, 2, pntohs(&pd[offset]));
break;
@ -205,7 +205,7 @@ dissect_vtp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
offset += 1; /* skip unknown field */
md_len = pd[offset];
proto_tree_add_item(vtp_tree, hf_vtp_md_len, NullTVB, offset,
proto_tree_add_uint(vtp_tree, hf_vtp_md_len, NullTVB, offset,
1, md_len);
offset += 1;
@ -284,7 +284,7 @@ dissect_vlan_info(const u_char *pd, int offset, proto_tree *tree)
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,
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,14 +296,14 @@ dissect_vlan_info(const u_char *pd, int offset, proto_tree *tree)
"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,
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_item(vlan_info_tree, hf_vtp_vlan_type, NullTVB, offset, 1,
proto_tree_add_uint(vlan_info_tree, hf_vtp_vlan_type, NullTVB, offset, 1,
pd[offset]);
offset += 1;
vlan_info_left -= 1;
@ -311,28 +311,28 @@ dissect_vlan_info(const u_char *pd, int offset, proto_tree *tree)
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,
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_item(vlan_info_tree, hf_vtp_isl_vlan_id, NullTVB, offset, 2,
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_item(vlan_info_tree, hf_vtp_mtu_size, NullTVB, offset, 2,
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_item(vlan_info_tree, hf_vtp_802_10_index, NullTVB, offset, 4,
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,9 +358,9 @@ dissect_vlan_info(const u_char *pd, int offset, proto_tree *tree)
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,
proto_tree_add_uint(tlv_tree, hf_vtp_vlan_tlvtype, NullTVB, offset,
1, type);
proto_tree_add_item(tlv_tree, hf_vtp_vlan_tlvlength, NullTVB, offset+1,
proto_tree_add_uint(tlv_tree, hf_vtp_vlan_tlvlength, NullTVB, offset+1,
1, length);
offset += 2;
vlan_info_left -= 2;

Some files were not shown because too many files have changed in this diff Show More