TNFCTL_TRACE_ATTRS_GET(3TNF) | TNF Library Functions | TNFCTL_TRACE_ATTRS_GET(3TNF) |
cc [ flag... ] file... -ltnfctl [ library... ] #include <tnf/tnfctl.h> tnfctl_errcode_t tnfctl_trace_attrs_get(tnfctl_handle_t *hndl, tnfctl_trace_attrs_t *attrs);
The tnfctl_trace_attrs_get() function returns the trace attributes associated with hndl in attrs. The trace attributes can be changed by some of the other interfaces in libtnfctl(3TNF). It is the client's responsibility to use tnfctl_trace_attrs_get() to get the new trace attributes after use of interfaces that change them. Typically, a client will use tnfctl_trace_attrs_get() after a call to tnfctl_continue(3TNF) in order to make sure that tracing is still working. See the discussion of trace_buf_state that follows.
Trace attributes are represented by the struct tnfctl_trace_attrs structure defined in <tnf/tnfctl.h>:
struct tnfctl_trace_attrs { pid_t targ_pid; /* not kernel mode */ const char *trace_file_name; /* not kernel mode */ size_t trace_buf_size; size_t trace_min_size; tnfctl_bufstate_t trace_buf_state; boolean_t trace_state; boolean_t filter_state; /* kernel mode only */ long pad; };
The semantics of the individual members of attrs are:
targ_pid
trace_file_name
trace_buf_size
trace_min_size
trace_buf_state
trace_state
filter_state
The tnfctl_trace_attrs_get() function returns TNFCTL_ERR_NONE upon success.
The tnfctl_trace_attrs_get() function will fail if:
TNFCTL_ERR_INTERNAL
See attributes(7) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
MT Level | MT-Safe |
prex(1), TNF_PROBE(3TNF), libtnfctl(3TNF), tnf_process_disable(3TNF), tnfctl_buffer_alloc(3TNF), tnfctl_continue(3TNF), tnfctl_filter_list_get(3TNF), tracing(3TNF), attributes(7)
March 4, 1997 | OmniOS |