Go to main content

man pages section 3: Extended Library Functions, Volume 4

Exit Print View

Updated: July 2017
 
 

stmfInitProxyDoor(3STMF)

Name

stmfInitProxyDoor - establish the door server with the STMF proxy service

Synopsis

cc [ flag... ] file... -lstmf [ library... ]
#include <libstmf.h>

int stmfInitProxyDoor(int *hdl, int fd);

Parameters

hdl

a pointer to an int that will contain the handle for the proxy door to be used in calls to stmfPostProxyMsg(3STMF) and stmfDestroyProxyDoor(3STMF).

fd

the door file descriptor for the established door server

Description

The stmfInitProxyDoor() function establishes the door server with the STMF proxy service. The STMF proxy service is responsible for sending SCSI commands to the peer node on behalf of a logical unit in the Standby asymmetric logical unit access (ALUA) state. stmfInitProxyDoor () should be called once a peer-to-peer communication channel between the two participating ALUA nodes has been established by the caller.

The door_call(3C) from the STMF proxy service to the door server will fill in the door_arg_t structure as follows:

door_arg_t arg;
uint32_t result;

arg.data_ptr = buf;
arg.data_size = size;
arg.desc_ptr = NULL;
arg.desc_num = 0;
arg.rbuf = (char *)&result
arg.rsize = sizeof (result);

The tuple <data_ptr, data_size> is expected to arrive at the peer node STMF proxy service via stmfPostProxyMsg().

The door server is expected to complete the door call with these arguments to door_return(3C):

uinit32_t result;

(void) door_return((char *)&result, sizeof(result), NULL, 0);

where result is of type uint32_t and set to 0 on success, non-zero on failure.

Non-zero values are logged as errors without further action. No file descriptors will be exchanged by the door call or return.

Return Values

The following values are returned:

STMF_ERROR_DOOR_INSTALLED

A previous door has already been established.

STMF_STATUS_SUCCESS

The API call was successful.

Attributes

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

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Interface Stability
Committed
MT-Level
Safe

See Also

door_call(3C), door_return(3C), libstmf(3LIB), stmfDestroyProxyDoor (3STMF), stmfPostProxyMsg(3STMF), attributes(5)