"hex_str_to_bytes()" modifies the GByteArray supplied to it, so don't
[obnox/wireshark/wip.git] / packet-bacapp.c
index ae2a89a969e943f49f962bad406e8e0e1751c2f6..b9f6965eb92c76664be09e814ae377e19b7f145f 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for BACnet (APDU) dissection
  * Copyright 2001, Hartmut Mueller <hartmut@abmlinux.org>, FH Dortmund
  *
- * $Id: packet-bacapp.c,v 1.9 2002/01/21 07:36:32 guy Exp $
+ * $Id: packet-bacapp.c,v 1.13 2002/08/28 21:00:07 jmayer Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -19,7 +19,7 @@
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 #include <stdlib.h>
 #include <string.h>
 
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
 #include <glib.h>
 
-#ifdef NEED_SNPRINTF_H
-# include "snprintf.h"
-#endif
-
 #include <epan/packet.h>
 
 static const char*
@@ -92,11 +80,11 @@ dissect_bacapp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                col_append_fstr(pinfo->cinfo, COL_INFO, "(%s)",
                bacapp_type_name(bacapp_type));
        if (tree) {
-               ti = proto_tree_add_item(tree, proto_bacapp, tvb, offset, tvb_length(tvb), FALSE);
+               ti = proto_tree_add_item(tree, proto_bacapp, tvb, offset, -1, FALSE);
 
                bacapp_tree = proto_item_add_subtree(ti, ett_bacapp);
 
-               proto_tree_add_uint_format(bacapp_tree, hf_bacapp_type, tvb, 
+               proto_tree_add_uint_format(bacapp_tree, hf_bacapp_type, tvb,
                        offset, 1, bacapp_type, "APDU Type: %u (%s)", bacapp_type,
                                bacapp_type_name(bacapp_type));
                offset ++;