Skip Navigation Links | |
Exit Print View | |
![]() |
man pages section 3: Extended Library Functions, Volume 4 Oracle Solaris 11 Express 11/10 |
Extended Library Functions, Volume 4
gl_customize_completion(3TECLA)
scf_count_ranges_destroy(3SCF)
scf_entry_destroy_children(3SCF)
scf_instance_get_pg_composed(3SCF)
scf_instance_get_snapshot(3SCF)
scf_iter_instance_pgs_composed(3SCF)
scf_iter_instance_pgs_typed(3SCF)
scf_iter_instance_pgs_typed_composed(3SCF)
scf_iter_instance_snapshots(3SCF)
scf_iter_property_values(3SCF)
scf_iter_service_instances(3SCF)
scf_iter_service_pgs_typed(3SCF)
scf_iter_snaplevel_pgs_typed(3SCF)
scf_pg_get_parent_instance(3SCF)
scf_pg_get_parent_service(3SCF)
scf_pg_get_parent_snaplevel(3SCF)
scf_pg_get_underlying_pg(3SCF)
scf_service_add_instance(3SCF)
scf_service_get_instance(3SCF)
scf_simple_app_props_free(3SCF)
scf_simple_app_props_get(3SCF)
scf_simple_app_props_next(3SCF)
scf_simple_app_props_search(3SCF)
scf_simple_prop_next_astring(3SCF)
scf_simple_prop_next_boolean(3SCF)
scf_simple_prop_next_count(3SCF)
scf_simple_prop_next_integer(3SCF)
scf_simple_prop_next_opaque(3SCF)
scf_simple_prop_next_reset(3SCF)
scf_simple_prop_next_time(3SCF)
scf_simple_prop_next_ustring(3SCF)
scf_simple_prop_numvalues(3SCF)
scf_simple_walk_instances(3SCF)
scf_snaplevel_get_instance_name(3SCF)
scf_snaplevel_get_next_snaplevel(3SCF)
scf_snaplevel_get_parent(3SCF)
scf_snaplevel_get_scope_name(3SCF)
scf_snaplevel_get_service_name(3SCF)
scf_snapshot_get_base_snaplevel(3SCF)
scf_tmpl_error_prop_tmpl(3SCF)
scf_tmpl_error_source_fmri(3SCF)
scf_tmpl_prop_cardinality(3SCF)
scf_tmpl_prop_common_name(3SCF)
scf_tmpl_prop_description(3SCF)
scf_tmpl_prop_internal_seps(3SCF)
scf_tmpl_prop_visibility(3SCF)
scf_tmpl_value_common_name(3SCF)
scf_tmpl_value_count_range_choices(3SCF)
scf_tmpl_value_count_range_constraints(3SCF)
scf_tmpl_value_description(3SCF)
scf_tmpl_value_in_constraint(3SCF)
scf_tmpl_value_int_range_choices(3SCF)
scf_tmpl_value_int_range_constraints(3SCF)
scf_tmpl_value_name_choices(3SCF)
scf_tmpl_value_name_constraints(3SCF)
scf_tmpl_visibility_to_string(3SCF)
scf_transaction_destroy_children(3SCF)
scf_transaction_property_change(3SCF)
scf_transaction_property_change_type(3SCF)
scf_transaction_property_delete(3SCF)
scf_transaction_property_new(3SCF)
scf_transaction_reset_all(3SCF)
scf_value_get_as_string_typed(3SCF)
scf_value_set_from_string(3SCF)
stmfGetHostGroupMembers(3STMF)
stmfGetLogicalUnitProperties(3STMF)
stmfGetProviderDataProt(3STMF)
stmfGetTargetGroupMembers(3STMF)
stmfGetTargetProperties(3STMF)
stmfRemoveFromHostGroup(3STMF)
stmfRemoveFromTargetGroup(3STMF)
stmfSetProviderDataProt(3STMF)
sysevent_bind_handle(3SYSEVENT)
sysevent_get_attr_list(3SYSEVENT)
sysevent_get_class_name(3SYSEVENT)
sysevent_get_pub_name(3SYSEVENT)
sysevent_get_subclass_name(3SYSEVENT)
sysevent_get_vendor_name(3SYSEVENT)
sysevent_post_event(3SYSEVENT)
sysevent_subscribe_event(3SYSEVENT)
sysevent_unbind_handle(3SYSEVENT)
sysevent_unsubscribe_event(3SYSEVENT)
tnfctl_filter_list_delete(3TNF)
tnfctl_probe_disconnect_all(3TNF)
volmgt_feature_enabled(3VOLMGT)
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_components_equal(3WSREG)
wsreg_create_component(3WSREG)
wsreg_free_component_array(3WSREG)
wsreg_get_child_components(3WSREG)
wsreg_get_compatible_versions(3WSREG)
wsreg_get_dependent_components(3WSREG)
wsreg_get_display_languages(3WSREG)
wsreg_get_display_name(3WSREG)
wsreg_get_required_components(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_instance(3WSREG)
wsreg_query_set_location(3WSREG)
wsreg_query_set_unique_name(3WSREG)
wsreg_query_set_version(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)
XTSOLgetClientAttributes(3XTSOL)
XTSOLgetPropAttributes(3XTSOL)
- template property group functions
cc [ flag… ] file… -lscf [ library… ] #include <libscf.h> scf_pg_tmpl_t *scf_tmpl_pg_create(scf_handle_t *handle);
void scf_tmpl_pg_reset(scf_pg_tmpl_t *pg_tmpl);
void scf_tmpl_pg_destroy(scf_pg_tmpl_t *pg_tmpl);
int scf_tmpl_get_by_pg_name(const char *instance_fmri, const char *snapshot, const char *pg_name, const char *pg_type, scf_pg_tmpl_t *pg_tmpl, int flags);
int scf_tmpl_get_by_pg(scf_propertygroup_t *pg, scf_pg_tmpl_t *pg_tmpl, int flags)
int scf_tmpl_iter_pgs(scf_pg_tmpl_t *pg_tmpl, const char *fmri, const char *snapshot, const char *pg_type, int flags);
The template property group functions locate and give access to metadata about SMF configuration for service instances. They are used to directly access property group metadata and explore metadata for properties contained in those property groups.
A property group does not need to be currently defined in order to explore metadata about it, as long as the metadata is defined. Thus, the property group template functions operate on strings rather than scf_propertygroup_t entities.
By default, when an instance FMRI is specified, scf_tmpl_get_by_pg_name() and scf_tmpl_iter_pgs() lookup composed data from the running snapshot of the instance. A different snapshot may be explicitly selected by specifying a valid snapshot name rather than NULL for the snapshot argument. If a service FMRI is specified, the current properties are used.
By default, these functions also explore template data defined by the service or instance itself, the service's restarter, and global template data. See smf_template(5) for more information about this composition.
Once retrieved, the scf_pg_tmpl_t can be explored using the scf_tmpl_pg_name(3SCF) and scf_tmpl_prop_create(3SCF) suite of functions.
Before calling scf_tmpl_get_by_pg(), scf_tmpl_get_by_pg_name(), or scf_tmpl_iter_pgs(), the scf_pg_tmpl_t must be allocated by scf_tmpl_pg_create(). The scf_pg_tmpl_t can be reset to contain no template information with scf_tmpl_pg_reset(), so that it can be used to start an iteration from scratch. All associated memory can be freed with scf_tmpl_pg_destroy().
The scf_tmpl_get_by_pg() function locates the most specific matching template for the property group supplied. The parent of that property group can be either a service or an instance.
The scf_tmpl_get_by_pg_name() function locates the most specific matching template for the property group as specified. As described above, when the snapshot argument is NULL the default running snapshot is used. If flags includes SCF_PG_TMPL_FLAG_CURRENT, the snapshot argument is ignored and the current configuration is used. If flags includes SCF_PG_TMPL_FLAG_EXACT, only the exact FMRI is looked up. Either or both of the pg_name and pg_type arguments may be specified as NULL. In this case, pg_name and/or pg_type is wildcarded and matches any value. The most specific snapshot matching those arguments is returned.
The scf_tmpl_iter_pgs() function iterates across all templates defined for the specified FMRI, snapshot, and optional property group type. It also takes an optional flags argument. If flags includes SCF_PG_TMPL_FLAG_CURRENT, the snapshot argument is ignored and the “running” snapshot is used. SCF_PG_TMPL_FLAG_REQUIRED searches only for required property groups. SCF_PG_TMPL_FLAG_EXACT looks only at the exact FMRI provided for templates, and not for templates defined on its restarter or globally.
The iterator state for scf_tmpl_iter_pgs() is stored on the template data structure. The data structure should be allocated with scf_tmpl_pg_create() and to continue the iteration the previously returned structure should be passed in as an argument.
The scf_tmpl_pg_create() function returns NULL on failure and a pointer to an allocated and populated scf_pg_tmpl_t on success. The caller is responsible for freeing the memory with scf_tmpl_pg_destroy().
The scf_tmpl_get_by_pg() and scf_tmpl_get_by_pg_name() functions return 0 on success and -1 on failure.
The scf_tmpl_iter_pgs() function returns 1 on successful completion. If the iteration is complete, it returns 0. It returns -1 on error.
The scf_tmpl_get_by_pg(), scf_tmpl_get_by_pg_name(), and scf_tmpl_iter_pgs() functions will fail if:
The storage mechanism that the repository server (svc.configd(1M)) chose for the operation denied access.
The connection to the repository was lost.
The instance or its template property group has been deleted.
The handle passed in has been destroyed.
An internal error occurred.
The handle argument, fmri argument, snapshot name, pg_name, or pg is invalid.
There is not enough memory to populate the scf_pg_tmpl_t.
The server does not have adequate resources to complete the request.
The handle is not currently bound.
The object matching FMRI does not exist in the repository, or the snapshot does not exist.
The template could not be read due to access restrictions.
The scf_tmpl_get_by_pg() function will fail if:
The property group specified by pg is not set.
The scf_tmpl_pg_create() function will fail if:
The handle argument is NULL.
There is no memory available.
See attributes(5) for descriptions of the following attributes:
|
svc.configd(1M), scf_tmpl_pg_name(3SCF), scf_tmpl_prop_create(3SCF), attributes(5), smf_template(5)