Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

tnfctl_register_funcs(3tnf) [sunos man page]

tnfctl_register_funcs(3TNF)				       TNF Library Functions				       tnfctl_register_funcs(3TNF)

NAME
tnfctl_register_funcs - register callbacks for probe creation and destruction SYNOPSIS
cc [ flag ... ] file ... -ltnfctl [ library ... ] #include <tnf/tnfctl.h> tnfctl_errcode_t tnfctl_register_funcs(tnfctl_handle_t *hndl, void * (*create_func)(tnfctl_handle_t *, tnfctl_probe_t *), void (*destroy_func)(void *)); DESCRIPTION
The function tnfctl_register_funcs() is used to store client-specific data on a per-probe basis. It registers a creator and a destructor function with hndl, either of which can be NULL. The creator function is called for every probe that currently exists in hndl. Every time a new probe is discovered, that is brought in by dlopen(3C), create_func is called. The return value of the creator function is stored as part of the probe state and can be retrieved by tnfctl_probe_state_get(3TNF) in the member field client_registered_data. destroy_func is called for every probe handle that is freed. This does not necessarily happen at the time dlclose(3C) frees the shared object. The probe handles are freed only when hndl is closed by tnfctl_close(3TNF). If tnfctl_register_funcs() is called a second time for the same hndl, then the previously registered destructor function is called first for all of the probes. RETURN VALUES
tnfctl_register_funcs() returns TNFCTL_ERR_NONE upon success. ERRORS
TNFCTL_ERR_INTERNAL An internal error occurred. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWtnfc | +-----------------------------+-----------------------------+ |MT Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
prex(1), TNF_PROBE(3TNF), dlclose(3C), dlopen(3C), libtnfctl(3TNF), tnfctl_close(3TNF), tnfctl_probe_state_get(3TNF), tracing(3TNF), tnf_kernel_probes(4), attributes(5) Linker and Libraries Guide SunOS 5.10 1 Mar 2004 tnfctl_register_funcs(3TNF)

Check Out this Related Man Page

tnfctl_close(3TNF)					       TNF Library Functions						tnfctl_close(3TNF)

NAME
tnfctl_close - close a tnfctl handle SYNOPSIS
cc [ flag ... ] file ... -ltnfctl [ library ... ] #include <tnf/tnfctl.h> tnfctl_errcode_t tnfctl_close(tnfctl_handle_t *hndl, tnfctl_targ_op_t action); DESCRIPTION
tnfctl_close() is used to close a tnfctl handle and to free up the memory associated with the handle. When the handle is closed, the trac- ing state and the states of the probes are not changed. tnfctl_close() can be used to close handles in any mode, that is, whether they were created by tnfctl_internal_open(3TNF), tnfctl_pid_open(3TNF), tnfctl_exec_open(3TNF), tnfctl_indirect_open(3TNF), or tnfctl_ker- nel_open(3TNF). The action argument is only used in direct mode, that is, if hndl was created by tnfctl_exec_open(3TNF) or tnfctl_pid_open(3TNF). In direct mode, action specifies whether the process will proceed, be killed, or remain suspended. action may have the following values: TNFCTL_TARG_DEFAULT Kills the target process if hndl was created with tnfctl_exec_open(3TNF), but lets it continue if it was created with tnfctl_pid_open(3TNF). TNFCTL_TARG_KILL Kills the target process. TNFCTL_TARG_RESUME Allows the target process to continue. TNFCTL_TARG_SUSPEND Leaves the target process suspended. This is not a job control suspend. It is possible to attach to the process again with a debugger or with the tnfctl_pid_open(3TNF) interface. The target process can also be continued with prun(1). RETURN VALUES
tnfctl_close() returns TNFCTL_ERR_NONE upon success. ERRORS
The following error codes apply to tnfctl_close(): TNFCTL_ERR_BADARG A bad argument was sent in action. TNFCTL_ERR_INTERNAL An internal error occurred. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWtnfc | +-----------------------------+-----------------------------+ |MT Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
prex(1), prun(1), TNF_PROBE(3TNF), libtnfctl(3TNF), tnfctl_exec_open(3TNF), tnfctl_indirect_open(3TNF), tnfctl_kernel_open(3TNF), tnfctl_pid_open(3TNF), tracing(3TNF), attributes(5) SunOS 5.11 4 Mar 1997 tnfctl_close(3TNF)
Man Page