Skip Navigation Links | |
Exit Print View | |
man pages section 3: Extended Library Functions, Volume 1 Oracle Solaris 11.1 Information Library |
Extended Library Functions, Volume 1
CIRCLEQ_HEAD_INITIALIZER(3EXT)
cpc_walk_generic_events_all(3CPC)
cpc_walk_generic_events_pic(3CPC)
ct_dev_status_get_aset(3CONTRACT)
ct_dev_status_get_dev_state(3CONTRACT)
ct_dev_status_get_minor(3CONTRACT)
ct_dev_status_get_noneg(3CONTRACT)
ct_dev_tmpl_clear_noneg(3CONTRACT)
ct_dev_tmpl_get_minor(3CONTRACT)
ct_dev_tmpl_get_noneg(3CONTRACT)
ct_dev_tmpl_set_aset(3CONTRACT)
ct_dev_tmpl_set_minor(3CONTRACT)
ct_dev_tmpl_set_noneg(3CONTRACT)
ct_event_read_critical(3CONTRACT)
ct_pr_event_get_exitstatus(3CONTRACT)
ct_pr_event_get_gcorefile(3CONTRACT)
ct_pr_event_get_pcorefile(3CONTRACT)
ct_pr_event_get_pid(3CONTRACT)
ct_pr_event_get_ppid(3CONTRACT)
ct_pr_event_get_sender(3CONTRACT)
ct_pr_event_get_senderct(3CONTRACT)
ct_pr_event_get_signal(3CONTRACT)
ct_pr_event_get_zcorefile(3CONTRACT)
ct_pr_status_get_contracts(3CONTRACT)
ct_pr_status_get_fatal(3CONTRACT)
ct_pr_status_get_members(3CONTRACT)
ct_pr_status_get_param(3CONTRACT)
ct_pr_status_get_svc_aux(3CONTRACT)
ct_pr_status_get_svc_creator(3CONTRACT)
ct_pr_status_get_svc_ctid(3CONTRACT)
ct_pr_status_get_svc_fmri(3CONTRACT)
ct_pr_tmpl_get_fatal(3CONTRACT)
ct_pr_tmpl_get_param(3CONTRACT)
ct_pr_tmpl_get_svc_aux(3CONTRACT)
ct_pr_tmpl_get_svc_fmri(3CONTRACT)
ct_pr_tmpl_get_transfer(3CONTRACT)
ct_pr_tmpl_set_fatal(3CONTRACT)
ct_pr_tmpl_set_param(3CONTRACT)
ct_pr_tmpl_set_svc_aux(3CONTRACT)
ct_pr_tmpl_set_svc_fmri(3CONTRACT)
ct_pr_tmpl_set_transfer(3CONTRACT)
ct_status_get_cookie(3CONTRACT)
ct_status_get_critical(3CONTRACT)
ct_status_get_holder(3CONTRACT)
ct_status_get_informative(3CONTRACT)
ct_status_get_nevents(3CONTRACT)
ct_status_get_nevid(3CONTRACT)
ct_status_get_ntime(3CONTRACT)
ct_status_get_qtime(3CONTRACT)
ct_status_get_state(3CONTRACT)
ct_status_get_zoneid(3CONTRACT)
ct_tmpl_get_critical(3CONTRACT)
ct_tmpl_get_informative(3CONTRACT)
ct_tmpl_set_critical(3CONTRACT)
ct_tmpl_set_informative(3CONTRACT)
dat_evd_clear_unwaitable(3DAT)
dat_get_consumer_context(3DAT)
dat_registry_add_provider(3DAT)
dat_registry_list_providers(3DAT)
dat_registry_remove_provider(3DAT)
dat_set_consumer_context(3DAT)
devid_deviceid_to_nmlist(3DEVID)
di_link_next_by_lnode(3DEVINFO)
di_link_next_by_node(3DEVINFO)
di_lnode_private_get(3DEVINFO)
di_lnode_private_set(3DEVINFO)
di_minor_private_get(3DEVINFO)
di_minor_private_set(3DEVINFO)
di_path_client_devfs_path(3DEVINFO)
di_path_client_next_path(3DEVINFO)
di_path_phci_next_path(3DEVINFO)
di_path_prop_lookup_bytes(3DEVINFO)
di_path_prop_lookup_int64s(3DEVINFO)
di_path_prop_lookup_ints(3DEVINFO)
di_path_prop_lookup_strings(3DEVINFO)
di_path_prop_strings(3DEVINFO)
di_prom_prop_lookup_bytes(3DEVINFO)
di_prom_prop_lookup_ints(3DEVINFO)
di_prom_prop_lookup_strings(3DEVINFO)
di_prop_lookup_bytes(3DEVINFO)
di_prop_lookup_int64(3DEVINFO)
di_prop_lookup_strings(3DEVINFO)
ea_match_object_catalog(3EXACCT)
- device contract template functions
cc [ flag… ] file… -D_LARGEFILE64_SOURCE -lcontract [ library… ] #include <libcontract.h> #include <sys/contract/device.h> int ct_dev_tmpl_set_aset(int fd, uint_t aset);
int ct_dev_tmpl_get_aset(int fd, uint_t *asetp);
int ct_dev_tmpl_set_minor(int fd, char *minor);
int ct_dev_tmpl_get_minor(int fd, char *buf, size_t *buflenp);
int ct_dev_tmpl_set_noneg(int fd);
int ct_dev_tmpl_clear_noneg(int fd);
int ct_dev_tmpl_get_noneg(int fd, uint_t *nonegp);
a bitset of one or more of device states
a pointer to a variable into which the current A-set is to be returned
a buffer into which the minor path is to be returned
a pointer to variable of type size_t in which the size of the buffer buf is passed in. If the buffer is too small the size of the buffer needed for a successful call is passed back to the caller.
a file descriptor from an open of the device contract template file in the contract filesystem (ctfs)
the devfs path (the /devices path without the “/devices” prefix) of a minor which is to be the subject of a contract
a pointer to a uint_t variable for receiving the current setting of the “nonnegotiable” term in the template
These functions read and write device contract terms and operate on device contract template file descriptors obtained from the contract(4) filesystem (ctfs).
The ct_dev_tmpl_set_aset() and ct_dev_tmpl_get_aset() functions write and read the “acceptable states” set (or A-set for short). This is the set of device states guaranteed by the contract. Any departure from these states will result in the breaking of the contract and a delivery of a critical contract event to the contract holder. The A-set value is a bitset of one or more of the following device states: CT_DEV_EV_ONLINE, CT_DEV_EV_DEGRADED, and CT_DEV_EV_OFFLINE.
The ct_dev_tmpl_set_minor() and ct_dev_tmpl_get_minor() functions write and read the minor term (the device resource that is to be the subject of the contract.) The value is a devfs path to a device minor node (minus the “/devices” prefix). For the ct_dev_tmpl_get_minor() function, a buffer at least PATH_MAX in size must be passed in. If the buffer is smaller than PATH_MAX, then the minimum size of the buffer required (PATH_MAX) for this function is passed back to the caller via the buflenp argument.
The ct_dev_tmpl_set_noneg() and ct_dev_tmpl_get_noneg() functions write and read the nonnegotiable term. If this term is set, synchronous negotiation events are automatically NACKed on behalf of the contract holder. For ct_dev_tmpl_get_noneg(), the variable pointed to by nonegp is set to 1 if the “noneg” term is set or to 0 otherwise. The ct_dev_tmpl_clear_noneg() term clears the nonnegotiable term from a template.
Upon successful completion, these functions return 0. Otherwise, they return a non-zero error value.
The ct_dev_tmpl_set_aset() function will fail if:
A template file descriptor or A-set is invalid
The ct_dev_tmpl_set_minor() function will fail if:
One or more arguments is invalid.
The minor named by minor path does not exist.
The ct_dev_tmpl_set_noneg() function will fail if:
A process lacks sufficient privilege to NACK a device state change.
The ct_dev_tmpl_get_aset() and ct_dev_tmpl_get_minor() functions will fail if:
One or more arguments is invalid.
The requested term is not set.
The ct_dev_tmpl_get_noneg() function will fail if:
One or more arguments is invalid.
The ct_dev_tmpl_get_minor() function will fail if:
The supplied buffer is too small.
See attributes(5) for descriptions of the following attributes:
|
libcontract(3LIB), contract(4), devices(4), attributes(5), lfcompile(5)