aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7>2009-09-30 14:02:49 +0000
committerwmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7>2009-09-30 14:02:49 +0000
commit5403869e2ec79fc81d8996c0249c6fda00105c5e (patch)
treed68eff5047dee44c66c08450cc961d81b2fc9f04
parent03c1008eca23fa0309a56656e4cfed6d31291d7d (diff)
Rename hfinfo.ref_count to hfinfo.ref_type since that's now how it's used.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@30216 f5534014-38df-0310-8fa8-9805f1628bb7
-rw-r--r--epan/dissectors/packet-tpncp.c2
-rw-r--r--epan/dissectors/packet-xml.c2
-rw-r--r--epan/proto.c20
-rw-r--r--epan/proto.h52
4 files changed, 38 insertions, 38 deletions
diff --git a/epan/dissectors/packet-tpncp.c b/epan/dissectors/packet-tpncp.c
index 07b58c430b..18850a173e 100644
--- a/epan/dissectors/packet-tpncp.c
+++ b/epan/dissectors/packet-tpncp.c
@@ -570,7 +570,7 @@ static gint init_tpncp_data_fields_info(tpncp_data_field_info *data_fields_info,
hf_entr.hfinfo.blurb = NULL;
hf_entr.hfinfo.id = 0;
hf_entr.hfinfo.parent = 0;
- hf_entr.hfinfo.ref_count = 0;
+ hf_entr.hfinfo.ref_type = HF_REF_TYPE_NONE;
hf_entr.hfinfo.bitshift = 0;
hf_entr.hfinfo.same_name_next = NULL;
hf_entr.hfinfo.same_name_prev = NULL;
diff --git a/epan/dissectors/packet-xml.c b/epan/dissectors/packet-xml.c
index 4a734690e1..43d06dbfce 100644
--- a/epan/dissectors/packet-xml.c
+++ b/epan/dissectors/packet-xml.c
@@ -760,7 +760,7 @@ static void add_xml_field(GArray* hfs, int* p_id, gchar* name, gchar* fqn) {
hfri.hfinfo.blurb = NULL;
hfri.hfinfo.id = 0;
hfri.hfinfo.parent = 0;
- hfri.hfinfo.ref_count = HF_REF_TYPE_NONE;
+ hfri.hfinfo.ref_type = HF_REF_TYPE_NONE;
hfri.hfinfo.bitshift = 0;
hfri.hfinfo.same_name_next = NULL;
hfri.hfinfo.same_name_prev = NULL;
diff --git a/epan/proto.c b/epan/proto.c
index 1d394c81e5..744a6efb0c 100644
--- a/epan/proto.c
+++ b/epan/proto.c
@@ -110,7 +110,7 @@ wrs_count_bitshift(guint32 bitmask)
} \
PROTO_REGISTRAR_GET_NTH(hfindex, hfinfo); \
if(!(PTREE_DATA(tree)->visible)){ \
- if((hfinfo->ref_count != HF_REF_TYPE_DIRECT) \
+ if((hfinfo->ref_type != HF_REF_TYPE_DIRECT) \
&& (hfinfo->type!=FT_PROTOCOL || \
PTREE_DATA(tree)->fake_protocols)){ \
/* just return tree back to the caller */\
@@ -552,7 +552,7 @@ free_GPtrArray_value(gpointer key, gpointer value, gpointer user_data _U_)
header_field_info *hfinfo;
PROTO_REGISTRAR_GET_NTH(hfid, hfinfo);
- if(hfinfo->ref_count != HF_REF_TYPE_NONE) {
+ if(hfinfo->ref_type != HF_REF_TYPE_NONE) {
/* when a field is referenced by a filter this also
affects the refcount for the parent protocol so we need
to adjust the refcount for the parent as well
@@ -560,9 +560,9 @@ free_GPtrArray_value(gpointer key, gpointer value, gpointer user_data _U_)
if( hfinfo->parent != -1 ) {
header_field_info *parent_hfinfo;
PROTO_REGISTRAR_GET_NTH(hfinfo->parent, parent_hfinfo);
- parent_hfinfo->ref_count = HF_REF_TYPE_NONE;
+ parent_hfinfo->ref_type = HF_REF_TYPE_NONE;
}
- hfinfo->ref_count = HF_REF_TYPE_NONE;
+ hfinfo->ref_type = HF_REF_TYPE_NONE;
}
g_ptr_array_free(ptrs, TRUE);
@@ -683,7 +683,7 @@ proto_field_is_referenced(proto_tree *tree, int proto_id)
return TRUE;
PROTO_REGISTRAR_GET_NTH(proto_id, hfinfo);
- if (hfinfo->ref_count != HF_REF_TYPE_NONE)
+ if (hfinfo->ref_type != HF_REF_TYPE_NONE)
return TRUE;
if (hfinfo->type == FT_PROTOCOL && !PTREE_DATA(tree)->fake_protocols)
@@ -1154,7 +1154,7 @@ static GPtrArray *proto_lookup_or_create_interesting_hfids(proto_tree *tree,
DISSECTOR_ASSERT(tree);
DISSECTOR_ASSERT(hfinfo);
- if (hfinfo->ref_count == HF_REF_TYPE_DIRECT) {
+ if (hfinfo->ref_type == HF_REF_TYPE_DIRECT) {
if (PTREE_DATA(tree)->interesting_hfids == NULL) {
/* Initialize the hash because we now know that it is needed */
PTREE_DATA(tree)->interesting_hfids =
@@ -3612,7 +3612,7 @@ proto_tree_prime_hfid(proto_tree *tree _U_, gint hfid)
/* this field is referenced by a filter so increase the refcount.
also increase the refcount for the parent, i.e the protocol.
*/
- hfinfo->ref_count = HF_REF_TYPE_DIRECT;
+ hfinfo->ref_type = HF_REF_TYPE_DIRECT;
/* only increase the refcount if there is a parent.
if this is a protocol and not a field then parent will be -1
and there is no parent to add any refcounting for.
@@ -3624,8 +3624,8 @@ proto_tree_prime_hfid(proto_tree *tree _U_, gint hfid)
/* Mark parent as indirectly referenced unless it is already directly
* referenced, i.e. the user has specified the parent in a filter.
*/
- if (parent_hfinfo->ref_count != HF_REF_TYPE_DIRECT)
- parent_hfinfo->ref_count = HF_REF_TYPE_INDIRECT;
+ if (parent_hfinfo->ref_type != HF_REF_TYPE_DIRECT)
+ parent_hfinfo->ref_type = HF_REF_TYPE_INDIRECT;
}
}
@@ -3848,7 +3848,7 @@ proto_register_protocol(const char *name, const char *short_name, const char *fi
hfinfo->strings = protocol;
hfinfo->bitmask = 0;
hfinfo->bitshift = 0;
- hfinfo->ref_count = HF_REF_TYPE_NONE;
+ hfinfo->ref_type = HF_REF_TYPE_NONE;
hfinfo->blurb = NULL;
hfinfo->parent = -1; /* this field differentiates protos and fields */
diff --git a/epan/proto.h b/epan/proto.h
index 4c4c8cfbf2..5c1e8e7ab0 100644
--- a/epan/proto.h
+++ b/epan/proto.h
@@ -173,22 +173,22 @@ typedef struct _header_field_info header_field_info;
/** information describing a header field */
struct _header_field_info {
/* ---------- set by dissector --------- */
- const char *name; /**< full name of this field */
- const char *abbrev; /**< abbreviated name of this field */
- enum ftenum type; /**< field type, one of FT_ (from ftypes.h) */
- int display; /**< one of BASE_, or number of field bits for FT_BOOLEAN */
- const void *strings; /**< value_string, range_string or true_false_string,
- typically converted by VALS(), RVALS() or TFS().
- If this is an FT_PROTOCOL then it points to the
- associated protocol_t structure */
- guint32 bitmask; /**< bitmask of interesting bits */
- const char *blurb; /**< Brief description of field */
+ const char *name; /**< full name of this field */
+ const char *abbrev; /**< abbreviated name of this field */
+ enum ftenum type; /**< field type, one of FT_ (from ftypes.h) */
+ int display; /**< one of BASE_, or number of field bits for FT_BOOLEAN */
+ const void *strings; /**< value_string, range_string or true_false_string,
+ typically converted by VALS(), RVALS() or TFS().
+ If this is an FT_PROTOCOL then it points to the
+ associated protocol_t structure */
+ guint32 bitmask; /**< bitmask of interesting bits */
+ const char *blurb; /**< Brief description of field */
/* ------- set by proto routines (prefilled by HFILL macro, see below) ------ */
- int id; /**< Field ID */
- int parent; /**< parent protocol tree */
- hf_ref_type ref_count; /**< is this field referenced by a filter */
- int bitshift; /**< bits to shift */
+ int id; /**< Field ID */
+ int parent; /**< parent protocol tree */
+ hf_ref_type ref_type; /**< is this field referenced by a filter */
+ int bitshift; /**< bits to shift */
header_field_info *same_name_next; /**< Link to next hfinfo with same abbrev */
header_field_info *same_name_prev; /**< Link to previous hfinfo with same abbrev */
};
@@ -202,8 +202,8 @@ struct _header_field_info {
/** Used when registering many fields at once, using proto_register_field_array() */
typedef struct hf_register_info {
- int *p_id; /**< written to by register() function */
- header_field_info hfinfo; /**< the field info to be registered */
+ int *p_id; /**< written to by register() function */
+ header_field_info hfinfo; /**< the field info to be registered */
} hf_register_info;
@@ -217,16 +217,16 @@ typedef struct _item_label_t {
/** Contains the field information for the proto_item. */
typedef struct field_info {
- header_field_info *hfinfo; /**< pointer to registered field information */
- gint start; /**< current start of data in field_info.ds_tvb */
- gint length; /**< current data length of item in field_info.ds_tvb */
- gint appendix_start; /**< start of appendix data */
- gint appendix_length; /**< length of appendix data */
- gint tree_type; /**< one of ETT_ or -1 */
- item_label_t *rep; /**< string for GUI tree */
- guint32 flags; /**< bitfield like FI_GENERATED, ... */
- tvbuff_t *ds_tvb; /**< data source tvbuff */
- fvalue_t value;
+ header_field_info *hfinfo; /**< pointer to registered field information */
+ gint start; /**< current start of data in field_info.ds_tvb */
+ gint length; /**< current data length of item in field_info.ds_tvb */
+ gint appendix_start; /**< start of appendix data */
+ gint appendix_length; /**< length of appendix data */
+ gint tree_type; /**< one of ETT_ or -1 */
+ item_label_t *rep; /**< string for GUI tree */
+ guint32 flags; /**< bitfield like FI_GENERATED, ... */
+ tvbuff_t *ds_tvb; /**< data source tvbuff */
+ fvalue_t value;
} field_info;