JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
man pages section 3: Extended Library Functions     Oracle Solaris 10 1/13 Information Library
search filter icon
search icon

Document Information

Preface

Extended Library Functions - Part 1

Extended Library Functions - Part 2

Extended Library Functions - Part 3

Extended Library Functions - Part 4

Extended Library Functions - Part 5

Extended Library Functions - Part 6

sin(3M)

sincos(3M)

sincosf(3M)

sincosl(3M)

sinf(3M)

sinh(3M)

sinhf(3M)

sinhl(3M)

sinl(3M)

smf_degrade_instance(3SCF)

smf_disable_instance(3SCF)

smf_enable_instance(3SCF)

smf_get_state(3SCF)

smf_maintain_instance(3SCF)

smf_refresh_instance(3SCF)

smf_restart_instance(3SCF)

smf_restore_instance(3SCF)

sqrt(3M)

sqrtf(3M)

sqrtl(3M)

SSAAgentIsAlive(3SNMP)

SSAGetTrapPort(3SNMP)

SSAOidCmp(3SNMP)

SSAOidCpy(3SNMP)

SSAOidDup(3SNMP)

SSAOidFree(3SNMP)

SSAOidInit(3SNMP)

SSAOidNew(3SNMP)

SSAOidString(3SNMP)

SSAOidStrToOid(3SNMP)

SSAOidZero(3SNMP)

SSARegSubagent(3SNMP)

SSARegSubtable(3SNMP)

SSARegSubtree(3SNMP)

SSASendTrap(3SNMP)

SSAStringCpy(3SNMP)

SSAStringInit(3SNMP)

SSAStringToChar(3SNMP)

SSAStringZero(3SNMP)

SSASubagentOpen(3SNMP)

stdarg(3EXT)

step(3GEN)

stobclear(3TSOL)

stobl(3TSOL)

stobsl(3TSOL)

strcadd(3GEN)

strccpy(3GEN)

streadd(3GEN)

strecpy(3GEN)

strfind(3GEN)

strrspn(3GEN)

str_to_label(3TSOL)

strtrns(3GEN)

Sun_MP_SendScsiCmd(3MPAPI)

SUNW_C_GetMechSession(3EXT)

SUNW_C_KeyToObject(3EXT)

sysevent_bind_handle(3SYSEVENT)

sysevent_free(3SYSEVENT)

sysevent_get_attr_list(3SYSEVENT)

sysevent_get_class_name(3SYSEVENT)

sysevent_get_pid(3SYSEVENT)

sysevent_get_pub_name(3SYSEVENT)

sysevent_get_seq(3SYSEVENT)

sysevent_get_size(3SYSEVENT)

sysevent_get_subclass_name(3SYSEVENT)

sysevent_get_time(3SYSEVENT)

sysevent_get_vendor_name(3SYSEVENT)

sysevent_post_event(3SYSEVENT)

sysevent_subscribe_event(3SYSEVENT)

sysevent_unbind_handle(3SYSEVENT)

sysevent_unsubscribe_event(3SYSEVENT)

tan(3M)

tanf(3M)

tanh(3M)

tanhf(3M)

tanhl(3M)

tanl(3M)

Task(3PERL)

tgamma(3M)

tgammaf(3M)

tgammal(3M)

tnfctl_buffer_alloc(3TNF)

tnfctl_buffer_dealloc(3TNF)

tnfctl_check_libs(3TNF)

tnfctl_close(3TNF)

tnfctl_continue(3TNF)

tnfctl_exec_open(3TNF)

tnfctl_filter_list_add(3TNF)

tnfctl_filter_list_delete(3TNF)

tnfctl_filter_list_get(3TNF)

tnfctl_filter_state_set(3TNF)

tnfctl_indirect_open(3TNF)

tnfctl_internal_open(3TNF)

tnfctl_kernel_open(3TNF)

tnfctl_pid_open(3TNF)

tnfctl_probe_apply(3TNF)

tnfctl_probe_apply_ids(3TNF)

tnfctl_probe_connect(3TNF)

tnfctl_probe_disable(3TNF)

tnfctl_probe_disconnect_all(3TNF)

tnfctl_probe_enable(3TNF)

tnfctl_probe_state_get(3TNF)

tnfctl_probe_trace(3TNF)

tnfctl_probe_untrace(3TNF)

tnfctl_register_funcs(3TNF)

tnfctl_strerror(3TNF)

tnfctl_trace_attrs_get(3TNF)

tnfctl_trace_state_set(3TNF)

TNF_DEBUG(3TNF)

TNF_DECLARE_RECORD(3TNF)

TNF_DEFINE_RECORD_1(3TNF)

TNF_DEFINE_RECORD_2(3TNF)

TNF_DEFINE_RECORD_3(3TNF)

TNF_DEFINE_RECORD_4(3TNF)

TNF_DEFINE_RECORD_5(3TNF)

TNF_PROBE_0(3TNF)

TNF_PROBE_0_DEBUG(3TNF)

TNF_PROBE_1(3TNF)

TNF_PROBE_1_DEBUG(3TNF)

TNF_PROBE_2(3TNF)

TNF_PROBE_2_DEBUG(3TNF)

TNF_PROBE_3(3TNF)

TNF_PROBE_3_DEBUG(3TNF)

TNF_PROBE(3TNF)

TNF_PROBE_4(3TNF)

TNF_PROBE_4_DEBUG(3TNF)

TNF_PROBE_5(3TNF)

TNF_PROBE_5_DEBUG(3TNF)

tnf_process_disable(3TNF)

tnf_process_enable(3TNF)

tnf_thread_disable(3TNF)

tnf_thread_enable(3TNF)

touchlock(3MAIL)

tracing(3TNF)

trunc(3M)

truncf(3M)

truncl(3M)

tsalarm_get(3EXT)

tsalarm_set(3EXT)

tsol_getrhtype(3TSOL)

tsol_lbuild_create(3TSOL)

tsol_lbuild_destroy(3TSOL)

tsol_lbuild_get(3TSOL)

tsol_lbuild_set(3TSOL)

Ucred(3PERL)

uuid_clear(3UUID)

uuid_compare(3UUID)

uuid_copy(3UUID)

uuid_generate(3UUID)

uuid_generate_random(3UUID)

uuid_generate_time(3UUID)

uuid_is_null(3UUID)

uuid_parse(3UUID)

uuid_time(3UUID)

uuid_unparse(3UUID)

v12n(3EXT)

v12n_capabilities(3EXT)

v12n_chassis_serialno(3EXT)

v12n_ctrl_domain(3EXT)

v12n_domain_name(3EXT)

v12n_domain_roles(3EXT)

v12n_domain_uuid(3EXT)

varargs(3EXT)

vatan2_(3MVEC)

vatan2f_(3MVEC)

vatan_(3MVEC)

vatanf_(3MVEC)

vc_abs_(3MVEC)

vc_exp_(3MVEC)

vc_log_(3MVEC)

vcos_(3MVEC)

vcosf_(3MVEC)

vcospi_(3MVEC)

vcospif_(3MVEC)

vc_pow_(3MVEC)

vexp_(3MVEC)

vexpf_(3MVEC)

vhypot_(3MVEC)

vhypotf_(3MVEC)

vlog_(3MVEC)

vlogf_(3MVEC)

volmgt_acquire(3VOLMGT)

volmgt_check(3VOLMGT)

volmgt_feature_enabled(3VOLMGT)

volmgt_inuse(3VOLMGT)

volmgt_ownspath(3VOLMGT)

volmgt_release(3VOLMGT)

volmgt_root(3VOLMGT)

volmgt_running(3VOLMGT)

volmgt_symdev(3VOLMGT)

volmgt_symname(3VOLMGT)

vpow_(3MVEC)

vpowf_(3MVEC)

vrhypot_(3MVEC)

vrhypotf_(3MVEC)

vrsqrt_(3MVEC)

vrsqrtf_(3MVEC)

vsin_(3MVEC)

vsincos_(3MVEC)

vsincosf_(3MVEC)

vsincospi_(3MVEC)

vsincospif_(3MVEC)

vsinf_(3MVEC)

vsinpi_(3MVEC)

vsinpif_(3MVEC)

vsqrt_(3MVEC)

vsqrtf_(3MVEC)

vz_abs_(3MVEC)

vz_exp_(3MVEC)

vz_log_(3MVEC)

vz_pow_(3MVEC)

write_vtoc(3EXT)

wsreg_add_child_component(3WSREG)

wsreg_add_compatible_version(3WSREG)

wsreg_add_dependent_component(3WSREG)

wsreg_add_display_name(3WSREG)

wsreg_add_required_component(3WSREG)

wsreg_can_access_registry(3WSREG)

wsreg_clone_component(3WSREG)

wsreg_components_equal(3WSREG)

wsreg_create_component(3WSREG)

wsreg_free_component(3WSREG)

wsreg_free_component_array(3WSREG)

wsreg_get(3WSREG)

wsreg_get_all(3WSREG)

wsreg_get_child_components(3WSREG)

wsreg_get_compatible_versions(3WSREG)

wsreg_get_data(3WSREG)

wsreg_get_data_pairs(3WSREG)

wsreg_get_dependent_components(3WSREG)

wsreg_get_display_languages(3WSREG)

wsreg_get_display_name(3WSREG)

wsreg_get_id(3WSREG)

wsreg_get_instance(3WSREG)

wsreg_get_location(3WSREG)

wsreg_get_parent(3WSREG)

wsreg_get_required_components(3WSREG)

wsreg_get_type(3WSREG)

wsreg_get_uninstaller(3WSREG)

wsreg_get_unique_name(3WSREG)

wsreg_get_vendor(3WSREG)

wsreg_get_version(3WSREG)

wsreg_initialize(3WSREG)

wsreg_query_create(3WSREG)

wsreg_query_free(3WSREG)

wsreg_query_get_id(3WSREG)

wsreg_query_get_instance(3WSREG)

wsreg_query_get_location(3WSREG)

wsreg_query_get_unique_name(3WSREG)

wsreg_query_get_version(3WSREG)

wsreg_query_set_id(3WSREG)

wsreg_query_set_instance(3WSREG)

wsreg_query_set_location(3WSREG)

wsreg_query_set_unique_name(3WSREG)

wsreg_query_set_version(3WSREG)

wsreg_register(3WSREG)

wsreg_remove_child_component(3WSREG)

wsreg_remove_compatible_version(3WSREG)

wsreg_remove_dependent_component(3WSREG)

wsreg_remove_display_name(3WSREG)

wsreg_remove_required_component(3WSREG)

wsreg_set_data(3WSREG)

wsreg_set_id(3WSREG)

wsreg_set_instance(3WSREG)

wsreg_set_location(3WSREG)

wsreg_set_parent(3WSREG)

wsreg_set_type(3WSREG)

wsreg_set_uninstaller(3WSREG)

wsreg_set_unique_name(3WSREG)

wsreg_set_vendor(3WSREG)

wsreg_set_version(3WSREG)

wsreg_unregister(3WSREG)

Xbcleartos(3TSOL)

Xbsltos(3TSOL)

XTSOLgetClientAttributes(3XTSOL)

XTSOLgetPropAttributes(3XTSOL)

XTSOLgetPropLabel(3XTSOL)

XTSOLgetPropUID(3XTSOL)

XTSOLgetResAttributes(3XTSOL)

XTSOLgetResLabel(3XTSOL)

XTSOLgetResUID(3XTSOL)

XTSOLgetSSHeight(3XTSOL)

XTSOLgetWorkstationOwner(3XTSOL)

XTSOLIsWindowTrusted(3XTSOL)

XTSOLMakeTPWindow(3XTSOL)

XTSOLsetPolyInstInfo(3XTSOL)

XTSOLsetPropLabel(3XTSOL)

XTSOLsetPropUID(3XTSOL)

XTSOLsetResLabel(3XTSOL)

XTSOLsetResUID(3XTSOL)

XTSOLsetSessionHI(3XTSOL)

XTSOLsetSessionLO(3XTSOL)

XTSOLsetSSHeight(3XTSOL)

XTSOLsetWorkstationOwner(3XTSOL)

y0(3M)

y0f(3M)

y0l(3M)

y1(3M)

y1f(3M)

y1l(3M)

yn(3M)

ynf(3M)

ynl(3M)

tnfctl_probe_state_get

, tnfctl_probe_enable

, tnfctl_probe_disable

, tnfctl_probe_trace

, tnfctl_probe_untrace

, tnfctl_probe_connect

, tnfctl_probe_disconnect_all

- interfaces to query and to change the state of a probe

Synopsis

cc [ flag ... ] file ... -ltnfctl [ library ... ]
#include <tnf/tnfctl.h>

tnfctl_errcode_t tnfctl_probe_state_get(tnfctl_handle_t *hndl,
     tnfctl_probe_t *probe_hndl, tnfctl_probe_state_t *state);
tnfctl_errcode_t tnfctl_probe_enable(tnfctl_handle_t *hndl,
     tnfctl_probe_t *probe_hndl, void *ignored);
tnfctl_errcode_t tnfctl_probe_disable(tnfctl_handle_t *hndl,
     tnfctl_probe_t *probe_hndl, void *ignored);
tnfctl_errcode_t tnfctl_probe_trace(tnfctl_handle_t *hndl,
     tnfctl_probe_t *probe_hndl, void *ignored);
tnfctl_errcode_t tnfctl_probe_untrace(tnfctl_handle_t *hndl,
     tnfctl_probe_t *probe_hndl, void *ignored);
tnfctl_errcode_t tnfctl_probe_disconnect_all(tnfctl_handle_t *hndl,
     tnfctl_probe_t *probe_hndl, void *ignored);
tnfctl_errcode_t tnfctl_probe_connect(tnfctl_handle_t *hndl,
     tnfctl_probe_t *probe_hndl, const char *lib_base_name,
     const char *func_name);

Description

tnfctl_probe_state_get() returns the state of the probe specified by probe_hndl in the process or kernel specified by hndl. The user will pass these in to an apply iterator. The caller must also allocate state and pass in a pointer to it. The semantics of the individual members of state are:

id

The unique integer assigned to this probe. This number does not change over the lifetime of this probe. A probe_hndl can be obtained by using the calls tnfctl_apply(), tanfctl_apply_ids(), or tnfctl_register_funcs().

attr_string

A string that consists of attribute value pairs separated by semicolons. For the syntax of this string, see the syntax of the detail argument of the TNF_PROBE(3TNF) macro. The attributes name, slots, keys, file, and line are defined for every probe. Additional user-defined attributes can be added by using the detail argument of the TNF_PROBE(3TNF) macro. An example of attr_string follows:

"name pageout;slots vnode pages_pageout ;
keys vm pageio io;file vm.c;line 25;"
enabled

B_TRUE if the probe is enabled, or B_FALSE if the probe is disabled. Probes are disabled by default. Use tnfctl_probe_enable() or tnfctl_probe_disable() to change this state.

traced

B_TRUE if the probe is traced, or B_FALSE if the probe is not traced. Probes in user processes are traced by default. Kernel probes are untraced by default. Use tnfctl_probe_trace() or tnfctl_probe_untrace() to change this state.

new_probe

B_TRUE if this is a new probe brought in since the last change in libraries. See dlopen(3C) or dlclose(3C). Otherwise, the value of new_probe will be B_FALSE. This field is not meaningful for kernel probe control.

obj_name

The name of the shared object or executable in which the probe is located. This string can be freed, so the client should make a copy of the string if it needs to be saved for use by other libtnfctl interfaces. In kernel mode, this string is always NULL.

func_names

A null-terminated array of pointers to strings that contain the names of functions connected to this probe. Whenever an enabled probe is encountered at runtime, these functions are executed. This array also will be freed by the library when the state of the probe changes. Use tnfctl_probe_connect() or tnfctl_probe_disconnect_all() to change this state.

func_addrs

A null-terminated array of pointers to addresses of functions in the target image connected to this probe. This array also will be freed by the library when the state of the probe changes.

client_registered_data

Data that was registered by the client for this probe by the creator function in tnfctl_register_funcs(3TNF).

tnfctl_probe_enable( ), tnfctl_probe_disable( ), tnfctl_probe_trace( ), tnfctl_probe_untrace( ), and tnfctl_probe_disconnect_all() ignore the last argument. This convenient feature permits these functions to be used in the probe_op field of tnfctl_probe_apply(3TNF) and tnfctl_probe_apply_ids(3TNF). tnfctl_probe_enable() enables the probe specified by probe_hndl. This is the master switch on a probe. A probe does not perform any action until it is enabled.

tnfctl_probe_disable() disables the probe specified by probe_hndl.

tnfctl_probe_trace() turns on tracing for the probe specified by probe_hndl. Probes emit a trace record only if the probe is traced.

tnfctl_probe_untrace() turns off tracing for the probe specified by probe_hndl. This is useful if you want to connect probe functions to a probe without tracing it.

tnfctl_probe_connect() connects the function func_name which exists in the library lib_base_name, to the probe specified by probe_hndl. tnfctl_probe_connect() returns an error code if used on a kernel tnfctl handle. lib_base_name is the base name (not a path) of the library. If it is NULL, and multiple functions in the target process match func_name, one of the matching functions is chosen arbitrarily. A probe function is a function that is in the target's address space and is written to a certain specification. The specification is not currently published.

tnf_probe_debug() is one function exported by libtnfprobe.so.1 and is the debug function that prex(1) uses. When the debug function is executed, it prints out the probe arguments and the value of the sunw%debug attribute of the probe to stderr.

tnfctl_probe_disconnect_all() disconnects all probe functions from the probe specified by probe_hndl.

Note that no libtnfctl call returns a probe handle (tnfctl_probe_t), yet each of the routines described here takes a probe_hndl as an argument. These routines may be used by passing them to one of the tnfctl_probe_apply(3TNF) iterators as the “op” argument. Alternatively, probe handles may be obtained and saved by a user's “op" function, and they can be passed later as the probe_hndl argument when using any of the functions described here.

Return Values

tnfctl_probe_state_get( ), tnfctl_probe_enable( ), tnfctl_probe_disable( ), tnfctl_probe_trace( ), tnfctl_probe_untrace( ), tnfctl_probe_disconnect_all() and tnfctl_probe_connect() return TNFCTL_ERR_NONE upon success.

Errors

The following error codes apply to tnfctl_probe_state_get():

TNFCTL_ERR_INVALIDPROBE

probe_hndl is no longer valid. The library that the probe was in could have been dynamically closed by dlclose(3C).

The following error codes apply to tnfctl_probe_enable(), tnfctl_probe_disable(), tnfctl_probe_trace(), tnfctl_probe_untrace(), and tnfctl_probe_disconnect_all()

TNFCTL_ERR_INVALIDPROBE

probe_hndl is no longer valid. The library that the probe was in could have been dynamically closed by dlclose(3C).

TNFCTL_ERR_BUFBROKEN

Cannot do probe operations because tracing is broken in the target.

TNFCTL_ERR_NOBUF

Cannot do probe operations until a buffer is allocated. See tnfctl_buffer_alloc(3TNF). This error code does not apply to kernel probe control.

The following error codes apply to tnfctl_probe_connect():

TNFCTL_ERR_INVALIDPROBE

probe_hndl is no longer valid. The library that the probe was in could have been dynamically closed by dlclose(3C).

TNFCTL_ERR_BADARG

The handle is a kernel handle, or func_name could not be found.

TNFCTL_ERR_BUFBROKEN

Cannot do probe operations because tracing is broken in the target.

TNFCTL_ERR_NOBUF

Cannot do probe operations until a buffer is allocated. See tnfctl_buffer_alloc(3TNF).

Attributes

See attributes(5) for description of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Availability
SUNWtnfc
MT Level
MT-Safe

See Also

prex(1), TNF_PROBE(3TNF), libtnfctl(3TNF), tnfctl_check_libs(3TNF), tnfctl_continue(3TNF), tnfctl_probe_apply(3TNF), tnfctl_probe_apply_ids(3TNF), tracing(3TNF), tnf_kernel_probes(4), attributes(5)