Merge commit 'b1e7e97d3b60469b243b3b2e22c7d8cbd11c7c90'
[unleashed.git] / usr / src / cmd / acctadm / aconf.h
blob68611efbde912c8efbfa2e90dff44db19453d464
1 /*
2 * CDDL HEADER START
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.
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.
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]
19 * CDDL HEADER END
22 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
26 #ifndef _ACONF_H
27 #define _ACONF_H
29 #pragma ident "%Z%%M% %I% %E% SMI"
31 #include <sys/types.h>
32 #include <sys/param.h>
33 #include <stdio.h>
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
39 #define MAXRESLEN 256
41 typedef struct acctconf {
42 int state;
43 char file[MAXPATHLEN];
44 char tracked[MAXRESLEN];
45 char untracked[MAXRESLEN];
46 } acctconf_t;
49 * Predefined strings
51 #define AC_STR_NONE "none"
54 * Configuration property group name
56 #define AC_PGNAME "config"
59 * Configuration property names
61 #define AC_PROP_STATE "enabled"
62 #define AC_PROP_FILE "file"
63 #define AC_PROP_TRACKED "tracked"
64 #define AC_PROP_UNTRACKED "untracked"
66 extern void aconf_init(acctconf_t *, int);
67 extern int aconf_setup(const char *);
68 extern int aconf_scf_init(const char *);
69 extern void aconf_scf_fini(void);
70 extern int aconf_set_string(const char *, const char *);
71 extern int aconf_set_bool(const char *, boolean_t);
72 extern int aconf_save(void);
73 extern void aconf_print(FILE *, int);
74 extern boolean_t aconf_have_smf_auths(void);
75 extern const char *aconf_type2fmri(int);
77 #ifdef __cplusplus
79 #endif
81 #endif /* _ACONF_H */