CL_getlocalid routine

Returns a CL_node object that contains the cluster ID and the node name of the host making the request. This request returns an error status on nodes not currently active in the cluster.

Syntax

CL_node CL_getlocalid (CL_status s)

Required input object data

None.

Return value

Item Description
CL_node Node object with local cluster and node name.

Status value

Item Description
CL_status s Status passed by reference. Output parameter that holds the return code.
CLE_OK The request completed successfully.
CLE_SYSERR System error. Check the AIX® global variable errno for additional information.
CLE_BADARGS Missing or invalid parameters. This status usually indicates that a NULL pointer was specified for an output parameter address.
CLE_IVNODE Node is not a cluster node.

Example

This example uses the cl_errmsg routine to illustrate proper programming for a single-threaded application. If your program is multi-threaded, you must use the cl_errmsg_r routine.

  CL_status status;
  CL_node lnode;

  lnode = CL_getlocalid(status);
  if (status < 0) {
      cl_errmsg(status);
  } else {
      printf("cluster id = %d, node name = %s\n", lnode.cln_clusterid,
lnode.cln_nodename.name);
  }