diff options
author | Bill Meier <wmeier@newsguy.com> | 2013-02-07 22:04:02 +0000 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2013-02-07 22:04:02 +0000 |
commit | cfff564398e06c2a0be00c3378369d694b0d078c (patch) | |
tree | 1948a9c1b703d64b7acd2bdfc02224748aba8200 /epan/proto.h | |
parent | fea2576612cd6f7ae19355e276bff753557d2be4 (diff) |
Add 'proto_registrar_get_id_byname()' accessor.
svn path=/trunk/; revision=47540
Diffstat (limited to 'epan/proto.h')
-rw-r--r-- | epan/proto.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/epan/proto.h b/epan/proto.h index 5a2e7bf184..6cd23eacce 100644 --- a/epan/proto.h +++ b/epan/proto.h @@ -359,10 +359,10 @@ struct _header_field_info { const char *blurb; /**< [FIELDDESCR] 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_type; /**< 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 */ }; @@ -1704,6 +1704,11 @@ extern header_field_info* proto_registrar_get_nth(guint hfindex); @return the registered item */ extern header_field_info* proto_registrar_get_byname(const char *field_name); +/** Get the header_field id based upon a field name. + @param field_name the field name to search for + @return the field id for the registered item */ +extern int proto_registrar_get_id_byname(const char *field_name); + /** Get enum ftenum FT_ of registered header_field number n. @param n item # n (0-indexed) @return the registered item */ |