10Sstevel@tonic-gate /* 20Sstevel@tonic-gate * CDDL HEADER START 30Sstevel@tonic-gate * 40Sstevel@tonic-gate * The contents of this file are subject to the terms of the 57475SPhilippe.Jung@Sun.COM * Common Development and Distribution License (the "License"). 67475SPhilippe.Jung@Sun.COM * You may not use this file except in compliance with the License. 70Sstevel@tonic-gate * 80Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 100Sstevel@tonic-gate * See the License for the specific language governing permissions 110Sstevel@tonic-gate * and limitations under the License. 120Sstevel@tonic-gate * 130Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 140Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 160Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 170Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 180Sstevel@tonic-gate * 190Sstevel@tonic-gate * CDDL HEADER END 200Sstevel@tonic-gate */ 217887SLiane.Praza@Sun.COM 220Sstevel@tonic-gate /* 2312483SAntonello.Cruz@Sun.COM * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. 240Sstevel@tonic-gate */ 250Sstevel@tonic-gate 260Sstevel@tonic-gate #ifndef _LIBSCF_H 270Sstevel@tonic-gate #define _LIBSCF_H 280Sstevel@tonic-gate 290Sstevel@tonic-gate 300Sstevel@tonic-gate #include <stddef.h> 310Sstevel@tonic-gate #include <sys/types.h> 32*12967Sgavin.maltby@oracle.com #include <libnvpair.h> 330Sstevel@tonic-gate 340Sstevel@tonic-gate #ifdef __cplusplus 350Sstevel@tonic-gate extern "C" { 360Sstevel@tonic-gate #endif 370Sstevel@tonic-gate 380Sstevel@tonic-gate typedef struct scf_version *scf_version_t; 390Sstevel@tonic-gate #define SCF_VERSION ((scf_version_t)1UL) 400Sstevel@tonic-gate 410Sstevel@tonic-gate /* 420Sstevel@tonic-gate * Opaque structures 430Sstevel@tonic-gate */ 440Sstevel@tonic-gate typedef struct scf_handle scf_handle_t; 450Sstevel@tonic-gate typedef struct scf_scope scf_scope_t; 460Sstevel@tonic-gate typedef struct scf_service scf_service_t; 470Sstevel@tonic-gate typedef struct scf_instance scf_instance_t; 480Sstevel@tonic-gate typedef struct scf_propertygroup scf_propertygroup_t; 490Sstevel@tonic-gate typedef struct scf_property scf_property_t; 500Sstevel@tonic-gate 510Sstevel@tonic-gate typedef struct scf_snapshot scf_snapshot_t; 520Sstevel@tonic-gate typedef struct scf_snaplevel scf_snaplevel_t; 530Sstevel@tonic-gate 540Sstevel@tonic-gate typedef struct scf_transaction scf_transaction_t; 550Sstevel@tonic-gate typedef struct scf_transaction_entry scf_transaction_entry_t; 560Sstevel@tonic-gate typedef struct scf_value scf_value_t; 570Sstevel@tonic-gate 580Sstevel@tonic-gate typedef struct scf_iter scf_iter_t; 590Sstevel@tonic-gate 607887SLiane.Praza@Sun.COM typedef struct scf_pg_tmpl scf_pg_tmpl_t; 617887SLiane.Praza@Sun.COM typedef struct scf_prop_tmpl scf_prop_tmpl_t; 627887SLiane.Praza@Sun.COM typedef struct scf_tmpl_errors scf_tmpl_errors_t; 637887SLiane.Praza@Sun.COM 640Sstevel@tonic-gate typedef struct scf_simple_app_props scf_simple_app_props_t; 650Sstevel@tonic-gate typedef struct scf_simple_prop scf_simple_prop_t; 660Sstevel@tonic-gate 670Sstevel@tonic-gate /* 680Sstevel@tonic-gate * Types 690Sstevel@tonic-gate */ 700Sstevel@tonic-gate typedef enum { 710Sstevel@tonic-gate SCF_TYPE_INVALID = 0, 720Sstevel@tonic-gate 730Sstevel@tonic-gate SCF_TYPE_BOOLEAN, 740Sstevel@tonic-gate SCF_TYPE_COUNT, 750Sstevel@tonic-gate SCF_TYPE_INTEGER, 760Sstevel@tonic-gate SCF_TYPE_TIME, 770Sstevel@tonic-gate SCF_TYPE_ASTRING, 780Sstevel@tonic-gate SCF_TYPE_OPAQUE, 790Sstevel@tonic-gate 800Sstevel@tonic-gate SCF_TYPE_USTRING = 100, 810Sstevel@tonic-gate 820Sstevel@tonic-gate SCF_TYPE_URI = 200, 830Sstevel@tonic-gate SCF_TYPE_FMRI, 840Sstevel@tonic-gate 850Sstevel@tonic-gate SCF_TYPE_HOST = 300, 860Sstevel@tonic-gate SCF_TYPE_HOSTNAME, 870Sstevel@tonic-gate SCF_TYPE_NET_ADDR_V4, 8812483SAntonello.Cruz@Sun.COM SCF_TYPE_NET_ADDR_V6, 8912483SAntonello.Cruz@Sun.COM SCF_TYPE_NET_ADDR 900Sstevel@tonic-gate } scf_type_t; 910Sstevel@tonic-gate 927887SLiane.Praza@Sun.COM typedef struct scf_time { 937887SLiane.Praza@Sun.COM int64_t t_seconds; 947887SLiane.Praza@Sun.COM int32_t t_ns; 957887SLiane.Praza@Sun.COM } scf_time_t; 967887SLiane.Praza@Sun.COM 977887SLiane.Praza@Sun.COM /* 987887SLiane.Praza@Sun.COM * There is no explicit initializer for this structure. Functions 997887SLiane.Praza@Sun.COM * which set or populate this structure assume that it is either 1007887SLiane.Praza@Sun.COM * uninitialized or destroyed. 1017887SLiane.Praza@Sun.COM */ 1027887SLiane.Praza@Sun.COM typedef struct scf_values { 1037887SLiane.Praza@Sun.COM scf_type_t value_type; 1047887SLiane.Praza@Sun.COM void *reserved; /* reserved for future use */ 1057887SLiane.Praza@Sun.COM int value_count; 1067887SLiane.Praza@Sun.COM char **values_as_strings; 1077887SLiane.Praza@Sun.COM union { 1087887SLiane.Praza@Sun.COM uint64_t *v_count; 1097887SLiane.Praza@Sun.COM uint8_t *v_boolean; 1107887SLiane.Praza@Sun.COM int64_t *v_integer; 1117887SLiane.Praza@Sun.COM char **v_astring; 1127887SLiane.Praza@Sun.COM char **v_ustring; 1137887SLiane.Praza@Sun.COM char **v_opaque; 1147887SLiane.Praza@Sun.COM scf_time_t *v_time; 1157887SLiane.Praza@Sun.COM } values; 1167887SLiane.Praza@Sun.COM } scf_values_t; 1177887SLiane.Praza@Sun.COM 1187887SLiane.Praza@Sun.COM typedef struct scf_count_ranges { 1197887SLiane.Praza@Sun.COM int scr_num_ranges; 1207887SLiane.Praza@Sun.COM uint64_t *scr_min; 1217887SLiane.Praza@Sun.COM uint64_t *scr_max; 1227887SLiane.Praza@Sun.COM } scf_count_ranges_t; 1237887SLiane.Praza@Sun.COM 1247887SLiane.Praza@Sun.COM typedef struct scf_int_ranges { 1257887SLiane.Praza@Sun.COM int sir_num_ranges; 1267887SLiane.Praza@Sun.COM int64_t *sir_min; 1277887SLiane.Praza@Sun.COM int64_t *sir_max; 1287887SLiane.Praza@Sun.COM } scf_int_ranges_t; 1297887SLiane.Praza@Sun.COM 1300Sstevel@tonic-gate /* 1310Sstevel@tonic-gate * Return codes 1320Sstevel@tonic-gate */ 1330Sstevel@tonic-gate #define SCF_SUCCESS 0 1340Sstevel@tonic-gate #define SCF_COMPLETE 1 1350Sstevel@tonic-gate #define SCF_FAILED -1 1360Sstevel@tonic-gate 1370Sstevel@tonic-gate typedef enum scf_error { 1380Sstevel@tonic-gate SCF_ERROR_NONE = 1000, /* no error */ 1390Sstevel@tonic-gate SCF_ERROR_NOT_BOUND, /* handle not bound */ 1400Sstevel@tonic-gate SCF_ERROR_NOT_SET, /* cannot use unset argument */ 1410Sstevel@tonic-gate SCF_ERROR_NOT_FOUND, /* nothing of that name found */ 1420Sstevel@tonic-gate SCF_ERROR_TYPE_MISMATCH, /* type does not match value */ 1430Sstevel@tonic-gate SCF_ERROR_IN_USE, /* cannot modify while in-use */ 1440Sstevel@tonic-gate SCF_ERROR_CONNECTION_BROKEN, /* repository connection gone */ 1450Sstevel@tonic-gate SCF_ERROR_INVALID_ARGUMENT, /* bad argument */ 1460Sstevel@tonic-gate SCF_ERROR_NO_MEMORY, /* no memory available */ 1470Sstevel@tonic-gate SCF_ERROR_CONSTRAINT_VIOLATED, /* required constraint not met */ 1480Sstevel@tonic-gate SCF_ERROR_EXISTS, /* object already exists */ 1490Sstevel@tonic-gate SCF_ERROR_NO_SERVER, /* repository server unavailable */ 1500Sstevel@tonic-gate SCF_ERROR_NO_RESOURCES, /* server has insufficient resources */ 1510Sstevel@tonic-gate SCF_ERROR_PERMISSION_DENIED, /* insufficient privileges for action */ 1520Sstevel@tonic-gate SCF_ERROR_BACKEND_ACCESS, /* backend refused access */ 1530Sstevel@tonic-gate SCF_ERROR_HANDLE_MISMATCH, /* mismatched SCF handles */ 1540Sstevel@tonic-gate SCF_ERROR_HANDLE_DESTROYED, /* object bound to destroyed handle */ 1550Sstevel@tonic-gate SCF_ERROR_VERSION_MISMATCH, /* incompatible SCF version */ 1560Sstevel@tonic-gate SCF_ERROR_BACKEND_READONLY, /* backend is read-only */ 1570Sstevel@tonic-gate SCF_ERROR_DELETED, /* object has been deleted */ 1587887SLiane.Praza@Sun.COM SCF_ERROR_TEMPLATE_INVALID, /* template data is invalid */ 1590Sstevel@tonic-gate 1600Sstevel@tonic-gate SCF_ERROR_CALLBACK_FAILED = 1080, /* user callback function failed */ 1610Sstevel@tonic-gate 1620Sstevel@tonic-gate SCF_ERROR_INTERNAL = 1101 /* internal error */ 1630Sstevel@tonic-gate } scf_error_t; 1640Sstevel@tonic-gate 1650Sstevel@tonic-gate /* 1667887SLiane.Praza@Sun.COM * This enum MUST be kept in sync with 1677887SLiane.Praza@Sun.COM * struct _scf_tmpl_error_desc em_desc() in scf_tmpl.c 1687887SLiane.Praza@Sun.COM */ 1697887SLiane.Praza@Sun.COM typedef enum scf_tmpl_error_type { 1707887SLiane.Praza@Sun.COM SCF_TERR_MISSING_PG, /* property group missing */ 1717887SLiane.Praza@Sun.COM SCF_TERR_WRONG_PG_TYPE, /* property group type incorrect */ 1727887SLiane.Praza@Sun.COM SCF_TERR_MISSING_PROP, /* missing required property */ 1737887SLiane.Praza@Sun.COM SCF_TERR_WRONG_PROP_TYPE, /* property type incorrect */ 1747887SLiane.Praza@Sun.COM SCF_TERR_CARDINALITY_VIOLATION, /* wrong number of values */ 1757887SLiane.Praza@Sun.COM SCF_TERR_VALUE_CONSTRAINT_VIOLATED, /* constraint violated for value */ 1767887SLiane.Praza@Sun.COM SCF_TERR_RANGE_VIOLATION, /* value violated specified range */ 1777887SLiane.Praza@Sun.COM SCF_TERR_PG_REDEFINE, /* global or restarter pg_pattern */ 1787887SLiane.Praza@Sun.COM /* redefined by the instance */ 1797887SLiane.Praza@Sun.COM SCF_TERR_PROP_TYPE_MISMATCH, /* property and value type mismatch */ 1807887SLiane.Praza@Sun.COM SCF_TERR_VALUE_OUT_OF_RANGE, /* value is out of range in template */ 1817887SLiane.Praza@Sun.COM SCF_TERR_INVALID_VALUE, /* value is not valid for the */ 1827887SLiane.Praza@Sun.COM /* template */ 1837887SLiane.Praza@Sun.COM SCF_TERR_PG_PATTERN_CONFLICT, /* pg_pattern conflicts with higher */ 1847887SLiane.Praza@Sun.COM /* level definition */ 1857887SLiane.Praza@Sun.COM SCF_TERR_PROP_PATTERN_CONFLICT, /* prop_pattern conflicts with higher */ 1867887SLiane.Praza@Sun.COM /* level definition */ 1877887SLiane.Praza@Sun.COM SCF_TERR_GENERAL_REDEFINE, /* global or restarter template */ 1887887SLiane.Praza@Sun.COM /* redefined */ 1897887SLiane.Praza@Sun.COM SCF_TERR_INCLUDE_VALUES, /* No supporting constraints or */ 1907887SLiane.Praza@Sun.COM /* values for include_values */ 1917887SLiane.Praza@Sun.COM SCF_TERR_PG_PATTERN_INCOMPLETE, /* Required pg_pattern is missing */ 1927887SLiane.Praza@Sun.COM /* name or type attribute. */ 1937887SLiane.Praza@Sun.COM SCF_TERR_PROP_PATTERN_INCOMPLETE /* Required prop_pattern is */ 1947887SLiane.Praza@Sun.COM /* missing a type attribute. */ 1957887SLiane.Praza@Sun.COM } scf_tmpl_error_type_t; 1967887SLiane.Praza@Sun.COM 1977887SLiane.Praza@Sun.COM typedef struct scf_tmpl_error scf_tmpl_error_t; 1987887SLiane.Praza@Sun.COM 1997887SLiane.Praza@Sun.COM /* 2007887SLiane.Praza@Sun.COM * scf_tmpl_strerror() human readable flag 2017887SLiane.Praza@Sun.COM */ 2027887SLiane.Praza@Sun.COM #define SCF_TMPL_STRERROR_HUMAN 0x1 2037887SLiane.Praza@Sun.COM 2047887SLiane.Praza@Sun.COM /* 2050Sstevel@tonic-gate * Standard services 2060Sstevel@tonic-gate */ 2077887SLiane.Praza@Sun.COM #define SCF_SERVICE_CONFIGD ((const char *) \ 2087887SLiane.Praza@Sun.COM "svc:/system/svc/repository:default") 2097887SLiane.Praza@Sun.COM #define SCF_INSTANCE_GLOBAL ((const char *) \ 2107887SLiane.Praza@Sun.COM "svc:/system/svc/global:default") 2117887SLiane.Praza@Sun.COM #define SCF_SERVICE_GLOBAL ((const char *) \ 2127887SLiane.Praza@Sun.COM "svc:/system/svc/global") 2130Sstevel@tonic-gate #define SCF_SERVICE_STARTD ((const char *) \ 2140Sstevel@tonic-gate "svc:/system/svc/restarter:default") 21511996SThomas.Whitten@Sun.COM #define SCF_INSTANCE_EMI ((const char *) \ 21611996SThomas.Whitten@Sun.COM "svc:/system/early-manifest-import:default") 21711996SThomas.Whitten@Sun.COM #define SCF_INSTANCE_FS_MINIMAL ((const char *) \ 21811996SThomas.Whitten@Sun.COM "svc:/system/filesystem/minimal:default") 21911996SThomas.Whitten@Sun.COM #define SCF_INSTANCE_MI ((const char *) \ 22011996SThomas.Whitten@Sun.COM "svc:/system/manifest-import:default") 2210Sstevel@tonic-gate 2220Sstevel@tonic-gate /* 2230Sstevel@tonic-gate * Major milestones 2240Sstevel@tonic-gate */ 2250Sstevel@tonic-gate #define SCF_MILESTONE_SINGLE_USER \ 2260Sstevel@tonic-gate ((const char *) "svc:/milestone/single-user:default") 2270Sstevel@tonic-gate #define SCF_MILESTONE_MULTI_USER \ 2280Sstevel@tonic-gate ((const char *) "svc:/milestone/multi-user:default") 2290Sstevel@tonic-gate #define SCF_MILESTONE_MULTI_USER_SERVER \ 2300Sstevel@tonic-gate ((const char *) "svc:/milestone/multi-user-server:default") 2310Sstevel@tonic-gate 2320Sstevel@tonic-gate /* 2330Sstevel@tonic-gate * standard scope names 2340Sstevel@tonic-gate */ 2350Sstevel@tonic-gate #define SCF_SCOPE_LOCAL ((const char *)"localhost") 2360Sstevel@tonic-gate 2370Sstevel@tonic-gate /* 2380Sstevel@tonic-gate * Property group types 2390Sstevel@tonic-gate */ 2400Sstevel@tonic-gate #define SCF_GROUP_APPLICATION ((const char *)"application") 2410Sstevel@tonic-gate #define SCF_GROUP_FRAMEWORK ((const char *)"framework") 2420Sstevel@tonic-gate #define SCF_GROUP_DEPENDENCY ((const char *)"dependency") 2430Sstevel@tonic-gate #define SCF_GROUP_METHOD ((const char *)"method") 2440Sstevel@tonic-gate #define SCF_GROUP_TEMPLATE ((const char *)"template") 2457887SLiane.Praza@Sun.COM #define SCF_GROUP_TEMPLATE_PG_PATTERN ((const char *)"template_pg_pattern") 2467887SLiane.Praza@Sun.COM #define SCF_GROUP_TEMPLATE_PROP_PATTERN ((const char *)"template_prop_pattern") 2470Sstevel@tonic-gate 2480Sstevel@tonic-gate /* 2490Sstevel@tonic-gate * Dependency types 2500Sstevel@tonic-gate */ 2510Sstevel@tonic-gate #define SCF_DEP_REQUIRE_ALL ((const char *)"require_all") 2520Sstevel@tonic-gate #define SCF_DEP_REQUIRE_ANY ((const char *)"require_any") 2530Sstevel@tonic-gate #define SCF_DEP_EXCLUDE_ALL ((const char *)"exclude_all") 2540Sstevel@tonic-gate #define SCF_DEP_OPTIONAL_ALL ((const char *)"optional_all") 2550Sstevel@tonic-gate 2560Sstevel@tonic-gate #define SCF_DEP_RESET_ON_ERROR ((const char *)"error") 2570Sstevel@tonic-gate #define SCF_DEP_RESET_ON_RESTART ((const char *)"restart") 2580Sstevel@tonic-gate #define SCF_DEP_RESET_ON_REFRESH ((const char *)"refresh") 2590Sstevel@tonic-gate #define SCF_DEP_RESET_ON_NONE ((const char *)"none") 2600Sstevel@tonic-gate 2610Sstevel@tonic-gate /* 2620Sstevel@tonic-gate * Standard property group names 2630Sstevel@tonic-gate */ 2640Sstevel@tonic-gate #define SCF_PG_GENERAL ((const char *)"general") 2650Sstevel@tonic-gate #define SCF_PG_GENERAL_OVR ((const char *)"general_ovr") 2660Sstevel@tonic-gate #define SCF_PG_RESTARTER ((const char *)"restarter") 2670Sstevel@tonic-gate #define SCF_PG_RESTARTER_ACTIONS ((const char *)"restarter_actions") 2680Sstevel@tonic-gate #define SCF_PG_METHOD_CONTEXT ((const char *)"method_context") 2690Sstevel@tonic-gate #define SCF_PG_APP_DEFAULT ((const char *)"application") 2700Sstevel@tonic-gate #define SCF_PG_DEPENDENTS ((const char *)"dependents") 2710Sstevel@tonic-gate #define SCF_PG_OPTIONS ((const char *)"options") 2720Sstevel@tonic-gate #define SCF_PG_OPTIONS_OVR ((const char *)"options_ovr") 2730Sstevel@tonic-gate #define SCF_PG_STARTD ((const char *)"startd") 2740Sstevel@tonic-gate #define SCF_PG_STARTD_PRIVATE ((const char *)"svc-startd-private") 2757475SPhilippe.Jung@Sun.COM #define SCF_PG_DEATHROW ((const char *)"deathrow") 27610461SSean.Wilcox@Sun.COM #define SCF_PG_MANIFESTFILES ((const char *)"manifestfiles") 2770Sstevel@tonic-gate 2780Sstevel@tonic-gate /* 2797887SLiane.Praza@Sun.COM * Template property group names and prefixes 2800Sstevel@tonic-gate */ 2810Sstevel@tonic-gate #define SCF_PG_TM_COMMON_NAME ((const char *)"tm_common_name") 2820Sstevel@tonic-gate #define SCF_PG_TM_DESCRIPTION ((const char *)"tm_description") 2830Sstevel@tonic-gate 2840Sstevel@tonic-gate #define SCF_PG_TM_MAN_PREFIX ((const char *)"tm_man_") 2850Sstevel@tonic-gate #define SCF_PG_TM_DOC_PREFIX ((const char *)"tm_doc_") 2860Sstevel@tonic-gate 2870Sstevel@tonic-gate /* 2880Sstevel@tonic-gate * Standard property names 2890Sstevel@tonic-gate */ 290*12967Sgavin.maltby@oracle.com #define SCF_PROPERTY_ACTIVE_POSTFIX ((const char *)"active") 2910Sstevel@tonic-gate #define SCF_PROPERTY_AUX_STATE ((const char *)"auxiliary_state") 2928823STruong.Q.Nguyen@Sun.COM #define SCF_PROPERTY_AUX_FMRI ((const char *)"auxiliary_fmri") 2938823STruong.Q.Nguyen@Sun.COM #define SCF_PROPERTY_AUX_TTY ((const char *)"auxiliary_tty") 2940Sstevel@tonic-gate #define SCF_PROPERTY_CONTRACT ((const char *)"contract") 2950Sstevel@tonic-gate #define SCF_PROPERTY_COREFILE_PATTERN ((const char *)"corefile_pattern") 2960Sstevel@tonic-gate #define SCF_PROPERTY_DEGRADED ((const char *)"degraded") 2970Sstevel@tonic-gate #define SCF_PROPERTY_DEGRADE_IMMEDIATE ((const char *)"degrade_immediate") 2980Sstevel@tonic-gate #define SCF_PROPERTY_DURATION ((const char *)"duration") 2990Sstevel@tonic-gate #define SCF_PROPERTY_ENABLED ((const char *)"enabled") 3007475SPhilippe.Jung@Sun.COM #define SCF_PROPERTY_DEATHROW ((const char *)"deathrow") 3010Sstevel@tonic-gate #define SCF_PROPERTY_ENTITY_STABILITY ((const char *)"entity_stability") 3020Sstevel@tonic-gate #define SCF_PROPERTY_ENTITIES ((const char *)"entities") 3030Sstevel@tonic-gate #define SCF_PROPERTY_EXEC ((const char *)"exec") 3040Sstevel@tonic-gate #define SCF_PROPERTY_GROUP ((const char *)"group") 3050Sstevel@tonic-gate #define SCF_PROPERTY_GROUPING ((const char *)"grouping") 3060Sstevel@tonic-gate #define SCF_PROPERTY_IGNORE ((const char *)"ignore_error") 3077887SLiane.Praza@Sun.COM #define SCF_PROPERTY_INTERNAL_SEPARATORS ((const char *)"internal_separators") 3080Sstevel@tonic-gate #define SCF_PROPERTY_LIMIT_PRIVILEGES ((const char *)"limit_privileges") 3090Sstevel@tonic-gate #define SCF_PROPERTY_MAINT_OFF ((const char *)"maint_off") 3100Sstevel@tonic-gate #define SCF_PROPERTY_MAINT_ON ((const char *)"maint_on") 3110Sstevel@tonic-gate #define SCF_PROPERTY_MAINT_ON_IMMEDIATE ((const char *)"maint_on_immediate") 3120Sstevel@tonic-gate #define SCF_PROPERTY_MAINT_ON_IMMTEMP ((const char *)"maint_on_immtemp") 3130Sstevel@tonic-gate #define SCF_PROPERTY_MAINT_ON_TEMPORARY ((const char *)"maint_on_temporary") 3140Sstevel@tonic-gate #define SCF_PROPERTY_METHOD_PID ((const char *)"method_pid") 3150Sstevel@tonic-gate #define SCF_PROPERTY_MILESTONE ((const char *)"milestone") 3160Sstevel@tonic-gate #define SCF_PROPERTY_NEED_SESSION ((const char *)"need_session") 3170Sstevel@tonic-gate #define SCF_PROPERTY_NEXT_STATE ((const char *)"next_state") 3180Sstevel@tonic-gate #define SCF_PROPERTY_PACKAGE ((const char *)"package") 3190Sstevel@tonic-gate #define SCF_PROPERTY_PRIVILEGES ((const char *)"privileges") 3200Sstevel@tonic-gate #define SCF_PROPERTY_PROFILE ((const char *)"profile") 3210Sstevel@tonic-gate #define SCF_PROPERTY_PROJECT ((const char *)"project") 3220Sstevel@tonic-gate #define SCF_PROPERTY_REFRESH ((const char *)"refresh") 3230Sstevel@tonic-gate #define SCF_PROPERTY_RESOURCE_POOL ((const char *)"resource_pool") 3240Sstevel@tonic-gate #define SCF_PROPERTY_ENVIRONMENT ((const char *)"environment") 3250Sstevel@tonic-gate #define SCF_PROPERTY_RESTART ((const char *)"restart") 3260Sstevel@tonic-gate #define SCF_PROPERTY_RESTARTER ((const char *)"restarter") 3270Sstevel@tonic-gate #define SCF_PROPERTY_RESTART_INTERVAL ((const char *)"restart_interval") 3280Sstevel@tonic-gate #define SCF_PROPERTY_RESTART_ON ((const char *)"restart_on") 3290Sstevel@tonic-gate #define SCF_PROPERTY_RESTORE ((const char *)"restore") 3300Sstevel@tonic-gate #define SCF_PROPERTY_SINGLE_INSTANCE ((const char *)"single_instance") 3310Sstevel@tonic-gate #define SCF_PROPERTY_START_METHOD_TIMESTAMP \ 3320Sstevel@tonic-gate ((const char *)"start_method_timestamp") 3330Sstevel@tonic-gate #define SCF_PROPERTY_START_METHOD_WAITSTATUS \ 3340Sstevel@tonic-gate ((const char *)"start_method_waitstatus") 3350Sstevel@tonic-gate #define SCF_PROPERTY_START_PID ((const char *)"start_pid") 3360Sstevel@tonic-gate #define SCF_PROPERTY_STATE ((const char *)"state") 3370Sstevel@tonic-gate #define SCF_PROPERTY_STABILITY ((const char *)"stability") 3380Sstevel@tonic-gate #define SCF_PROPERTY_STATE_TIMESTAMP ((const char *)"state_timestamp") 3390Sstevel@tonic-gate #define SCF_PROPERTY_SUPP_GROUPS ((const char *)"supp_groups") 3400Sstevel@tonic-gate #define SCF_PROPERTY_TIMEOUT ((const char *)"timeout_seconds") 3410Sstevel@tonic-gate #define SCF_PROPERTY_TIMEOUT_RETRY ((const char *)"timeout_retry") 3420Sstevel@tonic-gate #define SCF_PROPERTY_TRANSIENT_CONTRACT ((const char *)"transient_contract") 3430Sstevel@tonic-gate #define SCF_PROPERTY_TYPE ((const char *)"type") 3440Sstevel@tonic-gate #define SCF_PROPERTY_USE_PROFILE ((const char *)"use_profile") 3450Sstevel@tonic-gate #define SCF_PROPERTY_USER ((const char *)"user") 3460Sstevel@tonic-gate #define SCF_PROPERTY_UTMPX_PREFIX ((const char *)"utmpx_prefix") 3470Sstevel@tonic-gate #define SCF_PROPERTY_WORKING_DIRECTORY ((const char *)"working_directory") 3480Sstevel@tonic-gate 3490Sstevel@tonic-gate /* 3500Sstevel@tonic-gate * Template property names 3510Sstevel@tonic-gate */ 3527887SLiane.Praza@Sun.COM #define SCF_PROPERTY_TM_CARDINALITY_MIN ((const char *)"cardinality_min") 3537887SLiane.Praza@Sun.COM #define SCF_PROPERTY_TM_CARDINALITY_MAX ((const char *)"cardinality_max") 3547887SLiane.Praza@Sun.COM #define SCF_PROPERTY_TM_CHOICES_INCLUDE_VALUES ((const char *) \ 3557887SLiane.Praza@Sun.COM "choices_include_values") 3567887SLiane.Praza@Sun.COM #define SCF_PROPERTY_TM_CHOICES_NAME ((const char *)"choices_name") 3577887SLiane.Praza@Sun.COM #define SCF_PROPERTY_TM_CHOICES_RANGE ((const char *)"choices_range") 3587887SLiane.Praza@Sun.COM #define SCF_PROPERTY_TM_CONSTRAINT_NAME ((const char *)"constraint_name") 3597887SLiane.Praza@Sun.COM #define SCF_PROPERTY_TM_CONSTRAINT_RANGE ((const char *)"constraint_range") 3600Sstevel@tonic-gate #define SCF_PROPERTY_TM_MANPATH ((const char *)"manpath") 3617887SLiane.Praza@Sun.COM #define SCF_PROPERTY_TM_NAME ((const char *)"name") 3627887SLiane.Praza@Sun.COM #define SCF_PROPERTY_TM_PG_PATTERN ((const char *)"pg_pattern") 3637887SLiane.Praza@Sun.COM #define SCF_PROPERTY_TM_REQUIRED ((const char *)"required") 3640Sstevel@tonic-gate #define SCF_PROPERTY_TM_SECTION ((const char *)"section") 3657887SLiane.Praza@Sun.COM #define SCF_PROPERTY_TM_TARGET ((const char *)"target") 3660Sstevel@tonic-gate #define SCF_PROPERTY_TM_TITLE ((const char *)"title") 3677887SLiane.Praza@Sun.COM #define SCF_PROPERTY_TM_TYPE ((const char *)"type") 3680Sstevel@tonic-gate #define SCF_PROPERTY_TM_URI ((const char *)"uri") 3697887SLiane.Praza@Sun.COM #define SCF_PROPERTY_TM_VALUE_PREFIX ((const char *)"value_") 3707887SLiane.Praza@Sun.COM #define SCF_PROPERTY_TM_VALUES_NAME ((const char *)"values_name") 3717887SLiane.Praza@Sun.COM #define SCF_PROPERTY_TM_VISIBILITY ((const char *)"visibility") 3727887SLiane.Praza@Sun.COM #define SCF_PROPERTY_TM_COMMON_NAME_PREFIX ((const char *)"common_name_") 3737887SLiane.Praza@Sun.COM #define SCF_PROPERTY_TM_DESCRIPTION_PREFIX ((const char *)"description_") 3747887SLiane.Praza@Sun.COM #define SCF_PROPERTY_TM_UNITS_PREFIX ((const char *)"units_") 3757887SLiane.Praza@Sun.COM 3767887SLiane.Praza@Sun.COM /* 3777887SLiane.Praza@Sun.COM * Templates wildcard string 3787887SLiane.Praza@Sun.COM */ 3797887SLiane.Praza@Sun.COM #define SCF_TMPL_WILDCARD ((const char *)"*") 3800Sstevel@tonic-gate 3810Sstevel@tonic-gate /* 3820Sstevel@tonic-gate * Strings used by restarters for state and next_state properties. 3830Sstevel@tonic-gate * MAX_SCF_STATE_STRING holds the max length of a state string, including the 3840Sstevel@tonic-gate * terminating null. 3850Sstevel@tonic-gate */ 3860Sstevel@tonic-gate 3870Sstevel@tonic-gate #define MAX_SCF_STATE_STRING_SZ 14 3880Sstevel@tonic-gate 3890Sstevel@tonic-gate #define SCF_STATE_STRING_NONE ((const char *)"none") 3900Sstevel@tonic-gate #define SCF_STATE_STRING_UNINIT ((const char *)"uninitialized") 3910Sstevel@tonic-gate #define SCF_STATE_STRING_MAINT ((const char *)"maintenance") 3920Sstevel@tonic-gate #define SCF_STATE_STRING_OFFLINE ((const char *)"offline") 3930Sstevel@tonic-gate #define SCF_STATE_STRING_DISABLED ((const char *)"disabled") 3940Sstevel@tonic-gate #define SCF_STATE_STRING_ONLINE ((const char *)"online") 3950Sstevel@tonic-gate #define SCF_STATE_STRING_DEGRADED ((const char *)"degraded") 3960Sstevel@tonic-gate #define SCF_STATE_STRING_LEGACY ((const char *)"legacy_run") 3970Sstevel@tonic-gate 3980Sstevel@tonic-gate #define SCF_STATE_UNINIT 0x00000001 3990Sstevel@tonic-gate #define SCF_STATE_MAINT 0x00000002 4000Sstevel@tonic-gate #define SCF_STATE_OFFLINE 0x00000004 4010Sstevel@tonic-gate #define SCF_STATE_DISABLED 0x00000008 4020Sstevel@tonic-gate #define SCF_STATE_ONLINE 0x00000010 4030Sstevel@tonic-gate #define SCF_STATE_DEGRADED 0x00000020 4040Sstevel@tonic-gate #define SCF_STATE_ALL 0x0000003F 4050Sstevel@tonic-gate 406*12967Sgavin.maltby@oracle.com /* 407*12967Sgavin.maltby@oracle.com * software fma svc-transition class 408*12967Sgavin.maltby@oracle.com */ 409*12967Sgavin.maltby@oracle.com #define SCF_NOTIFY_PARAMS_VERSION 0X0 410*12967Sgavin.maltby@oracle.com #define SCF_NOTIFY_NAME_FMRI ((const char *)"fmri") 411*12967Sgavin.maltby@oracle.com #define SCF_NOTIFY_NAME_VERSION ((const char *)"version") 412*12967Sgavin.maltby@oracle.com #define SCF_NOTIFY_NAME_TSET ((const char *)"tset") 413*12967Sgavin.maltby@oracle.com #define SCF_NOTIFY_PG_POSTFIX ((const char *)"fmnotify") 414*12967Sgavin.maltby@oracle.com #define SCF_NOTIFY_PARAMS ((const char *)"notify-params") 415*12967Sgavin.maltby@oracle.com #define SCF_NOTIFY_PARAMS_INST \ 416*12967Sgavin.maltby@oracle.com ((const char *)"svc:/system/fm/notify-params:default") 417*12967Sgavin.maltby@oracle.com #define SCF_SVC_TRANSITION_CLASS \ 418*12967Sgavin.maltby@oracle.com ((const char *)"ireport.os.smf.state-transition") 419*12967Sgavin.maltby@oracle.com #define SCF_NOTIFY_PARAMS_PG_TYPE ((const char *)"notify_params") 420*12967Sgavin.maltby@oracle.com 421*12967Sgavin.maltby@oracle.com /* 422*12967Sgavin.maltby@oracle.com * Useful transition macros 423*12967Sgavin.maltby@oracle.com */ 424*12967Sgavin.maltby@oracle.com #define SCF_TRANS_SHIFT_INITIAL_STATE(s) ((s) << 16) 425*12967Sgavin.maltby@oracle.com #define SCF_TRANSITION_ALL \ 426*12967Sgavin.maltby@oracle.com (SCF_TRANS_SHIFT_INITIAL_STATE(SCF_STATE_ALL) | SCF_STATE_ALL) 427*12967Sgavin.maltby@oracle.com #define SCF_TRANS(f, t) (SCF_TRANS_SHIFT_INITIAL_STATE(f) | (t)) 428*12967Sgavin.maltby@oracle.com #define SCF_TRANS_VALID(t) (!((t) & ~SCF_TRANSITION_ALL)) 429*12967Sgavin.maltby@oracle.com #define SCF_TRANS_INITIAL_STATE(t) ((t) >> 16 & SCF_STATE_ALL) 430*12967Sgavin.maltby@oracle.com #define SCF_TRANS_FINAL_STATE(t) ((t) & SCF_STATE_ALL) 431*12967Sgavin.maltby@oracle.com 432*12967Sgavin.maltby@oracle.com /* 433*12967Sgavin.maltby@oracle.com * Prefixes for states in state transition notification 434*12967Sgavin.maltby@oracle.com */ 435*12967Sgavin.maltby@oracle.com #define SCF_STN_PREFIX_FROM ((const char *)"from-") 436*12967Sgavin.maltby@oracle.com #define SCF_STN_PREFIX_TO ((const char *)"to-") 437*12967Sgavin.maltby@oracle.com 4380Sstevel@tonic-gate #define SCF_PG_FLAG_NONPERSISTENT 0x1 4390Sstevel@tonic-gate 4400Sstevel@tonic-gate #define SCF_TRACE_LIBRARY 0x1 4410Sstevel@tonic-gate #define SCF_TRACE_DAEMON 0x2 4420Sstevel@tonic-gate 4430Sstevel@tonic-gate #define SMF_IMMEDIATE 0x1 4440Sstevel@tonic-gate #define SMF_TEMPORARY 0x2 4450Sstevel@tonic-gate #define SMF_AT_NEXT_BOOT 0x4 4460Sstevel@tonic-gate 4470Sstevel@tonic-gate scf_error_t scf_error(void); 4480Sstevel@tonic-gate const char *scf_strerror(scf_error_t); 4490Sstevel@tonic-gate 4500Sstevel@tonic-gate ssize_t scf_limit(uint32_t code); 4510Sstevel@tonic-gate #define SCF_LIMIT_MAX_NAME_LENGTH -2000U 4520Sstevel@tonic-gate #define SCF_LIMIT_MAX_VALUE_LENGTH -2001U 4530Sstevel@tonic-gate #define SCF_LIMIT_MAX_PG_TYPE_LENGTH -2002U 4540Sstevel@tonic-gate #define SCF_LIMIT_MAX_FMRI_LENGTH -2003U 4550Sstevel@tonic-gate 4560Sstevel@tonic-gate scf_handle_t *scf_handle_create(scf_version_t); 4570Sstevel@tonic-gate 4580Sstevel@tonic-gate int scf_handle_decorate(scf_handle_t *, const char *, scf_value_t *); 4590Sstevel@tonic-gate #define SCF_DECORATE_CLEAR ((scf_value_t *)0) 4600Sstevel@tonic-gate 4610Sstevel@tonic-gate int scf_handle_bind(scf_handle_t *); 4620Sstevel@tonic-gate int scf_handle_unbind(scf_handle_t *); 4630Sstevel@tonic-gate void scf_handle_destroy(scf_handle_t *); 4640Sstevel@tonic-gate 4650Sstevel@tonic-gate int scf_type_base_type(scf_type_t type, scf_type_t *out); 4667887SLiane.Praza@Sun.COM const char *scf_type_to_string(scf_type_t); 4677887SLiane.Praza@Sun.COM scf_type_t scf_string_to_type(const char *); 4680Sstevel@tonic-gate 4690Sstevel@tonic-gate /* values */ 4700Sstevel@tonic-gate scf_value_t *scf_value_create(scf_handle_t *); 4710Sstevel@tonic-gate scf_handle_t *scf_value_handle(const scf_value_t *); 4720Sstevel@tonic-gate void scf_value_destroy(scf_value_t *); 4730Sstevel@tonic-gate 4740Sstevel@tonic-gate scf_type_t scf_value_base_type(const scf_value_t *); 4750Sstevel@tonic-gate scf_type_t scf_value_type(const scf_value_t *); 4760Sstevel@tonic-gate int scf_value_is_type(const scf_value_t *, scf_type_t); 4770Sstevel@tonic-gate 4780Sstevel@tonic-gate void scf_value_reset(scf_value_t *); 4790Sstevel@tonic-gate 4800Sstevel@tonic-gate int scf_value_get_boolean(const scf_value_t *, uint8_t *); 4810Sstevel@tonic-gate int scf_value_get_count(const scf_value_t *, uint64_t *); 4820Sstevel@tonic-gate int scf_value_get_integer(const scf_value_t *, int64_t *); 4830Sstevel@tonic-gate int scf_value_get_time(const scf_value_t *, int64_t *, int32_t *); 4840Sstevel@tonic-gate ssize_t scf_value_get_astring(const scf_value_t *, char *, size_t); 4850Sstevel@tonic-gate ssize_t scf_value_get_ustring(const scf_value_t *, char *, size_t); 4860Sstevel@tonic-gate ssize_t scf_value_get_opaque(const scf_value_t *, void *, size_t); 4870Sstevel@tonic-gate 4880Sstevel@tonic-gate void scf_value_set_boolean(scf_value_t *, uint8_t); 4890Sstevel@tonic-gate void scf_value_set_count(scf_value_t *, uint64_t); 4900Sstevel@tonic-gate void scf_value_set_integer(scf_value_t *, int64_t); 4910Sstevel@tonic-gate int scf_value_set_time(scf_value_t *, int64_t, int32_t); 4920Sstevel@tonic-gate int scf_value_set_astring(scf_value_t *, const char *); 4930Sstevel@tonic-gate int scf_value_set_ustring(scf_value_t *, const char *); 4940Sstevel@tonic-gate int scf_value_set_opaque(scf_value_t *, const void *, size_t); 4950Sstevel@tonic-gate 4960Sstevel@tonic-gate ssize_t scf_value_get_as_string(const scf_value_t *, char *, size_t); 4970Sstevel@tonic-gate ssize_t scf_value_get_as_string_typed(const scf_value_t *, scf_type_t, 4980Sstevel@tonic-gate char *, size_t); 4990Sstevel@tonic-gate int scf_value_set_from_string(scf_value_t *, scf_type_t, const char *); 5000Sstevel@tonic-gate 5010Sstevel@tonic-gate scf_iter_t *scf_iter_create(scf_handle_t *); 5020Sstevel@tonic-gate scf_handle_t *scf_iter_handle(const scf_iter_t *); 5030Sstevel@tonic-gate void scf_iter_reset(scf_iter_t *); 5040Sstevel@tonic-gate void scf_iter_destroy(scf_iter_t *); 5050Sstevel@tonic-gate 5060Sstevel@tonic-gate int scf_iter_handle_scopes(scf_iter_t *, const scf_handle_t *); 5070Sstevel@tonic-gate int scf_iter_scope_services(scf_iter_t *, const scf_scope_t *); 5080Sstevel@tonic-gate int scf_iter_service_instances(scf_iter_t *, const scf_service_t *); 5090Sstevel@tonic-gate int scf_iter_service_pgs(scf_iter_t *, const scf_service_t *); 5100Sstevel@tonic-gate int scf_iter_instance_pgs(scf_iter_t *, const scf_instance_t *); 5110Sstevel@tonic-gate int scf_iter_instance_pgs_composed(scf_iter_t *, const scf_instance_t *, 5120Sstevel@tonic-gate const scf_snapshot_t *); 5130Sstevel@tonic-gate int scf_iter_service_pgs_typed(scf_iter_t *, const scf_service_t *, 5140Sstevel@tonic-gate const char *); 5150Sstevel@tonic-gate int scf_iter_instance_pgs_typed(scf_iter_t *, const scf_instance_t *, 5160Sstevel@tonic-gate const char *); 5170Sstevel@tonic-gate int scf_iter_instance_pgs_typed_composed(scf_iter_t *, const scf_instance_t *, 5180Sstevel@tonic-gate const scf_snapshot_t *, const char *); 5190Sstevel@tonic-gate int scf_iter_snaplevel_pgs(scf_iter_t *, const scf_snaplevel_t *); 5200Sstevel@tonic-gate int scf_iter_snaplevel_pgs_typed(scf_iter_t *, const scf_snaplevel_t *, 5210Sstevel@tonic-gate const char *); 5220Sstevel@tonic-gate int scf_iter_instance_snapshots(scf_iter_t *, const scf_instance_t *); 5230Sstevel@tonic-gate int scf_iter_pg_properties(scf_iter_t *, const scf_propertygroup_t *); 5240Sstevel@tonic-gate int scf_iter_property_values(scf_iter_t *, const scf_property_t *); 5250Sstevel@tonic-gate 5260Sstevel@tonic-gate int scf_iter_next_scope(scf_iter_t *, scf_scope_t *); 5270Sstevel@tonic-gate int scf_iter_next_service(scf_iter_t *, scf_service_t *); 5280Sstevel@tonic-gate int scf_iter_next_instance(scf_iter_t *, scf_instance_t *); 5290Sstevel@tonic-gate int scf_iter_next_pg(scf_iter_t *, scf_propertygroup_t *); 5300Sstevel@tonic-gate int scf_iter_next_property(scf_iter_t *, scf_property_t *); 5310Sstevel@tonic-gate int scf_iter_next_snapshot(scf_iter_t *, scf_snapshot_t *); 5320Sstevel@tonic-gate int scf_iter_next_value(scf_iter_t *, scf_value_t *); 5330Sstevel@tonic-gate 5340Sstevel@tonic-gate scf_scope_t *scf_scope_create(scf_handle_t *); 5350Sstevel@tonic-gate scf_handle_t *scf_scope_handle(const scf_scope_t *); 5360Sstevel@tonic-gate 5370Sstevel@tonic-gate /* XXX eventually remove this */ 5380Sstevel@tonic-gate #define scf_handle_get_local_scope(h, s) \ 5390Sstevel@tonic-gate scf_handle_get_scope((h), SCF_SCOPE_LOCAL, (s)) 5400Sstevel@tonic-gate 5410Sstevel@tonic-gate int scf_handle_get_scope(scf_handle_t *, const char *, scf_scope_t *); 5420Sstevel@tonic-gate void scf_scope_destroy(scf_scope_t *); 5430Sstevel@tonic-gate ssize_t scf_scope_get_name(const scf_scope_t *, char *, size_t); 5440Sstevel@tonic-gate 5450Sstevel@tonic-gate ssize_t scf_scope_to_fmri(const scf_scope_t *, char *, size_t); 5460Sstevel@tonic-gate 5470Sstevel@tonic-gate scf_service_t *scf_service_create(scf_handle_t *); 5480Sstevel@tonic-gate scf_handle_t *scf_service_handle(const scf_service_t *); 5490Sstevel@tonic-gate void scf_service_destroy(scf_service_t *); 5500Sstevel@tonic-gate int scf_scope_get_parent(const scf_scope_t *, scf_scope_t *); 5510Sstevel@tonic-gate ssize_t scf_service_get_name(const scf_service_t *, char *, size_t); 5520Sstevel@tonic-gate ssize_t scf_service_to_fmri(const scf_service_t *, char *, size_t); 5530Sstevel@tonic-gate int scf_service_get_parent(const scf_service_t *, scf_scope_t *); 5540Sstevel@tonic-gate int scf_scope_get_service(const scf_scope_t *, const char *, scf_service_t *); 5550Sstevel@tonic-gate int scf_scope_add_service(const scf_scope_t *, const char *, scf_service_t *); 5560Sstevel@tonic-gate int scf_service_delete(scf_service_t *); 5570Sstevel@tonic-gate 5580Sstevel@tonic-gate scf_instance_t *scf_instance_create(scf_handle_t *); 5590Sstevel@tonic-gate scf_handle_t *scf_instance_handle(const scf_instance_t *); 5600Sstevel@tonic-gate void scf_instance_destroy(scf_instance_t *); 5610Sstevel@tonic-gate ssize_t scf_instance_get_name(const scf_instance_t *, char *, size_t); 5620Sstevel@tonic-gate ssize_t scf_instance_to_fmri(const scf_instance_t *, char *, size_t); 5630Sstevel@tonic-gate int scf_service_get_instance(const scf_service_t *, const char *, 5640Sstevel@tonic-gate scf_instance_t *); 5650Sstevel@tonic-gate int scf_service_add_instance(const scf_service_t *, const char *, 5660Sstevel@tonic-gate scf_instance_t *); 5670Sstevel@tonic-gate int scf_instance_delete(scf_instance_t *); 5680Sstevel@tonic-gate 5690Sstevel@tonic-gate scf_snapshot_t *scf_snapshot_create(scf_handle_t *); 5700Sstevel@tonic-gate scf_handle_t *scf_snapshot_handle(const scf_snapshot_t *); 5710Sstevel@tonic-gate void scf_snapshot_destroy(scf_snapshot_t *); 5720Sstevel@tonic-gate ssize_t scf_snapshot_get_name(const scf_snapshot_t *, char *, size_t); 5730Sstevel@tonic-gate int scf_snapshot_get_parent(const scf_snapshot_t *, scf_instance_t *); 5740Sstevel@tonic-gate int scf_instance_get_snapshot(const scf_instance_t *, const char *, 5750Sstevel@tonic-gate scf_snapshot_t *); 5760Sstevel@tonic-gate int scf_snapshot_update(scf_snapshot_t *); 5770Sstevel@tonic-gate 5780Sstevel@tonic-gate scf_snaplevel_t *scf_snaplevel_create(scf_handle_t *); 5790Sstevel@tonic-gate scf_handle_t *scf_snaplevel_handle(const scf_snaplevel_t *); 5800Sstevel@tonic-gate void scf_snaplevel_destroy(scf_snaplevel_t *); 5810Sstevel@tonic-gate int scf_snaplevel_get_parent(const scf_snaplevel_t *, scf_snapshot_t *); 5820Sstevel@tonic-gate ssize_t scf_snaplevel_get_scope_name(const scf_snaplevel_t *, char *, size_t); 5830Sstevel@tonic-gate ssize_t scf_snaplevel_get_service_name(const scf_snaplevel_t *, char *, size_t); 5840Sstevel@tonic-gate ssize_t scf_snaplevel_get_instance_name(const scf_snaplevel_t *, char *, 5850Sstevel@tonic-gate size_t); 5860Sstevel@tonic-gate int scf_snaplevel_get_pg(const scf_snaplevel_t *, const char *, 5870Sstevel@tonic-gate scf_propertygroup_t *pg); 5880Sstevel@tonic-gate int scf_snapshot_get_base_snaplevel(const scf_snapshot_t *, scf_snaplevel_t *); 5890Sstevel@tonic-gate int scf_snaplevel_get_next_snaplevel(const scf_snaplevel_t *, 5900Sstevel@tonic-gate scf_snaplevel_t *); 5910Sstevel@tonic-gate 5920Sstevel@tonic-gate scf_propertygroup_t *scf_pg_create(scf_handle_t *); 5930Sstevel@tonic-gate scf_handle_t *scf_pg_handle(const scf_propertygroup_t *); 5940Sstevel@tonic-gate void scf_pg_destroy(scf_propertygroup_t *); 5950Sstevel@tonic-gate ssize_t scf_pg_to_fmri(const scf_propertygroup_t *, char *, size_t); 5960Sstevel@tonic-gate ssize_t scf_pg_get_name(const scf_propertygroup_t *, char *, size_t); 5970Sstevel@tonic-gate ssize_t scf_pg_get_type(const scf_propertygroup_t *, char *, size_t); 5980Sstevel@tonic-gate int scf_pg_get_flags(const scf_propertygroup_t *, uint32_t *); 5990Sstevel@tonic-gate int scf_pg_get_parent_service(const scf_propertygroup_t *, scf_service_t *); 6000Sstevel@tonic-gate int scf_pg_get_parent_instance(const scf_propertygroup_t *, scf_instance_t *); 6010Sstevel@tonic-gate int scf_pg_get_parent_snaplevel(const scf_propertygroup_t *, scf_snaplevel_t *); 6020Sstevel@tonic-gate int scf_service_get_pg(const scf_service_t *, const char *, 6030Sstevel@tonic-gate scf_propertygroup_t *); 6040Sstevel@tonic-gate int scf_instance_get_pg(const scf_instance_t *, const char *, 6050Sstevel@tonic-gate scf_propertygroup_t *); 6060Sstevel@tonic-gate int scf_instance_get_pg_composed(const scf_instance_t *, const scf_snapshot_t *, 6070Sstevel@tonic-gate const char *, scf_propertygroup_t *); 6080Sstevel@tonic-gate int scf_service_add_pg(const scf_service_t *, const char *, const char *, 6090Sstevel@tonic-gate uint32_t, scf_propertygroup_t *); 6100Sstevel@tonic-gate int scf_instance_add_pg(const scf_instance_t *, const char *, const char *, 6110Sstevel@tonic-gate uint32_t, scf_propertygroup_t *); 6120Sstevel@tonic-gate int scf_pg_delete(scf_propertygroup_t *); 6130Sstevel@tonic-gate 6140Sstevel@tonic-gate int scf_pg_get_underlying_pg(const scf_propertygroup_t *, 6150Sstevel@tonic-gate scf_propertygroup_t *); 6160Sstevel@tonic-gate int scf_instance_get_parent(const scf_instance_t *, scf_service_t *); 6170Sstevel@tonic-gate 6180Sstevel@tonic-gate int scf_pg_update(scf_propertygroup_t *); 6190Sstevel@tonic-gate 6200Sstevel@tonic-gate scf_property_t *scf_property_create(scf_handle_t *); 6210Sstevel@tonic-gate scf_handle_t *scf_property_handle(const scf_property_t *); 6220Sstevel@tonic-gate void scf_property_destroy(scf_property_t *); 6230Sstevel@tonic-gate int scf_property_is_type(const scf_property_t *, scf_type_t); 6240Sstevel@tonic-gate int scf_property_type(const scf_property_t *, scf_type_t *); 6250Sstevel@tonic-gate ssize_t scf_property_get_name(const scf_property_t *, char *, size_t); 6260Sstevel@tonic-gate int scf_property_get_value(const scf_property_t *, scf_value_t *); 6270Sstevel@tonic-gate ssize_t scf_property_to_fmri(const scf_property_t *, char *, size_t); 6280Sstevel@tonic-gate int scf_pg_get_property(const scf_propertygroup_t *, const char *, 6290Sstevel@tonic-gate scf_property_t *); 6300Sstevel@tonic-gate 6310Sstevel@tonic-gate scf_transaction_t *scf_transaction_create(scf_handle_t *); 6320Sstevel@tonic-gate scf_handle_t *scf_transaction_handle(const scf_transaction_t *); 6330Sstevel@tonic-gate int scf_transaction_start(scf_transaction_t *, scf_propertygroup_t *); 6340Sstevel@tonic-gate void scf_transaction_destroy(scf_transaction_t *); 6350Sstevel@tonic-gate void scf_transaction_destroy_children(scf_transaction_t *); 6360Sstevel@tonic-gate 6370Sstevel@tonic-gate void scf_transaction_reset(scf_transaction_t *); 6380Sstevel@tonic-gate void scf_transaction_reset_all(scf_transaction_t *); 6390Sstevel@tonic-gate 6400Sstevel@tonic-gate int scf_transaction_commit(scf_transaction_t *); 6410Sstevel@tonic-gate 6420Sstevel@tonic-gate scf_transaction_entry_t *scf_entry_create(scf_handle_t *); 6430Sstevel@tonic-gate scf_handle_t *scf_entry_handle(const scf_transaction_entry_t *); 6440Sstevel@tonic-gate void scf_entry_reset(scf_transaction_entry_t *); 6450Sstevel@tonic-gate void scf_entry_destroy(scf_transaction_entry_t *); 6460Sstevel@tonic-gate void scf_entry_destroy_children(scf_transaction_entry_t *); 6470Sstevel@tonic-gate 6480Sstevel@tonic-gate int scf_transaction_property_change(scf_transaction_t *, 6490Sstevel@tonic-gate scf_transaction_entry_t *, const char *, scf_type_t); 6500Sstevel@tonic-gate int scf_transaction_property_delete(scf_transaction_t *, 6510Sstevel@tonic-gate scf_transaction_entry_t *, const char *); 6520Sstevel@tonic-gate int scf_transaction_property_new(scf_transaction_t *, 6530Sstevel@tonic-gate scf_transaction_entry_t *, const char *, scf_type_t); 6540Sstevel@tonic-gate int scf_transaction_property_change_type(scf_transaction_t *, 6550Sstevel@tonic-gate scf_transaction_entry_t *, const char *, scf_type_t); 6560Sstevel@tonic-gate 6570Sstevel@tonic-gate int scf_entry_add_value(scf_transaction_entry_t *, scf_value_t *); 6580Sstevel@tonic-gate 6590Sstevel@tonic-gate int scf_handle_decode_fmri(scf_handle_t *, const char *, scf_scope_t *, 6600Sstevel@tonic-gate scf_service_t *, scf_instance_t *, scf_propertygroup_t *, scf_property_t *, 6610Sstevel@tonic-gate int); 6620Sstevel@tonic-gate #define SCF_DECODE_FMRI_EXACT 0x00000001 6630Sstevel@tonic-gate #define SCF_DECODE_FMRI_TRUNCATE 0x00000002 6640Sstevel@tonic-gate #define SCF_DECODE_FMRI_REQUIRE_INSTANCE 0x00000004 6650Sstevel@tonic-gate #define SCF_DECODE_FMRI_REQUIRE_NO_INSTANCE 0x00000008 6660Sstevel@tonic-gate 6670Sstevel@tonic-gate ssize_t scf_myname(scf_handle_t *, char *, size_t); 6680Sstevel@tonic-gate 6690Sstevel@tonic-gate /* 6707887SLiane.Praza@Sun.COM * Property group template interfaces. 6717887SLiane.Praza@Sun.COM */ 6727887SLiane.Praza@Sun.COM scf_pg_tmpl_t *scf_tmpl_pg_create(scf_handle_t *); 6737887SLiane.Praza@Sun.COM void scf_tmpl_pg_destroy(scf_pg_tmpl_t *); 6747887SLiane.Praza@Sun.COM void scf_tmpl_pg_reset(scf_pg_tmpl_t *); 6757887SLiane.Praza@Sun.COM int scf_tmpl_get_by_pg(scf_propertygroup_t *, scf_pg_tmpl_t *, int); 6767887SLiane.Praza@Sun.COM int scf_tmpl_get_by_pg_name(const char *, const char *, 6777887SLiane.Praza@Sun.COM const char *, const char *, scf_pg_tmpl_t *, int); 6787887SLiane.Praza@Sun.COM int scf_tmpl_iter_pgs(scf_pg_tmpl_t *, const char *, const char *, 6797887SLiane.Praza@Sun.COM const char *, int); 6807887SLiane.Praza@Sun.COM #define SCF_PG_TMPL_FLAG_REQUIRED 0x1 6817887SLiane.Praza@Sun.COM #define SCF_PG_TMPL_FLAG_EXACT 0x2 6827887SLiane.Praza@Sun.COM #define SCF_PG_TMPL_FLAG_CURRENT 0x4 6837887SLiane.Praza@Sun.COM 6847887SLiane.Praza@Sun.COM ssize_t scf_tmpl_pg_name(const scf_pg_tmpl_t *, char **); 6857887SLiane.Praza@Sun.COM ssize_t scf_tmpl_pg_common_name(const scf_pg_tmpl_t *, const char *, char **); 6867887SLiane.Praza@Sun.COM ssize_t scf_tmpl_pg_description(const scf_pg_tmpl_t *, const char *, char **); 6877887SLiane.Praza@Sun.COM ssize_t scf_tmpl_pg_type(const scf_pg_tmpl_t *, char **); 6887887SLiane.Praza@Sun.COM 6897887SLiane.Praza@Sun.COM ssize_t scf_tmpl_pg_target(const scf_pg_tmpl_t *, char **); 6907887SLiane.Praza@Sun.COM #define SCF_TM_TARGET_ALL ((const char *)"all") 6917887SLiane.Praza@Sun.COM #define SCF_TM_TARGET_DELEGATE ((const char *)"delegate") 6927887SLiane.Praza@Sun.COM #define SCF_TM_TARGET_INSTANCE ((const char *)"instance") 6937887SLiane.Praza@Sun.COM #define SCF_TM_TARGET_THIS ((const char *)"this") 6947887SLiane.Praza@Sun.COM 6957887SLiane.Praza@Sun.COM int scf_tmpl_pg_required(const scf_pg_tmpl_t *, uint8_t *); 6967887SLiane.Praza@Sun.COM 6977887SLiane.Praza@Sun.COM /* 6987887SLiane.Praza@Sun.COM * Property template interfaces. 6997887SLiane.Praza@Sun.COM */ 7007887SLiane.Praza@Sun.COM scf_prop_tmpl_t *scf_tmpl_prop_create(scf_handle_t *); 7017887SLiane.Praza@Sun.COM void scf_tmpl_prop_destroy(scf_prop_tmpl_t *); 7027887SLiane.Praza@Sun.COM void scf_tmpl_prop_reset(scf_prop_tmpl_t *); 7037887SLiane.Praza@Sun.COM int scf_tmpl_get_by_prop(scf_pg_tmpl_t *, const char *, 7047887SLiane.Praza@Sun.COM scf_prop_tmpl_t *, int); 7057887SLiane.Praza@Sun.COM int scf_tmpl_iter_props(scf_pg_tmpl_t *, scf_prop_tmpl_t *, int); 7067887SLiane.Praza@Sun.COM #define SCF_PROP_TMPL_FLAG_REQUIRED 0x1 7077887SLiane.Praza@Sun.COM 7087887SLiane.Praza@Sun.COM ssize_t scf_tmpl_prop_name(const scf_prop_tmpl_t *, char **); 7097887SLiane.Praza@Sun.COM int scf_tmpl_prop_type(const scf_prop_tmpl_t *, scf_type_t *); 7107887SLiane.Praza@Sun.COM int scf_tmpl_prop_required(const scf_prop_tmpl_t *, uint8_t *); 7117887SLiane.Praza@Sun.COM ssize_t scf_tmpl_prop_common_name(const scf_prop_tmpl_t *, const char *, 7127887SLiane.Praza@Sun.COM char **); 7137887SLiane.Praza@Sun.COM ssize_t scf_tmpl_prop_description(const scf_prop_tmpl_t *, const char *, 7147887SLiane.Praza@Sun.COM char **); 7157887SLiane.Praza@Sun.COM ssize_t scf_tmpl_prop_units(const scf_prop_tmpl_t *, const char *, char **); 7167887SLiane.Praza@Sun.COM int scf_tmpl_prop_cardinality(const scf_prop_tmpl_t *prop, uint64_t *, 7177887SLiane.Praza@Sun.COM uint64_t *); 7187887SLiane.Praza@Sun.COM int scf_tmpl_prop_internal_seps(const scf_prop_tmpl_t *, scf_values_t *); 7197887SLiane.Praza@Sun.COM 7207887SLiane.Praza@Sun.COM int scf_tmpl_prop_visibility(const scf_prop_tmpl_t *, uint8_t *); 7217887SLiane.Praza@Sun.COM #define SCF_TMPL_VISIBILITY_HIDDEN 1 7227887SLiane.Praza@Sun.COM #define SCF_TMPL_VISIBILITY_READONLY 2 7237887SLiane.Praza@Sun.COM #define SCF_TMPL_VISIBILITY_READWRITE 3 7247887SLiane.Praza@Sun.COM 7257887SLiane.Praza@Sun.COM const char *scf_tmpl_visibility_to_string(uint8_t); 7267887SLiane.Praza@Sun.COM #define SCF_TM_VISIBILITY_HIDDEN ((const char *)"hidden") 7277887SLiane.Praza@Sun.COM #define SCF_TM_VISIBILITY_READONLY ((const char *)"readonly") 7287887SLiane.Praza@Sun.COM #define SCF_TM_VISIBILITY_READWRITE ((const char *)"readwrite") 7297887SLiane.Praza@Sun.COM 7307887SLiane.Praza@Sun.COM int scf_tmpl_value_name_constraints(const scf_prop_tmpl_t *prop, 7317887SLiane.Praza@Sun.COM scf_values_t *vals); 7327887SLiane.Praza@Sun.COM void scf_count_ranges_destroy(scf_count_ranges_t *); 7337887SLiane.Praza@Sun.COM void scf_int_ranges_destroy(scf_int_ranges_t *); 7347887SLiane.Praza@Sun.COM int scf_tmpl_value_count_range_constraints(const scf_prop_tmpl_t *, 7357887SLiane.Praza@Sun.COM scf_count_ranges_t *); 7367887SLiane.Praza@Sun.COM int scf_tmpl_value_int_range_constraints(const scf_prop_tmpl_t *, 7377887SLiane.Praza@Sun.COM scf_int_ranges_t *); 7387887SLiane.Praza@Sun.COM int scf_tmpl_value_count_range_choices(const scf_prop_tmpl_t *, 7397887SLiane.Praza@Sun.COM scf_count_ranges_t *); 7407887SLiane.Praza@Sun.COM int scf_tmpl_value_int_range_choices(const scf_prop_tmpl_t *, 7417887SLiane.Praza@Sun.COM scf_int_ranges_t *); 7427887SLiane.Praza@Sun.COM int scf_tmpl_value_name_choices(const scf_prop_tmpl_t *prop, 7437887SLiane.Praza@Sun.COM scf_values_t *vals); 7447887SLiane.Praza@Sun.COM 7457887SLiane.Praza@Sun.COM void scf_values_destroy(scf_values_t *); 7467887SLiane.Praza@Sun.COM 7477887SLiane.Praza@Sun.COM ssize_t scf_tmpl_value_common_name(const scf_prop_tmpl_t *, const char *, 7487887SLiane.Praza@Sun.COM const char *, char **); 7497887SLiane.Praza@Sun.COM ssize_t scf_tmpl_value_description(const scf_prop_tmpl_t *, const char *, 7507887SLiane.Praza@Sun.COM const char *, char **); 7517887SLiane.Praza@Sun.COM 7527887SLiane.Praza@Sun.COM int scf_tmpl_value_in_constraint(const scf_prop_tmpl_t *pt, scf_value_t *value, 7537887SLiane.Praza@Sun.COM scf_tmpl_errors_t **errs); 7547887SLiane.Praza@Sun.COM 7557887SLiane.Praza@Sun.COM /* 7567887SLiane.Praza@Sun.COM * Template validation interfaces 7577887SLiane.Praza@Sun.COM */ 7587887SLiane.Praza@Sun.COM int scf_tmpl_validate_fmri(scf_handle_t *, const char *, 7597887SLiane.Praza@Sun.COM const char *, scf_tmpl_errors_t **, int); 7607887SLiane.Praza@Sun.COM #define SCF_TMPL_VALIDATE_FLAG_CURRENT 0x1 7617887SLiane.Praza@Sun.COM 7627887SLiane.Praza@Sun.COM void scf_tmpl_errors_destroy(scf_tmpl_errors_t *errs); 7637887SLiane.Praza@Sun.COM scf_tmpl_error_t *scf_tmpl_next_error(scf_tmpl_errors_t *); 7647887SLiane.Praza@Sun.COM void scf_tmpl_reset_errors(scf_tmpl_errors_t *errs); 7657887SLiane.Praza@Sun.COM int scf_tmpl_strerror(scf_tmpl_error_t *err, char *s, size_t n, int flag); 7667887SLiane.Praza@Sun.COM int scf_tmpl_error_source_fmri(const scf_tmpl_error_t *, char **); 7677887SLiane.Praza@Sun.COM int scf_tmpl_error_type(const scf_tmpl_error_t *, scf_tmpl_error_type_t *); 7687887SLiane.Praza@Sun.COM int scf_tmpl_error_pg_tmpl(const scf_tmpl_error_t *, char **, char **); 7697887SLiane.Praza@Sun.COM int scf_tmpl_error_pg(const scf_tmpl_error_t *, char **, char **); 7707887SLiane.Praza@Sun.COM int scf_tmpl_error_prop_tmpl(const scf_tmpl_error_t *, char **, char **); 7717887SLiane.Praza@Sun.COM int scf_tmpl_error_prop(const scf_tmpl_error_t *, char **, char **); 7727887SLiane.Praza@Sun.COM int scf_tmpl_error_value(const scf_tmpl_error_t *, char **); 7737887SLiane.Praza@Sun.COM 7747887SLiane.Praza@Sun.COM /* 7750Sstevel@tonic-gate * Simplified calls 7760Sstevel@tonic-gate */ 7770Sstevel@tonic-gate int smf_enable_instance(const char *, int); 7780Sstevel@tonic-gate int smf_disable_instance(const char *, int); 7790Sstevel@tonic-gate int smf_refresh_instance(const char *); 7800Sstevel@tonic-gate int smf_restart_instance(const char *); 7810Sstevel@tonic-gate int smf_maintain_instance(const char *, int); 7820Sstevel@tonic-gate int smf_degrade_instance(const char *, int); 7830Sstevel@tonic-gate int smf_restore_instance(const char *); 7840Sstevel@tonic-gate char *smf_get_state(const char *); 7850Sstevel@tonic-gate 7860Sstevel@tonic-gate int scf_simple_walk_instances(uint_t, void *, 7870Sstevel@tonic-gate int (*inst_callback)(scf_handle_t *, scf_instance_t *, void *)); 7880Sstevel@tonic-gate 7890Sstevel@tonic-gate scf_simple_prop_t *scf_simple_prop_get(scf_handle_t *, const char *, 7900Sstevel@tonic-gate const char *, const char *); 7910Sstevel@tonic-gate void scf_simple_prop_free(scf_simple_prop_t *); 7920Sstevel@tonic-gate scf_simple_app_props_t *scf_simple_app_props_get(scf_handle_t *, const char *); 7930Sstevel@tonic-gate void scf_simple_app_props_free(scf_simple_app_props_t *); 7940Sstevel@tonic-gate const scf_simple_prop_t *scf_simple_app_props_next( 7950Sstevel@tonic-gate const scf_simple_app_props_t *, scf_simple_prop_t *); 7960Sstevel@tonic-gate const scf_simple_prop_t *scf_simple_app_props_search( 7970Sstevel@tonic-gate const scf_simple_app_props_t *, const char *, const char *); 7980Sstevel@tonic-gate ssize_t scf_simple_prop_numvalues(const scf_simple_prop_t *); 7990Sstevel@tonic-gate scf_type_t scf_simple_prop_type(const scf_simple_prop_t *); 8000Sstevel@tonic-gate char *scf_simple_prop_name(const scf_simple_prop_t *); 8010Sstevel@tonic-gate char *scf_simple_prop_pgname(const scf_simple_prop_t *); 8020Sstevel@tonic-gate uint8_t *scf_simple_prop_next_boolean(scf_simple_prop_t *); 8030Sstevel@tonic-gate uint64_t *scf_simple_prop_next_count(scf_simple_prop_t *); 8040Sstevel@tonic-gate int64_t *scf_simple_prop_next_integer(scf_simple_prop_t *); 8050Sstevel@tonic-gate int64_t *scf_simple_prop_next_time(scf_simple_prop_t *, int32_t *); 8060Sstevel@tonic-gate char *scf_simple_prop_next_astring(scf_simple_prop_t *); 8070Sstevel@tonic-gate char *scf_simple_prop_next_ustring(scf_simple_prop_t *); 8080Sstevel@tonic-gate void *scf_simple_prop_next_opaque(scf_simple_prop_t *, size_t *); 8090Sstevel@tonic-gate void scf_simple_prop_next_reset(scf_simple_prop_t *); 8100Sstevel@tonic-gate 8110Sstevel@tonic-gate /* 812*12967Sgavin.maltby@oracle.com * smf_state_from_string() 813*12967Sgavin.maltby@oracle.com * return SCF_STATE_* value for the input 814*12967Sgavin.maltby@oracle.com * -1 on error. String "all" maps to SCF_STATE_ALL macro 815*12967Sgavin.maltby@oracle.com */ 816*12967Sgavin.maltby@oracle.com int32_t smf_state_from_string(const char *); 817*12967Sgavin.maltby@oracle.com 818*12967Sgavin.maltby@oracle.com /* 819*12967Sgavin.maltby@oracle.com * smf_state_to_string() 820*12967Sgavin.maltby@oracle.com * return SCF_STATE_STRING* value for the input 821*12967Sgavin.maltby@oracle.com * NULL on error. 822*12967Sgavin.maltby@oracle.com */ 823*12967Sgavin.maltby@oracle.com const char *smf_state_to_string(int32_t); 824*12967Sgavin.maltby@oracle.com 825*12967Sgavin.maltby@oracle.com /* 826*12967Sgavin.maltby@oracle.com * Notification interfaces 827*12967Sgavin.maltby@oracle.com */ 828*12967Sgavin.maltby@oracle.com int smf_notify_set_params(const char *, nvlist_t *); 829*12967Sgavin.maltby@oracle.com int smf_notify_get_params(nvlist_t **, nvlist_t *); 830*12967Sgavin.maltby@oracle.com int smf_notify_del_params(const char *, const char *, int32_t); 831*12967Sgavin.maltby@oracle.com 832*12967Sgavin.maltby@oracle.com /* 8330Sstevel@tonic-gate * SMF exit status definitions 8340Sstevel@tonic-gate */ 8350Sstevel@tonic-gate #define SMF_EXIT_OK 0 8360Sstevel@tonic-gate #define SMF_EXIT_ERR_FATAL 95 8370Sstevel@tonic-gate #define SMF_EXIT_ERR_CONFIG 96 8380Sstevel@tonic-gate #define SMF_EXIT_MON_DEGRADE 97 8390Sstevel@tonic-gate #define SMF_EXIT_MON_OFFLINE 98 8400Sstevel@tonic-gate #define SMF_EXIT_ERR_NOSMF 99 8410Sstevel@tonic-gate #define SMF_EXIT_ERR_PERM 100 8420Sstevel@tonic-gate 8430Sstevel@tonic-gate #ifdef __cplusplus 8440Sstevel@tonic-gate } 8450Sstevel@tonic-gate #endif 8460Sstevel@tonic-gate 8470Sstevel@tonic-gate #endif /* _LIBSCF_H */ 848