actf 0.0.1
An acute CTF reader
Loading...
Searching...
No Matches
/home/adwe/code/actf/fld_loc.h File Reference

Field location related methods. More...

Go to the source code of this file.

Typedefs

typedef struct actf_fld_loc actf_fld_loc
 A field location.

Enumerations

enum  actf_fld_loc_origin {
  ACTF_FLD_LOC_ORIGIN_NONE , ACTF_FLD_LOC_ORIGIN_PKT_HEADER , ACTF_FLD_LOC_ORIGIN_PKT_CTX , ACTF_FLD_LOC_ORIGIN_EVENT_HEADER ,
  ACTF_FLD_LOC_ORIGIN_EVENT_COMMON_CTX , ACTF_FLD_LOC_ORIGIN_EVENT_SPECIFIC_CTX , ACTF_FLD_LOC_ORIGIN_EVENT_PAYLOAD , ACTF_FLD_LOC_N_ORIGINS
}
 Field location origins.

Functions

enum actf_fld_loc_origin actf_fld_loc_origin (const actf_fld_loc *loc)
 Get the origin of the field location.
char ** actf_fld_loc_path (const actf_fld_loc *loc)
 Get the path of a field location.
size_t actf_fld_loc_path_len (const actf_fld_loc *loc)
 Get the number of elements in the field location path.

Detailed Description

Field location related methods.

Function Documentation

◆ actf_fld_loc_origin()

Get the origin of the field location.

Parameters
locthe field location
Returns
the origin

◆ actf_fld_loc_path()

char ** actf_fld_loc_path ( const actf_fld_loc * loc)

Get the path of a field location.

Each path element is either a string denoting the name of a structure field member to follow or null which means refers to the parent structure field of the current locating context.

Parameters
locthe field location
Returns
the list of path elements, length is retrieved from actf_fld_loc_path_len().

◆ actf_fld_loc_path_len()

size_t actf_fld_loc_path_len ( const actf_fld_loc * loc)

Get the number of elements in the field location path.

Parameters
locthe field location
Returns
the number of elements in the path