aboutsummaryrefslogtreecommitdiffstats
path: root/packet-ipx.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2000-05-31 05:09:07 +0000
committerGuy Harris <guy@alum.mit.edu>2000-05-31 05:09:07 +0000
commit283ce59938ad2be252a6232e40a958e177a40e1a (patch)
treeb451d4a712d9b914022ba872296e70e55b8d9bc5 /packet-ipx.c
parentaa553f63ecc7b9e310a05b743502c50f6dffb800 (diff)
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
Diffstat (limited to 'packet-ipx.c')
-rw-r--r--packet-ipx.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/packet-ipx.c b/packet-ipx.c
index 1fb9db630b..e69319157f 100644
--- a/packet-ipx.c
+++ b/packet-ipx.c
@@ -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);
}