xref: /onnv-gate/usr/src/lib/librestart/common/librestart.h (revision 12967:ab9ae749152f)
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
56045Srm88369  * Common Development and Distribution License (the "License").
66045Srm88369  * 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  */
210Sstevel@tonic-gate /*
22*12967Sgavin.maltby@oracle.com  * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
230Sstevel@tonic-gate  */
240Sstevel@tonic-gate 
250Sstevel@tonic-gate #ifndef	_LIBRESTART_H
260Sstevel@tonic-gate #define	_LIBRESTART_H
270Sstevel@tonic-gate 
286045Srm88369 #include <libsysevent.h>
290Sstevel@tonic-gate #include <libcontract.h>
300Sstevel@tonic-gate #include <libscf.h>
310Sstevel@tonic-gate #include <limits.h>
320Sstevel@tonic-gate #include <priv.h>
330Sstevel@tonic-gate #include <pwd.h>
340Sstevel@tonic-gate #include <sys/types.h>
350Sstevel@tonic-gate 
360Sstevel@tonic-gate #ifdef	__cplusplus
370Sstevel@tonic-gate extern "C" {
380Sstevel@tonic-gate #endif
390Sstevel@tonic-gate 
400Sstevel@tonic-gate /*
410Sstevel@tonic-gate  * There are 3 parts to librestart.
420Sstevel@tonic-gate  *	1) The event protocol from the master restarter to its delegates.
430Sstevel@tonic-gate  *	2) A functional interface for updating the repository.
440Sstevel@tonic-gate  *	3) Convenience functions for common restarter tasks.
450Sstevel@tonic-gate  *
460Sstevel@tonic-gate  * Event protocol
470Sstevel@tonic-gate  *	We need a reliable event protocol, as there's no way to define
480Sstevel@tonic-gate  *	restarter events as idempotent.
490Sstevel@tonic-gate  *
500Sstevel@tonic-gate  *	Currently using sysevent channels as the reliable event implementation.
510Sstevel@tonic-gate  *	This could change if the implementation proves unsuitable, but
520Sstevel@tonic-gate  *	the API defined here should abstract anything but a change in
530Sstevel@tonic-gate  *	the fundamental event model.
540Sstevel@tonic-gate  *
550Sstevel@tonic-gate  *	We offer functions to tease apart the event rather than generic
560Sstevel@tonic-gate  *	nvpair interfaces. This is because each event type has a well-
570Sstevel@tonic-gate  *	defined set of fields.
580Sstevel@tonic-gate  */
590Sstevel@tonic-gate 
608823STruong.Q.Nguyen@Sun.COM /*
618823STruong.Q.Nguyen@Sun.COM  * Some of the functions have external contracted consumers, review contracts
628823STruong.Q.Nguyen@Sun.COM  * when making incompatible changes.
638823STruong.Q.Nguyen@Sun.COM  */
648823STruong.Q.Nguyen@Sun.COM 
650Sstevel@tonic-gate typedef struct restarter_event_handle restarter_event_handle_t;
660Sstevel@tonic-gate typedef struct restarter_event restarter_event_t;
670Sstevel@tonic-gate 
680Sstevel@tonic-gate typedef uint32_t restarter_event_type_t;
690Sstevel@tonic-gate 
700Sstevel@tonic-gate /*
710Sstevel@tonic-gate  * Define an event protocol version. In theory, we could use this in
720Sstevel@tonic-gate  * the future to support delegated restarters which use an older
730Sstevel@tonic-gate  * protocol. In practice, increment RESTARTER_EVENT_VERSION whenever the
740Sstevel@tonic-gate  * protocol might have changed.
750Sstevel@tonic-gate  */
76*12967Sgavin.maltby@oracle.com #define	RESTARTER_EVENT_VERSION		5
770Sstevel@tonic-gate 
780Sstevel@tonic-gate #define	RESTARTER_FLAG_DEBUG		1
790Sstevel@tonic-gate 
809765SSean.Wilcox@Sun.COM #define	RESTARTER_ERRMSGSZ		1024
819765SSean.Wilcox@Sun.COM 
820Sstevel@tonic-gate /*
830Sstevel@tonic-gate  * Event types
840Sstevel@tonic-gate  *	RESTARTER_EVENT_TYPE_ADD_INSTANCE
850Sstevel@tonic-gate  *		responsible for a new (stopped) instance
860Sstevel@tonic-gate  *	RESTARTER_EVENT_TYPE_REMOVE_INSTANCE
870Sstevel@tonic-gate  *		no longer responsible for this instance; stop it and return
880Sstevel@tonic-gate  *	RESTARTER_EVENT_TYPE_ENABLE
890Sstevel@tonic-gate  *		no guarantee that dependencies are met; see
900Sstevel@tonic-gate  *		RESTARTER_EVENT_TYPE_START
910Sstevel@tonic-gate  *	RESTARTER_EVENT_TYPE_DISABLE
920Sstevel@tonic-gate  *		no guarantee that instance was running
930Sstevel@tonic-gate  *	RESTARTER_EVENT_TYPE_ADMIN_DEGRADED
940Sstevel@tonic-gate  *	RESTARTER_EVENT_TYPE_ADMIN_REFRESH
950Sstevel@tonic-gate  *	RESTARTER_EVENT_TYPE_ADMIN_RESTART
960Sstevel@tonic-gate  *	RESTARTER_EVENT_TYPE_ADMIN_MAINT_OFF
970Sstevel@tonic-gate  *	RESTARTER_EVENT_TYPE_ADMIN_MAINT_ON
980Sstevel@tonic-gate  *	RESTARTER_EVENT_TYPE_ADMIN_MAINT_ON_IMMEDIATE
990Sstevel@tonic-gate  *	RESTARTER_EVENT_TYPE_ADMIN_MAINT_OFF
1000Sstevel@tonic-gate  *	RESTARTER_EVENT_TYPE_STOP
1010Sstevel@tonic-gate  *		dependencies are, or are becoming, unsatisfied
1020Sstevel@tonic-gate  *	RESTARTER_EVENT_TYPE_START
1030Sstevel@tonic-gate  *		dependencies have become satisfied
1040Sstevel@tonic-gate  *	RESTARTER_EVENT_TYPE_DEPENDENCY_CYCLE
1050Sstevel@tonic-gate  *		instance caused a dependency cycle
1060Sstevel@tonic-gate  *	RESTARTER_EVENT_TYPE_INVALID_DEPENDENCY
1070Sstevel@tonic-gate  *		instance has an invalid dependency
1080Sstevel@tonic-gate  */
1090Sstevel@tonic-gate 
1100Sstevel@tonic-gate #define	RESTARTER_EVENT_TYPE_INVALID			0
1110Sstevel@tonic-gate #define	RESTARTER_EVENT_TYPE_ADD_INSTANCE		1
1120Sstevel@tonic-gate #define	RESTARTER_EVENT_TYPE_REMOVE_INSTANCE		2
1130Sstevel@tonic-gate #define	RESTARTER_EVENT_TYPE_ENABLE			3
1140Sstevel@tonic-gate #define	RESTARTER_EVENT_TYPE_DISABLE			4
1150Sstevel@tonic-gate #define	RESTARTER_EVENT_TYPE_ADMIN_DEGRADED		5
1160Sstevel@tonic-gate #define	RESTARTER_EVENT_TYPE_ADMIN_REFRESH		6
1170Sstevel@tonic-gate #define	RESTARTER_EVENT_TYPE_ADMIN_RESTART		7
1180Sstevel@tonic-gate #define	RESTARTER_EVENT_TYPE_ADMIN_MAINT_OFF		8
1190Sstevel@tonic-gate #define	RESTARTER_EVENT_TYPE_ADMIN_MAINT_ON		9
1200Sstevel@tonic-gate #define	RESTARTER_EVENT_TYPE_ADMIN_MAINT_ON_IMMEDIATE	10
1210Sstevel@tonic-gate #define	RESTARTER_EVENT_TYPE_STOP			11
1220Sstevel@tonic-gate #define	RESTARTER_EVENT_TYPE_START			12
1230Sstevel@tonic-gate #define	RESTARTER_EVENT_TYPE_DEPENDENCY_CYCLE		13
1240Sstevel@tonic-gate #define	RESTARTER_EVENT_TYPE_INVALID_DEPENDENCY		14
1250Sstevel@tonic-gate #define	RESTARTER_EVENT_TYPE_ADMIN_DISABLE		15
12611482SSean.Wilcox@Sun.COM #define	RESTARTER_EVENT_TYPE_STOP_RESET			16
1270Sstevel@tonic-gate 
1280Sstevel@tonic-gate #define	RESTARTER_EVENT_ERROR			-1
1290Sstevel@tonic-gate 
1300Sstevel@tonic-gate #define	RESTARTER_EVENT_INSTANCE_DISABLED	0
1310Sstevel@tonic-gate #define	RESTARTER_EVENT_INSTANCE_ENABLED	1
1320Sstevel@tonic-gate 
1330Sstevel@tonic-gate typedef enum {
1340Sstevel@tonic-gate 	RESTARTER_STATE_NONE,
1350Sstevel@tonic-gate 	RESTARTER_STATE_UNINIT,
1360Sstevel@tonic-gate 	RESTARTER_STATE_MAINT,
1370Sstevel@tonic-gate 	RESTARTER_STATE_OFFLINE,
1380Sstevel@tonic-gate 	RESTARTER_STATE_DISABLED,
1390Sstevel@tonic-gate 	RESTARTER_STATE_ONLINE,
1400Sstevel@tonic-gate 	RESTARTER_STATE_DEGRADED
1410Sstevel@tonic-gate } restarter_instance_state_t;
1420Sstevel@tonic-gate 
1430Sstevel@tonic-gate /*
1440Sstevel@tonic-gate  * These values are ordered by severity of required restart, as we use
1450Sstevel@tonic-gate  * integer comparisons to determine error flow.
1460Sstevel@tonic-gate  */
1470Sstevel@tonic-gate typedef enum {
1480Sstevel@tonic-gate 	RERR_UNSUPPORTED = -1,
1490Sstevel@tonic-gate 	RERR_NONE = 0,			/* no error, restart, refresh */
1500Sstevel@tonic-gate 	RERR_FAULT,			/* fault occurred */
1510Sstevel@tonic-gate 	RERR_RESTART,			/* transition due to restart */
1520Sstevel@tonic-gate 	RERR_REFRESH			/* transition due to refresh */
1530Sstevel@tonic-gate } restarter_error_t;
1540Sstevel@tonic-gate /*
1550Sstevel@tonic-gate  * restarter_store_contract() and restarter_remove_contract() types
1560Sstevel@tonic-gate  */
1570Sstevel@tonic-gate typedef enum {
1580Sstevel@tonic-gate 	RESTARTER_CONTRACT_PRIMARY,
1590Sstevel@tonic-gate 	RESTARTER_CONTRACT_TRANSIENT
1600Sstevel@tonic-gate } restarter_contract_type_t;
1610Sstevel@tonic-gate 
1620Sstevel@tonic-gate /*
1630Sstevel@tonic-gate  * restarter_bind_handle() registers a delegate with svc.startd to
1640Sstevel@tonic-gate  * begin consuming events.
1650Sstevel@tonic-gate  *
1660Sstevel@tonic-gate  * On initial bind, the delgated restarter receives an event for each
1670Sstevel@tonic-gate  * instance it is responsible for, as if that instance was new.
1680Sstevel@tonic-gate  *
1690Sstevel@tonic-gate  * callers must have superuser privileges
1700Sstevel@tonic-gate  *
1710Sstevel@tonic-gate  * The event handler can return 0 for success, or EAGAIN to request
1720Sstevel@tonic-gate  * retry of event delivery. EAGAIN may be returned 3 times before the
1730Sstevel@tonic-gate  * event is discarded.
1740Sstevel@tonic-gate  */
1750Sstevel@tonic-gate int restarter_bind_handle(uint32_t, const char *,
1760Sstevel@tonic-gate     int (*event_handler)(restarter_event_t *), int,
1770Sstevel@tonic-gate     restarter_event_handle_t **);
1780Sstevel@tonic-gate 
1790Sstevel@tonic-gate restarter_event_type_t restarter_event_get_type(restarter_event_t *);
1800Sstevel@tonic-gate uint64_t restarter_event_get_seq(restarter_event_t *);
1810Sstevel@tonic-gate void restarter_event_get_time(restarter_event_t *, hrtime_t *);
1820Sstevel@tonic-gate ssize_t restarter_event_get_instance(restarter_event_t *, char *, size_t);
1830Sstevel@tonic-gate restarter_event_handle_t *restarter_event_get_handle(restarter_event_t *);
1840Sstevel@tonic-gate 
1850Sstevel@tonic-gate /*
1860Sstevel@tonic-gate  * The following functions work only on certain types of events.
1870Sstevel@tonic-gate  * They fail with a return of -1 if they're called on an inappropriate event.
1880Sstevel@tonic-gate  */
1890Sstevel@tonic-gate int restarter_event_get_enabled(restarter_event_t *);
1900Sstevel@tonic-gate int restarter_event_get_current_states(restarter_event_t *,
1910Sstevel@tonic-gate     restarter_instance_state_t *, restarter_instance_state_t *);
1920Sstevel@tonic-gate 
1930Sstevel@tonic-gate /*
194*12967Sgavin.maltby@oracle.com  * State transition reasons
195*12967Sgavin.maltby@oracle.com  */
196*12967Sgavin.maltby@oracle.com 
197*12967Sgavin.maltby@oracle.com typedef enum {
198*12967Sgavin.maltby@oracle.com 	restarter_str_none,
199*12967Sgavin.maltby@oracle.com 	restarter_str_administrative_request,
200*12967Sgavin.maltby@oracle.com 	restarter_str_bad_repo_state,
201*12967Sgavin.maltby@oracle.com 	restarter_str_clear_request,
202*12967Sgavin.maltby@oracle.com 	restarter_str_ct_ev_core,
203*12967Sgavin.maltby@oracle.com 	restarter_str_ct_ev_exit,
204*12967Sgavin.maltby@oracle.com 	restarter_str_ct_ev_hwerr,
205*12967Sgavin.maltby@oracle.com 	restarter_str_ct_ev_signal,
206*12967Sgavin.maltby@oracle.com 	restarter_str_dependencies_satisfied,
207*12967Sgavin.maltby@oracle.com 	restarter_str_dependency_activity,
208*12967Sgavin.maltby@oracle.com 	restarter_str_dependency_cycle,
209*12967Sgavin.maltby@oracle.com 	restarter_str_disable_request,
210*12967Sgavin.maltby@oracle.com 	restarter_str_enable_request,
211*12967Sgavin.maltby@oracle.com 	restarter_str_fault_threshold_reached,
212*12967Sgavin.maltby@oracle.com 	restarter_str_insert_in_graph,
213*12967Sgavin.maltby@oracle.com 	restarter_str_invalid_dependency,
214*12967Sgavin.maltby@oracle.com 	restarter_str_invalid_restarter,
215*12967Sgavin.maltby@oracle.com 	restarter_str_method_failed,
216*12967Sgavin.maltby@oracle.com 	restarter_str_per_configuration,
217*12967Sgavin.maltby@oracle.com 	restarter_str_refresh,
218*12967Sgavin.maltby@oracle.com 	restarter_str_restart_request,
219*12967Sgavin.maltby@oracle.com 	restarter_str_restarting_too_quickly,
220*12967Sgavin.maltby@oracle.com 	restarter_str_service_request,
221*12967Sgavin.maltby@oracle.com 	restarter_str_startd_restart
222*12967Sgavin.maltby@oracle.com } restarter_str_t;
223*12967Sgavin.maltby@oracle.com 
224*12967Sgavin.maltby@oracle.com struct restarter_state_transition_reason {
225*12967Sgavin.maltby@oracle.com 	restarter_str_t	str_key;
226*12967Sgavin.maltby@oracle.com 	const char	*str_short;
227*12967Sgavin.maltby@oracle.com 	const char	*str_long;
228*12967Sgavin.maltby@oracle.com };
229*12967Sgavin.maltby@oracle.com 
230*12967Sgavin.maltby@oracle.com /*
2310Sstevel@tonic-gate  * Functions for updating the repository.
2320Sstevel@tonic-gate  */
2338823STruong.Q.Nguyen@Sun.COM 
2348823STruong.Q.Nguyen@Sun.COM /*
2358823STruong.Q.Nguyen@Sun.COM  * When setting state to "maintenance", callers of restarter_set_states() can
2368823STruong.Q.Nguyen@Sun.COM  * set aux_state to "service_request" to communicate that another service has
2378823STruong.Q.Nguyen@Sun.COM  * requested maintenance state for the target service.
2388823STruong.Q.Nguyen@Sun.COM  *
2398823STruong.Q.Nguyen@Sun.COM  * Callers should use restarter_inst_validate_aux_fmri() to validate the fmri
2408823STruong.Q.Nguyen@Sun.COM  * of the requested service and pass "service_request" for aux_state when
2418823STruong.Q.Nguyen@Sun.COM  * calling restarter_set_states(). See inetd and startd for examples.
2428823STruong.Q.Nguyen@Sun.COM  */
2430Sstevel@tonic-gate int restarter_set_states(restarter_event_handle_t *, const char *,
2440Sstevel@tonic-gate     restarter_instance_state_t, restarter_instance_state_t,
2450Sstevel@tonic-gate     restarter_instance_state_t, restarter_instance_state_t, restarter_error_t,
246*12967Sgavin.maltby@oracle.com     restarter_str_t);
2476045Srm88369 int restarter_event_publish_retry(evchan_t *, const char *, const char *,
2486045Srm88369     const char *, const char *, nvlist_t *, uint32_t);
2490Sstevel@tonic-gate 
250*12967Sgavin.maltby@oracle.com /*
251*12967Sgavin.maltby@oracle.com  * functions for retrieving the state transition reason messages
252*12967Sgavin.maltby@oracle.com  */
253*12967Sgavin.maltby@oracle.com 
254*12967Sgavin.maltby@oracle.com #define	RESTARTER_STRING_VERSION	1
255*12967Sgavin.maltby@oracle.com 
256*12967Sgavin.maltby@oracle.com uint32_t restarter_str_version(void);
257*12967Sgavin.maltby@oracle.com const char *restarter_get_str_short(restarter_str_t);
258*12967Sgavin.maltby@oracle.com const char *restarter_get_str_long(restarter_str_t);
259*12967Sgavin.maltby@oracle.com 
2600Sstevel@tonic-gate int restarter_store_contract(scf_instance_t *, ctid_t,
2610Sstevel@tonic-gate     restarter_contract_type_t);
2620Sstevel@tonic-gate int restarter_remove_contract(scf_instance_t *, ctid_t,
2630Sstevel@tonic-gate     restarter_contract_type_t);
2640Sstevel@tonic-gate 
2650Sstevel@tonic-gate ssize_t restarter_state_to_string(restarter_instance_state_t, char *, size_t);
2660Sstevel@tonic-gate restarter_instance_state_t restarter_string_to_state(char *);
2670Sstevel@tonic-gate 
2689765SSean.Wilcox@Sun.COM #define	RESTARTER_METHOD_CONTEXT_VERSION	7
2690Sstevel@tonic-gate 
2700Sstevel@tonic-gate struct method_context {
2710Sstevel@tonic-gate 	/* Stable */
2720Sstevel@tonic-gate 	uid_t		uid, euid;
2730Sstevel@tonic-gate 	gid_t		gid, egid;
2740Sstevel@tonic-gate 	int		ngroups;		/* -1 means use initgroups(). */
2759263SSean.Wilcox@Sun.COM 	gid_t		groups[NGROUPS_MAX];
2760Sstevel@tonic-gate 	priv_set_t	*lpriv_set, *priv_set;
2770Sstevel@tonic-gate 	char		*corefile_pattern;	/* Optional. */
2780Sstevel@tonic-gate 	char		*project;		/* NULL for no change */
2790Sstevel@tonic-gate 	char		*resource_pool;		/* NULL for project default */
2800Sstevel@tonic-gate 	char		*working_dir;		/* NULL for :default */
2810Sstevel@tonic-gate 	char		**env;			/* NULL for no env */
2820Sstevel@tonic-gate 	size_t		env_sz;			/* size of env array */
2830Sstevel@tonic-gate 
2840Sstevel@tonic-gate 	/* Private */
2850Sstevel@tonic-gate 	char		*vbuf;
2860Sstevel@tonic-gate 	ssize_t		vbuf_sz;
2870Sstevel@tonic-gate 	struct passwd	pwd;
2880Sstevel@tonic-gate 	char		*pwbuf;
2890Sstevel@tonic-gate 	ssize_t		pwbufsz;
2900Sstevel@tonic-gate };
2910Sstevel@tonic-gate 
2929765SSean.Wilcox@Sun.COM /*
2939765SSean.Wilcox@Sun.COM  * An error structure that contains a message string, and a type
2949765SSean.Wilcox@Sun.COM  * that can be used to determine course of action by the reciever
2959765SSean.Wilcox@Sun.COM  * of the error structure.
2969765SSean.Wilcox@Sun.COM  *
2979765SSean.Wilcox@Sun.COM  * type - usually will be an errno equivalent but could contain
2989765SSean.Wilcox@Sun.COM  * 	defined error types for exampe SCF_ERROR_XXX
2999765SSean.Wilcox@Sun.COM  * msg - must be at the end of the structure as if the message is
3009765SSean.Wilcox@Sun.COM  * 	longer than EMSGSIZE we will reallocate the structure to
3019765SSean.Wilcox@Sun.COM  * 	handle the overflow
3029765SSean.Wilcox@Sun.COM  */
3039765SSean.Wilcox@Sun.COM typedef struct mc_error {
3049765SSean.Wilcox@Sun.COM 	int	destroy;	/* Flag to indicate destruction steps */
3059765SSean.Wilcox@Sun.COM 	int	type;		/* Type of error for decision making */
3069765SSean.Wilcox@Sun.COM 	int	size;		/* The size of the error message string */
3079765SSean.Wilcox@Sun.COM 	char 	msg[RESTARTER_ERRMSGSZ];
3089765SSean.Wilcox@Sun.COM } mc_error_t;
3099765SSean.Wilcox@Sun.COM 
3100Sstevel@tonic-gate int restarter_rm_libs_loadable(void);
3110Sstevel@tonic-gate /* instance, restarter name, method name, command line, structure pointer */
3129765SSean.Wilcox@Sun.COM mc_error_t *restarter_get_method_context(uint_t, scf_instance_t *,
3130Sstevel@tonic-gate     scf_snapshot_t *, const char *, const char *, struct method_context **);
3149765SSean.Wilcox@Sun.COM void restarter_mc_error_destroy(mc_error_t *);
3150Sstevel@tonic-gate int restarter_set_method_context(struct method_context *, const char **);
3160Sstevel@tonic-gate void restarter_free_method_context(struct method_context *);
3170Sstevel@tonic-gate 
3180Sstevel@tonic-gate 
3190Sstevel@tonic-gate int restarter_is_null_method(const char *);
3200Sstevel@tonic-gate int restarter_is_kill_method(const char *);
3210Sstevel@tonic-gate int restarter_is_kill_proc_method(const char *);
3220Sstevel@tonic-gate 
3238823STruong.Q.Nguyen@Sun.COM /* Validate the inst fmri specified in  restarter_actions/auxiliary_fmri */
3248823STruong.Q.Nguyen@Sun.COM int restarter_inst_validate_ractions_aux_fmri(scf_instance_t *);
3258823STruong.Q.Nguyen@Sun.COM 
3268823STruong.Q.Nguyen@Sun.COM /* Delete instance's restarter_actions/auxiliary_fmri property */
3278823STruong.Q.Nguyen@Sun.COM int restarter_inst_reset_ractions_aux_fmri(scf_instance_t *);
3288823STruong.Q.Nguyen@Sun.COM 
3298823STruong.Q.Nguyen@Sun.COM /* Get boolean value from instance's restarter_actions/auxiliary_tty */
3308823STruong.Q.Nguyen@Sun.COM int restarter_inst_ractions_from_tty(scf_instance_t *);
3318823STruong.Q.Nguyen@Sun.COM 
3328823STruong.Q.Nguyen@Sun.COM /* Delete instance's restarter/auxiliary_fmri property */
3338823STruong.Q.Nguyen@Sun.COM int restarter_inst_reset_aux_fmri(scf_instance_t *);
3348823STruong.Q.Nguyen@Sun.COM 
3358823STruong.Q.Nguyen@Sun.COM /*
3368823STruong.Q.Nguyen@Sun.COM  * Set instance's restarter/auxiliary_fmri, value come from
3378823STruong.Q.Nguyen@Sun.COM  * restarter_actions/auxliary_fmri
3388823STruong.Q.Nguyen@Sun.COM  */
3398823STruong.Q.Nguyen@Sun.COM int restarter_inst_set_aux_fmri(scf_instance_t *);
3408823STruong.Q.Nguyen@Sun.COM 
3410Sstevel@tonic-gate #ifdef	__cplusplus
3420Sstevel@tonic-gate }
3430Sstevel@tonic-gate #endif
3440Sstevel@tonic-gate 
3450Sstevel@tonic-gate #endif	/* _LIBRESTART_H */
346