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 5*45916cd2Sjpk * Common Development and Distribution License (the "License"). 6*45916cd2Sjpk * 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*45916cd2Sjpk * Copyright 2006 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 35*45916cd2Sjpk #include <stdio.h> 36*45916cd2Sjpk #include <secdb.h> 37*45916cd2Sjpk 38*45916cd2Sjpk /* 39*45916cd2Sjpk * These are unsupported, SUN-private interfaces. 40*45916cd2Sjpk */ 41*45916cd2Sjpk 42*45916cd2Sjpk #define DAOPT_AUTHS "auths" 43*45916cd2Sjpk #define DAOPT_CSCRIPT "cleanscript" 44*45916cd2Sjpk #define DAOPT_MINLABEL "minlabel" 45*45916cd2Sjpk #define DAOPT_MAXLABEL "maxlabel" 46*45916cd2Sjpk #define DAOPT_ZONE "zone" 47*45916cd2Sjpk #define DA_RESERVED "reserved" 48*45916cd2Sjpk 49*45916cd2Sjpk typedef struct { 50*45916cd2Sjpk char *da_devname; 51*45916cd2Sjpk char *da_devtype; 52*45916cd2Sjpk char *da_devauth; 53*45916cd2Sjpk char *da_devexec; 54*45916cd2Sjpk kva_t *da_devopts; 55*45916cd2Sjpk } devalloc_t; 56*45916cd2Sjpk 57*45916cd2Sjpk typedef struct { 587c478bd9Sstevel@tonic-gate char *dmap_devname; 597c478bd9Sstevel@tonic-gate char *dmap_devtype; 607c478bd9Sstevel@tonic-gate char *dmap_devlist; 61*45916cd2Sjpk char **dmap_devarray; 627c478bd9Sstevel@tonic-gate } devmap_t; 637c478bd9Sstevel@tonic-gate 64*45916cd2Sjpk int getdadmline(char *, int, FILE *); 65*45916cd2Sjpk 66*45916cd2Sjpk devalloc_t *getdaent(void); 67*45916cd2Sjpk devalloc_t *getdatype(char *); 68*45916cd2Sjpk devalloc_t *getdanam(char *); 69*45916cd2Sjpk void setdaent(void); 70*45916cd2Sjpk void enddaent(void); 71*45916cd2Sjpk void freedaent(devalloc_t *); 72*45916cd2Sjpk void setdafile(char *); 73*45916cd2Sjpk 747c478bd9Sstevel@tonic-gate devmap_t *getdmapent(void); 757c478bd9Sstevel@tonic-gate devmap_t *getdmaptype(char *); 767c478bd9Sstevel@tonic-gate devmap_t *getdmapnam(char *); 777c478bd9Sstevel@tonic-gate devmap_t *getdmapdev(char *); 787c478bd9Sstevel@tonic-gate void setdmapent(void); 797c478bd9Sstevel@tonic-gate void enddmapent(void); 80*45916cd2Sjpk void freedmapent(devmap_t *); 817c478bd9Sstevel@tonic-gate void setdmapfile(char *); 82*45916cd2Sjpk char *getdmapfield(char *); 83*45916cd2Sjpk char *getdmapdfield(char *); 847c478bd9Sstevel@tonic-gate 857c478bd9Sstevel@tonic-gate #ifdef __cplusplus 867c478bd9Sstevel@tonic-gate } 877c478bd9Sstevel@tonic-gate #endif 887c478bd9Sstevel@tonic-gate 897c478bd9Sstevel@tonic-gate #endif /* _BSM_DEVICES_H */ 90