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 #ifdef __cplusplus 307c478bd9Sstevel@tonic-gate extern "C" { 317c478bd9Sstevel@tonic-gate #endif 327c478bd9Sstevel@tonic-gate 3345916cd2Sjpk #include <stdio.h> 3445916cd2Sjpk #include <secdb.h> 3545916cd2Sjpk 367c478bd9Sstevel@tonic-gate 3745916cd2Sjpk #define DAOPT_AUTHS "auths" 38*10ddde3aSaj #define DAOPT_CLASS "class" 3945916cd2Sjpk #define DAOPT_CSCRIPT "cleanscript" 4045916cd2Sjpk #define DAOPT_MINLABEL "minlabel" 4145916cd2Sjpk #define DAOPT_MAXLABEL "maxlabel" 42*10ddde3aSaj #define DAOPT_XDISPLAY "xdpy" 4345916cd2Sjpk #define DAOPT_ZONE "zone" 4445916cd2Sjpk #define DA_RESERVED "reserved" 457c478bd9Sstevel@tonic-gate 46*10ddde3aSaj /* 47*10ddde3aSaj * These are unsupported, SUN-private interfaces. 48*10ddde3aSaj */ 49*10ddde3aSaj 5045916cd2Sjpk typedef struct { 5145916cd2Sjpk char *da_devname; 5245916cd2Sjpk char *da_devtype; 5345916cd2Sjpk char *da_devauth; 5445916cd2Sjpk char *da_devexec; 5545916cd2Sjpk kva_t *da_devopts; 567c478bd9Sstevel@tonic-gate } devalloc_t; 577c478bd9Sstevel@tonic-gate 5845916cd2Sjpk typedef struct { 5945916cd2Sjpk char *dmap_devname; 6045916cd2Sjpk char *dmap_devtype; 6145916cd2Sjpk char *dmap_devlist; 6245916cd2Sjpk char **dmap_devarray; 6345916cd2Sjpk } devmap_t; 6445916cd2Sjpk 6545916cd2Sjpk int getdadmline(char *, int, FILE *); 6645916cd2Sjpk 6745916cd2Sjpk devalloc_t *getdaent(void); 6845916cd2Sjpk devalloc_t *getdatype(char *); 6945916cd2Sjpk devalloc_t *getdanam(char *); 7045916cd2Sjpk void setdaent(void); 7145916cd2Sjpk void enddaent(void); 7245916cd2Sjpk void freedaent(devalloc_t *); 7345916cd2Sjpk void setdafile(char *); 7445916cd2Sjpk 7545916cd2Sjpk devmap_t *getdmapent(void); 7645916cd2Sjpk devmap_t *getdmaptype(char *); 7745916cd2Sjpk devmap_t *getdmapnam(char *); 7845916cd2Sjpk devmap_t *getdmapdev(char *); 7945916cd2Sjpk void setdmapent(void); 8045916cd2Sjpk void enddmapent(void); 8145916cd2Sjpk void freedmapent(devmap_t *); 8245916cd2Sjpk void setdmapfile(char *); 8345916cd2Sjpk char *getdmapfield(char *); 8445916cd2Sjpk char *getdmapdfield(char *); 857c478bd9Sstevel@tonic-gate 867c478bd9Sstevel@tonic-gate #ifdef __cplusplus 877c478bd9Sstevel@tonic-gate } 887c478bd9Sstevel@tonic-gate #endif 897c478bd9Sstevel@tonic-gate 907c478bd9Sstevel@tonic-gate #endif /* _BSM_DEVICES_H */ 91