*
* $Id$
*
- * Ethereal - Network traffic analyzer
- * By Gerald Combs <gerald@ethereal.com>
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
* Copyright 1998 Gerald Combs
*
* This program is free software; you can redistribute it and/or
#include "tvbuff.h"
#include "ftypes/ftypes.h"
-/** The header-field index for the special text pseudo-field. Exported by libethereal.dll */
-ETH_VAR_IMPORT int hf_text_only;
+/** The header-field index for the special text pseudo-field. Exported by libwireshark.dll */
+WS_VAR_IMPORT int hf_text_only;
/** the maximum length of a protocol field string representation */
#define ITEM_LABEL_LENGTH 240
* If that string is dynamically allocated, it should be allocated with
* ep_alloc(); using ep_strdup_printf() would work.
*
- * If the ETHEREAL_ABORT_ON_DISSECTOR_BUG environment variable is set,
+ * If the WIRESHARK_ABORT_ON_DISSECTOR_BUG environment variable is set,
* it will call abort(), instead, to make it easier to get a stack trace.
*
* @param message string to use as the message
*/
#define REPORT_DISSECTOR_BUG(message) \
- ((getenv("ETHEREAL_ABORT_ON_DISSECTOR_BUG") != NULL) ? \
+ ((getenv("WIRESHARK_ABORT_ON_DISSECTOR_BUG") != NULL) ? \
abort() : \
THROW_MESSAGE(DissectorError, message))
* used in field_info.flags. */
/* HIDING PROTOCOL FIELDS IS DEPRECATED, IT'S CONSIDERED TO BE BAD GUI DESIGN! */
#define FI_HIDDEN 0x0001
-/** The protocol field should be displayed as "generated by Ethereal",
+/** The protocol field should be displayed as "generated by Wireshark",
* used in field_info.flags. */
#define FI_GENERATED 0x0002
/** The protocol field indicates a security probem (e.g. unsecure implementation) */
/*#define PI_SECURITY 0x8000*/
-/* add more, see http://wiki.ethereal.com/Development/ExpertInfo */
+/* add more, see http://wiki.wireshark.org/Development/ExpertInfo */
/** is this protocol field hidden from the protocol tree display (used for filtering only)? */
/* HIDING PROTOCOL FIELDS IS DEPRECATED, IT'S CONSIDERED TO BE BAD GUI DESIGN! */
#define PROTO_ITEM_SET_HIDDEN(proto_item) \
((proto_item) ? FI_SET_FLAG((proto_item)->finfo, FI_HIDDEN) : 0)
-/** is this protocol field generated by Ethereal (and not read from the packet data)? */
+/** is this protocol field generated by Wireshark (and not read from the packet data)? */
#define PROTO_ITEM_IS_GENERATED(proto_item) \
((proto_item) ? FI_GET_FLAG((proto_item)->finfo, FI_GENERATED) : 0)
-/** mark this protocol field as generated by Ethereal (and not read from the packet data) */
+/** mark this protocol field as generated by Wireshark (and not read from the packet data) */
#define PROTO_ITEM_SET_GENERATED(proto_item) \
((proto_item) ? FI_SET_FLAG((proto_item)->finfo, FI_GENERATED) : 0)
you will still need to call any subdissector with the original value of
tree or filtering will break.
- The purpose of this is to optimize ethereal for speed and make it
+ The purpose of this is to optimize wireshark for speed and make it
faster for when filters are being used.
*/
extern gboolean proto_field_is_referenced(proto_tree *tree, int proto_id);
/**
* Sets an expert info to the proto_item.
@param ti the item to set the expert info
- @param group the group of this info (e.g. FI_CHECKSUM)
- @param severity of this info (e.g. FI_ERROR)
+ @param group the group of this info (e.g. PI_CHECKSUM)
+ @param severity of this info (e.g. PI_ERROR)
@return TRUE if value was written
*/
extern gboolean proto_item_set_expert_flags(proto_item *ti, int group, int severity);
@return parent item */
extern proto_item* proto_tree_get_parent(proto_tree *tree);
+/** Get the root tree from any subtree.
+ @param tree the tree to get the root from
+ @return root tree */
+extern proto_tree* proto_tree_get_root(proto_tree *tree);
+
/** Move an existing item behind another existing item.
@param tree the tree to which both items belong
@param fixed_item the item which keeps it's position
* proto_get_finfo_ptr_array because it has to search through the tree. */
extern GPtrArray* proto_find_finfo(proto_tree *tree, int hfindex);
+/* Return GPtrArray* of field_info pointers containg all hfindexes that appear in
+* tree. */
+extern GPtrArray* proto_all_finfos(proto_tree *tree);
+
/** Dumps a glossary of the protocol registrations to STDOUT */
extern void proto_registrar_dump_protocols(void);
/** Points to the first element of an array of Booleans, indexed by
a subtree item type. That array element is TRUE if subtrees of
an item of that type are to be expanded. With MSVC and a
- libethereal.dll, we need a special declaration. */
-ETH_VAR_IMPORT gboolean *tree_is_expanded;
+ libwireshark.dll, we need a special declaration. */
+WS_VAR_IMPORT gboolean *tree_is_expanded;
/** Number of elements in the tree_is_expanded array. With MSVC and a
- * libethereal.dll, we need a special declaration. */
-ETH_VAR_IMPORT int num_tree_types;
+ * libwireshark.dll, we need a special declaration. */
+WS_VAR_IMPORT int num_tree_types;
/** glib doesn't have g_ptr_array_len of all things!*/
#ifndef g_ptr_array_len