xref: /illumos-gate/usr/src/lib/libbsm/common/devices.h (revision 10ddde3a)
17c478bd9Sstevel@tonic-gate /*
27c478bd9Sstevel@tonic-gate  * CDDL HEADER START
37c478bd9Sstevel@tonic-gate  *
47c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
545916cd2Sjpk  * Common Development and Distribution License (the "License").
645916cd2Sjpk  * You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate  *
87c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate  * and limitations under the License.
127c478bd9Sstevel@tonic-gate  *
137c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate  *
197c478bd9Sstevel@tonic-gate  * CDDL HEADER END
207c478bd9Sstevel@tonic-gate  */
217c478bd9Sstevel@tonic-gate /*
22*10ddde3aSaj  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
237c478bd9Sstevel@tonic-gate  * Use is subject to license terms.
247c478bd9Sstevel@tonic-gate  */
257c478bd9Sstevel@tonic-gate 
267c478bd9Sstevel@tonic-gate #ifndef	_BSM_DEVICES_H
277c478bd9Sstevel@tonic-gate #define	_BSM_DEVICES_H
287c478bd9Sstevel@tonic-gate 
297c478bd9Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
307c478bd9Sstevel@tonic-gate 
317c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
327c478bd9Sstevel@tonic-gate extern "C" {
337c478bd9Sstevel@tonic-gate #endif
347c478bd9Sstevel@tonic-gate 
3545916cd2Sjpk #include <stdio.h>
3645916cd2Sjpk #include <secdb.h>
3745916cd2Sjpk 
387c478bd9Sstevel@tonic-gate 
3945916cd2Sjpk #define	DAOPT_AUTHS	"auths"
40*10ddde3aSaj #define	DAOPT_CLASS	"class"
4145916cd2Sjpk #define	DAOPT_CSCRIPT	"cleanscript"
4245916cd2Sjpk #define	DAOPT_MINLABEL	"minlabel"
4345916cd2Sjpk #define	DAOPT_MAXLABEL	"maxlabel"
44*10ddde3aSaj #define	DAOPT_XDISPLAY	"xdpy"
4545916cd2Sjpk #define	DAOPT_ZONE	"zone"
4645916cd2Sjpk #define	DA_RESERVED	"reserved"
477c478bd9Sstevel@tonic-gate 
48*10ddde3aSaj /*
49*10ddde3aSaj  * These are unsupported, SUN-private interfaces.
50*10ddde3aSaj  */
51*10ddde3aSaj 
5245916cd2Sjpk typedef struct {
5345916cd2Sjpk 	char	*da_devname;
5445916cd2Sjpk 	char	*da_devtype;
5545916cd2Sjpk 	char	*da_devauth;
5645916cd2Sjpk 	char	*da_devexec;
5745916cd2Sjpk 	kva_t	*da_devopts;
587c478bd9Sstevel@tonic-gate } devalloc_t;
597c478bd9Sstevel@tonic-gate 
6045916cd2Sjpk typedef struct {
6145916cd2Sjpk 	char	*dmap_devname;
6245916cd2Sjpk 	char	*dmap_devtype;
6345916cd2Sjpk 	char	*dmap_devlist;
6445916cd2Sjpk 	char	**dmap_devarray;
6545916cd2Sjpk } devmap_t;
6645916cd2Sjpk 
6745916cd2Sjpk int		getdadmline(char *, int, FILE *);
6845916cd2Sjpk 
6945916cd2Sjpk devalloc_t	*getdaent(void);
7045916cd2Sjpk devalloc_t	*getdatype(char *);
7145916cd2Sjpk devalloc_t	*getdanam(char *);
7245916cd2Sjpk void		setdaent(void);
7345916cd2Sjpk void		enddaent(void);
7445916cd2Sjpk void		freedaent(devalloc_t *);
7545916cd2Sjpk void		setdafile(char *);
7645916cd2Sjpk 
7745916cd2Sjpk devmap_t	*getdmapent(void);
7845916cd2Sjpk devmap_t	*getdmaptype(char *);
7945916cd2Sjpk devmap_t	*getdmapnam(char *);
8045916cd2Sjpk devmap_t	*getdmapdev(char *);
8145916cd2Sjpk void		setdmapent(void);
8245916cd2Sjpk void		enddmapent(void);
8345916cd2Sjpk void		freedmapent(devmap_t *);
8445916cd2Sjpk void		setdmapfile(char *);
8545916cd2Sjpk char		*getdmapfield(char *);
8645916cd2Sjpk char		*getdmapdfield(char *);
877c478bd9Sstevel@tonic-gate 
887c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
897c478bd9Sstevel@tonic-gate }
907c478bd9Sstevel@tonic-gate #endif
917c478bd9Sstevel@tonic-gate 
927c478bd9Sstevel@tonic-gate #endif	/* _BSM_DEVICES_H */
93