10Sstevel@tonic-gate /* 20Sstevel@tonic-gate * CDDL HEADER START 30Sstevel@tonic-gate * 40Sstevel@tonic-gate * The contents of this file are subject to the terms of the 59325SSrivijitha.Dugganapalli@Sun.COM * Common Development and Distribution License (the "License"). 69325SSrivijitha.Dugganapalli@Sun.COM * You may not use this file except in compliance with the License. 70Sstevel@tonic-gate * 80Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 100Sstevel@tonic-gate * See the License for the specific language governing permissions 110Sstevel@tonic-gate * and limitations under the License. 120Sstevel@tonic-gate * 130Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 140Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 160Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 170Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 180Sstevel@tonic-gate * 190Sstevel@tonic-gate * CDDL HEADER END 200Sstevel@tonic-gate */ 210Sstevel@tonic-gate /* 229325SSrivijitha.Dugganapalli@Sun.COM * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 230Sstevel@tonic-gate * Use is subject to license terms. 240Sstevel@tonic-gate */ 250Sstevel@tonic-gate 260Sstevel@tonic-gate #ifndef _LIBDEVID_H 270Sstevel@tonic-gate #define _LIBDEVID_H 280Sstevel@tonic-gate 290Sstevel@tonic-gate #include <errno.h> 300Sstevel@tonic-gate #include <sys/param.h> 310Sstevel@tonic-gate #include <sys/sunddi.h> 320Sstevel@tonic-gate #include <sys/ddi_impldefs.h> 330Sstevel@tonic-gate #include <sys/dkio.h> 340Sstevel@tonic-gate #include <devid.h> 350Sstevel@tonic-gate 360Sstevel@tonic-gate #ifdef __cplusplus 370Sstevel@tonic-gate extern "C" { 380Sstevel@tonic-gate #endif 390Sstevel@tonic-gate 400Sstevel@tonic-gate /* 410Sstevel@tonic-gate * libdevid SUN private interfaces or structures. 420Sstevel@tonic-gate */ 430Sstevel@tonic-gate extern int devid_str_compare(char *devid1_str, char *devid2_str); 440Sstevel@tonic-gate 459325SSrivijitha.Dugganapalli@Sun.COM extern int devid_scsi_encode(int version, char *driver_name, uchar_t *inq, 469325SSrivijitha.Dugganapalli@Sun.COM size_t inq_len, uchar_t *inq80, size_t inq80_len, 479325SSrivijitha.Dugganapalli@Sun.COM uchar_t *inq83, size_t inq83_len, ddi_devid_t *devid); 489325SSrivijitha.Dugganapalli@Sun.COM 499325SSrivijitha.Dugganapalli@Sun.COM extern char *devid_to_guid(ddi_devid_t devid); 509325SSrivijitha.Dugganapalli@Sun.COM extern void devid_free_guid(char *guid); 519325SSrivijitha.Dugganapalli@Sun.COM 529325SSrivijitha.Dugganapalli@Sun.COM extern int scsi_wwnstr_to_wwn(const char *wwnstr, uint64_t *wwnp); 539325SSrivijitha.Dugganapalli@Sun.COM extern char *scsi_wwn_to_wwnstr(uint64_t wwn, 549325SSrivijitha.Dugganapalli@Sun.COM int unit_address_form, char *wwnstr); 559325SSrivijitha.Dugganapalli@Sun.COM extern void scsi_wwnstr_hexcase(char *wwnstr, int lower_case); 56*10696SDavid.Hollister@Sun.COM extern const char *scsi_wwnstr_skip_ua_prefix(const char *wwnstr); 579325SSrivijitha.Dugganapalli@Sun.COM extern void scsi_free_wwnstr(char *wwnstr); 589325SSrivijitha.Dugganapalli@Sun.COM 599325SSrivijitha.Dugganapalli@Sun.COM #ifdef SCSI_ADDR_PROP_LUN64 609325SSrivijitha.Dugganapalli@Sun.COM extern scsi_lun64_t scsi_lun_to_lun64(scsi_lun_t lun); 619325SSrivijitha.Dugganapalli@Sun.COM extern scsi_lun_t scsi_lun64_to_lun(scsi_lun64_t lun64); 629325SSrivijitha.Dugganapalli@Sun.COM #endif /* SCSI_ADDR_PROP_LUN64 */ 639325SSrivijitha.Dugganapalli@Sun.COM 640Sstevel@tonic-gate #ifdef __cplusplus 650Sstevel@tonic-gate } 660Sstevel@tonic-gate #endif 670Sstevel@tonic-gate 680Sstevel@tonic-gate #endif /* _LIBDEVID_H */ 69