cc [flags…] –I /usr/cluster/include file –L /usr/cluster/lib –l dsdev#include <rgm/libdsdev.h>scha_err_t scds_get_rg_hostnames(char *resourcegroup_name, scds_net_resource_list_t **netresource_list);
scha_err_t scds_get_rg_hostnames_zone(char *zone_name, char * resourcegroup_name, scds_net_resource_list_t **netresource_list);
scds_get_rg_hostnames() 和 scds_get_rg_hostnames_zone() 函数可检索资源组中所有网络资源使用的主机名的列表。从全局区域执行时,您可以通过 scds_get_rg_hostnames_zone() 函数从给定区域群集中的资源组检索列表。该函数返回一个指向 netresource_list 中的列表的指针。资源组可能不包含任何网络资源,也可能包含不使用网络资源的资源,所以这些函数可能会返回设置为 NULL 的 netresource_list 参数。
您可以将系统中任意资源组的名称传递给 scds_get_rg_hostnames() 和 scds_get_rg_hostnames_zone()。使用由 scds_get_rg_hostnames() 和 scds_get_rg_hostnames_zone() 返回的主机名联系在指定资源组中运行的应用程序。
使用 scds_free_net_list() 释放由此函数分配并返回的内存。
支持以下参数
要检索其数据的资源组的名称
资源组所用的网络资源的列表
scds_get_rg_hostnames() 和 scds_get_rg_hostnames_zone() 函数返回的函数可返回以下值:
该函数成功。
该函数失败。
函数成功。
有关其他错误代码的描述,请参见 scha_calls(3HA)。
头文件
库
有关以下属性的描述,请参见 attributes(5):
|
scds_free_net_list(3HA)、scds_get_rs_hostnames(3HA)、scha_calls(3HA)、attributes(5)