stmfInitProxyDoorSCSIMTarget Mode Framework Library FustmfInitProxyDoor(3STMF)NAMEstmfInitProxyDoor - establish the door server with the STMF proxy ser‐
vice
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 stmfDe‐
stroyProxyDoor(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. stmfInitProxy‐
Door() 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 argu‐
ments 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 estab‐
lished.
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 ALSOdoor_call(3C), door_return(3C), libstmf(3LIB), stmfDestroyProxy‐
Door(3STMF), stmfPostProxyMsg(3STMF), attributes(5)SunOS 5.11 29 Sep 2009 stmfInitProxyDoor(3STMF)