Previous section.

CDE 1.1: Remote Procedure Call
Copyright © 1997 The Open Group


Connection-oriented RPC Protocol Machines

This chapter specifies the connection-oriented RPC protocol as a series of statecharts and accompanying tables of definitions.

CO_CLIENT Machine

CO_CLIENT Statechart shows the CO_CLIENT machine statechart.

Figure: CO_CLIENT Statechart

CO_CLIENT Activities

The CO_CLIENT statechart defines the following activities:

Chart:
CO_CLIENT
Activity:
ABORT_RECEIVE
Description:
Flush and discard any further responses for this call. There may be numerous additional packets in the pipeline. The flush may be lazy, upon subsequent receive processing. Also, notify the run-time system and stub to reclaim any resources for this call.
Chart:
CO_CLIENT
Activity:
ABORT_SEND
Description:
Discontinue any further transmission of request data for the current call, to the best extent possible. Some error condition has caused a fault.
Chart:
CO_CLIENT
Activity:
DEQUEUE_CANCEL
Description:
If there is a pending cancel timeout for this call, dequeue it.
Chart:
CO_CLIENT
Activity:
EXCEPTION
Description:
Raise a fault and return to calling routine.
Chart:
CO_CLIENT
Activity:
HANDLE_OUT_FRAG
Description:
This activity is invoked at each received fragment evaluation of out parameters for multi-fragmented RPC responses.

The HANDLE_OUT_FRAG activity makes received data of the next fragment available to the stub for unmarshaling and the object UUID (RT_OBJ_ID) available to the manager routine. This does not require a transfer of control from the run-time system to the stub for each fragment; implementation policy determines when control is transferred.

Chart:
CO_CLIENT
Activity:
SEND_PKT
Description:
Prepare a PDU to send to the server, adding the appropriate header information as necessary. If security services were requested (conditional flag AUTH is true), apply per-message security services. Send the PDU.

The conditional flags and data items set in the run-time system (with prefix SND_) provide the appropriate input for generating the PDU data. Note that actions within the same execution step that started this activity may have assigned values to the SND_* variables which have to be taken by this instance of the activity.

After sending a request PDU, the RT_IN_FRAG pointer is incremented accordingly, to point to the remaining data in the transmit queue.

Note:
The SEND_PKT activity may be invoked simultaneously by several orthogonal states (DATA, CONTROL, CANCEL, and so on). The run-time system must catch these send requests, buffer these and the associated data, and perform the sends in sequential order.
Chart:
CO_CLIENT
Activity:
SET_PRES_CONTEXT
Description:
Set the negotiated presentation context (from RT_SERVER_PRES_CONTEXT_LIST) and save the security credentials for this call.

This activity sets the conditional flag PRES_SEC_CONTEXT_SUPPORTED true on success, otherwise false. The selected presentation context identifier is assigned to the data item RT_PRES_CONTEXT_ID for use in subsequent messages.

Chart:
CO_CLIENT
Activity:
VERIFY_AUTH
Description:
Verify the authentication trailer of PDU and decrypt message if necessary.

This activity takes as input values the PDU header field auth_proto (RT_AUTH_SPEC) and the authentication verifier (RT_AUTH_VERIFIER).

Depending on the result of the verification, the activity VERIFY_AUTH generates either the event AUTHENTICATED (success) or DENIED (authentication failure).

The algorithm applied to this activity is dependent on the security service in use (determined by RT_AUTH_SPEC). The general evaluation steps for authentication service rpc_c_authn_dce_secret are as follows (for more details see Security ):


Note:
The VERIFY_AUTH activity may be invoked simultaneously by several orthogonal states (DATA, CONTROL and CANCEL). VERIFY_AUTH must not generate the event AUTHENTICATED unless the entire requested authentication processing is completed. If VERIFY_AUTH detects an authentication failure and generates the event DENIED, the protocol machine rejects the RPC call and no further processing is required.

CO_CLIENT States

The CO_CLIENT statechart defines the following states:

Chart:
CO_CLIENT
State:
ALLOCATED
Description:
An association is allocated for current call.


Reactions
Trigger Action
ALTER_CONTEXT_REQ SND_PRES_CONTEXT_LIST:= DESIRED_CONTEXT_LIST; SND_REQUEST_TYPE:=ALTER_CONTEXT; st!(SEND_PKT)
en(ALLOCATED) IF PRES_SEC_CONTEXT_SUPPORTED THEN ALLOC_ASSOC_ACK ELSE ALTER_CONTEXT_REQ END IF
CHECK_CONTEXT IF PRES_SEC_CONTEXT_SUPPORTED THEN ALLOC_ASSOC_ACK ELSE ALLOC_ASSOC_NAK; DEALLOC_ASSOC END IF
RCV_SHUTDOWN or RESOURCES_SCARCE tr!(SHUTDOWN_REQUESTED)
RCV_ALTER_CONTEXT_RESP MARK_ASSOC; CHECK_CONTEXT

Chart:
CO_CLIENT
State:
ASSOCIATION
Description:
Main state for an association.
Chart:
CO_CLIENT
State:
ASSOC_DONE
Description:
Waiting for outstanding call machinery to complete.
Chart:
CO_CLIENT
State:
ASSOC_OPEN
Description:
Association available for call.


Reactions
Trigger Action
(RCV_SHUTDOWN or RESOURCES_SCARCE) [not SHUTDOWN_OK] tr!(SHUTDOWN_REQUESTED)

Chart:
CO_CLIENT
State:
AUTHENTICATION
Description:
Process authentication verification.
Activities Throughout:

VERIFY_AUTH
Chart:
CO_CLIENT
State:
CALL
Description:
Processing a remote procedure call request.
Chart:
CO_CLIENT
State:
CALL_IDLE
Description:
Initial remote procedure call state.


Reactions
Trigger Action
en(CALL_IDLE) RT_CANCEL_COUNT:=0; RT_RCV_CANCEL_COUNT:=0; tr!(RT_DID_NOT_EXECUTE)

Chart:
CO_CLIENT
State:
CANCEL
Description:
Processing of requests to terminate call in progress.


Reactions
Trigger Action
tm(CLIENT_CANCEL, TIMEOUT_CANCEL) RT_EXCEPTION_STATUS:= CONST_RPC_S_CANCEL_TIMEOUT; st!(EXCEPTION)
tm(CLIENT_CANCEL, TIMEOUT_CANCEL)[in(STUB_WAIT)] DEALLOC_ASSOC
tm(CLIENT_CANCEL, TIMEOUT_CANCEL)[in(REQ_WAIT)] DEALLOC_ASSOC; ORPHANED_CALL; st!(ABORT_SEND)
tm(CLIENT_CANCEL, TIMEOUT_CANCEL)[in(CONFIRMATION)] DEALLOC_ASSOC; ORPHANED_CALL; st!(ABORT_RECEIVE)

Chart:
CO_CLIENT
State:
CAN_IDLE
Description:
Waits for cancel requests and handles cancel timeouts if pending cancel request.


Reactions
Trigger Action
en(CAN_IDLE) IF CURRENT_PENDING_CANCEL THEN tr!(RT_PENDING_CANCEL) ELSE fs!(RT_PENDING_CANCEL) END IF

Chart:
CO_CLIENT
State:
CNTL_IDLE
Description:
Waits for incoming control PDUs.


Reactions
Trigger Action
en(CNTL_IDLE) fs!(FAULT_PDU); fs!(BIND_ACK_PDU); fs!(BIND_NAK_PDU); fs!(SHUTDOWN_PDU); fs!(VERSION_MISMATCH_PDU); fs!(LAST_OUT_FRAG); fs!(ALTER_CONTEXT_RESP_PDU);;
RECEIVE_PDU[PDU_TYPE=FAULT and VALID_PDU_HEADER] tr!(FAULT_PDU); RT_RCV_CANCEL_COUNT:= PDU_CANCEL_COUNT IF PDU_PENDING_CANCEL THEN tr!(RT_RCV_PENDING_CANCEL) ELSE fs!(RT_RCV_PENDING_CANCEL) END IF
RECEIVE_PDU[PDU_TYPE=BIND_ACK and VALID_PDU_HEADER and not LAST_OUT_FRAG] DO_CNTL_RESP; RCV_FRAG_CNTL_PDU;;
RECEIVE_PDU[PDU_TYPE=BIND_ACK and VALID_PDU_HEADER and LAST_OUT_FRAG] tr!(BIND_ACK_PDU);;
exiting IF AUTH THEN RT_AUTH_VERIFIER_CNTL:= PDU_AUTH_VERIFIER; RT_AUTH_LENGTH_CNTL:= PDU_AUTH_SPEC END IF;;
RECEIVE_PDU[PDU_TYPE=BIND_NAK and VALID_PDU_HEADER and VERSION_MISMATCH] tr!(VERSION_MISMATCH_PDU);;
RECEIVE_PDU[PDU_TYPE=BIND_NAK and VALID_PDU_HEADER] tr!(BIND_NAK_PDU);;
RECEIVE_PDU[PDU_TYPE=SHUTDOWN and VALID_PDU_HEADER] tr!(SHUTDOWN_PDU);;
RECEIVE_PDU[PDU_TYPE= ALTER_CONTEXT_RESP and VALID_PDU_HEADER and not LAST_OUT_FRAG] DO_CNTL_RESP RCV_FRAG_CNTL_PDU
RECEIVE_PDU[PDU_TYPE= ALTER_CONTEXT_RESP and VALID_PDU_HEADER and LAST_OUT_FRAG] tr!(ALTER_CONTEXT_RESP_PDU);;
RECEIVE_PDU[CNTL_PDU and VALID_PDU_HEADER] RCV_CNTL_PDU;;
RECEIVE_PDU[CNTL_PDU and not VALID_FRAG_SIZE] RCV_FRAG_SIZE_TOO_LARGE

Chart:
CO_CLIENT
State:
CONFIRMATION
Description:
Processing response data (out params) for remote procedure call.


Reactions
Trigger Action
en(CONFIRMATION) fs!(RESPONSE_ACTIVE); RT_OUT_PARAMS:=NULL
en(CONFIRMATION)[MAYBE] DEALLOC_ASSOC

Chart:
CO_CLIENT
State:
CONF_IDLE
Description:
Receive response data from server (possibly fragmented).


Reactions
Trigger Action
RECEIVE_PDU[PDU_TYPE=RESPONSE and VALID_PDU_HEADER and not AUTH] tr!(RESPONSE_ACTIVE); DO_RESP; RCV_FRAG_PDU;;
RECEIVE_PDU[PDU_TYPE=RESPONSE and VALID_PDU_HEADER and AUTH] tr!(RESPONSE_ACTIVE); DO_RESP; RCV_FRAG_PDU_A;;
RECEIVE_PDU[PDU_TYPE=RESPONSE and not VALID_FRAG_SIZE] RCV_FRAG_SIZE_TOO_LARGE;;
en(CONF_IDLE)[RESPONSE_ACTIVE and LAST_OUT_FRAG] RCV_LAST_OUT_FRAG;;
en(CONF_IDLE)[RESPONSE_ACTIVE] DO_OUT_PKT; st!(HANDLE_OUT_FRAG)

Chart:
CO_CLIENT
State:
CONN_WAIT
Description:
Request transport connection and wait for response.


Reactions
Trigger Action
en(CONN_WAIT) IF VERSION_MISMATCH_PDU THEN PDU_VERSION_NUM_MINOR:=PDU_CN_VERS_COMPAT; END IF;; REQUEST_CONN

Chart:
CO_CLIENT
State:
CONTROL
Description:
Processing received control PDUs.
Chart:
CO_CLIENT
State:
CO_CLIENT
Description:
Main state for client association and call.

The CO_CLIENT_ALLOC machine creates this state by generating the CREATE_ASSOCIATION event.

Chart:
CO_CLIENT
State:
DATA
Description:
Processing RPC call data.


Reactions
Trigger Action
en(DATA) fs!(REQUEST_ACTIVE)

Chart:
CO_CLIENT
State:
FAULT
Description:
Handling fault PDU responses.


Reactions
Trigger Action
en(FAULT) DEALLOC_ASSOC; IF PDU_DID_NOT_EXECUTE THEN tr!(RT_DID_NOT_EXECUTE) END IF; RT_RCV_CANCEL_COUNT:=PDU_CANCEL_COUNT; RT_EXCEPTION_STATUS:=PDU_FAULT_STATUS; st!(EXCEPTION); IF in(REQ_WAIT) THEN st!(ABORT_SEND) END IF; IF in(CONFIRMATION) THEN st!(ABORT_RECEIVE) END IF

Chart:
CO_CLIENT
State:
INIT
Description:
Initial state for new association. Initialise state variables.


Reactions
Trigger Action
en(INIT) fs!(SHUTDOWN_REQUESTED); fs!(WAIT_FOR_GROUP); IF GROUP_EXISTS THEN SND_ASSOC_GROUP_ID:=RT_ASSOC_GROUP_ID ELSE SND_ASSOC_GROUP_ID:=NULL END IF

Chart:
CO_CLIENT
State:
INIT_WAIT
Description:
Wait for server's response to bind request.


Reactions
Trigger Action
RCV_BIND_ACK[not GROUP_EXISTS] CREATE_GROUP; tr!(WAIT_FOR_GROUP)

Chart:
CO_CLIENT
State:
REQ_WAIT
Description:
Handles fragmented requests to server.


Reactions
Trigger Action
en(REQ_WAIT)[not REQUEST_ACTIVE] FIRST_REQ
ex(REQ_WAIT)[not LAST_IN_FRAG] fs!(SND_FIRST_FRAG)

Chart:
CO_CLIENT
State:
SND_CAN
Description:
Processes cancel requests. Sends cancel PDU.


Reactions
Trigger Action
en(SND_CAN) or CLIENT_CANCEL CAN_CALL; RT_CANCEL_COUNT:=RT_CANCEL_COUNT+1

Chart:
CO_CLIENT
State:
STUB_WAIT
Description:
Wait until stub calls with first fragment.
Chart:
CO_CLIENT
State:
WORKING
Description:
Main working state for call instance.

CO_CLIENT Events

The CO_CLIENT statechart defines the following events:

Chart:
CO_CLIENT
Event:
ABORT_ASSOC_REQ
Description:
Client run-time system requested termination of association (typically local error).
Chart:
CO_CLIENT
Event:
ADD_TO_GROUP
Description:
Signal group to add this association. Generated by an association in this group.

Association must check that the instance of the CO_CLIENT_ALLOC machine which initiated this association has not terminated. If it has terminated, then the ASSOCIATION machine must lock the group before issuing this event to avoid possible race conditions.

Event is generated by CO_CLIENT and sensed by CO_CLIENT_GROUP.

Chart:
CO_CLIENT
Event:
ALLOC_ASSOC_ACK
Description:
Association allocated and may be used for call.

Event is generated by CO_CLIENT and sensed by CO_CLIENT_ALLOC.

Chart:
CO_CLIENT
Event:
ALLOC_ASSOC_NAK
Description:
Unable to allocate association because requested context not supported.

Generated in chart CO_CLIENT and sensed in CO_CLIENT_ALLOC.

Chart:
CO_CLIENT
Event:
ALLOC_REQ
Description:
A client requested allocation of an association.

For efficiency, choose the association which has either or both a presentation context and a security context matching those requested for the call.

Event is generated by CO_CLIENT_ALLOC and sensed by CO_CLIENT.

Chart:
CO_CLIENT
Event:
ALTER_CONTEXT_REQ
Description:
The run-time system has requested an additional presentation context negotiation. The AUTH conditional flag is updated by the run-time system to reflect the requested security context.
Chart:
CO_CLIENT
Event:
AUTHENTICATED
Description:
Authentication processing completed successfully.
Chart:
CO_CLIENT
Event:
CHECK_CONTEXT
Description:
Check whether desired context is supported. Internally generated.
Chart:
CO_CLIENT
Event:
CLIENT_CANCEL
Description:
The client has issued an RPC cancel request call.

Generated by the Cancel service primitive.

Chart:
CO_CLIENT
Event:
CLOSE
Description:
Compound events to terminate association.
Definition:
ABORT_ASSOC_REQ or CONN_NAK or
NO_CONNECTION[not in(DATA)] or
RCV_BIND_NAK or RCV_ALTER_CONTEXT_REJECT
or DEALLOC_ASSOC[in(ASSOC_DONE) or
SHUTDOWN_OK and SHUTDOWN_REQUESTED] or
(RCV_SHUTDOWN or
RESOURCES_SCARCE)[SHUTDOWN_OK] or
RCV_FRAG_SIZE_TOO_LARGE[not in(DATA)] or
[in(ASSOC_DONE) and in(CALL_IDLE)] or
DENIED[in(INIT_WAIT)]

Chart:
CO_CLIENT
Event:
COMPLETE
Description:
RPC call completed (with success or fault).
Definition:
(RCV_LAST_OUT_FRAG or DEALLOC_ASSOC or
DENIED[not SHUTDOWN_PDU] or NO_CONNECTION
or RCV_FRAG_SIZE_TOO_LARGE) and not
RCV_FAULT

Chart:
CO_CLIENT
Event:
CONN_ACK
Description:
Transport connection was established. Generated by underlying transport.
Chart:
CO_CLIENT
Event:
CONN_NAK
Description:
Transport connection request failed. Generated by transport service.
Chart:
CO_CLIENT
Event:
CREATE_ASSOCIATION
Description:
This event, generated internally, creates the CO_CLIENT machine. The presentation context and security context are passed to the association along with this event. The AUTH conditional flag is initialised by the run-time system to reflect the requested security context.

Event is generated by CO_CLIENT_ALLOC and sensed by CO_CLIENT.

Chart:
CO_CLIENT
Event:
CREATE_FAILED
Description:
Failed to create a new association.

Event is generated by CO_CLIENT or CO_CLIENT_ALLOC and sensed by CO_CLIENT_ALLOC.

Chart:
CO_CLIENT
Event:
CREATE_GROUP
Description:
Triggers creation of the association group. If this event is issued to a group that already exists, then it has no effect.

Event is generated by CO_CLIENT and sensed by CO_CLIENT_GROUP.

Chart:
CO_CLIENT
Event:
CREATE_SUCCESS
Description:
A new association was successfully created.

Event is generated by CO_CLIENT and sensed by CO_CLIENT_ALLOC.

Chart:
CO_CLIENT
Event:
DEALLOC_ASSOC
Description:
Deallocation of association requested. Generated internally.
Chart:
CO_CLIENT
Event:
DENIED
Description:
Authentication failure detected.

The VERIFY_AUTH activity generates this event if either the integrity check failed or the requested protection level for authentication services does not match.

Chart:
CO_CLIENT
Event:
DISCONN_REQ
Description:
Request termination of transport/session connection. Generated internally.
Chart:
CO_CLIENT
Event:
LAST_IN_PKT
Description:
Statechart internal event: last packet of fragmented request.
Definition:
[TRANSMIT_REQ and LAST_IN_FRAG and
REQUEST_ACTIVE]

Chart:
CO_CLIENT
Event:
MARK_ASSOC
Description:
Save status of association for RPC user and/or update presentation context set.

Because the association may terminate, the status, such as reason for termination, must be preserved for return to RPC user by the stub. This event is generated internally to CO_CLIENT.

Chart:
CO_CLIENT
Event:
NEXT_IN_PKT
Description:
Statechart internal event: intermediate packet of fragmented request.
Definition:
[TRANSMIT_REQ and not LAST_IN_FRAG and
REQUEST_ACTIVE]

Chart:
CO_CLIENT
Event:
NO_CONNECTION
Description:
Notification that the underlying transport connection terminated.

Generated externally by the underlying transport service.

Chart:
CO_CLIENT
Event:
OPEN_ASSOC
Description:
Open the association for use by a call.
Definition:
RCV_BIND_ACK[GROUP_EXISTS] or
[GROUP_EXISTS and WAIT_FOR_GROUP]

Chart:
CO_CLIENT
Event:
RCV_ALTER_CONTEXT_REJECT
Description:
Received an alter_context_resp PDU marking a security integrity failure.

This failure is indicated by the data item PDU_AUTH_VALUE_SUB_TYPE set to CONST_SUB_TYPE_INVALID_CHECKSUM. This event is generated in the CNTL_CALL action (CO_CLIENT chart).

Chart:
CO_CLIENT
Event:
RCV_ALTER_CONTEXT_RESP
Description:
Received an alter_context_resp PDU. Generated in CNTL_CALL action.
Chart:
CO_CLIENT
Event:
RCV_BIND_ACK
Description:
Receive a bind_ack PDU. Generated in CNTL_CALL action.
Chart:
CO_CLIENT
Event:
RCV_BIND_NAK
Description:
Received a bind_nak PDU. Generated in CNTL_CALL action (CO_CLIENT chart).
Chart:
CO_CLIENT
Event:
RCV_CNTL_PDU
Description:
Received one of the control PDUs with valid header.
Chart:
CO_CLIENT
Event:
RCV_FAULT
Description:
Received a valid fault PDU. Generated in CNTL_CALL action.
Chart:
CO_CLIENT
Event:
RCV_FRAG_CNTL_PDU
Description:
Received a fragmented control PDU.
Chart:
CO_CLIENT
Event:
RCV_FRAG_PDU
Description:
Received a response PDU for a non-authenticated call.
Chart:
CO_CLIENT
Event:
RCV_FRAG_PDU_A
Description:
Received a response PDU for an authenticated call.
Chart:
CO_CLIENT
Event:
RCV_FRAG_SIZE_TOO_LARGE
Description:
The received PDU exceeded the maximum allowed fragment size.
Chart:
CO_CLIENT
Event:
RCV_LAST_OUT_FRAG
Description:
Received last fragment response PDU. Signal completion to stub.

The last fragment of a multi-fragmented response or a single packet response was received. RCV_LAST_OUT_FRAG signals that the complete response data is available to the stub for unmarshaling.

Chart:
CO_CLIENT
Event:
RCV_SHUTDOWN
Description:
Shutdown indication was received from the server. Generated in CNTL_CALL action.
Chart:
CO_CLIENT
Event:
RECEIVE_PDU
Description:
Received a PDU from server.
Chart:
CO_CLIENT
Event:
REMOVE_FROM_GROUP
Description:
Remove association from this group.

To avoid a race condition which could result from multiple simultaneous events, the association machine must lock the group before generating the REMOVE_FROM_GROUP event and release the lock only after the event has been processed by the group machine.

Event is generated by CO_CLIENT and sensed by CO_CLIENT_GROUP.

Chart:
CO_CLIENT
Event:
REQUEST_CONN
Description:
Request a new transport connection. If not null, use secondary address.
Chart:
CO_CLIENT
Event:
RESOURCES_SCARCE
Description:
Requests shutdown of association. Externally generated.

Resource management is implementation-specific. This event is generated by the implementation resource management policy when it is necessary to reclaim idle associations. It is recommended that idle associations be maintained for better performance.

CO_CLIENT Actions

The CO_CLIENT statechart defines the following actions:

Chart:
CO_CLIENT
Action:
CAN_CALL
Description:
Set up the cancel PDU to be sent.
Definition:
SND_REQUEST_TYPE:=CANCEL;
st!(SEND_PKT)

Chart:
CO_CLIENT
Action:
CNTL_CALL
Description:
Reactions on received control PDUs. Generates respective RCV_* events.
Definition:
IF
FAULT_PDU
THEN
RCV_FAULT;
IF
RT_CANCEL_COUNT/=RT_RCV_CANCEL_COUNT
THEN
tr!(RT_PENDING_CANCEL)
ELSE
IF
RT_RCV_PENDING_CANCEL
THEN
tr!(RT_PENDING_CANCEL)
ELSE
fs!(RT_PENDING_CANCEL)
END IF
END IF
END IF;
IF
BIND_ACK_PDU
THEN
RCV_BIND_ACK;
RT_SERVER_PRES_CONTEXT_LIST:=PDU_P_RESULT_LIST;
st!(SET_PRES_CONTEXT);
IF
PDU_MAX_RCV_FRAG_SIZE/=0
THEN
SND_MAX_XMIT_FRAG_SIZE:=PDU_MAX_RCV_FRAG_SIZE
END IF;
IF
PDU_MAX_XMIT_FRAG_SIZE/=0
THEN
SND_MAX_RCV_FRAG_SIZE:=PDU_MAX_XMIT_FRAG_SIZE
END IF
END IF;
IF
ALTER_CONTEXT_RESP_PDU
THEN
IF
PDU_AUTH_VALUE_SUB_TYPE=
CONST_SUB_TYPE_INVALID_CHECKSUM
THEN
RCV_ALTER_CONTEXT_REJECT
ELSE
RCV_ALTER_CONTEXT_RESP;
RT_SERVER_PRES_CONTEXT_LIST:=
RT_SERVER_PRES_CONTEXT_LIST
+PDU_P_RESULT_LIST;
st!(SET_PRES_CONTEXT)
END IF
END IF;
IF
BIND_NAK_PDU
THEN
RCV_BIND_NAK
END IF;
IF
SHUTDOWN_PDU
THEN
RCV_SHUTDOWN
END IF

Chart:
CO_CLIENT
Action:
DO_CNTL_RESP
Description:
Evaluate control PDU header.
Definition:
RT_HEADER:=RT_HEADER+PDU_HEADER;
IF
PDU_LAST_FRAG
THEN
tr!(LAST_OUT_FRAG);
END IF

Chart:
CO_CLIENT
Action:
DO_OUT_PKT
Description:
Append received response PDU body bgcolor="#FFFFFF" data to internal buffer.
Definition:
RT_OUT_PARAMS:=RT_OUT_PARAMS+RT_BODY
Chart:
CO_CLIENT
Action:
DO_RESP
Description:
Evaluate response PDU header.
Definition:
RT_BODY:=PDU_BODY;
IF
AUTH
THEN
RT_AUTH_VERIFIER_CALL:=PDU_AUTH_VERIFIER;
RT_AUTH_LENGTH_CALL:=PDU_AUTH_SPEC
END IF;
IF
PDU_LAST_FRAG
THEN
tr!(LAST_OUT_FRAG);
IF
PDU_CANCEL_COUNT/=RT_CANCEL_COUNT
THEN
tr!(RT_PENDING_CANCEL)
ELSE
IF
PDU_PENDING_CANCEL
THEN
tr!(RT_PENDING_CANCEL)
ELSE
fs!(RT_PENDING_CANCEL)
END IF
END IF;
RT_RCV_CANCEL_COUNT:=PDU_CANCEL_COUNT
END IF

Chart:
CO_CLIENT
Action:
END_ASSOC
Description:
Notification that association has been closed.
Definition:
MARK_ASSOC;
IF
in(INIT)
THEN
CREATE_FAILED
END IF;
WHEN
not NO_CONNECTION
THEN
DISCONN_REQ
END WHEN;
IF
in(ASSOC_OPEN) or in(ALLOCATED)
THEN
REMOVE_FROM_GROUP
END IF

Chart:
CO_CLIENT
Action:
FINAL
Description:
Perform final actions for RPC call.
Definition:
st!(DEQUEUE_CANCEL);
WHEN
RCV_LAST_OUT_FRAG
THEN
DEALLOC_ASSOC
END WHEN;
WHEN
DENIED
THEN
RT_EXCEPTION_STATUS:=CONST_NCA_S_INVALID_CHKSUM
END WHEN;
WHEN
NO_CONNECTION
THEN
RT_EXCEPTION_STATUS:=CONST_RPC_S_COMM_FAILURE;
DEALLOC_ASSOC
END WHEN;
WHEN
RCV_FRAG_SIZE_TOO_LARGE
THEN
RT_EXCEPTION_STATUS:=RT_NCA_S_PROTO_ERROR
END WHEN;
WHEN
DENIED or NO_CONNECTION or
RCV_FRAG_SIZE_TOO_LARGE
THEN
st!(EXCEPTION);
IF
not in(STUB_WAIT)
THEN
IF
in(REQ_WAIT)
THEN
st!(ABORT_SEND)
ELSE
st!(ABORT_RECEIVE)
END IF
END IF
END WHEN

Chart:
CO_CLIENT
Action:
FIRST_REQ
Description:
Set up and send first request PDU.

If the request is non-fragmented (single PDU), the actual send activity will be performed through the LAST_REQ action.

Definition:
tr!(REQUEST_ACTIVE);
tr!(SND_FIRST_FRAG);
RT_IN_FRAG:=RT_IN_PARAMS;
SND_IN_PARAMS:=RT_IN_PARAMS;
SND_PRES_CONTEXT_ID:=RT_PRES_CONTEXT_ID;
IF
RT_OBJ_ID/=NULL
THEN
SND_OBJ_ID:=RT_OBJ_ID
ENDIF;
SND_CALL_ID:=RT_CALL_ID;
SND_OP_NUM:=RT_OP_NUM;
IF
not LAST_IN_FRAG
THEN
fs!(TRANSMIT_REQ);
fs!(RT_DID_NOT_EXECUTE);
fs!(SND_LAST_FRAG);
SND_REQUEST_TYPE:=REQUEST;
st!(SEND_PKT)
END IF

Chart:
CO_CLIENT
Action:
INIT_ASSOC
Description:
Initiate an association. Create bind PDU and send it.
Definition:
SND_PRES_CONTEXT_LIST:=DESIRED_CONTEXT_LIST;
SND_IF_ID:=RT_IF_ID;
SND_IF_VERSION:=RT_IF_VERSION;
SND_MAX_RCV_FRAG_SIZE:=RT_MAX_RCV_FRAG_SIZE;
SND_MAX_XMIT_FRAG_SIZE:=RT_MAX_XMIT_FRAG_SIZE;
SND_REQUEST_TYPE:=BIND;
st!(SEND_PKT)

Chart:
CO_CLIENT
Action:
LAST_REQ
Description:
Send last in fragment to server.
Definition:
fs!(TRANSMIT_REQ);
fs!(RT_DID_NOT_EXECUTE);
tr!(SND_LAST_FRAG);
SND_IN_PARAMS:=RT_IN_FRAG;
SND_REQUEST_TYPE:=REQUEST;
st!(SEND_PKT)

Chart:
CO_CLIENT
Action:
MAKE_AVAIL
Description:
Make the association available for a call.
Definition:
CREATE_SUCCESS;
ADD_TO_GROUP

Chart:
CO_CLIENT
Action:
NEXT_REQ
Description:
Send next in fragment to server.
Definition:
fs!(TRANSMIT_REQ);
SND_IN_PARAMS:=RT_IN_FRAG;
SND_REQUEST_TYPE:=REQUEST;
st!(SEND_PKT)

Chart:
CO_CLIENT
Action:
ORPHANED_CALL
Description:
Set up orphaned PDU to be sent.
Definition:
SND_REQUEST_TYPE:=ORPHANED;
st!(SEND_PKT)

CO_CLIENT Conditions

The CO_CLIENT statechart defines the following conditions:

Chart:
CO_CLIENT
Condition:
ALTER_CONTEXT_RESP_PDU
Description:
Statechart internal flag: received PDU type alter_context_resp.
Chart:
CO_CLIENT
Condition:
AUTH
Description:
Statechart internal flag: indicates that call is authenticated.
Chart:
CO_CLIENT
Condition:
BIND_ACK_PDU
Description:
Statechart internal flag: received PDU type bind_ack.
Chart:
CO_CLIENT
Condition:
BIND_NAK_PDU
Description:
Statechart internal flag: received PDU type bind_nak.
Chart:
CO_CLIENT
Condition:
CHECK_AUTH
Description:
Verify authentication if requested (not required for shutdown and bind_nak PDUs).
Definition:
AUTH and (not PDU_TYPE=SHUTDOWN and not
PDU_TYPE=BIND_NAK)

Chart:
CO_CLIENT
Condition:
CNTL_PDU
Description:
Statechart internal flag: to be received control PDUs.
Definition:
PDU_TYPE=FAULT or PDU_TYPE=BIND_ACK or
PDU_TYPE=BIND_NAK or PDU_TYPE=SHUTDOWN or
PDU_TYPE=ALTER_CONTEXT_RESP

Chart:
CO_CLIENT
Condition:
CURRENT_PENDING_CANCEL
Description:
Cancel pending state passed from stub during initialisation of call.
Chart:
CO_CLIENT
Condition:
FAULT_PDU
Description:
Statechart internal flag: received PDU type fault.
Chart:
CO_CLIENT
Condition:
GROUP_EXISTS
Description:
The group to which this association belongs exists.
Definition:
in(CO_CLIENT_GROUP:CO_CLIENT_GROUP)
Chart:
CO_CLIENT
Condition:
LAST_IN_FRAG
Description:
Statechart internal flag: last in fragment or non-frag in packet ready to send.

This flag is set if the transmit queue contains the last fragment (see also Connection-oriented Protocol ).

Chart:
CO_CLIENT
Condition:
LAST_OUT_FRAG
Description:
Statechart internal flag: last out fragment or non-frag out packet received.
Chart:
CO_CLIENT
Condition:
MAYBE
Description:
Statechart internal flag: maybe call.
Chart:
CO_CLIENT
Condition:
PDU_DID_NOT_EXECUTE
Description:
fault PDU header flag PFC_DID_NOT_EXECUTE.
Chart:
CO_CLIENT
Condition:
PDU_LAST_FRAG
Description:
Header flag PFC_LAST_FRAG.
Chart:
CO_CLIENT
Condition:
PDU_PENDING_CANCEL
Description:
Header flag PFC_PENDING_CANCEL in received response or fault PDU.
Chart:
CO_CLIENT
Condition:
PRES_SEC_CONTEXT_SUPPORTED
Description:
The presentation and security contexts for the call are in the negotiated set.

Both the negotiated presentation context and the security credentials are saved by the SET_PRES_SEC_CONTEXT activity.

Chart:
CO_CLIENT
Condition:
REQUEST_ACTIVE
Description:
Statechart internal flag: send request has started.
Chart:
CO_CLIENT
Condition:
RESPONSE_ACTIVE
Description:
Statechart internal flag: indicates availability of response data.
Chart:
CO_CLIENT
Condition:
RT_DID_NOT_EXECUTE
Description:
Run time internal: the call has not been executed yet by the server manager.

This flag is common state shared between the stub and the run-time system. The stub must initialise this to true. The run-time system updates this flag. If a call fails, the stub may check this flag to ascertain whether it may safely retry the call when exactly-once semantics were requested.

Chart:
CO_CLIENT
Condition:
RT_PENDING_CANCEL
Description:
Statechart internal flag: cancel pending state at server.
Chart:
CO_CLIENT
Condition:
RT_RCV_PENDING_CANCEL
Description:
Statechart internal: holds received pending cancel state.
Chart:
CO_CLIENT
Condition:
SHUTDOWN_OK
Description:
Shutdown of association allowed.

Association must lock group when checking these state variables.

Definition:
ASSOC_COUNT>1 or ACTIVE_CONTEXT_COUNT=0
Chart:
CO_CLIENT
Condition:
SHUTDOWN_PDU
Description:
Statechart internal flag: received PDU type shutdown.
Chart:
CO_CLIENT
Condition:
SHUTDOWN_REQUESTED
Description:
Orderly shutdown of association requested.
Chart:
CO_CLIENT
Condition:
SND_FIRST_FRAG
Description:
Statechart internal flag: header flag (PFC_FIRST_FRAG) of next frag to be sent.
Chart:
CO_CLIENT
Condition:
SND_LAST_FRAG
Description:
Statechart internal flag: header flag (PFC_LAST_FRAG) of next buffered fragment.
Chart:
CO_CLIENT
Condition:
TRANSMIT_REQ
Description:
One or more fragments are queued for transmission of request data.

This flag indicates that one or more request fragment(s) are queued in a run-time internal buffer and ready to be transmitted.

The run-time system internally sets this flag (true) after the stub initially provides data in the transmit queue, sufficient for at least the first PDU fragment to be transmitted. The protocol machine resets this flag if it has detected and taken an event for sending the next fragment in the queue. The run-time system sets this flag again after completion of a SEND_PKT activity if the transmit queue contains enough data for the next PDU fragment to be transmitted.

Chart:
CO_CLIENT
Condition:
VALID_FRAG_SIZE
Description:
Evaluation whether received PDU exceeds size limit.
Definition:
PDU_FRAG_LENGTH<=RT_MAX_RCV_FRAG_SIZE
Chart:
CO_CLIENT
Condition:
VALID_PDU_HEADER
Description:
Pre-evaluation of PDU header (before authentication processing).
Definition:
PDU_CALL_ID=RT_CALL_ID
and PDU_VERSION_NUM=CO_VERSION_NUM_V20
and PDU_VERSION_NUM_MINOR=CO_VERSION_NUM_V20_MINOR
or PDU_VERSION_NUM_MINOR=PDU_CN_VERS_COMPAT
and VALID_FRAG_SIZE

Chart:
CO_CLIENT
Condition:
VERSION_MISMATCH
Description:
Version mismatch. Version .1 client access version .0 server.
Definition:
PDU_FAULT_STATUS=RPC_S_VERSION_MISMATCH
Chart:
CO_CLIENT
Condition:
VERSION_MISMATCH_PDU
Description:
Statechart internal flag: Received a bind_nak with a VERSION_MISMATCH.
Chart:
CO_CLIENT
Condition:
WAIT_FOR_GROUP
Description:
Indicates association is waiting for group to be created.

CO_CLIENT Data-Items

The CO_CLIENT statechart defines the following data items:

Chart:
CO_CLIENT
Data Item:
ACTIVE_CONTEXT_COUNT
Description:
Number of active context handles for group. State variable of CO_CLIENT_GROUP.
Chart:
CO_CLIENT
Data Item:
ALTER_CONTEXT
Description:
Constant: PDU type alter_context.
Definition:
14
Chart:
CO_CLIENT
Data Item:
ALTER_CONTEXT_RESP
Description:
Constant: PDU type alter_context_resp.
Definition:
15
Chart:
CO_CLIENT
Data Item:
ASSOC_COUNT
Description:
Number of associations in group. State variable of CO_CLIENT_GROUP.

Must lock group before accessing this state variable to avoid race conditions.

Chart:
CO_CLIENT
Data Item:
BIND
Description:
Constant: PDU type bind.
Definition:
11
Chart:
CO_CLIENT
Data Item:
BIND_ACK
Description:
Constant: PDU type bind_ack.
Definition:
12
Chart:
CO_CLIENT
Data Item:
BIND_NAK
Description:
Constant: PDU type bind_nak.
Definition:
13
Chart:
CO_CLIENT
Data Item:
CANCEL
Description:
Constant: PDU type cancel.
Definition:
18
Chart:
CO_CLIENT
Data Item:
CONST_NCA_S_INVALID_CHKSUM
Description:
Constant: fault status code nca_s_invalid_chksum.
Chart:
CO_CLIENT
Data Item:
CONST_RPC_S_CANCEL_TIMEOUT
Description:
Constant: fault status code rpc_s_cancel_timeout.
Chart:
CO_CLIENT
Data Item:
CONST_RPC_S_COMM_FAILURE
Description:
Constant: fault status code rpc_s_comm_failure.
Chart:
CO_CLIENT
Data Item:
CONST_SUB_TYPE_INVALID_CHECKSUM
Description:
Value indicating a security integrity failure (invalid checksum).

The value dce_c_cn_dce_sub_type_invalid_checksum, which is encoded in the sub_type field of the auth_value member of the authentication verifier. (See Security .)

Definition:
2
Chart:
CO_CLIENT
Data Item:
CO_VERSION_NUM_V20
Description:
Constant: RPC protocol version 2.0 major version number.
Definition:
5
Chart:
CO_CLIENT
Data Item:
CO_VERSION_NUM_V20_MINOR
Description:
Constant: RPC protocol minor version number.
Chart:
CO_CLIENT
Data Item:
DESIRED_CONTEXT_LIST
Description:
Presentation context determined by stub.

This is the presentation context required for the call. Its value is determined by the stub from the interface definition and transfer syntaxes. See the section on PDU encodings for details of this context.

Chart:
CO_CLIENT
Data Item:
FAULT
Description:
Constant: PDU type fault.
Definition:
3
Chart:
CO_CLIENT
Data Item:
ORPHANED
Description:
Constant: PDU type orphaned.
Definition:
19
Chart:
CO_CLIENT
Data Item:
PDU_AUTH_SPEC
Description:
PDU header field auth_length.
Chart:
CO_CLIENT
Data Item:
PDU_AUTH_VALUE_SUB_TYPE
Description:
The value of the sub_type field of the auth_value member of the authentication verifier as received in an alter_context_resp PDU. (See Security .)
Chart:
CO_CLIENT
Data Item:
PDU_AUTH_VERIFIER
Description:
PDU trailer: authentication verifier (authentication protocol-specific).
Chart:
CO_CLIENT
Data Item:
PDU_BODY
Description:
Array of PDU body bgcolor="#FFFFFF" data.
Chart:
CO_CLIENT
Data Item:
PDU_CALL_ID
Description:
PDU header field call_id.
Chart:
CO_CLIENT
Data Item:
PDU_CANCEL_COUNT
Description:
Received cancel_count value in response or fault PDU header.
Chart:
CO_CLIENT
Data Item:
PDU_CN_VERS_COMPAT
Description:
Constant: Protocol minor version compatible number.
Definition:
0
Chart:
CO_CLIENT
Data Item:
PDU_FAULT_STATUS
Description:
Constant: fault status code.
Chart:
CO_CLIENT
Data Item:
PDU_FRAG_LENGTH
Description:
PDU header field frag_length.
Chart:
CO_CLIENT
Data Item:
PDU_HEADER
Description:
Array of PDU header data.
Chart:
CO_CLIENT
Data Item:
PDU_MAX_RCV_FRAG_SIZE
Description:
PDU header field max_recv_frag.
Chart:
CO_CLIENT
Data Item:
PDU_MAX_XMIT_FRAG_SIZE
Description:
PDU header field max_xmit_frag.
Chart:
CO_CLIENT
Data Item:
PDU_P_RESULT_LIST
Description:
PDU header field: p_result_list in bind_ack and alter_context_resp PDUs.
Chart:
CO_CLIENT
Data Item:
PDU_TYPE
Description:
PDU header field PTYPE.
Chart:
CO_CLIENT
Data Item:
PDU_VERSION_NUM
Description:
PDU header field rpc_vers.
Chart:
CO_CLIENT
Data Item:
PDU_VERSION_NUM_MINOR
Description:
PDU header field rpc_vers_minor.
Chart:
CO_CLIENT
Data Item:
REQUEST
Description:
Constant: PDU type request.
Definition:
0
Chart:
CO_CLIENT
Data Item:
RESPONSE
Description:
Constant: PDU type response.
Definition:
2
Chart:
CO_CLIENT
Data Item:
RPC_S_VERSION_MISMATCH
Description:
Constant: fault status code rpc_s_rpc_prot_version_mismatch.
Chart:
CO_CLIENT
Data Item:
RT_ASSOC_GROUP_ID
Description:
Group ID for newly created association. Defined in CO_CLIENT_GROUP.
Chart:
CO_CLIENT
Data Item:
RT_AUTH_LENGTH_CALL
Description:
Statechart internal: authentication length field received in CALL state.
Chart:
CO_CLIENT
Data Item:
RT_AUTH_LENGTH_CNTL
Description:
Statechart internal: authentication length field received in CONTROL state.
Chart:
CO_CLIENT
Data Item:
RT_AUTH_VERIFIER_CALL
Description:
Received authentication trailer (verifier) for request PDU.
Chart:
CO_CLIENT
Data Item:
RT_AUTH_VERIFIER_CNTL
Description:
Received authentication trailer (verifier) for control PDU.
Chart:
CO_CLIENT
Data Item:
RT_BODY
Description:
Statechart internal: temporarily buffered response PDU body bgcolor="#FFFFFF" data.
Chart:
CO_CLIENT
Data Item:
RT_CALL_ID
Description:
Statechart internal: call identifier of current RPC call.
Chart:
CO_CLIENT
Data Item:
RT_CANCEL_COUNT
Description:
Statechart internal counter: number of cancel requests sent.
Chart:
CO_CLIENT
Data Item:
RT_EXCEPTION_STATUS
Description:
Statechart internal: status value passed to exception handler.
Chart:
CO_CLIENT
Data Item:
RT_HEADER
Description:
Statechart internal: temporarily buffered response PDU header data.
Chart:
CO_CLIENT
Data Item:
RT_IF_ID
Description:
Statechart internal: received interface UUID of call.
Chart:
CO_CLIENT
Data Item:
RT_IF_VERSION
Description:
Statechart internal: received interface version number.
Chart:
CO_CLIENT
Data Item:
RT_IN_FRAG
Description:
Statechart internal pointer to data to be sent in next request PDU.

The SEND_PKT activity increments this pointer after a request PDU is sent.

Chart:
CO_CLIENT
Data Item:
RT_IN_PARAMS
Description:
Statechart internal: buffered array of reassembled input data.

RT_IN_PARAMS is the queue of transmit data provided by the stub. A possible segmentation of this queue is not equivalent to the sizes of PDU fragments sent by the run-time system (SEND_PKT) activity.

The RT_IN_FRAG variable is a pointer data type that points to the to be transmitted data fragment within this RT_IN_PARAMS queue.

Chart:
CO_CLIENT
Data Item:
RT_MAX_RCV_FRAG_SIZE
Description:
Maximum size of a fragment the receiver is able to handle.

The minimum value of this fragment size is determined by the architected value MustRcvFragSize (refer to Fragmentation and Reassembly ).

Implementations may support larger fragment sizes that are subject to negotiation with the server. This value is set internally by run-time implementations.

Chart:
CO_CLIENT
Data Item:
RT_MAX_XMIT_FRAG_SIZE
Description:
Maximum size of a fragment the sender is able to handle.

The minimum value of this fragment size is determined by the architected value MustRcvFragSize (refer to Fragmentation and Reassembly ).

Implementations may support larger fragment sizes that are subject to negotiation with the server. This value is set internally by run-time implementations.

Chart:
CO_CLIENT
Data Item:
RT_NCA_S_PROTO_ERROR
Description:
Constant: fault status code nca_s_proto_error.
Chart:
CO_CLIENT
Data Item:
RT_OBJ_ID
Description:
Statechart internal: buffered object UUID of RPC call.
Chart:
CO_CLIENT
Data Item:
RT_OP_NUM
Description:
Statechart internal: buffered operation number of RPC call.
Chart:
CO_CLIENT
Data Item:
RT_OUT_PARAMS
Description:
Buffered array of unfragmented output data.
Chart:
CO_CLIENT
Data Item:
RT_PRES_CONTEXT_ID
Description:
Statechart internal: presentation context identifier of current call.

Selection of values for the context identifier is implementation-dependent. There must be a one-to-one mapping between each negotiated context and the identifiers within an association.

Chart:
CO_CLIENT
Data Item:
RT_RCV_CANCEL_COUNT
Description:
Statechart internal: received cancel count.
Chart:
CO_CLIENT
Data Item:
RT_SERVER_PRES_CONTEXT_LIST
Description:
Statechart internal: the received set of supported server presentation contexts.
Chart:
CO_CLIENT
Data Item:
SHUTDOWN
Description:
Constant: PDU type shutdown.
Definition:
17
Chart:
CO_CLIENT
Data Item:
SND_ASSOC_GROUP_ID
Description:
Association group ID sent in bind and alter_context PDUs.
Chart:
CO_CLIENT
Data Item:
SND_CALL_ID
Description:
Call ID of current RPC call.
Chart:
CO_CLIENT
Data Item:
SND_IF_ID
Description:
Interface UUID to be sent.
Chart:
CO_CLIENT
Data Item:
SND_IF_VERSION
Description:
Interface version number to be sent.
Chart:
CO_CLIENT
Data Item:
SND_IN_PARAMS
Description:
PDU body bgcolor="#FFFFFF" data promoted to SEND_PKT activity.
Chart:
CO_CLIENT
Data Item:
SND_MAX_RCV_FRAG_SIZE
Description:
Constant: Maximum receive fragment size. Sent in bind PDU.
Chart:
CO_CLIENT
Data Item:
SND_MAX_XMIT_FRAG_SIZE
Description:
Constant: Maximum transmit fragment size. Sent in bind PDU.
Chart:
CO_CLIENT
Data Item:
SND_OBJ_ID
Description:
Object UUID of current RPC call.
Chart:
CO_CLIENT
Data Item:
SND_OP_NUM
Description:
Operation number of current call.
Chart:
CO_CLIENT
Data Item:
SND_PRES_CONTEXT_ID
Description:
Determined by the presentation context in the binding information.
Chart:
CO_CLIENT
Data Item:
SND_PRES_CONTEXT_LIST
Description:
Presentation context list to be sent.
Chart:
CO_CLIENT
Data Item:
SND_REQUEST_TYPE
Description:
PDU type to be sent.
Chart:
CO_CLIENT
Data Item:
TIMEOUT_CANCEL
Description:
Timeout value for cancel requests.

Sets the lower bound on the time to wait before timing out after forwarding a cancel PDU to the server. The default of this timeout value is set to infinity (see Architected and Default Values for Protocol Machines ). Applications may set a different value via the rpc_mgmt_set_cancel_timeout RPC API.

CO_CLIENT_ALLOC Machine

CO_CLIENT_ALLOC Statechart shows the CO_CLIENT_ALLOC machine statechart. Figure: CO_CLIENT_ALLOC Statechart

CO_CLIENT_ALLOC Activities

The CO_CLIENT_ALLOC statechart defines the following activities:

Chart:
CO_CLIENT_ALLOC
Activity:
FETCH_TICKET
Description:
Obtains the security context for the RPC session from the security service (that is, kerberos ticket, if authentication service is rpc_c_authn_dce_secret).

The activity resets the conditional flag TICKET to false at the beginning, and sets TICKET to true before termination only if the fetch operation succeeded. FETCH_TICKET is a self-terminating activity.

CO_CLIENT_ALLOC States

The CO_CLIENT_ALLOC statechart defines the following states:

Chart:
CO_CLIENT_ALLOC
State:
ALLOC_ASSOC
Description:
Wait for association to be allocated.


Reactions
Trigger Action
en(ALLOC_ASSOC) ALLOC_REQ

Chart:
CO_CLIENT_ALLOC
State:
CO_CLIENT_ALLOC
Description:
Protocol machine for association allocation. Created by Invoke service primitive.
Chart:
CO_CLIENT_ALLOC
State:
CREATE_ASSOC
Description:
Create a new association.


Reactions
Trigger Action
en(CREATE_ASSOC) IF in(CO_CLIENT_GROUP:CO_CLIENT_GROUP) and RT_SECONDARY_ADDRESS=NULL THEN CREATE_FAILED ELSE CREATE_ASSOCIATION END IF

Chart:
CO_CLIENT_ALLOC
State:
GET_TICKET
Description:
Get authentication ticket from security server (security service-specific).
Activities Throughout:

FETCH_TICKET
Chart:
CO_CLIENT_ALLOC
State:
INIT
Description:
Initialise state for a call.


Reactions
Trigger Action
en(INIT)[not AUTH or TICKET] TIMEOUT_MAX_ALLOC_WAIT:=3; MAP_TO_GROUP_AND_LOCK; TIMEOUT_RANDOM:=RAND_UNIFORM(0,3)

Chart:
CO_CLIENT_ALLOC
State:
WAIT_RETRY
Description:
Wait and retry if resources for association currently not available.


Reactions
Trigger Action
en(WAIT_RETRY) UNLOCK_GROUP; TIMEOUT_RANDOM:= MIN(RAND_UNIFORM (0,TIMEOUT_MAX_ALLOC_WAIT), CONST_MAX_BACKOFF); TIMEOUT_MAX_ALLOC_WAIT:= 2*TIMEOUT_MAX_ALLOC_WAIT
tm(en(WAIT_RETRY), TIMEOUT_RANDOM) MAP_TO_GROUP_AND_LOCK

CO_CLIENT_ALLOC Events

The CO_CLIENT_ALLOC statechart defines the following events:

Chart:
CO_CLIENT_ALLOC
Event:
ALLOC_ASSOC_ACK
Description:
Association allocated and may be used for call.

Event is generated by CO_CLIENT and sensed by CO_CLIENT_ALLOC.

Chart:
CO_CLIENT_ALLOC
Event:
ALLOC_ASSOC_NAK
Description:
Unable to allocate association because requested context not supported.

Generated in chart CO_CLIENT and sensed in CO_CLIENT_ALLOC.

Chart:
CO_CLIENT_ALLOC
Event:
ALLOC_REQ
Description:
A client requested allocation of an association.

For efficiency, choose the association which has either or both a presentation context and a security context matching those requested for the call.

Event is generated by CO_CLIENT_ALLOC and sensed by CO_CLIENT.

Chart:
CO_CLIENT_ALLOC
Event:
ATTEMPT_DONE
Description:
Attempt to allocate association either completed successfully or failed.
Definition:
RCV_BIND_NAK or RCV_ALTER_CONTEXT_REJECT
or ALLOC_ASSOC_ACK or ALLOC_ASSOC_NAK or
tm(en(INIT),
CONST_MAX_RESOURCE_WAIT)[not
in(ALLOC_ASSOC)] or NO_COMMUNICATION or
sp(FETCH_TICKET)[not TICKET]

Chart:
CO_CLIENT_ALLOC
Event:
CREATE_ASSOCIATION
Description:
This event, generated internally, creates the CO_CLIENT machine.

The presentation context and security context are passed to the association along with this event.

Event is generated by CO_CLIENT_ALLOC and sensed by CO_CLIENT.

Chart:
CO_CLIENT_ALLOC
Event:
CREATE_FAILED
Description:
Failed to create a new association.

Event is generated by CO_CLIENT or CO_CLIENT_ALLOC and sensed by CO_CLIENT_ALLOC.

Chart:
CO_CLIENT_ALLOC
Event:
CREATE_SUCCESS
Description:
A new association was successfully created.

Event is generated by CO_CLIENT and sensed by CO_CLIENT_ALLOC.

Chart:
CO_CLIENT_ALLOC
Event:
FETCHED_TICKET
Description:
Client fetched a valid authentication ticket.
Definition:
sp(FETCH_TICKET)[TICKET]
Chart:
CO_CLIENT_ALLOC
Event:
LOCK_GRANTED
Description:
The request to lock access to the group was granted.

To guard against race conditions, the model assumes the existence of a centralised locking mechanism for each group. One lock is associated with each group. Requests for a lock are queued and serviced in FIFO order. At most one machine may be in possession of the lock for a particular group at any time.

Chart:
CO_CLIENT_ALLOC
Event:
MAP_TO_GROUP_AND_LOCK
Description:
Map the call to a group based upon the binding information and request lock.

Determine the group to which the binding information maps. Request a lock for this group. If the group does not exist, then possession of the lock indicates that this allocation machine is permitted to create the group.

Chart:
CO_CLIENT_ALLOC
Event:
NO_COMMUNICATION
Description:
An unrecoverable network error occurred. Generated by underlying transport.

This may occur either during an attempt to create a new association or during an attempt to allocate an existing association.

Chart:
CO_CLIENT_ALLOC
Event:
RCV_ALTER_CONTEXT_REJECT
Description:
Received an alter_context_resp PDU marking a security integrity failure.

This failure is indicated by data item PDU_AUTH_VALUE_SUB_TYPE set to CONST_SUB_TYPE_INVALID_CHECKSUM. This event is generated in the CNTL_CALL action (CO_CLIENT chart).

Chart:
CO_CLIENT_ALLOC
Event:
RCV_BIND_NAK
Description:
Received a bind_nak PDU. Generated in CNTL_CALL action (CO_CLIENT chart).
Chart:
CO_CLIENT_ALLOC
Event:
START_CALL
Description:
The client has initiated a remote procedure call (Invoke service primitive).
Chart:
CO_CLIENT_ALLOC
Event:
UNLOCK_GROUP
Description:
Release group lock or dequeue pending lock request. Generated internally.

If the machine has been granted the lock for the group, then release the lock. If the machine has queued a request for the lock, then dequeue the request.

CO_CLIENT_ALLOC Actions

The CO_CLIENT_ALLOC statechart defines the following actions:

Chart:
CO_CLIENT_ALLOC
Action:
RETURN_STATUS
Description:
Return status of allocation attempt to stub and unlock group.

The CO_CLIENT_ALLOC machine indicates to the stub whether an association was allocated. If an association was successfully allocated, then a the identity of the association is returned to the stub. If the allocation attempt failed, then the reason for the failure is returned to the stub.

Definition:
UNLOCK_GROUP
Chart:
CO_CLIENT_ALLOC
Action:
SETUP_CALL
Description:
Set up and initialise call data.
Definition:
tr!(RT_DID_NOT_EXECUTE)

CO_CLIENT_ALLOC Conditions

The CO_CLIENT_ALLOC statechart defines the following conditions:

Chart:
CO_CLIENT_ALLOC
Condition:
ASSOC_AVAIL
Description:
The group exists and at least one association in the group is available.

The group indicated by the binding information exists, and at least one association in that group is in the ASSOC_OPEN state.

Definition:
in(CO_CLIENT:ASSOC_OPEN)
Chart:
CO_CLIENT_ALLOC
Condition:
AUTH
Description:
Statechart internal flag: indicates that call is authenticated.
Chart:
CO_CLIENT_ALLOC
Condition:
RESOURCE_AVAIL
Description:
Policy and resources permit new association. Value determined externally.

The policy for allowing creation of new associations and the management of resources is implementation-dependent.

Chart:
CO_CLIENT_ALLOC
Condition:
RT_DID_NOT_EXECUTE
Description:
Run time internal: the call has not been executed yet by the server manager.

This flag is common state shared between the stub and the run-time system. The stub must initialise this to true. The run-time system updates this flag. If a call fails, the stub may check this flag to ascertain whether it may safely retry the call when exactly-once semantics were requested.

Chart:
CO_CLIENT_ALLOC
Condition:
TICKET
Description:
The authentication ticket is valid. Determined externally.

The authentication ticket from the call's client principal to the server's principal is valid. The particular ticket depends on the client/server pair of principals, and may be different for different RPCs.

Note that implementations may cache unexpired tickets, even across process invocations or system reboots. Therefore, this condition predicate may be maintained externally to the RPC run-time system.

CO_CLIENT_ALLOC Data-Items

The CO_CLIENT_ALLOC statechart defines the following data items:

Chart:
CO_CLIENT_ALLOC
Data Item:
CONST_MAX_BACKOFF
Description:
Upper bound in seconds for wait to retry allocation. Architectural constant.
Definition:
60
Chart:
CO_CLIENT_ALLOC
Data Item:
CONST_MAX_RESOURCE_WAIT
Description:
Maximum time in seconds to wait for association allocation. Architected value.
Definition:
300
Chart:
CO_CLIENT_ALLOC
Data Item:
RT_SECONDARY_ADDRESS
Description:
The secondary address for the group. Determined by CO_CLIENT_GROUP.
Chart:
CO_CLIENT_ALLOC
Data Item:
TIMEOUT_MAX_ALLOC_WAIT
Description:
Maximum wait before retrying association allocation. Internal variable.
Chart:
CO_CLIENT_ALLOC
Data Item:
TIMEOUT_RANDOM
Description:
Random time between 0 and TIMEOUT_MAX_ALLOC_WAIT. Internal variable.

CO_CLIENT_GROUP Machine

CO_CLIENT_GROUP Statechart shows the CO_CLIENT_GROUP machine statechart. Figure: CO_CLIENT_GROUP Statechart

CO_CLIENT_GROUP States

The CO_CLIENT_GROUP statechart defines the following states:

Chart:
CO_CLIENT_GROUP
State:
CO_CLIENT_GROUP
Description:
Client association group machine. Created by CO_CLIENT:CREATE_GROUP event.

The group is created when the CO_CLIENT receives a valid bind_ack PDU and the group did not already exist. Note that once the CO_CLIENT_GROUP is terminated, the group ID, RT_ASSOC_GROUP_ID, is no longer valid. If the run-time system or stub was maintaining this value with other state (for example, it may be stored with other binding data pointed to by a binding handle) then the value must be invalidated appropriately.

Chart:
CO_CLIENT_GROUP
State:
GROUP_ACTIVE
Description:
Associations belong to this group.


Reactions
Trigger Action
REMOVE_FROM_GROUP [ASSOC_COUNT>1] ASSOC_COUNT:=ASSOC_COUNT-1
ADD_TO_GROUP ASSOC_COUNT:=ASSOC_COUNT+1
CONTEXT_ACTIVE ACTIVE_CONTEXT_COUNT:= ACTIVE_CONTEXT_COUNT+1
CONTEXT_INACTIVE ACTIVE_CONTEXT_COUNT:= ACTIVE_CONTEXT_COUNT-1

Chart:
CO_CLIENT_GROUP
State:
GROUP_OPEN
Description:
Open a new associations group.


Reactions
Trigger Action
en(GROUP_OPEN) ACTIVE_CONTEXT_COUNT:=0; ASSOC_COUNT:=0; RT_ASSOC_GROUP_ID:=PDU_ASSOC_GROUP_ID; RT_SECONDARY_ADDRESS:=PDU_SEC_ADDR

CO_CLIENT_GROUP Events

The CO_CLIENT_GROUP statechart defines the following events:

Chart:
CO_CLIENT_GROUP
Event:
ADD_TO_GROUP
Description:
Signal group to add this association. Generated by an association in this group.

Association must check that the instance of the CO_CLIENT_ALLOC machine which initiated this association has not terminated. If it has terminated, then the ASSOCIATION machine must lock the group before issuing this event to avoid possible race conditions.

Event is generated by CO_CLIENT and sensed by CO_CLIENT_GROUP.

Chart:
CO_CLIENT_GROUP
Event:
CONTEXT_ACTIVE
Description:
A context handle was activated. Generated by the client stub.

The stub generates this event for each context handle which makes a transition from inactive to active. To avoid a race condition which could result from multiple simultaneous events, the stub must lock the group before generating the CONTEXT_ACTIVE event and release the lock only after the event has been processed by the group machine.

Chart:
CO_CLIENT_GROUP
Event:
CONTEXT_INACTIVE
Description:
Context handle deactivated. Generated by the client stub.

The stub generates this event for each context handle which makes a transition from active to inactive. To avoid a race condition which could result from multiple simultaneous events, the stub must lock the group before generating the CONTEXT_INACTIVE event and release the lock only after the event has been processed by the group machine.

Chart:
CO_CLIENT_GROUP
Event:
CREATE_GROUP
Description:
Triggers creation of the association group. If this event is issued to a group that already exists, then it has no effect.

Event is generated by CO_CLIENT and sensed by CO_CLIENT_GROUP.

Chart:
CO_CLIENT_GROUP
Event:
REMOVE_FROM_GROUP
Description:
Remove association from this group.

To avoid a race condition which could result from multiple simultaneous events, the association machine must lock the group before generating the REMOVE_FROM_GROUP event and release the lock only after the event has been processed by the group machine.

Event is generated by CO_CLIENT and sensed by CO_CLIENT_GROUP.

CO_CLIENT_GROUP Data-Items

The CO_CLIENT_GROUP statechart defines the following data items:

Chart:
CO_CLIENT_GROUP
Data Item:
ACTIVE_CONTEXT_COUNT
Description:
Number of active context handles for group. State variable of CO_CLIENT_GROUP.
Chart:
CO_CLIENT_GROUP
Data Item:
ASSOC_COUNT
Description:
Number of associations in group. State variable of CO_CLIENT_GROUP.

Must lock group before accessing this state variable to avoid race conditions.

Chart:
CO_CLIENT_GROUP
Data Item:
PDU_ASSOC_GROUP_ID
Description:
The association group ID (header field assoc_group_id) from the bind_ack PDU.
Chart:
CO_CLIENT_GROUP
Data Item:
PDU_SEC_ADDR
Description:
The optional secondary address (header field sec_addr) from the bind_ack PDU.
Chart:
CO_CLIENT_GROUP
Data Item:
RT_ASSOC_GROUP_ID
Description:
Group ID for newly created association. Defined in CO_CLIENT_GROUP.
Chart:
CO_CLIENT_GROUP
Data Item:
RT_SECONDARY_ADDRESS
Description:
The secondary address for the group. Determined by CO_CLIENT_GROUP.

CO_SERVER Machine

CO_SERVER Statechart shows the CO_SERVER machine statechart.

Figure: CO_SERVER Statechart

CO_SERVER Activities

The CO_SERVER statechart defines the following activities:

Chart:
CO_SERVER
Activity:
ABORT_RECEIVE
Description:
Flush and discard any further received packets for this call. There may be numerous additional packets in the pipeline. The flush may be lazy, upon subsequent receive processing. Also, notify the run-time system and stub to reclaim any resources for this call.
Chart:
CO_SERVER
Activity:
ABORT_SEND
Description:
Discontinue any further transmission of response data for the current call, to the best extent possible. Some error condition has caused a fault.
Chart:
CO_SERVER
Activity:
CANCEL_NOTIFY_APP
Description:
This activity notifies the manager routine of the RPC application about the cancel request issued by the client.

CANCEL_NOTIFY_APP activity terminates after acknowledgement from the stub. The stub sets the RETURN_PENDING_CANCEL flag appropriately.

Chart:
CO_SERVER
Activity:
HANDLE_IN_FRAG
Description:
This activity is invoked at each received fragment evaluation of in parameters for multi-fragmented RPC requests.

The HANDLE_IN_FRAG activity makes received data of the next fragment available to the stub for unmarshalling and passes the object UUID (RT_OBJ_ID) to the manager routine. This does not require a transfer of control from the run-time system to the stub for each fragment; implementation policy determines when control is transferred.

Chart:
CO_SERVER
Activity:
SEND_PKT
Description:
Prepare a PDU to send to the client, adding the appropriate header information as necessary. If security services were requested (conditional flag AUTH is true), apply per-message security services. Send the PDU.

The conditional flags and data items set in the run-time system (with prefix SND_) provide the appropriate input for generating the PDU data. Note that actions within the same execution step that started this activity may have assigned values to the SND_* variables which have to be taken by this instance of the activity.

After sending a response PDU, the RT_OUT_FRAG pointer is incremented accordingly, to point to the remaining data in the transmit queue.

Note:
The SEND_PKT activity may be invoked simultaneously by several orthogonal states (WORKING, CONTROL, CANCEL, and so on). The run-time system must catch these send requests, buffer these and the associated data, and perform the sends in sequential order.
Chart:
CO_SERVER
Activity:
STOP_ORPHAN
Description:
Tell the stub that the client orphaned the call and allow the manager routine to run down gracefully. If it is executing (that is, it is still receiving for a pipe), cancel it. Otherwise, discard the input and/or output data. If possible (not required), ensure that neither response nor fault PDU is returned for the orphaned call.
Chart:
CO_SERVER
Activity:
VERIFY_AUTH
Description:
Verify the authentication trailer of PDU and decrypt message if necessary.

This activity takes as input values the PDU header field auth_proto and the authentication verifier.

Depending on the result of the verification, the activity VERIFY_AUTH generates either the event AUTHENTICATED (success) or DENIED (authentication failure).

The algorithm applied to this activity is dependent on the security service in use (determined by RT_AUTH_SPEC). The general evaluation steps for authentication service rpc_c_authn_dce_secret are as follows (for more details see Security ):


Note:
The VERIFY_AUTH activity may be invoked simultaneously by several orthogonal states (WORKING, CONTROL and CANCEL). VERIFY_AUTH must not generate the event AUTHENTICATED unless the entire requested authentication processing is completed. If VERIFY_AUTH detects an authentication failure and generates the event DENIED, the protocol machine rejects the RPC call and no further processing is required.

CO_SERVER States

The CO_SERVER statechart defines the following states:

Chart:
CO_SERVER
State:
ASSOCIATION
Description:
Main state for active association.
Chart:
CO_SERVER
State:
ASSOC_OPEN
Description:
Association available for call.


Reactions
Trigger Action
RCV_ALTER_CONTEXT DO_ALTER_CONTEXT_RESP
RESOURCES_SCARCE SND_REPLY_TYPE:=SHUTDOWN; st!(SEND_PKT)
DENIED[ALTER_CONTEXT_PDU] SND_AUTH_VALUE_SUB_TYPE:= CONST_SUB_TYPE_INVALID_CHECKSUM; SND_REPLY_TYPE:=ALTER_CONTEXT_RESP; st!(SEND_PKT)

Chart:
CO_SERVER
State:
ASSOC_REQ
Description:
Wait for decision on whether to accept association.


Reactions
Trigger Action
DENIED[BIND_PDU] SND_REJECT_REASON:= CONST_REASON_INVALID_CHECKSUM SND_REPLY_TYPE:=BIND_NAK st!(SEND_PKT)
ACCEPT_BIND[not GROUP_EXISTS] tr!(WAIT_FOR_GROUP)
entering RT_GROUP_ID:=PDU_ASSOC_GROUP_ID
ASSOC_REJECT SND_REJECT_REASON:=RT_REJECT_REASON SND_REPLY_TYPE:=BIND_NAK st!(SEND_PKT)

Chart:
CO_SERVER
State:
ASSOC_WAIT
Description:
Wait for all bind packets containing EPAC information.
Chart:
CO_SERVER
State:
AUTHENTICATION
Description:
Process authentication verification.
Activities Throughout:

VERIFY_AUTH
Chart:
CO_SERVER
State:
CALL
Description:
Processing a remote procedure call request.
Chart:
CO_SERVER
State:
CANCEL
Description:
Processing of client requests to terminate call in progress.

The reaction within this state senses the termination of the CANCEL_NOTIFY_APP activity as cancel acknowledgement from the server manager routine. The manager routine also sets the RETURN_PENDING_CANCEL flag appropriately.



Reactions
Trigger Action
sp(CANCEL_NOTIFY_APP) IF RETURN_PENDING_CANCEL THEN tr!(SND_PENDING_CANCEL) END IF

Chart:
CO_SERVER
State:
CAN_IDLE
Description:
Waits for cancel requests.


Reactions
Trigger Action
exiting IF AUTH THEN RT_AUTH_VERIFIER_CAN:=PDU_AUTH_VERIFIER; RT_AUTH_LENGTH_CAN:=PDU_AUTH_SPEC END IF

Chart:
CO_SERVER
State:
CLOSED
Description:
Association waiting to receive bind request.


Reactions
Trigger Action
en(CLOSED) fs!(WAIT_FOR_GROUP)
DENIED[BIND_PDU] SND_REJECT_REASON:= CONST_REASON_INVALID_CHECKSUM; SND_REPLY_TYPE:=BIND_NAK; st!(SEND_PKT)

Chart:
CO_SERVER
State:
CNTL_IDLE
Description:
Waits for incoming control PDUs.


Reactions
Trigger Action
en(CNTL_IDLE) fs!(ORPHANED_PDU) fs!(LAST_IN_FRAG) fs!(BIND_PDU) fs!(ALTER_CONTEXT_PDU)
RECEIVE_PDU[PDU_TYPE=ORPHANED and VALID_PDU_HEADER] tr!(ORPHANED_PDU)
exiting IF AUTH THEN RT_AUTH_VERIFIER_CNTL:= PDU_AUTH_VERIFIER RT_AUTH_LENGTH_CNTL:= PDU_AUTH_SPEC END IF
RECEIVE_PDU[PDU_TYPE=BIND and VALID_PDU_HEADER and not LAST_IN_FRAG] DO_CNTL_RESP RCV_CNTL_FRAG_PDU
RECEIVE_PDU[PDU_TYPE=BIND and VALID_PDU_HEADER and LAST_IN_FRAG] tr!(BIND_PDU)
RECEIVE_PDU[PDU_TYPE= ALTER_CONTEXT and VALID_PDU_HEADER and not LAST_IN_FRAG] DO_CNTL_RESP RCV_CNTL_FRAG_PDU
RECEIVE_PDU[PDU_TYPE= ALTER_CONTEXT and VALID_PDU_HEADER and LAST_IN_FRAG] tr!(ALTER_CONTEXT_PDU)
RECEIVE_PDU[CNTL_PDU and not VALID_FRAG_SIZE] RCV_FRAG_SIZE_TOO_LARGE
RECEIVE_PDU[CNTL_PDU and VALID_PDU_HEADER] RCV_CNTL_PDU

Chart:
CO_SERVER
State:
CONTROL
Description:
Processing received control PDUs.
Chart:
CO_SERVER
State:
CO_SERVER
Description:
Main state for call and association; created by CONNECT_ESTABLISHED event.

The CO_SERVER state is created when a connection to a server is established, using the primary or secondary address for an association group.

Chart:
CO_SERVER
State:
DATA
Description:
Processing RPC call data.
Chart:
CO_SERVER
State:
FAULT
Description:
Handles processing faults and sends fault PDU.


Reactions
Trigger Action
en(FAULT) DEALLOC_REQ

Chart:
CO_SERVER
State:
INDICATION
Description:
Handles incoming RPC request fragments.


Reactions
Trigger Action
en(INDICATION) [not LAST_IN_FRAG] DO_IN_PKT; st!(HANDLE_IN_FRAG)
en(INDICATION) [LAST_IN_FRAG] DO_IN_PKT; st!(HANDLE_IN_FRAG); RCV_LAST_IN_FRAG
RECEIVE_PDU[PDU_TYPE=REQUEST and not VALID_FRAG_SIZE] RCV_FRAG_SIZE_TOO_LARGE
RECEIVE_PDU[PDU_TYPE=REQUEST and VALID_PDU_HEADER and not AUTH] DO_REQ; RCV_FRAG_PDU
RECEIVE_PDU[PDU_TYPE=REQUEST and VALID_PDU_HEADER and AUTH] DO_REQ; RCV_FRAG_PDU_A

Chart:
CO_SERVER
State:
INIT
Description:
Initial RPC call state. Waits for request from client.


Reactions
Trigger Action
en(INIT) fs!(MAYBE); fs!(LAST_IN_FRAG); SND_CANCEL_COUNT:=0; fs!(SND_PENDING_CANCEL)
RECEIVE_PDU[PDU_TYPE=REQUEST and not VALID_FRAG_SIZE] RCV_FRAG_SIZE_TOO_LARGE
tm(en(INIT), TIMEOUT_SERVER_DISCONNECT) SND_REPLY_TYPE:=SHUTDOWN; st!(SEND_PKT)
exiting IF PDU_MAYBE THEN tr!(MAYBE) END IF
exiting IF PDU_PENDING_CANCEL THEN tr!(SND_PENDING_CANCEL) END IF
exiting SETUP_CALL

Chart:
CO_SERVER
State:
PROCESS_REQ
Description:
Promotes completely received request to manager routine


Reactions
Trigger Action
entering RT_OUT_PARAMS:=NULL

Chart:
CO_SERVER
State:
REPLIED
Description:
Terminal state for calls.


Reactions
Trigger Action
en(REPLIED) DEALLOC_REQ

Chart:
CO_SERVER
State:
REPLYING
Description:
Handles fragmented reply to client.


Reactions
Trigger Action
en(REPLYING) fs!(SND_FIRST_FRAG)

Chart:
CO_SERVER
State:
WORKING
Description:
Main working state for call instance.

CO_SERVER Events

The CO_SERVER statechart defines the following events:

Chart:
CO_SERVER
Event:
ABORT_ASSOC_REQ
Description:
Abrupt termination of the association requested. Generated externally.
Chart:
CO_SERVER
Event:
ABORT_CONNECTION
Description:
Signal transport to abort connection. Generated internally.
Chart:
CO_SERVER
Event:
ACCEPT_BIND
Description:
Generated by the ACCEPT_ASSOC_POLICY activity.

The local policy permits establishment of the requested association. The mechanism for deciding whether to accept or reject a bind request is implementation and policy-dependent.

Chart:
CO_SERVER
Event:
ADD_ALTER_CONTEXT
Description:
Update the set of presentation contexts for this association.

Select the set of matching presentations contexts based on the received presentation context list (p_context_elem field) of the alter_context PDU and the contexts supported by the server. Generate the structure p_result_list to be sent to the client in the alter_context_response PDU.

Chart:
CO_SERVER
Event:
ADD_PRES_CONTEXT
Description:
Update the presentation context set for this association.

Select the set of matching presentations contexts based on the received presentation context list (p_context_elem field) of the bind PDU and the contexts supported by the server. Generate the structure p_result_list to be sent to the client in the bind_ack PDU.

Chart:
CO_SERVER
Event:
ADD_TO_GROUP
Description:
Signal group to add this association.

To avoid race conditions, the ASSOCIATION must lock the group before issuing this event and unlock the group only after the event has been processed by the group machine instance.

Event is generated by CO_SERVER and sensed by CO_SERVER_GROUP.

Chart:
CO_SERVER
Event:
ASSOC_ACCEPT
Description:
The server accepted the association.
Definition:
ACCEPT_BIND[GROUP_EXISTS] or
[GROUP_EXISTS and WAIT_FOR_GROUP]

Chart:
CO_SERVER
Event:
ASSOC_REJECT
Description:
Generated by the ACCEPT_ASSOC_POLICY activity.

The local policy rejected the request for a new association. The mechanism for deciding whether to accept or reject a bind request is implementation and policy-dependent.

Chart:
CO_SERVER
Event:
AUTHENTICATED
Description:
Authentication processing completed successfully.
Chart:
CO_SERVER
Event:
CANCEL_CALL
Description:
Generate local cancel request for the call currently using the association.
Chart:
CO_SERVER
Event:
CLOSE
Description:
Compound events to terminate association.
Definition:
NO_CONNECTION or ABORT_ASSOC_REQ
Chart:
CO_SERVER
Event:
COMPLETE
Description:
RPC call completed (with success or fault).
Definition:
DEALLOC_REQ or DENIED[not ORPHANED_PDU] or
[AUTH and TICKET_EXP] or
RCV_FRAG_SIZE_TOO_LARGE

Chart:
CO_SERVER
Event:
CONNECT_ESTABLISHED
Description:
A connection to server has been established. Generated externally by transport.

The address used to establish the connection may be either the primary or, if one exists, secondary address for the server.

Chart:
CO_SERVER
Event:
DEALLOC_REQ
Description:
Call completed or failed. Service provider requests the deallocation of assoc.
Chart:
CO_SERVER
Event:
DENIED
Description:
Authentication failure detected.

The VERIFY_AUTH activity generates this event if either the integrity check failed or the requested protection level for authentication services does not match (not for bind or alter_context PDUs).

Chart:
CO_SERVER
Event:
LAST_OUT_PKT
Description:
Statechart internal event: last fragment of fragmented response.
Definition:
[TRANSMIT_RESP and LAST_OUT_FRAG]
Chart:
CO_SERVER
Event:
MARK_ASSOC
Description:
Mark association with termination status and related information.
Chart:
CO_SERVER
Event:
NEXT_OUT_PKT
Description:
Statechart internal event: intermediate fragment of fragmented response.
Definition:
[TRANSMIT_RESP and not LAST_OUT_FRAG]
Chart:
CO_SERVER
Event:
NO_CONNECTION
Description:
Notification that the underlying connection terminated. Generated externally.
Chart:
CO_SERVER
Event:
PROCESSING_FAULT
Description:
Execution of procedure failed. Returned from called procedure (stub).
Chart:
CO_SERVER
Event:
PROCESSING_FDNE
Description:
Stub (manager routine) or run-time system rejected RPC request.

The call did not execute.

Chart:
CO_SERVER
Event:
PROC_FAULT
Description:
Execution of call failed.
Definition:
PROCESSING_FAULT or PROCESSING_FDNE
Chart:
CO_SERVER
Event:
PROC_RESPONSE
Description:
Call returned from called procedure (server manager routine).

This event indicates that the called application procedure is ready to respond to the RPC request and has provided out parameter data in the RT_OUT_PARAMS queue. The processing of the application procedure may not have been completed and more out parameter data may to be queued (sensed by the TRANSMIT_RESP and LAST_OUT_FRAG condition flags).

Chart:
CO_SERVER
Event:
RCV_ALTER_CONTEXT
Description:
Received valid alter_context PDU. Generated in CNTL_CALL action.
Chart:
CO_SERVER
Event:
RCV_BIND
Description:
Received valid bind PDU on this association's transport connection.

Generated in CNTL_CALL action.

Chart:
CO_SERVER
Event:
RCV_CAN_PDU
Description:
Received cancel PDU with valid header.
Definition:
RECEIVE_PDU[PDU_TYPE=CANCEL and
VALID_PDU_HEADER and in(DATA) and not
in(REPLYING) and not in(REPLIED)]

Chart:
CO_SERVER
Event:
RCV_CNTL_FRAG_PDU
Description:
Receive incoming control PDU fragment.
Chart:
CO_SERVER
Event:
RCV_CNTL_PDU
Description:
Received one of the control PDUs with valid header.
Chart:
CO_SERVER
Event:
RCV_FRAG_PDU
Description:
Received PDU for non-authenticated fragmented requests with valid header.
Chart:
CO_SERVER
Event:
RCV_FRAG_PDU_A
Description:
Received PDU for authenticated fragmented request with valid header.
Chart:
CO_SERVER
Event:
RCV_FRAG_SIZE_TOO_LARGE
Description:
The received PDU exceeded the maximum allowed fragment size.
Chart:
CO_SERVER
Event:
RCV_LAST_IN_FRAG
Description:
Received last fragment request PDU. Signal completion to stub.

The last fragment of a multi-fragmented request or a single packet request was received. RCV_LAST_IN_FRAG signals that the complete request data is available to the stub for unmarshalling, and it transfers the control from the run-time system to the stub for processing the RPC request.

Chart:
CO_SERVER
Event:
RCV_REQ_PDU
Description:
Received request PDU (first packet for fragmented requests) with valid header.
Definition:
RECEIVE_PDU[PDU_TYPE=REQUEST and
in(ASSOC_OPEN) and PDU_FIRST_FRAG and
VALID_VERSION]

Chart:
CO_SERVER
Event:
RECEIVE_PDU
Description:
Received a PDU from client.
Chart:
CO_SERVER
Event:
REMOVE_FROM_GROUP
Description:
Signal association group to remove this association.

To avoid race conditions, the ASSOCIATION must lock the group before issuing this event and unlock the group only after the event has been processed by the group machine instance.

Event is generated by CO_SERVER and sensed by CO_SERVER_GROUP.

Chart:
CO_SERVER
Event:
RESOURCES_SCARCE
Description:
Request to reclaim resources. Externally generated.

Resource management is implementation-specific. This event is generated by the implementation resource management policy when it is necessary to reclaim idle associations. It is recommended that at least one idle association per client-server pair be maintained for better performance. This may be tuned for different style applications.

Chart:
CO_SERVER
Event:
SEND_RESPONSE
Description:
Called procedure provided out parameters to be sent.
Definition:
PROC_RESPONSE[not MAYBE]

CO_SERVER Actions

The CO_SERVER statechart defines the following actions:

Chart:
CO_SERVER
Action:
CLEAN_UP
Description:
Termination actions.
Definition:
MARK_ASSOC;
IF
in(ASSOC_OPEN)
THEN
REMOVE_FROM_GROUP;
CANCEL_CALL
END IF;
WHEN
ABORT_ASSOC_REQ
THEN
ABORT_CONNECTION
END WHEN

Chart:
CO_SERVER
Action:
CNTL_CALL
Description:
Reactions on received control PDUs. Generate respective RCV_* events.
Definition:
IF
ORPHANED_PDU
THEN
st!(STOP_ORPHAN);
DEALLOC_REQ
END IF;
IF
BIND_PDU
THEN
RCV_BIND
END IF;
IF
ALTER_CONTEXT_PDU
THEN
RCV_ALTER_CONTEXT
END IF

Chart:
CO_SERVER
Action:
DO_ALTER_CONTEXT_RESP
Description:
Process the alter context negotiation request and send response back.

Note that the activities ADD_ALTER_CONTEXT and SEND_PKT must be synchronised to assure that the alter_context_resp PDU contains the negotiated context.

Definition:
RT_CLIENT_PRES_CONTEXT_LIST:=PDU_P_CONT_LIST;
RT_IF_ID:=PDU_IF_ID;
RT_IF_VERSION:=PDU_IF_VERSION;
IF
PDU_AUTH_SPEC=0
THEN
fs!(AUTH)
ELSE
tr!(AUTH)
END IF
ADD_ALTER_CONTEXT;
SND_REPLY_TYPE:=ALTER_CONTEXT_RESP;
st!(SEND_PKT)

Chart:
CO_SERVER
Action:
DO_BIND_ACK
Description:
Signal CO_SERVER_GROUP to add group and send a bind_ack PDU.
Definition:
RT_IF_ID:=PDU_IF_ID;
RT_IF_VERSION:=PDU_IF_VERSION;
IF
PDU_AUTH_SPEC=0
THEN
fs!(AUTH)
ELSE
tr!(AUTH)
END IF
IF
PDU_MAX_XMIT_FRAG_SIZE>RT_MAX_RCV_FRAG_SIZE
or PDU_MAX_XMIT_FRAG_SIZE=0 and
RT_MAX_RCV_FRAG_SIZE<CONST_MUST_RCV_FRAG_SIZE
THEN
SND_MAX_RCV_FRAG_SIZE:=RT_MAX_RCV_FRAG_SIZE
ELSE
IF
PDU_MAX_XMIT_FRAG_SIZE=0
THEN
SND_MAX_RCV_FRAG_SIZE:=CONST_MUST_RCV_FRAG_SIZE
ELSE
SND_MAX_RCV_FRAG_SIZE:=PDU_MAX_XMIT_FRAG_SIZE
END IF
END IF;

IF
PDU_MAX_RCV_FRAG_SIZE>RT_MAX_XMIT_FRAG_SIZE
or PDU_MAX_RCV_FRAG_SIZE=0 and
RT_MAX_XMIT_FRAG_SIZE<CONST_MUST_RCV_FRAG_SIZE
THEN
SND_MAX_XMIT_FRAG_SIZE:=RT_MAX_XMIT_FRAG_SIZE
ELSE
IF
PDU_MAX_RCV_FRAG_SIZE=0
THEN
SND_MAX_XMIT_FRAG_SIZE:=CONST_MUST_RCV_FRAG_SIZE
ELSE
SND_MAX_XMIT_FRAG_SIZE:=PDU_MAX_RCV_FRAG_SIZE
END IF
END IF;
SND_GROUP_FIELD:=RT_GROUP_ID;
SND_SEC_ADDR:=RT_SECONDARY_ADDRESS;
RT_CLIENT_PRES_CONTEXT_LIST:=PDU_P_CONT_LIST;
ADD_TO_GROUP;
ADD_PRES_CONTEXT;
SND_REPLY_TYPE:=BIND_ACK;
st!(SEND_PKT)

Chart:
CO_SERVER
Action:
DO_CNTL_RESP
Description:
Append received header fragment to buffer. Check for last fragment flag.
Definition:
RT_HEADER:=RT_HEADER+PDU_HEADER;
IF
PDU_LAST_FRAG
THEN
tr!(LAST_IN_FRAG);
END IF;

Chart:
CO_SERVER
Action:
DO_IN_PDU_FRAG
Description:
Assemble incoming PDU header packets.
Chart:
CO_SERVER
Action:
DO_IN_PKT
Description:
Append received request PDU body bgcolor="#FFFFFF" data to internal buffer.
Definition:
RT_IN_PARAMS:=RT_IN_PARAMS+RT_BODY
Chart:
CO_SERVER
Action:
DO_REPLY
Description:
Send last out frag to requesting client.
Definition:
fs!(TRANSMIT_RESP);
IF
LAST_OUT_FRAG
THEN
tr!(SND_LAST_FRAG)
ELSE
fs!(SND_LAST_FRAG)
END IF;
SND_OUT_PARAMS:=RT_OUT_FRAG;
SND_REPLY_TYPE:=RESPONSE;
st!(SEND_PKT)

Chart:
CO_SERVER
Action:
DO_REQ
Description:
Evaluate request PDU header and signal allocation request.
Definition:
RT_PRES_CONTEXT_ID:=PDU_P_CONT_ID;
RT_BODY:=PDU_BODY;
IF
PDU_AUTH_SPEC/=0
THEN
RT_AUTH_VERIFIER_CALL:=PDU_AUTH_VERIFIER;
RT_AUTH_LENGTH_CALL:=PDU_AUTH_SPEC
END IF;
IF
PDU_LAST_FRAG
THEN
tr!(LAST_IN_FRAG)
END IF

Chart:
CO_SERVER
Action:
ERROR
Description:
Determine the type of failure.
Definition:
WHEN
PROCESSING_FDNE
THEN
tr!(SND_DID_NOT_EXECUTE)
ELSE
fs!(SND_DID_NOT_EXECUTE)
END WHEN;
FAULT_CALL

Chart:
CO_SERVER
Action:
FAULT_CALL
Description:
Send fault PDU.
Definition:
IF
not MAYBE
THEN
SND_REPLY_TYPE:=FAULT;
st!(SEND_PKT)
END IF;
IF
in(PROCESS_REQ) or in(REPLYING) or
in(REPLIED)
THEN
st!(ABORT_SEND)
ELSE
st!(ABORT_RECEIVE)
END IF

Chart:
CO_SERVER
Action:
FINAL
Description:
Perform final actions for RPC call.
Definition:
WHEN
DENIED[not BIND_PDU and not
ALTER_CONTEXT_PDU]
THEN
SND_OUT_PARAMS:=CONST_NCA_S_INVALID_CHKSUM;
FAULT_CALL;
DEALLOC_REQ
END WHEN;
WHEN
RCV_FRAG_SIZE_TOO_LARGE
THEN
SND_OUT_PARAMS:=CONST_NCA_S_PROTO_ERROR;
FAULT_CALL;
DEALLOC_REQ
END WHEN

Chart:
CO_SERVER
Action:
FIRST_REPLY
Description:
Initialise and send first response PDU.
Definition:
fs!(TRANSMIT_RESP);
IF
LAST_OUT_FRAG
THEN
tr!(SND_LAST_FRAG)
ELSE
fs!(SND_LAST_FRAG)
END IF;
tr!(SND_FIRST_FRAG);
SND_PRES_CONTEXT_ID:=RT_PRES_CONTEXT_ID;
SND_CALL_ID:=RT_CALL_ID;
RT_OUT_FRAG:=RT_OUT_PARAMS;
SND_OUT_PARAMS:=RT_OUT_PARAMS;
SND_REPLY_TYPE:=RESPONSE;
st!(SEND_PKT)

Chart:
CO_SERVER
Action:
PROCESS_CAN
Description:
Process cancel request (signal manager routine).
Definition:
SND_CANCEL_COUNT:=SND_CANCEL_COUNT+1;
st!(CANCEL_NOTIFY_APP)

Chart:
CO_SERVER
Action:
SETUP_CALL
Description:
Set up call data at first call's request PDU.
Definition:
RT_CALL_ID:=PDU_CALL_ID;
IF
PDU_OBJ_UUID
THEN
RT_OBJ_ID:=PDU_OBJ_ID
ELSE
RT_OBJ_ID:=NULL
ENDIF;
RT_OP_NUM:=PDU_OP_NUM

CO_SERVER Conditions

The CO_SERVER statechart defines the following conditions:

Chart:
CO_SERVER
Condition:
ALTER_CONTEXT_PDU
Description:
Statechart internal flag: received PDU type alter_context.
Chart:
CO_SERVER
Condition:
AUTH
Description:
Statechart internal flag: false if PDU field auth_length = 0; true otherwise.
Chart:
CO_SERVER
Condition:
BIND_PDU
Description:
Statechart internal flag: received PDU type bind.
Chart:
CO_SERVER
Condition:
CNTL_PDU
Description:
Statechart internal flag: to be received control PDUs.
Definition:
PDU_TYPE=ORPHANED or PDU_TYPE=BIND or
PDU_TYPE=ALTER_CONTEXT

Chart:
CO_SERVER
Condition:
GROUP_EXISTS
Description:
The group exists.
Definition:
in(CO_SERVER_GROUP:CO_SERVER_GROUP)
Chart:
CO_SERVER
Condition:
LAST_IN_FRAG
Description:
Statechart internal flag: last in fragment or non-frag in packet received.
Chart:
CO_SERVER
Condition:
LAST_OUT_FRAG
Description:
Statechart internal flag: last out fragment or non-frag out packet ready to send.

This flag is set by the run-time system if the transmit queue contains the last fragment (see also Connection-oriented Protocol ).

Chart:
CO_SERVER
Condition:
MAYBE
Description:
Statechart internal flag: maybe call.
Chart:
CO_SERVER
Condition:
ORPHANED_PDU
Description:
Statechart internal flag: received PDU type orphaned.
Chart:
CO_SERVER
Condition:
PDU_FIRST_FRAG
Description:
Header flag PFC_FIRST_FRAG.
Chart:
CO_SERVER
Condition:
PDU_LAST_FRAG
Description:
Header flag PFC_LAST_FRAG.
Chart:
CO_SERVER
Condition:
PDU_MAYBE
Description:
Header flag PFC_MAYBE.
Chart:
CO_SERVER
Condition:
PDU_OBJECT_UUID
Description:
Status if optional object field is present in received PDU (header flag PFC_OBJECT_UUID is set).
Chart:
CO_SERVER
Condition:
PDU_PENDING_CANCEL
Description:
Header flag PFC_PENDING_CANCEL in received request PDU.
Chart:
CO_SERVER
Condition:
PDU_VERSION_VALID
Description:
PDU contains valid most recent version.
Definition:
PDU_VERSION_NUMBER=CO_VERSION_NUM_V20
and PDU_VERSION_NUMBER_MINOR=1

Chart:
CO_SERVER
Condition:
RETURN_PENDING_CANCEL
Description:
Cancel pending state returned from stub after processing the cancel request.
Chart:
CO_SERVER
Condition:
SND_DID_NOT_EXECUTE
Description:
Statechart internal flag: send fault PDU with PFC_DID_NOT_EXECUTE header flag set.
Chart:
CO_SERVER
Condition:
SND_FIRST_FRAG
Description:
Statechart internal flag: send first out fragment.
Chart:
CO_SERVER
Condition:
SND_LAST_FRAG
Description:
Statechart internal flag: header flag PFC_LAST_FRAG for PDU to be sent.
Chart:
CO_SERVER
Condition:
SND_PENDING_CANCEL
Description:
Cancel pending state for current call at server.

The cancel pending state is set by the server manager routine via the CANCEL_NOTIFY_APP activity.

Chart:
CO_SERVER
Condition:
TICKET_EXP
Description:
Statechart internal flag: ticket expired.
Definition:
SYS_TIME>GRACE_PERIOD+PDU_EXP_TIME
Chart:
CO_SERVER
Condition:
TRANSMIT_RESP
Description:
One or more fragments queued for transmission of response data.

This flag indicates that one or more response fragment(s) are queued in a run-time internal buffer and ready to be transmitted.

The run-time system internally sets this flag (true) after the stub initially provides data in the transmit queue, sufficient for at least the first PDU fragment to be transmitted. The protocol machine resets this flag if it has detected and taken an event for sending the next fragment in the queue.

The run-time system sets this flag again after completion of a SEND_PKT if the transmit queue contains enough data for the next PDU fragment to be transmitted.

Chart:
CO_SERVER
Condition:
VALID_FRAG_SIZE
Description:
Evaluation whether received PDU exceeds size limit.
Definition:
not PDU_TYPE=BIND and
PDU_FRAG_LENGTH<=RT_MAX_RCV_FRAG_SIZE or
PDU_TYPE=BIND and
PDU_FRAG_LENGTH<=CONST_MUST_RCV_FRAG_SIZE

Chart:
CO_SERVER
Condition:
VALID_PDU_HEADER
Description:
Pre-evaluation of PDU header (before authentication processing).
Definition:

PDU_CALL_ID=RT_CALL_ID and VALID_VERSION
and VALID_FRAG_SIZE

Chart:
CO_SERVER
Condition:
VALID_VERSION
Description:
Evaluation of protocol version.
Definition:
PDU_VERSION_NUM=CO_VERSION_NUM_V20 and
PDU_VERSION_NUM_MINOR<=CO_VERSION_NUM_V20_MINOR

Chart:
CO_SERVER
Condition:
WAIT_FOR_GROUP
Description:
Association waits for group creation before opening.

CO_SERVER Data-Items

The CO_SERVER statechart defines the following data items:

Chart:
CO_SERVER
Data Item:
ALTER_CONTEXT
Description:
Constant: PDU type alter_context.
Definition:
14
Chart:
CO_SERVER
Data Item:
ALTER_CONTEXT_RESP
Description:
Constant: PDU type alter_context_resp.
Definition:
15
Chart:
CO_SERVER
Data Item:
BIND
Description:
Constant: PDU type bind.
Definition:
11
Chart:
CO_SERVER
Data Item:
BIND_ACK
Description:
Constant: PDU type bind_ack.
Definition:
12
Chart:
CO_SERVER
Data Item:
BIND_NAK
Description:
Constant: PDU type bind_nak.
Definition:
13
Chart:
CO_SERVER
Data Item:
CANCEL
Description:
Constant: PDU type cancel.
Definition:
18
Chart:
CO_SERVER
Data Item:
CONST_MUST_RCV_FRAG_SIZE
Description:
Constant: MustRecvFragSize value, indicating the lower bound of the fragment size.
Definition:
1432
Chart:
CO_SERVER
Data Item:
CONST_NCA_S_INVALID_CHKSUM
Description:
Constant: reject status code nca_s_invalid_chksum.
Chart:
CO_SERVER
Data Item:
CONST_NCA_S_PROTO_ERROR
Description:
Constant: reject status code nca_s_proto_error.
Chart:
CO_SERVER
Data Item:
CONST_REASON_INVALID_CHECKSUM
Description:
The value indicating a security integrity failure.

This value is the invalid_checksum member of the enumerated type p_reject_reason_t (see RPC PDU Encodings ). This is transmitted in the provider_reject_reason field of the bind_nak PDU.

Chart:
CO_SERVER
Data Item:
CONST_SUB_TYPE_INVALID_CHECKSUM
Description:
Value indicating a security integrity failure (invalid checksum).

The value dce_c_cn_dce_sub_type_invalid_checksum, which is encoded in the sub_type field of the auth_value member of the authentication verifier. (See Security .)

Definition:
2
Chart:
CO_SERVER
Data Item:
CO_VERSION_NUM_V20
Description:
Constant: RPC protocol version 2.0 major version number.
Definition:
5
Chart:
CO_SERVER
Data Item:
CO_VERSION_NUM_V20_MINOR
Description:
Constant: RPC protocol minor version number.
Chart:
CO_SERVER
Data Item:
FAULT
Description:
Constant: PDU type fault.
Definition:
3
Chart:
CO_SERVER
Data Item:
GRACE_PERIOD
Description:
Grace period on server after ticket expiration (implementation-specific).
Chart:
CO_SERVER
Data Item:
ORPHANED
Description:
Constant: PDU type orphaned.
Definition:
19
Chart:
CO_SERVER
Data Item:
PDU_ASSOC_GROUP_ID
Description:
The assoc_group_id field from the received bind PDU.
Chart:
CO_SERVER
Data Item:
PDU_AUTH_SPEC
Description:
PDU header field auth_length.
Chart:
CO_SERVER
Data Item:
PDU_AUTH_VERIFIER
Description:
PDU trailer: authentication verifier (authentication protocol-specific).
Chart:
CO_SERVER
Data Item:
PDU_BODY
Description:
Array of PDU body bgcolor="#FFFFFF" data.
Chart:
CO_SERVER
Data Item:
PDU_CALL_ID
Description:
PDU header field call_id.
Chart:
CO_SERVER
Data Item:
PDU_EXP_TIME
Description:
Ticket expiration time transmitted in the authentication verifier.
Chart:
CO_SERVER
Data Item:
PDU_FRAG_LENGTH
Description:
PDU header field frag_length.
Chart:
CO_SERVER
Data Item:
PDU_HEADER
Description:
Array of buffered PDU header data.
Chart:
CO_SERVER
Data Item:
PDU_IF_ID
Description:
PDU header field: interface identifier, encoded in the p_context_elem field of bind and alter_context PDUs.
Chart:
CO_SERVER
Data Item:
PDU_IF_VERSION
Description:
PDU header field: interface version, encoded in the p_context_elem field of bind and alter_context PDUs.
Chart:
CO_SERVER
Data Item:
PDU_MAX_RCV_FRAG_SIZE
Description:
PDU header field max_recv_frag.
Chart:
CO_SERVER
Data Item:
PDU_MAX_XMIT_FRAG_SIZE
Description:
PDU header field max_xmit_frag.
Chart:
CO_SERVER
Data Item:
PDU_OBJ_ID
Description:
PDU header field object.
Chart:
CO_SERVER
Data Item:
PDU_OP_NUM
Description:
PDU header field opnum.
Chart:
CO_SERVER
Data Item:
PDU_P_CONT_ID
Description:
PDU header field p_cont_id.
Chart:
CO_SERVER
Data Item:
PDU_P_CONT_LIST
Description:
PDU header field p_cont_elem in bind and alter_context PDUs.
Chart:
CO_SERVER
Data Item:
PDU_TYPE
Description:
PDU header field PTYPE.
Chart:
CO_SERVER
Data Item:
PDU_VERSION_NUM
Description:
PDU header field rpc_vers.
Chart:
CO_SERVER
Data Item:
PDU_VERSION_NUM_MINOR
Description:
PDU header field rpc_vers_minor.
Chart:
CO_SERVER
Data Item:
REQUEST
Description:
Constant: PDU type request.
Definition:
0
Chart:
CO_SERVER
Data Item:
RESPONSE
Description:
Constant: PDU type response.
Definition:
2
Chart:
CO_SERVER
Data Item:
RT_AUTH_LENGTH_CALL
Description:
Statechart internal: auth_length field received in CALL state.
Chart:
CO_SERVER
Data Item:
RT_AUTH_LENGTH_CAN
Description:
Statechart internal: auth_length field received in CANCEL state.
Chart:
CO_SERVER
Data Item:
RT_AUTH_LENGTH_CNTL
Description:
Statechart internal: auth_length field received in CONTROL state.
Chart:
CO_SERVER
Data Item:
RT_AUTH_VERIFIER_CALL
Description:
Received authentication trailer (verifier) for request PDU.
Chart:
CO_SERVER
Data Item:
RT_AUTH_VERIFIER_CAN
Description:
Received authentication trailer (verifier) for cancel PDU.
Chart:
CO_SERVER
Data Item:
RT_AUTH_VERIFIER_CNTL
Description:
Received authentication trailer (verifier) for control PDU.
Chart:
CO_SERVER
Data Item:
RT_BODY
Description:
Statechart internal: temporarily buffered request PDU body bgcolor="#FFFFFF" data.
Chart:
CO_SERVER
Data Item:
RT_CALL_ID
Description:
Statechart internal: call identifier of current RPC call.
Chart:
CO_SERVER
Data Item:
RT_CLIENT_PRES_CONTEXT_LIST
Description:
Statechart internal: presentation context as represented by the client.
Chart:
CO_SERVER
Data Item:
RT_GROUP_ID
Description:
The identifier of the association group of which this association is a member.
Chart:
CO_SERVER
Data Item:
RT_HEADER
Description:
Statechart internal: temporarily buffered PDU header data.
Chart:
CO_SERVER
Data Item:
RT_IF_ID
Description:
Statechart internal: received interface UUID.
Chart:
CO_SERVER
Data Item:
RT_IF_VERSION
Description:
Statechart internal: received interface version number.
Chart:
CO_SERVER
Data Item:
RT_IN_PARAMS
Description:
Statechart internal: buffered array of reassembled input data.
Chart:
CO_SERVER
Data Item:
RT_MAX_RCV_FRAG_SIZE
Description:
Maximum size of a fragment the receiver is able to handle.

The minimum value of this fragment size is determined by the architected value MustRcvFragSize (refer to RPC PDU Encodings ).

Implementations may support larger fragment sizes that are subject to negotiation with the client. This value is set internally by run-time implementations.

Chart:
CO_SERVER
Data Item:
RT_MAX_XMIT_FRAG_SIZE
Description:
Maximum size of a fragment the sender is able to handle.

The minimum value of this fragment size is determined by the architected value MustRcvFragSize (refer to RPC PDU Encodings ).

Implementations may support larger fragment sizes that are subject to negotiation with the client. This value is set internally by run-time implementations.

Chart:
CO_SERVER
Data Item:
RT_OBJ_ID
Description:
Statechart internal: buffered object UUID of RPC call.
Chart:
CO_SERVER
Data Item:
RT_OP_NUM
Description:
Statechart internal: buffered operation number of RPC call.
Chart:
CO_SERVER
Data Item:
RT_OUT_FRAG
Description:
Statechart internal pointer to data to be sent in next response PDU.

The SEND_PKT activity increments this pointer after a response PDU is sent.

Chart:
CO_SERVER
Data Item:
RT_OUT_PARAMS
Description:
Buffered array of unfragmented output data.

RT_OUT_PARAMS is the queue of transmit data provided by the stub. A possible segmentation of this queue is not equivalent to the sizes of PDU fragments sent by the run-time system (SEND_PKT) activity.

The RT_OUT_FRAG variable is a pointer data type that points to the to be transmitted data fragment within this RT_IN_PARAMS queue.

Chart:
CO_SERVER
Data Item:
RT_PRES_CONTEXT_ID
Description:
Statechart internal: presentation context identifier of current call.
Chart:
CO_SERVER
Data Item:
RT_REJECT_REASON
Description:
The reason the bind request was rejected.

The RPC run-time system sets this value according to the detected error (see also the p_reject_reason_t type definition in RPC PDU Encodings ).

Chart:
CO_SERVER
Data Item:
RT_SECONDARY_ADDRESS
Description:
Secondary address for this server.
Chart:
CO_SERVER
Data Item:
SHUTDOWN
Description:
Constant: PDU type shutdown.
Definition:
17
Chart:
CO_SERVER
Data Item:
SND_AUTH_VALUE_SUB_TYPE
Description:
The value of the sub_type field of the auth_value member of the authentication verifier sent in an alter_context_resp PDU. (See Security .)
Chart:
CO_SERVER
Data Item:
SND_CALL_ID
Description:
Call identifier to be sent.
Chart:
CO_SERVER
Data Item:
SND_CANCEL_COUNT
Description:
Counter of received cancel requests for current call.
Chart:
CO_SERVER
Data Item:
SND_GROUP_FIELD
Description:
The assoc_group_id field of a bind_ack PDU.
Chart:
CO_SERVER
Data Item:
SND_MAX_RCV_FRAG_SIZE
Description:
max_recv_frag header value to be sent.
Chart:
CO_SERVER
Data Item:
SND_MAX_XMIT_FRAG_SIZE
Description:
max_xmit_frag header field to be sent.
Chart:
CO_SERVER
Data Item:
SND_OUT_PARAMS
Description:
PDU body bgcolor="#FFFFFF" data promoted to SEND_PKT activity.
Chart:
CO_SERVER
Data Item:
SND_PRES_CONTEXT_ID
Description:
Presentation context identifier to be sent.
Chart:
CO_SERVER
Data Item:
SND_REJECT_REASON
Description:
The value sent for the reject reason in a bind_nak PDU.
Chart:
CO_SERVER
Data Item:
SND_REPLY_TYPE
Description:
PDU type to be sent.
Chart:
CO_SERVER
Data Item:
SND_SEC_ADDR
Description:
The sec_addr field of a bind_ack PDU to be sent.
Chart:
CO_SERVER
Data Item:
SYS_TIME
Description:
Secure reference time of local system.
Chart:
CO_SERVER
Data Item:
TIMEOUT_SERVER_DISCONNECT
Description:
Timeout value: DefaultServerDisconnectTimer.

CO_SERVER_GROUP Machine

CO_SERVER_GROUP Statechart shows the CO_SERVER_GROUP machine statechart. Figure: CO_SERVER_GROUP Statechart

CO_SERVER_GROUP States

The CO_SERVER_GROUP statechart defines the following states:

Chart:
CO_SERVER_GROUP
State:
CALL_WAIT
Description:
Wait for calls to complete before running down context handles.

Allows the server an opportunity to complete before attempting context rundown.



Reactions
Trigger Action
exiting IF ACTIVE_CONTEXT_COUNT>0 THEN RUNDOWN_CONTEXT_HANDLES END IF
CONTEXT_ACTIVE@T{ ACTIVE_CONTEXT_COUNT:= ACTIVE_CONTEXT_COUNT+1  
CONTEXT_INACTIVE ACTIVE_CONTEXT_COUNT:= ACTIVE_CONTEXT_COUNT-1

Chart:
CO_SERVER_GROUP
State:
CO_SERVER_GROUP
Description:
Main state for a server association group. Created by ACCEPT_BIND event.

Note that once the CO_SERVER_GROUP is terminated, the group ID associated with this group is no longer valid. Receipt of a PDU containing a PDU_ASSOC_GROUP_ID which does not match the group ID of any group is a client protocol error.

Chart:
CO_SERVER_GROUP
State:
GROUP_ACTIVE
Description:
Group contains associations not in CLOSED state.


Reactions
Trigger Action
ADD_TO_GROUP ASSOC_COUNT:=ASSOC_COUNT+1
REMOVE_FROM_GROUP[ASSOC_COUNT>1] ASSOC_COUNT:=ASSOC_COUNT-1
CONTEXT_ACTIVE ACTIVE_CONTEXT_COUNT:= ACTIVE_CONTEXT_COUNT+1
CONTEXT_INACTIVE ACTIVE_CONTEXT_COUNT:= ACTIVE_CONTEXT_COUNT-1

CO_SERVER_GROUP Events

The CO_SERVER_GROUP statechart defines the following events:

Chart:
CO_SERVER_GROUP
Event:
ACCEPT_BIND
Description:
Externally generated. Server accepts association. Same as in CO_SERVER.
Chart:
CO_SERVER_GROUP
Event:
ADD_TO_GROUP
Description:
Signal group to add this association.

To avoid race conditions, the ASSOCIATION must lock the group before issuing this event and unlock the group only after the event has been processed by the group machine instance.

Event is generated by CO_SERVER and sensed by CO_SERVER_GROUP.

Chart:
CO_SERVER_GROUP
Event:
CLOSE_GROUP
Description:
Close the group.
Definition:
NO_CALLS[in(CALL_WAIT)] or
REMOVE_FROM_GROUP[ACTIVE_CONTEXT_COUNT=0
and ASSOC_COUNT=1]

Chart:
CO_SERVER_GROUP
Event:
CONTEXT_ACTIVE
Description:
A context handle was activated. Generated by the server stub.

The stub must generate this event for each context handle which makes a transition from inactive to active. To avoid a race condition which could result from multiple simultaneous events, the stub must lock the group before generating the CONTEXT_ACTIVE event and release the lock only after the event has been processed by the group machine.

Chart:
CO_SERVER_GROUP
Event:
CONTEXT_INACTIVE
Description:
Context handle deactivated. Generated by the server stub.

The stub generates this event for each context handle which makes a transition from active to inactive. To avoid a race condition which could result from multiple simultaneous events, the stub must lock the group before generating the CONTEXT_INACTIVE event and release the lock only after the event has been processed by the group machine.

Chart:
CO_SERVER_GROUP
Event:
NO_CALLS
Description:
All calls using this association group have completed. Generated externally.
Chart:
CO_SERVER_GROUP
Event:
REMOVE_FROM_GROUP
Description:
Signal association group to remove this association.

To avoid race conditions, the ASSOCIATION must lock the group before issuing this event and unlock the group only after the event has been processed by the group machine instance.

Event is generated by CO_SERVER and sensed by CO_SERVER_GROUP.

Chart:
CO_SERVER_GROUP
Event:
RUNDOWN_CONTEXT_HANDLES
Description:
Signal stub to rundown all active context handles for this group.

The stub manages context handles and may associate them with rundown routines. An instance of the CO_SERVER_GROUP signals the stub to rundown any active context handles that were associated with this group.

CO_SERVER_GROUP Actions

The CO_SERVER_GROUP statechart defines the following actions:

Chart:
CO_SERVER_GROUP
Action:
INIT_GROUP
Description:
Initialise state for group and generate value for RT_GROUP_ID.
Definition:
ASSOC_COUNT:=0;
ACTIVE_CONTEXT_COUNT:=0

CO_SERVER_GROUP Data-Items

The CO_SERVER_GROUP statechart defines the following data items:

Chart:
CO_SERVER_GROUP
Data Item:
ACTIVE_CONTEXT_COUNT
Description:
Number of active context handles for this group. Internal variable.
Chart:
CO_SERVER_GROUP
Data Item:
ASSOC_COUNT
Description:
Number of associations in group. Internal variable.
Chart:
CO_SERVER_GROUP
Data Item:
PDU_ASSOC_GROUP_ID
Description:
The group id field from the received bind PDU.


Please note that the html version of this specification may contain formatting aberrations. The definitive version is available as an electronic publication on CD-ROM from The Open Group.

Contents Next section Index