Skip Navigation Links
Exit Print View
| Oracle Solaris Cluster Reference Manual Oracle Solaris Cluster 4.1

Search Scope:

- This Document
- Entire Library

### 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 `scds_get_zone_name` function is called from the global zone.

- 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 resource is configured in a zone cluster.

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

- Oracle Solaris 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:

handle

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

## Errors

`SCHA_ERR_NOERR`

  The function succeeded.

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

## Files

`/usr/cluster/include/rgm/libdsdev.h`

  Include file

`/usr/cluster/lib/libdsdev.so`

  Library

## Attributes

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

ATTRIBUTE TYPE | ATTRIBUTE VALUE
--- | ---
Availability | ha-cluster/developer/api
Interface Stability | Evolving

## See Also

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

Copyright © 2000, 2012, Oracle and/or its affiliates. All rights reserved. Legal Notices |