xref: /titanic_41/usr/src/uts/sun4v/sys/varconfig.h (revision 82629e3015252bf18319ba3815c773df23e21436)
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 (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21 
22 /*
23  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #ifndef	_SYS_VARCONFIG_H
28 #define	_SYS_VARCONFIG_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 #ifdef	__cplusplus
33 extern "C" {
34 #endif
35 
36 
37 typedef enum {
38 	VAR_CONFIG_SET_REQ,
39 	VAR_CONFIG_DELETE_REQ,
40 	VAR_CONFIG_SET_RESP,
41 	VAR_CONFIG_DELETE_RESP
42 } var_config_cmd_t;
43 
44 typedef struct  {
45 	var_config_cmd_t cmd;
46 } var_config_hdr_t;
47 
48 
49 typedef struct {
50 	char name_and_value[1];
51 } var_config_set_req_t;
52 
53 typedef struct {
54 	char name[1];
55 } var_config_delete_req_t;
56 
57 
58 typedef enum {
59 	VAR_CONFIG_SUCCESS = 0,
60 	VAR_CONFIG_NO_SPACE,
61 	VAR_CONFIG_INVALID_VAR,
62 	VAR_CONFIG_INVALID_VAL,
63 	VAR_CONFIG_VAR_NOT_PRESENT
64 } var_config_status_t;
65 
66 typedef struct {
67 	var_config_status_t result;
68 } var_config_resp_t;
69 
70 
71 typedef struct {
72 	var_config_hdr_t vc_hdr;
73 	union {
74 		var_config_set_req_t vc_set;
75 		var_config_delete_req_t vc_delete;
76 		var_config_resp_t vc_resp;
77 	} un;
78 } var_config_msg_t;
79 
80 #define	var_config_cmd		vc_hdr.cmd
81 #define	var_config_set		un.vc_set
82 #define	var_config_delete	un.vc_delete
83 #define	var_config_resp		un.vc_resp
84 
85 #ifdef	__cplusplus
86 }
87 #endif
88 
89 #endif /* _SYS_VARCONFIG_H */
90