dtrace_setopt, dtrace_getopt - Process DTrace options
cc [ flag... ] file... -ldtrace [ library... ] #include <dtrace.h> int dtrace_getopt(dtrace_hdl_t *dtp, const char *opt, dtrace_optval_t *val) int dtrace_setopt(dtrace_hdl_t *dtp, const char *opt, const char *val)
The dtrace_getopt() function gets the current value of the specified option, opt, and returns that value in the third argument, val.
The dtrace_setopt() function sets the specified option, opt, to the specified value, val, for the DTrace handle, dtp. The value is specified as a string.
On successful completion, the dtrace_setopt() function returns 0. Otherwise the function returns -1 and sets the DTrace error number to indicate the reason for the failure. See the dtrace_errno(3DTRACE) man page for more information.
On successful completion, the dtrace_getopt() function returns 0 and places the value of the specified option in the val argument. Otherwise the function returns -1 and sets the DTrace error number to indicate the reason for the failure. See the dtrace_errno(3DTRACE) man page for more information.
The dtrace_getopt() and dtrace_setopt() functions will fail if:
Either the dtp or the opt argument is NULL.
The opt argument contains an invalid DTrace option name.
The dtrace_setopt() function will fail if:
The val argument is an inappropriate value for the specified option. See the Solaris Dynamic Tracing Guide for the appropriate values.
The system was unable to allocate memory while processing this function.
When setting the version option, this error indicates that the specified version is invalid.
When setting the version option, this error indicates that the requested API version is undefined.
When setting the strsize option, the specified value exceeds UINT_MAX.
See libdtrace(3LIB) for an example of using the dtrace_setopt() function.
See attributes(7) for descriptions of the following attributes:
|