secpolev_get_ability_info()
Get information about an ability event
Synopsis:
#include <secpol/secpolev.h>
int secpolev_get_ability_info(unsigned *id,
const char **name,
unsigned *flags,
uint64_t *start,
uint64_t *end)
Arguments:
- id
- If non-NULL, set to the ID of the ability.
- name
- If non-NULL, set to the name of the ability.
- flags
- If non-NULL, provides zero or more
SECPOLEV_ABILITY_*
flags. - start
- If non-NULL, set to the start of the range that was tested. Likely meaningful only if the
SECPOLEV_ABILITY_RANGED
flag is set. - end
- If non-NULL, set to the end of the range that was tested. Likely meaningful only if the
SECPOLEV_ABILITY_RANGED
flag is set.
Library:
libsecpolevDescription:
The secpolev_get_ability_info() function returns information about an ability event (that is, an event of type SECPOLEV_EVENT_ABILITY_TEST
).
The start and end values indicate the range tested for a ranged ability. For static abilities, SECPOLEV_ABILITY_RANGED
is set if the ability supports ranges. For custom abilities, this flag is not set and it is unknown if the ability supports ranges, though they typically do not.
The returned string remains valid until the next call to secpolev_wait_event().
Returns:
0
if successful, or -1
if an error occurred. On failure, errno is set to:- ENOTSUP - There is no current event or the event is not of type
SECPOLEV_EVENT_ABILITY_TEST
.
Page updated: