Home | History | Annotate | Download | only in man3ha
 te
CDDL HEADER START

The contents of this file are subject to the terms of the
Common Development and Distribution License (the "License").
You may not use this file except in compliance with the License.

You can obtain a copy of the license at CDDL.txt
or http://www.opensolaris.org/os/licensing.
See the License for the specific language governing permissions
and limitations under the License.

When distributing Covered Code, include this CDDL HEADER in each
file and include the License file at CDDL.txt.
If applicable, add the following below this CDDL HEADER, with the
fields enclosed by brackets "[]" replaced with your own identifying
information: Portions Copyright [yyyy] [name of copyright owner]

CDDL HEADER END
Copyright 2008 Sun Microsystems, Inc. All rights
reserved. Use is subject to license terms.
scds_get_zone_name 3HA "13 Aug 2008" "Sun Cluster 3.2" "Sun Cluster HA and Data Services"
NAME
scds_get_zone_name - retrieve the name of a zone on whose behalf a method is running
SYNOPSIS

cc [flags.\|.\|.] -I /usr/cluster/include file -L /usr/cluster/lib  -l  dsdev
#include <rgm/libdsdev.h>

const char *scds_get_zone_name(scds_handle_t handle);
DESCRIPTION

The scds_get_zone_name() function returns a pointer to a character string. If the following conditions are met, this character string contains the name of the zone in which a resource group runs:

The Global_zone resource type property is set to TRUE. See the rt_properties(5) man page for information about the Global_zone resource type property.

The method is configured to run in a non-global zone.

In all other cases, including the following, the character string is NULL:

Sun Cluster software is running on an operating system that does not support zones.

The resource group and the method are running in the global zone.

The Global_zone resource type property is set to FALSE.

To obtain the name of the zone in which a method is actually executing, use the zonename command. See the zonename(1) man page.

The pointer to the character string points to memory that belongs to the Data Service Development Library (DSDL). Do not modify this memory. A call to scds_close() invalidates this pointer.

PARAMETERS

The following parameters are supported:

.na handle .ad The handle that is returned from scds_initialize(3HA).

ERRORS

.na SCHA_ERR_NOERR .ad The function succeeded.

See scha_calls(3HA) for a description of other error codes.

FILES

.na /usr/cluster/include/rgm/libdsdev.h .ad Include file

.na /usr/cluster/lib/libdsdev.so .ad Library

ATTRIBUTES

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPEATTRIBUTE VALUE
AvailabilitySUNWscdev
Interface StabilityEvolving
SEE ALSO

zonename(1), scds_close(3HA), scds_initialize(3HA), scha_calls(3HA), attributes(5), rt_properties(5)