Fix some "proto_tree_add_uint()" and "proto_tree_add_uint_hidden()"
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 9 Mar 2002 22:54:27 +0000 (22:54 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 9 Mar 2002 22:54:27 +0000 (22:54 +0000)
calls that passed TRUE or FALSE, rather than an integer value, as the
last argument.

A SOCKS command is one byte, so make the "socks.command" field an
FT_UINT8.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4904 f5534014-38df-0310-8fa8-9805f1628bb7

packet-l2tp.c
packet-socks.c

index bef7981bdc3e9ff6fd8c345e931d387fd22ba5b2..85e172d0c43ebd65b97b33788c82fb68c980e99c 100644 (file)
@@ -7,7 +7,7 @@
  * Laurent Cazalet <laurent.cazalet@mailclub.net>
  * Thomas Parvais <thomas.parvais@advalvas.be>
  *
- * $Id: packet-l2tp.c,v 1.30 2002/01/21 07:36:36 guy Exp $
+ * $Id: packet-l2tp.c,v 1.31 2002/03/09 22:54:27 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -28,7 +28,6 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  */
 
-
 static int proto_l2tp = -1;
 static int hf_l2tp_type = -1;
 static int hf_l2tp_length_bit = -1;
@@ -462,7 +461,8 @@ dissect_l2tp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
   if (OFFSET_BIT(control)) {
        offset_size = tvb_get_ntohs(tvb, index);
        if (tree) {
-               proto_tree_add_uint(l2tp_tree, hf_l2tp_offset, tvb, index, 2, FALSE);
+               proto_tree_add_uint(l2tp_tree, hf_l2tp_offset, tvb, index, 2,
+                   offset_size);
        }
        index += 2;
        if (tree) {
index c024133604bd3739bff12e9ba98b3027e3e2d55d..6d71a18dc4bcebad4d153c5f92623e3856b67ae4 100644 (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.35 2002/01/24 09:20:51 guy Exp $
+ * $Id: packet-socks.c,v 1.36 2002/03/09 22:54:27 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -525,7 +525,7 @@ display_socks_v4(tvbuff_t *tvb, int offset, packet_info *pinfo,
                ++offset;
                                                /* Do results code      */
                proto_tree_add_item( tree, hf_socks_results_4, tvb, offset, 1, FALSE);
-                proto_tree_add_uint_hidden(tree, hf_socks_results, tvb, offset, 1, FALSE);
+               proto_tree_add_item_hidden(tree, hf_socks_results, tvb, offset, 1, FALSE);
 
                ++offset;
 
@@ -631,11 +631,12 @@ display_socks_v5(tvbuff_t *tvb, int offset, packet_info *pinfo,
                command = tvb_get_guint8(tvb, offset);
                
                if (compare_packet( hash_info->command_row))
-                       proto_tree_add_uint( tree, hf_socks_cmd, tvb, offset, 1, FALSE);
+                       proto_tree_add_uint( tree, hf_socks_cmd, tvb, offset, 1,
+                           command);
 
                else {
                        proto_tree_add_item( tree, hf_socks_results_5, tvb, offset, 1, FALSE);
-                       proto_tree_add_uint_hidden(tree, hf_socks_results, tvb, offset, 1, FALSE);
+                       proto_tree_add_item_hidden(tree, hf_socks_results, tvb, offset, 1, FALSE);
                }
 
                ++offset;
@@ -1137,7 +1138,7 @@ proto_register_socks( void){
                        }
                },
                { &hf_socks_cmd,
-                       { "Command", "socks.command", FT_UINT16,
+                       { "Command", "socks.command", FT_UINT8,
                                BASE_DEC,  VALS(cmd_strings), 0x0, "", HFILL
                        }
                },