NAME | SYNOPSIS | PARAMETERS | DESCRIPTION | RETURN VALUE | ERRORS | ATTRIBUTES
$(OS_DIR)/lib/libsysevent.a #include <sys/sysevent.h> #include <libsysevent.h>sysevent_attr_t *sysevent_attr_next(sysevent_t * ev, sysevent_attr_list_t * ev_attr_list);
Handle pointing to an event
Pointer to event attribute list
Handle to an event attribute (name-value pair)
Pointer to attribute value structure
The sysevent_attr_next() function returns the next attribute associated with event in its attribute list, ev_attr_list . Specifying NULL for the attribute argument, it will return the first attribute in the list.
The sysevent_attr_name() function returns a pointer to a string containing the name of the attribute, attr .
The sysevent_attr_value() function updates the structure members of ev_attr_val to reflect the datatype and appropriate data value for the attribute attr .
The buffers containing the value data and name are managed by the library and can only be freed by a call to sysevent_free() .
Note that sysevent_attr_value() returns a correct result for all valid sysevent data types ( SE_DATA_TYPE_* ), but the following name-value pair types are not supported:
DATA_TYPE_BOOLEAN
DATA_TYPE_INT16_ARRAY
DATA_TYPE_UINT16_ARRAY
DATA_TYPE_INT64_ARRAY
DATA_TYPE_UINT64_ARRAY
DATA_TYPE_STRING_ARRAY
Also note that sysevent_attr_next() works only on an event duplicate obtained via a call to sysevent_dup() . This allows the attributes associated with the system event to be unpacked. If sysevent_dup() is not called prior to sysevent_attr_next() invocation, a null pointer is returned and errno is set to ENOENT .
The sysevent_attr_next() function returns an attribute handle on success. On failure, NULL is returned and errno is set to indicate the error.
The sysevent_attr_name() function returns a pointer to the name of the attribute. NULL is returned in the case of failure and an errno condition is set.
The sysevent_attr_value() function returns 0 for success. Otherwise, a value of -1 is returned and an errno condition is set.
Pointer argument has a null value
No attribute match found or event is not unpacked
Data type not supported
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
Interface Stability | Evolving |
NAME | SYNOPSIS | PARAMETERS | DESCRIPTION | RETURN VALUE | ERRORS | ATTRIBUTES