17269Seschrock /* 27269Seschrock * CDDL HEADER START 37269Seschrock * 47269Seschrock * The contents of this file are subject to the terms of the 57269Seschrock * Common Development and Distribution License (the "License"). 67269Seschrock * You may not use this file except in compliance with the License. 77269Seschrock * 87269Seschrock * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97269Seschrock * or http://www.opensolaris.org/os/licensing. 107269Seschrock * See the License for the specific language governing permissions 117269Seschrock * and limitations under the License. 127269Seschrock * 137269Seschrock * When distributing Covered Code, include this CDDL HEADER in each 147269Seschrock * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157269Seschrock * If applicable, add the following below this CDDL HEADER, with the 167269Seschrock * fields enclosed by brackets "[]" replaced with your own identifying 177269Seschrock * information: Portions Copyright [yyyy] [name of copyright owner] 187269Seschrock * 197269Seschrock * CDDL HEADER END 207269Seschrock */ 217269Seschrock 227269Seschrock /* 2312126SHyon.Kim@Sun.COM * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. 247269Seschrock */ 257269Seschrock 267269Seschrock #ifndef _SES_H 277269Seschrock #define _SES_H 287269Seschrock 297269Seschrock #include <assert.h> 307269Seschrock 317269Seschrock #include <scsi/libses.h> 327269Seschrock 337269Seschrock #include <fm/topo_mod.h> 347269Seschrock #include <fm/topo_list.h> 357269Seschrock #include <fm/topo_method.h> 367269Seschrock 377269Seschrock #ifdef __cplusplus 387269Seschrock extern "C" { 397269Seschrock #endif 407269Seschrock 418344SEric.Schrock@Sun.COM extern ses_node_t *ses_node_lock(topo_mod_t *, tnode_t *); 428344SEric.Schrock@Sun.COM extern void ses_node_unlock(topo_mod_t *, tnode_t *); 437269Seschrock 447269Seschrock extern int ses_node_enum_facility(topo_mod_t *, tnode_t *, topo_version_t, 457269Seschrock nvlist_t *, nvlist_t **); 467269Seschrock extern int ses_enc_enum_facility(topo_mod_t *, tnode_t *, topo_version_t, 477269Seschrock nvlist_t *, nvlist_t **); 487269Seschrock 497325SEric.Schrock@Sun.COM typedef struct ses_enum_target { 507325SEric.Schrock@Sun.COM topo_list_t set_link; 517325SEric.Schrock@Sun.COM ses_target_t *set_target; 527325SEric.Schrock@Sun.COM ses_snap_t *set_snap; 5310527SEric.Schrock@Sun.COM hrtime_t set_snaptime; 547325SEric.Schrock@Sun.COM char *set_devpath; 557325SEric.Schrock@Sun.COM int set_refcount; 568344SEric.Schrock@Sun.COM pthread_mutex_t set_lock; 57*12357SStephen.Hanson@Sun.COM ctid_t set_ctid; 587325SEric.Schrock@Sun.COM } ses_enum_target_t; 597325SEric.Schrock@Sun.COM 607269Seschrock #ifndef NDEBUG 617269Seschrock #define verify(x) assert(x) 627269Seschrock #else 637269Seschrock #define verify(x) ((void)(x)) 647269Seschrock #endif 657269Seschrock 667269Seschrock #ifdef __cplusplus 677269Seschrock } 687269Seschrock #endif 697269Seschrock 707269Seschrock #endif /* _SES_H */ 71