|
actf 0.0.1
An acute CTF reader
|
Field class related methods. More...
Go to the source code of this file.
Enumerations | |
| enum | actf_role { ACTF_ROLE_NIL = 0 , ACTF_ROLE_DSTREAM_CLS_ID = (1 << 0) , ACTF_ROLE_DSTREAM_ID = (1 << 1) , ACTF_ROLE_PKT_MAGIC_NUM = (1 << 2) , ACTF_ROLE_METADATA_STREAM_UUID = (1 << 3) , ACTF_ROLE_DEF_CLK_TSTAMP = (1 << 4) , ACTF_ROLE_DISC_EVENT_CNT_SNAPSHOT = (1 << 5) , ACTF_ROLE_PKT_CONTENT_LEN = (1 << 6) , ACTF_ROLE_PKT_END_DEF_CLK_TSTAMP = (1 << 7) , ACTF_ROLE_PKT_SEQ_NUM = (1 << 8) , ACTF_ROLE_PKT_TOT_LEN = (1 << 9) , ACTF_ROLE_EVENT_CLS_ID = (1 << 10) } |
| The possible roles of a field class. More... | |
| enum | actf_fld_cls_type { ACTF_FLD_CLS_NIL , ACTF_FLD_CLS_FXD_LEN_BIT_ARR , ACTF_FLD_CLS_FXD_LEN_BIT_MAP , ACTF_FLD_CLS_FXD_LEN_UINT , ACTF_FLD_CLS_FXD_LEN_SINT , ACTF_FLD_CLS_FXD_LEN_BOOL , ACTF_FLD_CLS_FXD_LEN_FLOAT , ACTF_FLD_CLS_VAR_LEN_UINT , ACTF_FLD_CLS_VAR_LEN_SINT , ACTF_FLD_CLS_NULL_TERM_STR , ACTF_FLD_CLS_STATIC_LEN_STR , ACTF_FLD_CLS_DYN_LEN_STR , ACTF_FLD_CLS_STATIC_LEN_BLOB , ACTF_FLD_CLS_DYN_LEN_BLOB , ACTF_FLD_CLS_STRUCT , ACTF_FLD_CLS_STATIC_LEN_ARR , ACTF_FLD_CLS_DYN_LEN_ARR , ACTF_FLD_CLS_OPTIONAL , ACTF_FLD_CLS_VARIANT , ACTF_N_FLD_CLSES } |
| A field class type. | |
Functions | |
| enum actf_fld_cls_type | actf_fld_cls_type (const actf_fld_cls *fc) |
| Get the type of a field class. | |
| size_t | actf_fld_cls_len (const actf_fld_cls *fc) |
| Get the length property of the field class. | |
| enum actf_byte_order | actf_fld_cls_byte_order (const actf_fld_cls *fc) |
| Get the byte order property of the field class. | |
| enum actf_bit_order | actf_fld_cls_bit_order (const actf_fld_cls *fc) |
| Get the bit order property of the field class. | |
| size_t | actf_fld_cls_alignment (const actf_fld_cls *fc) |
| Get the alignment property of the field class. | |
| const actf_flags * | actf_fld_cls_bit_map_flags (const actf_fld_cls *fc) |
| Get the flags of the field class. | |
| enum actf_base | actf_fld_cls_pref_display_base (const actf_fld_cls *fc) |
| Get the preferred display base of the field class. | |
| const actf_mappings * | actf_fld_cls_mappings (const actf_fld_cls *fc) |
| Get any available mappings of the field class. | |
| enum actf_role | actf_fld_cls_roles (const actf_fld_cls *fc) |
| Get the roles of the field class. | |
| enum actf_encoding | actf_fld_cls_encoding (const actf_fld_cls *fc) |
| Get the character encoding of the field class. | |
| const char * | actf_fld_cls_media_type (const actf_fld_cls *fc) |
| Get the IANA media type of the field class. | |
| const actf_fld_loc * | actf_fld_cls_len_fld_loc (const actf_fld_cls *fc) |
| Get the field location denoting length of the field class. | |
| uint64_t | actf_fld_cls_min_alignment (const actf_fld_cls *fc) |
| Get the minimum alignment property of the field class. | |
| size_t | actf_fld_cls_members_len (const actf_fld_cls *fc) |
| Get the number of members of the struct field class. | |
| const char * | actf_fld_cls_members_name_idx (const actf_fld_cls *fc, size_t i) |
| Get the name of the member with the specified index of the struct field class. | |
| const actf_fld_cls * | actf_fld_cls_members_fld_cls_idx (const actf_fld_cls *fc, size_t i) |
| Get the field class of the member with the specified index of the struct field class. | |
| const actf_fld * | actf_fld_cls_members_attributes_idx (const actf_fld_cls *fc, size_t i) |
| Get the attributes of the member with the specified index of the struct field class. | |
| const actf_fld * | actf_fld_cls_members_extensions_idx (const actf_fld_cls *fc, size_t i) |
| Get the extensions of the member with the specified index of the struct field class. | |
| const actf_fld_cls * | actf_fld_cls_element_fld_cls (const actf_fld_cls *fc) |
| Get the element field class of the field class. | |
| const actf_fld_loc * | actf_fld_cls_selector_fld_loc (const actf_fld_cls *fc) |
| Get the field location denoting selector field of the field class. | |
| const actf_rng_set * | actf_fld_cls_selector_rng_set (const actf_fld_cls *fc) |
| Get the selector ranges which determine if an optional field is enabled or not when the selector field is an integer. | |
| const actf_fld_cls * | actf_fld_cls_optional_fld_cls (const actf_fld_cls *fc) |
| Get a the conditional field class of an optional field class. | |
| size_t | actf_fld_cls_options_len (const actf_fld_cls *fc) |
| Get the number of options of the variant field class. | |
| const char * | actf_fld_cls_options_name_idx (const actf_fld_cls *fc, size_t i) |
| Get the name of the option with the specified index of the variant field class. | |
| const actf_fld_cls * | actf_fld_cls_options_fld_cls_idx (const actf_fld_cls *fc, size_t i) |
| Get the field class of the option with the specified index of the variant field class. | |
| const actf_rng_set * | actf_fld_cls_options_selector_rng_set_idx (const actf_fld_cls *fc, size_t i) |
| Get the selector range set of the option with the specified index of the variant field class. | |
| const actf_fld * | actf_fld_cls_options_attributes_idx (const actf_fld_cls *fc, size_t i) |
| Get the attributes of the option with the specified index of the variant field class. | |
| const actf_fld * | actf_fld_cls_options_extensions_idx (const actf_fld_cls *fc, size_t i) |
| Get the extensions of the option with the specified index of the variant field class. | |
| const char * | actf_fld_cls_aliased_name (const actf_fld_cls *fc) |
| Get the alias of the field class. | |
| const actf_fld * | actf_fld_cls_attributes (const actf_fld_cls *fc) |
| Get the attributes of the field class. | |
| const actf_fld * | actf_fld_cls_extensions (const actf_fld_cls *fc) |
| Get the extensions of the field class. | |
Field class related methods.
| enum actf_role |
The possible roles of a field class.
A field class can have multiple roles ORed together.
| enum actf_fld_cls_type actf_fld_cls_type | ( | const actf_fld_cls * | fc | ) |
Get the type of a field class.
| fc | the field class |
| size_t actf_fld_cls_len | ( | const actf_fld_cls * | fc | ) |
Get the length property of the field class.
The following field classes return length in bits:
The following field classes return length in bytes:
The following field class returns the number of element fields:
Any other field class returns 0.
| fc | the field class |
| enum actf_byte_order actf_fld_cls_byte_order | ( | const actf_fld_cls * | fc | ) |
Get the byte order property of the field class.
Applicable to:
Any other field class returns ACTF_LIL_ENDIAN.
| fc | the field class |
| enum actf_bit_order actf_fld_cls_bit_order | ( | const actf_fld_cls * | fc | ) |
Get the bit order property of the field class.
Applicable to:
Any other field class returns ACTF_FIRST_TO_LAST.
| fc | the field class |
| size_t actf_fld_cls_alignment | ( | const actf_fld_cls * | fc | ) |
Get the alignment property of the field class.
This is not the same as the effective alignment requirement of a field class.
Applicable to:
Any other field class returns 0.
| fc | the field class |
| const actf_flags * actf_fld_cls_bit_map_flags | ( | const actf_fld_cls * | fc | ) |
Get the flags of the field class.
Applicable to:
Any other field class returns NULL.
| fc | the field class |
| enum actf_base actf_fld_cls_pref_display_base | ( | const actf_fld_cls * | fc | ) |
Get the preferred display base of the field class.
Applicable to:
Any other field class returns ACTF_BASE_DECIMAL.
| fc | the field class |
| const actf_mappings * actf_fld_cls_mappings | ( | const actf_fld_cls * | fc | ) |
Get any available mappings of the field class.
Applicable to:
Any other field class returns NULL.
| fc | the field class |
| enum actf_role actf_fld_cls_roles | ( | const actf_fld_cls * | fc | ) |
Get the roles of the field class.
Applicable to:
Any other field class returns ACTF_ROLE_NIL.
| fc | the field class |
| enum actf_encoding actf_fld_cls_encoding | ( | const actf_fld_cls * | fc | ) |
Get the character encoding of the field class.
Applicable to:
Any other field class returns ACTF_ENCODING_UTF8.
| fc | the field class |
| const char * actf_fld_cls_media_type | ( | const actf_fld_cls * | fc | ) |
Get the IANA media type of the field class.
Applicable to:
Any other field class returns NULL.
| fc | the field class |
| const actf_fld_loc * actf_fld_cls_len_fld_loc | ( | const actf_fld_cls * | fc | ) |
Get the field location denoting length of the field class.
Applicable to:
Any other field class returns NULL.
| fc | the field class |
| uint64_t actf_fld_cls_min_alignment | ( | const actf_fld_cls * | fc | ) |
Get the minimum alignment property of the field class.
Applicable to:
Any other field class returns 0.
| fc | the field class |
| size_t actf_fld_cls_members_len | ( | const actf_fld_cls * | fc | ) |
Get the number of members of the struct field class.
Applicable to:
Any other field class returns 0.
| fc | the field class |
| const char * actf_fld_cls_members_name_idx | ( | const actf_fld_cls * | fc, |
| size_t | i ) |
Get the name of the member with the specified index of the struct field class.
Applicable to:
Any other field class returns NULL.
| fc | the field class |
| i | the index |
| const actf_fld_cls * actf_fld_cls_members_fld_cls_idx | ( | const actf_fld_cls * | fc, |
| size_t | i ) |
Get the field class of the member with the specified index of the struct field class.
Applicable to:
Any other field class returns NULL.
| fc | the field class |
| i | the index |
| const actf_fld * actf_fld_cls_members_attributes_idx | ( | const actf_fld_cls * | fc, |
| size_t | i ) |
Get the attributes of the member with the specified index of the struct field class.
Applicable to:
Any other field class returns NULL.
| fc | the field class |
| i | the index |
| const actf_fld * actf_fld_cls_members_extensions_idx | ( | const actf_fld_cls * | fc, |
| size_t | i ) |
Get the extensions of the member with the specified index of the struct field class.
Applicable to:
Any other field class returns NULL.
| fc | the field class |
| i | the index |
| const actf_fld_cls * actf_fld_cls_element_fld_cls | ( | const actf_fld_cls * | fc | ) |
Get the element field class of the field class.
Applicable to:
Any other field class returns NULL.
| fc | the field class |
| const actf_fld_loc * actf_fld_cls_selector_fld_loc | ( | const actf_fld_cls * | fc | ) |
Get the field location denoting selector field of the field class.
Applicable to:
Any other field class returns NULL.
| fc | the field class |
| const actf_rng_set * actf_fld_cls_selector_rng_set | ( | const actf_fld_cls * | fc | ) |
Get the selector ranges which determine if an optional field is enabled or not when the selector field is an integer.
The range set will be empty if the selector field is a boolean.
Applicable to:
Any other field class returns NULL.
| fc | the field class |
| const actf_fld_cls * actf_fld_cls_optional_fld_cls | ( | const actf_fld_cls * | fc | ) |
Get a the conditional field class of an optional field class.
Applicable to:
Any other field class returns NULL.
| fc | the field class |
| size_t actf_fld_cls_options_len | ( | const actf_fld_cls * | fc | ) |
Get the number of options of the variant field class.
Applicable to:
Any other field class returns 0.
| fc | the field class |
| const char * actf_fld_cls_options_name_idx | ( | const actf_fld_cls * | fc, |
| size_t | i ) |
Get the name of the option with the specified index of the variant field class.
Applicable to:
Any other field class returns NULL.
| fc | the field class |
| i | the index |
| const actf_fld_cls * actf_fld_cls_options_fld_cls_idx | ( | const actf_fld_cls * | fc, |
| size_t | i ) |
Get the field class of the option with the specified index of the variant field class.
Applicable to:
Any other field class returns NULL.
| fc | the field class |
| i | the index |
| const actf_rng_set * actf_fld_cls_options_selector_rng_set_idx | ( | const actf_fld_cls * | fc, |
| size_t | i ) |
Get the selector range set of the option with the specified index of the variant field class.
Applicable to:
Any other field class returns NULL.
| fc | the field class |
| i | the index |
| const actf_fld * actf_fld_cls_options_attributes_idx | ( | const actf_fld_cls * | fc, |
| size_t | i ) |
Get the attributes of the option with the specified index of the variant field class.
Applicable to:
Any other field class returns NULL.
| fc | the field class |
| i | the index |
| const actf_fld * actf_fld_cls_options_extensions_idx | ( | const actf_fld_cls * | fc, |
| size_t | i ) |
Get the extensions of the option with the specified index of the variant field class.
Applicable to:
Any other field class returns NULL.
| fc | the field class |
| i | the index |
| const char * actf_fld_cls_aliased_name | ( | const actf_fld_cls * | fc | ) |
Get the alias of the field class.
Applicable to ALL field classes.
| fc | the field class |
| const actf_fld * actf_fld_cls_attributes | ( | const actf_fld_cls * | fc | ) |
Get the attributes of the field class.
Applicable to ALL field classes.
| fc | the field class |
| const actf_fld * actf_fld_cls_extensions | ( | const actf_fld_cls * | fc | ) |
Get the extensions of the field class.
Applicable to ALL field classes.
| fc | the field class |