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_simple_net_probe 3HA "13 Aug 2008" "Sun Cluster 3.2" "Sun Cluster HA and Data Services"
NAME
scds_simple_net_probe - probe by establishing and terminating a TCP connection to an application
SYNOPSIS

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

scha_err_t scds_simple_net_probe(scds_handle_t handle, scds_netaddr_t addr,
 time_t timeout, scds_fmsock_status_t *status, int count);
DESCRIPTION

The scds_simple_net_probe() function is a wrapper function around scds_fm_net_connect(3HA) and scds_fm_net_disconnect(3HA). For hosts that have multiple mappings, scds_simple_net_probe() handles both IPv4 and IPv6 addresses for the supplied hostname.

You can retrieve a list of network addresses for the resource by using scds_get_netaddr_list(3HA).

The status for a connect to, or disconnect from, an IPv4 target is stored in the first member of the scds_fmsock_status_t array. The second member contains the status for an IPv6 target. If the hostname that is supplied to this function does not contain an IPv4 or IPv6 mapping, the corresponding status is set to SCDS_FMSOCK_NA.

PARAMETERS

The following parameters are supported:

.na handle .ad The handle returned by scds_initialize(3HA).

.na addr .ad The hostname, TCP port number, and protocol identifier that specify where the process is listening.

.na timeout .ad The timeout value in seconds to wait for a successful connection. Each socket (IPv4 or IPv6) gets the same timeout period, and timeouts proceed in parallel.

.na status .ad Array of SCDS_MAX_IPADDR_TYPES members of type scds_fmsock_status_t. Each member in the array holds a status. This parameter is an output argument that is set by this function.

.na count .ad The number of members in the socklist array. Set this parameter to SCDS_MAX_IPADDR_TYPES.

RETURN VALUES

The scds_simple_net_probe() function returns the following values:

.na 0 .ad The function succeeded.

.na SCHA_ERR_INVAL .ad The function was called with invalid paramaters.

.na Other nonzero values .ad At least one connect operation failed due to a timeout, a refused connection, or some other error. Inspect the err field of all members of the socklist array that are set to SCDS_FMSOCK_ERR to determine the exact error.

.na nonzero .ad At least one connect or disconnect operation failed. You can inspect the scds_fmsock_status_t array to determine if the failure was in an IPv4 target, an IPv6 target, or both.

ERRORS

.na SCHA_ERR_NOERR .ad Indicates that the function succeeded.

.na SCHA_ERR_INTERNAL .ad Indicates that an internal error occurred while the function was executing.

.na SCHA_ERR_STATE .ad Indicates that the connection request was refused by the server.

.na SCHA_ERR_TIMEOUT .ad Indicates that the connection request timed out.

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

scds_fm_net_connect(3HA), scds_fm_net_disconnect(3HA), scds_get_netaddr_list(3HA), scds_initialize(3HA), scds_simple_probe(3HA), scha_calls(3HA), attributes(5)