Go to main content

Reference for Oracle Solaris Cluster 4.4

Exit Print View

Updated: August 2018
 
 

scds_get_zone_name (3HA)

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 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(7) 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:

  • The resource group is configured in the global zone.

  • The Global_zone resource type property is set to FALSE, or the Global_zone_override resource 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(7) 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(7), rt_properties(7)