1*fcf3ce44SJohn Forte /* 2*fcf3ce44SJohn Forte * CDDL HEADER START 3*fcf3ce44SJohn Forte * 4*fcf3ce44SJohn Forte * The contents of this file are subject to the terms of the 5*fcf3ce44SJohn Forte * Common Development and Distribution License (the "License"). 6*fcf3ce44SJohn Forte * You may not use this file except in compliance with the License. 7*fcf3ce44SJohn Forte * 8*fcf3ce44SJohn Forte * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*fcf3ce44SJohn Forte * or http://www.opensolaris.org/os/licensing. 10*fcf3ce44SJohn Forte * See the License for the specific language governing permissions 11*fcf3ce44SJohn Forte * and limitations under the License. 12*fcf3ce44SJohn Forte * 13*fcf3ce44SJohn Forte * When distributing Covered Code, include this CDDL HEADER in each 14*fcf3ce44SJohn Forte * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*fcf3ce44SJohn Forte * If applicable, add the following below this CDDL HEADER, with the 16*fcf3ce44SJohn Forte * fields enclosed by brackets "[]" replaced with your own identifying 17*fcf3ce44SJohn Forte * information: Portions Copyright [yyyy] [name of copyright owner] 18*fcf3ce44SJohn Forte * 19*fcf3ce44SJohn Forte * CDDL HEADER END 20*fcf3ce44SJohn Forte */ 21*fcf3ce44SJohn Forte /* 22*fcf3ce44SJohn Forte * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 23*fcf3ce44SJohn Forte * Use is subject to license terms. 24*fcf3ce44SJohn Forte */ 25*fcf3ce44SJohn Forte 26*fcf3ce44SJohn Forte #ifndef _CFG_CLUSTER_H 27*fcf3ce44SJohn Forte #define _CFG_CLUSTER_H 28*fcf3ce44SJohn Forte 29*fcf3ce44SJohn Forte #ifdef __cplusplus 30*fcf3ce44SJohn Forte extern "C" { 31*fcf3ce44SJohn Forte #endif 32*fcf3ce44SJohn Forte 33*fcf3ce44SJohn Forte /* 34*fcf3ce44SJohn Forte * This file is a combination of interfaces culled from scstat.h, 35*fcf3ce44SJohn Forte * scconf.h and the header files that they include. 36*fcf3ce44SJohn Forte * 37*fcf3ce44SJohn Forte * It exposes a subset of the interfaces defined in PSARC/2001/261 38*fcf3ce44SJohn Forte * for use in NWS software. 39*fcf3ce44SJohn Forte */ 40*fcf3ce44SJohn Forte 41*fcf3ce44SJohn Forte #include <sys/errno.h> 42*fcf3ce44SJohn Forte #include <sys/types.h> 43*fcf3ce44SJohn Forte 44*fcf3ce44SJohn Forte /* 45*fcf3ce44SJohn Forte * From sc_syslog_msg.h 46*fcf3ce44SJohn Forte */ 47*fcf3ce44SJohn Forte 48*fcf3ce44SJohn Forte typedef enum sc_state_code_enum { 49*fcf3ce44SJohn Forte ONLINE = 1, /* resource is running */ 50*fcf3ce44SJohn Forte OFFLINE, /* resource is stopped due to user action */ 51*fcf3ce44SJohn Forte FAULTED, /* resource is stopped due to a failure */ 52*fcf3ce44SJohn Forte DEGRADED, /* resource is running but has a minor problem */ 53*fcf3ce44SJohn Forte WAIT, /* resource is in transition from a state to another */ 54*fcf3ce44SJohn Forte 55*fcf3ce44SJohn Forte /* 56*fcf3ce44SJohn Forte * resource is monitored but state of the resource is 57*fcf3ce44SJohn Forte * not known because either the monitor went down or 58*fcf3ce44SJohn Forte * the monitor cannot report resource state temporarily. 59*fcf3ce44SJohn Forte */ 60*fcf3ce44SJohn Forte UNKNOWN, 61*fcf3ce44SJohn Forte 62*fcf3ce44SJohn Forte NOT_MONITORED /* There is no monitor to check state of the resource */ 63*fcf3ce44SJohn Forte } sc_state_code_t; 64*fcf3ce44SJohn Forte 65*fcf3ce44SJohn Forte /* 66*fcf3ce44SJohn Forte * End sc_syslog_msg.h 67*fcf3ce44SJohn Forte */ 68*fcf3ce44SJohn Forte 69*fcf3ce44SJohn Forte 70*fcf3ce44SJohn Forte /* 71*fcf3ce44SJohn Forte * From scstat.h 72*fcf3ce44SJohn Forte */ 73*fcf3ce44SJohn Forte 74*fcf3ce44SJohn Forte #define SCSTAT_MAX_STRING_LEN 1024 75*fcf3ce44SJohn Forte 76*fcf3ce44SJohn Forte /* Error codes returned by scstat functions. */ 77*fcf3ce44SJohn Forte /* This definition is covered by PSARC/2001/261. DO NOT change it. */ 78*fcf3ce44SJohn Forte typedef enum scstat_errno { 79*fcf3ce44SJohn Forte SCSTAT_ENOERR, /* normal return - no error */ 80*fcf3ce44SJohn Forte SCSTAT_EUSAGE, /* syntax error */ 81*fcf3ce44SJohn Forte SCSTAT_ENOMEM, /* not enough memory */ 82*fcf3ce44SJohn Forte SCSTAT_ENOTCLUSTER, /* not a cluster node */ 83*fcf3ce44SJohn Forte SCSTAT_ENOTCONFIGURED, /* not found in CCR */ 84*fcf3ce44SJohn Forte SCSTAT_ESERVICENAME, /* dcs: invalid service name */ 85*fcf3ce44SJohn Forte SCSTAT_EINVAL, /* scconf: invalid argument */ 86*fcf3ce44SJohn Forte SCSTAT_EPERM, /* not root */ 87*fcf3ce44SJohn Forte SCSTAT_ECLUSTERRECONFIG, /* cluster is reconfiguring */ 88*fcf3ce44SJohn Forte SCSTAT_ERGRECONFIG, /* RG is reconfiguring */ 89*fcf3ce44SJohn Forte SCSTAT_EOBSOLETE, /* Resource/RG has been updated */ 90*fcf3ce44SJohn Forte SCSTAT_EUNEXPECTED /* internal or unexpected error */ 91*fcf3ce44SJohn Forte } scstat_errno_t; 92*fcf3ce44SJohn Forte 93*fcf3ce44SJohn Forte /* States a resource can be in */ 94*fcf3ce44SJohn Forte /* This definition is covered by PSARC/2001/261. DO NOT change it. */ 95*fcf3ce44SJohn Forte typedef enum scstat_state_code { 96*fcf3ce44SJohn Forte SCSTAT_ONLINE = ONLINE, /* resource is running */ 97*fcf3ce44SJohn Forte SCSTAT_OFFLINE = OFFLINE, /* resource stopped due to user action */ 98*fcf3ce44SJohn Forte SCSTAT_FAULTED = FAULTED, /* resource stopped due to a failure */ 99*fcf3ce44SJohn Forte SCSTAT_DEGRADED = DEGRADED, /* resource running with a minor problem */ 100*fcf3ce44SJohn Forte SCSTAT_WAIT = WAIT, /* resource is in transition */ 101*fcf3ce44SJohn Forte SCSTAT_UNKNOWN = UNKNOWN, /* resource state is unknown */ 102*fcf3ce44SJohn Forte SCSTAT_NOTMONITORED = NOT_MONITORED /* resource is not monitored */ 103*fcf3ce44SJohn Forte } scstat_state_code_t; 104*fcf3ce44SJohn Forte 105*fcf3ce44SJohn Forte /* States a replica of a resource can be in */ 106*fcf3ce44SJohn Forte /* This definition is covered by PSARC/2001/261. DO NOT change it. */ 107*fcf3ce44SJohn Forte typedef enum scstat_node_pref { 108*fcf3ce44SJohn Forte SCSTAT_PRIMARY, /* replica is a primary */ 109*fcf3ce44SJohn Forte SCSTAT_SECONDARY, /* replica is a secondary */ 110*fcf3ce44SJohn Forte SCSTAT_SPARE, /* replica is a spare */ 111*fcf3ce44SJohn Forte SCSTAT_INACTIVE, /* replica is inactive */ 112*fcf3ce44SJohn Forte SCSTAT_TRANSITION, /* replica is changing state */ 113*fcf3ce44SJohn Forte SCSTAT_INVALID /* replica is in an invalid state */ 114*fcf3ce44SJohn Forte } scstat_node_pref_t; 115*fcf3ce44SJohn Forte 116*fcf3ce44SJohn Forte /* component name */ 117*fcf3ce44SJohn Forte typedef char *scstat_name_t; 118*fcf3ce44SJohn Forte typedef scstat_name_t scstat_cluster_name_t; /* cluster name */ 119*fcf3ce44SJohn Forte typedef scstat_name_t scstat_node_name_t; /* node name */ 120*fcf3ce44SJohn Forte typedef scstat_name_t scstat_adapter_name_t; /* adapter name */ 121*fcf3ce44SJohn Forte typedef scstat_name_t scstat_path_name_t; /* path name */ 122*fcf3ce44SJohn Forte typedef scstat_name_t scstat_ds_name_t; /* device service name */ 123*fcf3ce44SJohn Forte typedef scstat_name_t scstat_quorumdev_name_t; /* quorum device name */ 124*fcf3ce44SJohn Forte typedef scstat_name_t scstat_rs_name_t; /* resource name */ 125*fcf3ce44SJohn Forte typedef scstat_name_t scstat_rg_name_t; /* rg name */ 126*fcf3ce44SJohn Forte 127*fcf3ce44SJohn Forte /* status string */ 128*fcf3ce44SJohn Forte typedef char *scstat_statstr_t; 129*fcf3ce44SJohn Forte typedef scstat_statstr_t scstat_node_statstr_t; /* node status */ 130*fcf3ce44SJohn Forte typedef scstat_statstr_t scstat_path_statstr_t; /* path status */ 131*fcf3ce44SJohn Forte typedef scstat_statstr_t scstat_ds_statstr_t; /* DS status */ 132*fcf3ce44SJohn Forte typedef scstat_statstr_t scstat_node_quorum_statstr_t; /* node quorum status */ 133*fcf3ce44SJohn Forte typedef scstat_statstr_t scstat_quorumdev_statstr_t; /* quorum device stat */ 134*fcf3ce44SJohn Forte 135*fcf3ce44SJohn Forte /* ha device node status list */ 136*fcf3ce44SJohn Forte /* This definition is covered by PSARC/2001/261. DO NOT change it. */ 137*fcf3ce44SJohn Forte typedef struct scstat_ds_node_state_struct { 138*fcf3ce44SJohn Forte /* node name */ 139*fcf3ce44SJohn Forte scstat_node_name_t scstat_node_name; 140*fcf3ce44SJohn Forte /* node status */ 141*fcf3ce44SJohn Forte scstat_node_pref_t scstat_node_state; 142*fcf3ce44SJohn Forte /* next */ 143*fcf3ce44SJohn Forte struct scstat_ds_node_state_struct *scstat_node_next; 144*fcf3ce44SJohn Forte } scstat_ds_node_state_t; 145*fcf3ce44SJohn Forte 146*fcf3ce44SJohn Forte /* Cluster node status */ 147*fcf3ce44SJohn Forte /* This definition is covered by PSARC/2001/261. DO NOT change it. */ 148*fcf3ce44SJohn Forte typedef struct scstat_node_struct { 149*fcf3ce44SJohn Forte scstat_node_name_t scstat_node_name; /* node name */ 150*fcf3ce44SJohn Forte scstat_state_code_t scstat_node_status; /* cluster membership */ 151*fcf3ce44SJohn Forte scstat_node_statstr_t scstat_node_statstr; /* node status string */ 152*fcf3ce44SJohn Forte void *pad; /* Padding for */ 153*fcf3ce44SJohn Forte /* PSARC/2001/261. */ 154*fcf3ce44SJohn Forte struct scstat_node_struct *scstat_node_next; /* next */ 155*fcf3ce44SJohn Forte } scstat_node_t; 156*fcf3ce44SJohn Forte 157*fcf3ce44SJohn Forte /* Cluster ha device status */ 158*fcf3ce44SJohn Forte /* This definition is covered by PSARC/2001/261. DO NOT change it. */ 159*fcf3ce44SJohn Forte typedef struct scstat_ds_struct { 160*fcf3ce44SJohn Forte /* ha device name */ 161*fcf3ce44SJohn Forte scstat_ds_name_t scstat_ds_name; 162*fcf3ce44SJohn Forte /* ha device status */ 163*fcf3ce44SJohn Forte scstat_state_code_t scstat_ds_status; 164*fcf3ce44SJohn Forte /* ha device statstr */ 165*fcf3ce44SJohn Forte scstat_ds_statstr_t scstat_ds_statstr; 166*fcf3ce44SJohn Forte /* node preference list */ 167*fcf3ce44SJohn Forte scstat_ds_node_state_t *scstat_node_state_list; 168*fcf3ce44SJohn Forte /* next */ 169*fcf3ce44SJohn Forte struct scstat_ds_struct *scstat_ds_next; 170*fcf3ce44SJohn Forte } scstat_ds_t; 171*fcf3ce44SJohn Forte 172*fcf3ce44SJohn Forte /* 173*fcf3ce44SJohn Forte * scstat_strerr 174*fcf3ce44SJohn Forte * 175*fcf3ce44SJohn Forte * Map scstat_errno_t to a string. 176*fcf3ce44SJohn Forte * 177*fcf3ce44SJohn Forte * The supplied "errbuffer" should be of at least SCSTAT_MAX_STRING_LEN 178*fcf3ce44SJohn Forte * in length. 179*fcf3ce44SJohn Forte */ 180*fcf3ce44SJohn Forte /* This definition is covered by PSARC/2001/261. DO NOT change it. */ 181*fcf3ce44SJohn Forte void scstat_strerr(scstat_errno_t, char *); 182*fcf3ce44SJohn Forte 183*fcf3ce44SJohn Forte /* 184*fcf3ce44SJohn Forte * Upon success, a list of objects of scstat_node_t are returned. 185*fcf3ce44SJohn Forte * The caller is responsible for freeing the space. 186*fcf3ce44SJohn Forte * 187*fcf3ce44SJohn Forte * Possible return values: 188*fcf3ce44SJohn Forte * 189*fcf3ce44SJohn Forte * SCSTAT_NOERR - success 190*fcf3ce44SJohn Forte * SCSTAT_ENOMEM - not enough memory 191*fcf3ce44SJohn Forte * SCSTAT_EPERM - not root 192*fcf3ce44SJohn Forte * SCSTAT_ENOTCLUSTER - there is no cluster 193*fcf3ce44SJohn Forte * SCCONF_EINVAL - invalid argument 194*fcf3ce44SJohn Forte * SCSTAT_EUNEXPECTED - internal or unexpected error 195*fcf3ce44SJohn Forte */ 196*fcf3ce44SJohn Forte /* This definition is covered by PSARC/2001/261. DO NOT change it. */ 197*fcf3ce44SJohn Forte scstat_errno_t scstat_get_nodes(scstat_node_t **pplnodes); 198*fcf3ce44SJohn Forte 199*fcf3ce44SJohn Forte /* 200*fcf3ce44SJohn Forte * Free all memory associated with a scstat_node_t structure. 201*fcf3ce44SJohn Forte */ 202*fcf3ce44SJohn Forte /* This definition is covered by PSARC/2001/261. DO NOT change it. */ 203*fcf3ce44SJohn Forte void scstat_free_nodes(scstat_node_t *plnodes); 204*fcf3ce44SJohn Forte 205*fcf3ce44SJohn Forte /* 206*fcf3ce44SJohn Forte * If the device service name passed in is NULL, then this function returns 207*fcf3ce44SJohn Forte * the status of all device services, otherwise it returns the status of the 208*fcf3ce44SJohn Forte * device service specified. 209*fcf3ce44SJohn Forte * The caller is responsible for freeing the space. 210*fcf3ce44SJohn Forte * 211*fcf3ce44SJohn Forte * Possible return values: 212*fcf3ce44SJohn Forte * 213*fcf3ce44SJohn Forte * SCSTAT_ENOERR - success 214*fcf3ce44SJohn Forte * SCSTAT_ENOMEM - not enough memory 215*fcf3ce44SJohn Forte * SCSTAT_EPERM - not root 216*fcf3ce44SJohn Forte * SCSTAT_ENOTCLUSTER - there is no cluster 217*fcf3ce44SJohn Forte * SCCONF_EINVAL - invalid argument 218*fcf3ce44SJohn Forte * SCSTAT_ESERVICENAME - invalid device group name 219*fcf3ce44SJohn Forte * SCSTAT_EUNEXPECTED - internal or unexpected error 220*fcf3ce44SJohn Forte */ 221*fcf3ce44SJohn Forte /* This definition is covered by PSARC/2001/261. DO NOT change it. */ 222*fcf3ce44SJohn Forte scstat_errno_t scstat_get_ds_status(scstat_ds_name_t *dsname, 223*fcf3ce44SJohn Forte scstat_ds_t **dsstatus); 224*fcf3ce44SJohn Forte 225*fcf3ce44SJohn Forte /* 226*fcf3ce44SJohn Forte * Free memory associated with a scstat_ds_t structure. 227*fcf3ce44SJohn Forte */ 228*fcf3ce44SJohn Forte /* This definition is covered by PSARC/2001/261. DO NOT change it. */ 229*fcf3ce44SJohn Forte void scstat_free_ds_status(scstat_ds_t *dsstatus); 230*fcf3ce44SJohn Forte 231*fcf3ce44SJohn Forte /* 232*fcf3ce44SJohn Forte * End scstat.h 233*fcf3ce44SJohn Forte */ 234*fcf3ce44SJohn Forte 235*fcf3ce44SJohn Forte /* 236*fcf3ce44SJohn Forte * From scconf.h 237*fcf3ce44SJohn Forte */ 238*fcf3ce44SJohn Forte 239*fcf3ce44SJohn Forte /* Maximum message string length */ 240*fcf3ce44SJohn Forte #define SCCONF_MAXSTRINGLEN 1024 241*fcf3ce44SJohn Forte 242*fcf3ce44SJohn Forte /* This definition is covered by PSARC/2001/261. DO NOT change it. */ 243*fcf3ce44SJohn Forte typedef enum scconf_errno { 244*fcf3ce44SJohn Forte SCCONF_NOERR = 0, /* normal return - no error */ 245*fcf3ce44SJohn Forte SCCONF_EPERM = 1, /* permission denied */ 246*fcf3ce44SJohn Forte SCCONF_EEXIST = 2, /* object already exists */ 247*fcf3ce44SJohn Forte SCCONF_ENOEXIST = 3, /* object does not exist */ 248*fcf3ce44SJohn Forte SCCONF_ESTALE = 4, /* object or handle is stale */ 249*fcf3ce44SJohn Forte SCCONF_EUNKNOWN = 5, /* unkown type */ 250*fcf3ce44SJohn Forte SCCONF_ENOCLUSTER = 6, /* cluster does not exist */ 251*fcf3ce44SJohn Forte SCCONF_ENODEID = 7, /* ID used in place of node name */ 252*fcf3ce44SJohn Forte SCCONF_EINVAL = 8, /* invalid argument */ 253*fcf3ce44SJohn Forte SCCONF_EUSAGE = 9, /* command usage error */ 254*fcf3ce44SJohn Forte SCCONF_ETIMEDOUT = 10, /* call timed out */ 255*fcf3ce44SJohn Forte SCCONF_EINUSE = 11, /* already in use */ 256*fcf3ce44SJohn Forte SCCONF_EBUSY = 12, /* busy, try again later */ 257*fcf3ce44SJohn Forte SCCONF_EINSTALLMODE = 13, /* install mode */ 258*fcf3ce44SJohn Forte SCCONF_ENOMEM = 14, /* not enough memory */ 259*fcf3ce44SJohn Forte SCCONF_ESETUP = 15, /* setup attempt failed */ 260*fcf3ce44SJohn Forte SCCONF_EUNEXPECTED = 16, /* internal or unexpected error */ 261*fcf3ce44SJohn Forte SCCONF_EBADVALUE = 17, /* bad ccr table value */ 262*fcf3ce44SJohn Forte SCCONF_EOVERFLOW = 18, /* message buffer overflow */ 263*fcf3ce44SJohn Forte SCCONF_EQUORUM = 19, /* operation would compromise quorum */ 264*fcf3ce44SJohn Forte SCCONF_TM_EBADOPTS = 20, /* bad transport TM "options" */ 265*fcf3ce44SJohn Forte SCCONF_TM_EINVAL = 21, /* other transport TM error */ 266*fcf3ce44SJohn Forte SCCONF_DS_ESUSPENDED = 22, /* Device service in suspended state */ 267*fcf3ce44SJohn Forte SCCONF_DS_ENODEINVAL = 23, /* Node specified is not in cluster */ 268*fcf3ce44SJohn Forte SCCONF_EAUTH = 24, /* authentication error */ 269*fcf3ce44SJohn Forte SCCONF_DS_EINVAL = 25, /* Device service in an invalid state */ 270*fcf3ce44SJohn Forte SCCONF_EIO = 26 /* IO error */ 271*fcf3ce44SJohn Forte } scconf_errno_t; 272*fcf3ce44SJohn Forte 273*fcf3ce44SJohn Forte /* IDs */ 274*fcf3ce44SJohn Forte /* This definition is covered by PSARC/2001/261. DO NOT change it. */ 275*fcf3ce44SJohn Forte typedef uint_t scconf_id_t; 276*fcf3ce44SJohn Forte 277*fcf3ce44SJohn Forte /* This definition is covered by PSARC/2001/261. DO NOT change it. */ 278*fcf3ce44SJohn Forte typedef scconf_id_t scconf_nodeid_t; /* node ID */ 279*fcf3ce44SJohn Forte 280*fcf3ce44SJohn Forte /* Cluster transport handle */ 281*fcf3ce44SJohn Forte /* This definition is covered by PSARC/2001/261. DO NOT change it. */ 282*fcf3ce44SJohn Forte typedef void * scconf_cltr_handle_t; 283*fcf3ce44SJohn Forte 284*fcf3ce44SJohn Forte /* This definition is covered by PSARC/2001/261. DO NOT change it. */ 285*fcf3ce44SJohn Forte extern scconf_errno_t scconf_get_nodeid(char *nodename, 286*fcf3ce44SJohn Forte scconf_nodeid_t *nodeidp); 287*fcf3ce44SJohn Forte 288*fcf3ce44SJohn Forte /* 289*fcf3ce44SJohn Forte * Get the name of a node from its "nodeid". Upon success, 290*fcf3ce44SJohn Forte * a pointer to the nodename is left in "nodenamep". 291*fcf3ce44SJohn Forte * 292*fcf3ce44SJohn Forte * It is the caller's responsibility to free memory allocated 293*fcf3ce44SJohn Forte * for "nodename" using free(3C). 294*fcf3ce44SJohn Forte * 295*fcf3ce44SJohn Forte * Possible return values: 296*fcf3ce44SJohn Forte * 297*fcf3ce44SJohn Forte * SCCONF_NOERR - success 298*fcf3ce44SJohn Forte * SCCONF_EPERM - not root 299*fcf3ce44SJohn Forte * SCCONF_ENOCLUSTER - there is no cluster 300*fcf3ce44SJohn Forte * SCCONF_ENOMEM - not enough memory 301*fcf3ce44SJohn Forte * SCCONF_EINVAL - invalid argument 302*fcf3ce44SJohn Forte * SCCONF_EUNEXPECTED - internal or unexpected error 303*fcf3ce44SJohn Forte */ 304*fcf3ce44SJohn Forte /* This definition is covered by PSARC/2001/261. DO NOT change it. */ 305*fcf3ce44SJohn Forte extern scconf_errno_t scconf_get_nodename(scconf_nodeid_t nodeid, 306*fcf3ce44SJohn Forte char **nodenamep); 307*fcf3ce44SJohn Forte 308*fcf3ce44SJohn Forte /* 309*fcf3ce44SJohn Forte * Map scconf_errno_t to a string. 310*fcf3ce44SJohn Forte * 311*fcf3ce44SJohn Forte * The supplied "errbuffer" should be of at least SCCONF_MAXSTRINGLEN 312*fcf3ce44SJohn Forte * in length. 313*fcf3ce44SJohn Forte */ 314*fcf3ce44SJohn Forte /* This definition is covered by PSARC/2001/261. DO NOT change it. */ 315*fcf3ce44SJohn Forte extern void scconf_strerr(char *errbuffer, scconf_errno_t err); 316*fcf3ce44SJohn Forte 317*fcf3ce44SJohn Forte /* 318*fcf3ce44SJohn Forte * Given a dev_t value, return the name of device service that contains this 319*fcf3ce44SJohn Forte * device. 320*fcf3ce44SJohn Forte * 321*fcf3ce44SJohn Forte * The caller is responsible for freeing the memory returned in "name". 322*fcf3ce44SJohn Forte * 323*fcf3ce44SJohn Forte * Possible return values: 324*fcf3ce44SJohn Forte * 325*fcf3ce44SJohn Forte * SCCONF_NOERR - success 326*fcf3ce44SJohn Forte * SCCONF_EPERM - not root 327*fcf3ce44SJohn Forte * SCCONF_ENOEXIST - the given device is not configured 328*fcf3ce44SJohn Forte * SCCONF_ENOMEM - not enough memory 329*fcf3ce44SJohn Forte * SCCONF_ENOCLUSTER - cluster config does not exist 330*fcf3ce44SJohn Forte * SCCONF_EUNEXPECTED - internal or unexpected error 331*fcf3ce44SJohn Forte */ 332*fcf3ce44SJohn Forte /* This definition is covered by PSARC/2001/261. DO NOT change it. */ 333*fcf3ce44SJohn Forte extern scconf_errno_t scconf_get_ds_by_devt(major_t maj, minor_t min, 334*fcf3ce44SJohn Forte char **dsname); 335*fcf3ce44SJohn Forte 336*fcf3ce44SJohn Forte /* 337*fcf3ce44SJohn Forte * End scconf.h 338*fcf3ce44SJohn Forte */ 339*fcf3ce44SJohn Forte 340*fcf3ce44SJohn Forte #ifdef __cplusplus 341*fcf3ce44SJohn Forte } 342*fcf3ce44SJohn Forte #endif 343*fcf3ce44SJohn Forte 344*fcf3ce44SJohn Forte #endif /* _CFG_CLUSTER_H */ 345