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 /*
23 * Copyright 1998-2002 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
25 */
26
27 #ifndef _SYS_CONFIG_ADMIN_H
28 #define _SYS_CONFIG_ADMIN_H
29
30 #pragma ident "%Z%%M% %I% %E% SMI"
31
32 /*
33 * config_admin.h
34 *
35 * this file supports usage of the interfaces defined in
36 * config_admin.3x. which are contained in /usr/lib/libcfgadm.so.1
37 */
38
39 #include <sys/param.h>
40
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44
45
46 /*
47 * Defined constants
48 */
49 #define CFGA_AP_LOG_ID_LEN 20
50 #define CFGA_AP_PHYS_ID_LEN MAXPATHLEN
51 #define CFGA_INFO_LEN 4096
159 */
160 typedef enum {
161 CFGA_OK = 0,
162 CFGA_NACK,
163 CFGA_NOTSUPP,
164 CFGA_OPNOTSUPP,
165 CFGA_PRIV,
166 CFGA_BUSY,
167 CFGA_SYSTEM_BUSY,
168 CFGA_DATA_ERROR,
169 CFGA_LIB_ERROR,
170 CFGA_NO_LIB,
171 CFGA_INSUFFICENT_CONDITION,
172 CFGA_INVAL,
173 CFGA_ERROR,
174 CFGA_APID_NOEXIST,
175 CFGA_ATTR_INVAL
176 } cfga_err_t;
177
178
179 #if defined(__STDC__)
180
181 /*
182 * config_admin.3x library interfaces
183 */
184
185 cfga_err_t config_change_state(cfga_cmd_t state_change_cmd, int num_ap_ids,
186 char *const *ap_ids, const char *options, struct cfga_confirm *confp,
187 struct cfga_msg *msgp, char **errstring, cfga_flags_t flags);
188
189 cfga_err_t config_private_func(const char *function, int num_ap_ids,
190 char *const *ap_ids, const char *options, struct cfga_confirm *confp,
191 struct cfga_msg *msgp, char **errstring, cfga_flags_t flags);
192
193 cfga_err_t config_test(int num_ap_ids, char *const *ap_ids,
194 const char *options, struct cfga_msg *msgp, char **errstring,
195 cfga_flags_t flags);
196
197 cfga_err_t config_list_ext(int num_ap_ids, char *const *ap_ids,
198 struct cfga_list_data **ap_id_list, int *nlist, const char *options,
199 const char *listopts, char **errstring, cfga_flags_t flags);
200
239
240
241 /*
242 * Plugin version information.
243 */
244 #define CFGA_HSL_V1 1
245 #define CFGA_HSL_V2 2
246 #define CFGA_HSL_VERS CFGA_HSL_V2
247
248 /*
249 * The following two routines are retained only for backward compatibility.
250 */
251 cfga_err_t cfga_stat(const char *, struct cfga_stat_data *,
252 const char *, char **);
253 cfga_err_t cfga_list(const char *, struct cfga_stat_data **, int *,
254 const char *, char **);
255
256
257 #endif /* CFGA_PLUGIN_LIB */
258
259 #else /* !defined __STDC__ */
260
261 extern const char *config_strerror();
262 extern int config_ap_id_cmp();
263
264 #endif /* __STDC__ */
265
266 #ifdef __cplusplus
267 }
268 #endif
269
270 #endif /* _SYS_CONFIG_ADMIN_H */
|
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 /*
23 * Copyright 2014 Garrett D'Amore <garrett@damore.org>
24 *
25 * Copyright 1998-2002 Sun Microsystems, Inc. All rights reserved.
26 * Use is subject to license terms.
27 */
28
29 #ifndef _SYS_CONFIG_ADMIN_H
30 #define _SYS_CONFIG_ADMIN_H
31
32 /*
33 * config_admin.h
34 *
35 * this file supports usage of the interfaces defined in
36 * config_admin.3x. which are contained in /usr/lib/libcfgadm.so.1
37 */
38
39 #include <sys/param.h>
40
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44
45
46 /*
47 * Defined constants
48 */
49 #define CFGA_AP_LOG_ID_LEN 20
50 #define CFGA_AP_PHYS_ID_LEN MAXPATHLEN
51 #define CFGA_INFO_LEN 4096
159 */
160 typedef enum {
161 CFGA_OK = 0,
162 CFGA_NACK,
163 CFGA_NOTSUPP,
164 CFGA_OPNOTSUPP,
165 CFGA_PRIV,
166 CFGA_BUSY,
167 CFGA_SYSTEM_BUSY,
168 CFGA_DATA_ERROR,
169 CFGA_LIB_ERROR,
170 CFGA_NO_LIB,
171 CFGA_INSUFFICENT_CONDITION,
172 CFGA_INVAL,
173 CFGA_ERROR,
174 CFGA_APID_NOEXIST,
175 CFGA_ATTR_INVAL
176 } cfga_err_t;
177
178
179 /*
180 * config_admin.3x library interfaces
181 */
182
183 cfga_err_t config_change_state(cfga_cmd_t state_change_cmd, int num_ap_ids,
184 char *const *ap_ids, const char *options, struct cfga_confirm *confp,
185 struct cfga_msg *msgp, char **errstring, cfga_flags_t flags);
186
187 cfga_err_t config_private_func(const char *function, int num_ap_ids,
188 char *const *ap_ids, const char *options, struct cfga_confirm *confp,
189 struct cfga_msg *msgp, char **errstring, cfga_flags_t flags);
190
191 cfga_err_t config_test(int num_ap_ids, char *const *ap_ids,
192 const char *options, struct cfga_msg *msgp, char **errstring,
193 cfga_flags_t flags);
194
195 cfga_err_t config_list_ext(int num_ap_ids, char *const *ap_ids,
196 struct cfga_list_data **ap_id_list, int *nlist, const char *options,
197 const char *listopts, char **errstring, cfga_flags_t flags);
198
237
238
239 /*
240 * Plugin version information.
241 */
242 #define CFGA_HSL_V1 1
243 #define CFGA_HSL_V2 2
244 #define CFGA_HSL_VERS CFGA_HSL_V2
245
246 /*
247 * The following two routines are retained only for backward compatibility.
248 */
249 cfga_err_t cfga_stat(const char *, struct cfga_stat_data *,
250 const char *, char **);
251 cfga_err_t cfga_list(const char *, struct cfga_stat_data **, int *,
252 const char *, char **);
253
254
255 #endif /* CFGA_PLUGIN_LIB */
256
257 #ifdef __cplusplus
258 }
259 #endif
260
261 #endif /* _SYS_CONFIG_ADMIN_H */
|