Synopsis

Description

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>:

The process id of the target process. This is not valid for kernel tracing.

trace_file_name

The name of the trace file to which the target writes. trace_file_name will be NULL if no trace file exists or if kernel tracing is implemented. This pointer should not be used after calling other libtnfctl interfaces. The client should copy this string if it should be saved for the use of other libtnfctl interfaces.

The state of the trace buffer. TNFCTL_BUF_OK indicates that a trace buffer has been allocated. TNFCTL_BUF_NONE indicates that no buffer has been allocated. TNFCTL_BUF_BROKEN indicates that there is an internal error in the target for tracing. The target will continue to run correctly, but no trace records will be written. To fix tracing, restart the process. For kernel tracing, deallocate the existing buffer with tnfctl_buffer_dealloc(3TNF) and allocate a new one with tnfctl_buffer_alloc(3TNF).