xref: /titanic_41/usr/src/cmd/saf/adm.h (revision eb0cc229f19c437a6b538d3ac0d0443268290b7e)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
23 /*	  All Rights Reserved  	*/
24 
25 
26 #ident	"%Z%%M%	%I%	%E% SMI"       /* SVr4.0 1.3*/
27 
28 
29 /*
30  * REQUIRES: sac.h
31  */
32 
33 
34 struct	admcmd {
35 	char	ac_mtype;		/* type of message */
36 	char	ac_tag[PMTAGSIZE + 1];	/* PM tag */
37 	pid_t	ac_pid;			/* pid for id purposes (seq #) */
38 };
39 
40 
41 /*
42  * ac_mtype values
43  */
44 
45 # define AC_START	1		/* start PM */
46 # define AC_KILL	2		/* kill PM */
47 # define AC_ENABLE	3		/* enable PM */
48 # define AC_DISABLE	4		/* disable PM */
49 # define AC_STATUS	5		/* return PM status info - ac_tag
50 					   is unused with this command */
51 # define AC_SACREAD	6		/* read _sactab - ac_tag is unused
52 					   with this command */
53 # define AC_PMREAD	7		/* tell PM to read _pmtab */
54 
55 
56 /*
57  * the following structure defines the header on messages from
58  * the SAC back to sacadm.  The size field (ak_size) defines the
59  * size of the data portion of * the message, which follows the header.
60  * The form of this optional data portion is defined strictly by the
61  * request message type that caused the data to be returned (ac_mtype).
62  */
63 
64 struct	admack {
65 	char	ak_resp;		/* response code - 0 for ack, non
66 					   zero indicates reason for failure */
67 	pid_t	ak_pid;			/* pid for id purposes (seq #) */
68 	long	ak_size;		/* if true, indicates size of next msg */
69 };
70 
71 
72 /*
73  * ak_resp values
74  */
75 
76 # define AK_ACK		0		/* requested command succeeded */
77 # define AK_PMRUN	1		/* PM was already running */
78 # define AK_PMNOTRUN	2		/* PM was not running */
79 # define AK_NOPM	3		/* PM does not exist */
80 # define AK_UNKNOWN	4		/* unknown command */
81 # define AK_NOCONTACT	5		/* could not contact PM */
82 # define AK_PMLOCK	6		/* _pid file locked on start */
83 # define AK_RECOVER	7		/* PM in recovery */
84 # define AK_REQFAIL	8		/* the request failed for some reason */
85