HP OpenVMS Systems Documentation

Content starts here

VMS DECwindows Transport Manual


Previous Contents Index


Chapter 7
Transport Support Macros

This chapter describes the support macros that you can use if you write your own transport-specific component. These routines are provided for your convenience; there is no requirement that you use them, but you must implement similar functions.

The transport support macros are located in the file SYS$LIBRARY:DECW$XPORTMAC.R32.

The transport support macros are listed in Table 7-1.

Table 7-1 Transport Support Macros
Routine Function
XPORT_IN_NOTIFY_SET Requests input notification.
XPORT_IN_NOTIFY_CLEAR Clears a request-for-input notification.
XPORT_IN_NOTIFY_WAIT Initiates a wait-for-input notification.
XPORT_IN_NOTIFY_SEND Sends notice that an input operation has completed.
XPORT_OUT_NOTIFY_SET Sends notice that output notification is required.
XPORT_OUT_NOTIFY_CLEAR Sends notice that output notification is no longer required.
XPORT_OUT_NOTIFY_WAIT Waits for output notification.
XPORT_OUT_NOTIFY_SEND Sends notice that an output operation has completed.
XPORT_XTCB_FILLED Returns the number of data bytes in an XTCB.
XPORT_XTCB_TOTAL Determines the total number of bytes in the data area of an XTCB.
XPORT_XTCB_FREE Determines the number of unused bytes in the data area of an XTCB.
XPORT_WRITE_WAIT Waits for the output work queue to empty.
XPORT_WRITE_UNWAIT Reenables output work queue write operations.
XPORT_ABORT_SEND Declares a user-mode AST to the process indicating that the connection has died.
XPORT_OUT_WRITE_ENABLE Clears the write disable flag.
XPORT_OUT_WRITE_DISABLE Sets the write disable flag.
XPORT_OUT_STATE_SRP Marks a switch to the use of SRPs for output and returns true (1) if an LRP was being used.
XPORT_OUT_STATE_LRP Marks a switch to the use of LRPs for output and returns true (1) if an SRP was being used.
XPORT_IN_STATE_SRP Marks a switch to the use of SRPs for input and returns true (1) if an LRP was being used.
XPORT_IN_STATE_LRP Marks a switch to the use of LRPs for input and returns true (1) if an SRP was being used.
XPORT_IN_FREE_ENABLE Clears the free disable flag for this connection type of queue and returns true (1) if it was clear or false (0) if it was set.
XPORT_IN_FREE_DISABLE Sets the free disable flag for this connection and type of queue and returns true (1) if it was set or false (0) if it was clear.
VALIDATE_XTCC Validates an XTCC and returns the IXTCC.
VALIDATE_USERW Checks user buffer for write access.
VALIDATE_USER Checks user buffer for read access.

XPORT_IN_NOTIFY_SET

Requests input notification.

Format

XPORT_IN_NOTIFY_SET xtcc


Arguments

xtcc


VMS usage: record
type: xtcc
access: modify
mechanism: value

The XTCC of the connection for which input notification is requested.

Description

The XPORT_IN_NOTIFY_SET macro clears the waiting-for-input I/O status block (IOSB) field of the XTCC and sets the XTCC$L_IWQ_FLAG bit to indicate that the transport user wants to be notified when input is delivered to the input work queue.

XPORT_IN_NOTIFY_CLEAR

Clears a request-for-input notification.

Format

XPORT_IN_NOTIFY_CLEAR xtcc


Arguments

xtcc


VMS usage: record
type: xtcc
access: modify
mechanism: reference

The XTCC of the connection for which to cancel input notification.

Description

The XPORT_IN_NOTIFY_CLEAR macro clears the XTCC$L_IWQ_FLAG bit to indicate that the transport user no longer wants to be notified when input is delivered to the input work queue.

XPORT_IN_NOTIFY_WAIT

Initiates a wait-for-input notification

Format

XPORT_IN_NOTIFY_WAIT xtcc, xtpb


Arguments

xtcc


VMS usage: record
type: xtcc
access: modify
mechanism: reference

The XTCC of the connection for which to wait for input notification.

xtpb


VMS usage: record
type: xtpb
access: modify
mechanism: reference

The XTPB of the connection for which to wait for input notification.

Description

The XPORT_IN_NOTIFY_WAIT macro calls the $SYNCH system service to suspend a process until input notification is set. The service is satisfied when the XTPB$W_IN_EFN flag is set and the lower word of the XTCC$W_IN_IOSB is made nonzero, as performed by the XPORT_IN_NOTIFY_SEND macro.

XPORT_IN_NOTIFY_SEND

Sends notice that an input operation has completed.

Format

XPORT_IN_NOTIFY_SEND xtcc, xtpb


Arguments

xtcc


VMS usage: record
type: xtcc
access: modify
mechanism: reference

The XTCC of the connection for which to send input notification.

xtpb


VMS usage: record
type: xtpb
access: modify
mechanism: reference

The XTPB of the connection for which to send input notification.

Description

The XPORT_IN_NOTIFY_SEND macro conditionally performs the operations that inform a process that an input operation has completed. These operations consist of sending a user-mode AST to the process in the case where the XTPB$A_I_NOTIFY_RTNADR field points to a procedure to call for input notification, or of code that completes the $SYNCH system service call performed by the XPORT_IN_NOTIFY_WAIT macro.

XPORT_IN_NOTIFY_SEND sends the AST only if the previous AST (identified by the XTCC$V_IN_AST_IN_PROG field) has been delivered, that is, the field was clear. This prevents EXQUOTA errors due to excessive use of ASTs.


XPORT_OUT_NOTIFY_SET

Sends notice that output notification is required.

Format

XPORT_OUT_NOTIFY_SET xtcc, type


Arguments

xtcc


VMS usage: record
type: xtcc
access: modify
mechanism: reference

The XTCC of the connection for which you want to receive output notification.

type


VMS usage: longword
type: longword
access: read
mechanism: value

The type of output free queue you are interested in. Valid types are DECW$C_XPORT_BUFFER_SRP and DECW$C_XPORT_BUFFER_LRP.

Description

The XPORT_OUT_NOTIFY_SET macro clears the waiting-for-output I/O status block (IOSB) field of the XTCC and sets the XTCC$L_OFSQ_FLAG or XTCC$L_OFLQ_FLAG bit to indicate that you are waiting for the output free queue.

XPORT_OUT_NOTIFY_CLEAR

Sends notice that output notification is no longer required.

Format

XPORT_OUT_NOTIFY_CLEAR xtcc, type


Arguments

xtcc


VMS usage: record
type: xtcc
access: modify
mechanism: reference

The XTCC of the connection for which you want to cancel output notification.

type


VMS usage: longword
type: longword
access: read
mechanism: value

The type of output free queue you are no longer interested in. Valid types are DECW$C_XPORT_BUFFER_SRP and DECW$C_XPORT_BUFFER_LRP.

Description

The XPORT_OUT_NOTIFY_CLEAR macro clears the XTCC$L_OFSQ_FLAG or XTCC$L_OFLQ_FLAG bit to indicate that you do not want to receive output notification. The XPORT_OUT_NOTIFY_CLEAR macro reverses the effect of the XPORT_OUT_NOTIFY_SET macro.

XPORT_OUT_NOTIFY_WAIT

Waits for output notification.

Format

XPORT_OUT_NOTIFY_WAIT xtcc, xtpb


Arguments

xtcc


VMS usage: record
type: xtcc
access: modify
mechanism: reference

The XTCC of the connection for which you want to wait for output notification.

xtpb


VMS usage: record
type: xtpb
access: modify
mechanism: reference

The XTPB of the connection for which you want to wait for output notification.

Description

The XPORT_IN_NOTIFY_WAIT macro calls the $SYNCH system service to suspend a process until output notification is set. The service is satisfied when the XTPB$W_ON_EFN flag is set and the lower word of the XTCC$W_ON_IOSB field is made nonzero, as performed by the XPORT_OUT_NOTIFY_SEND macro.

XPORT_OUT_NOTIFY_SEND

Sends notice that an output operation has completed.

Format

XPORT_OUT_NOTIFY_SEND xtcc, xtpb, type


Arguments

xtcc


VMS usage: record
type: xtcc
access: modify
mechanism: reference

The XTCC of the connection for which you want to send output notification.

xtpb


VMS usage: record
type: xtpb
access: modify
mechanism: reference

The XTPB of the connection for which you want to send output notification.

type


VMS usage: longword
type: longword
access: read
mechanism: value

The type of output free queue you are interested in. Valid types are DECW$C_XPORT_BUFFER_SRP and DECW$C_XPORT_BUFFER_LRP.

Description

The XPORT_OUT_NOTIFY_SEND macro conditionally performs the operations that inform a process that an output operation has completed. These operations consist of sending a user-mode AST to the process in the case where the XTPB$A_O_NOTIFY_RTNADR field points to a procedure to call for output notification, or of code that completes the $SYNCH system service call performed by the XPORT_OUT_NOTIFY_WAIT macro.

XPORT_XTCB_FILLED

Returns the number of data bytes in an XTCB.

Format

XPORT_XTCB_FILLED xtcb


Arguments

xtcb


VMS usage: record
type: xtcb
access: modify
mechanism: reference

The XTCB for which you want to return the number of data bytes in an XTCB.

Description

The XPORT_XTCB_FILLED macro returns the number of data bytes in an XTCB.

XPORT_XTCB_TOTAL

Determines the total number of bytes in the data area of an XTCB.

Format

XPORT_XTCB_TOTAL xtcb


Arguments

xtcb


VMS usage: record
type: xtcb
access: modify
mechanism: reference

The XTCB for which you want to determine the total number of bytes in the data area of an XTCB.

Description

The XPORT_XTCB_TOTAL macro determines the total number of bytes in the data area of an XTCB.

XPORT_XTCB_FREE

Determines the number of unused bytes in the data area of an XTCB.

Format

XPORT_XTCB_FREE xtcb


Arguments

xtcb


VMS usage: record
type: xtcb
access: modify
mechanism: reference

The XTCB for which you want to determine the number of unused bytes in the data area of an XTCB.

Description

The XPORT_XTCB_FREE macro determines the number of unused bytes in the data area of an XTCB.

XPORT_WRITE_WAIT

Waits for the output work queue to empty.

Format

XPORT_WRITE_WAIT xtcc, xtpb


Arguments

xtcc


VMS usage: record
type: xtcc
access: modify
mechanism: reference

The XTCC for the connection on which you want to wait.

xtpb


VMS usage: record
type: xtpb
access: modify
mechanism: reference

The XTPB for the connection on which you want to wait.

Description

The XPORT_WRITE_WAIT macro performs a $SYNCH system service to wait for the output work queue to empty. XPORT_WRITE_WAIT is similar to XPORT_OUT_NOTIFY_WAIT, but uses the XTCC$W_OW_IOSB field. Also, because there are no equivalents to the XPORT_OUT_NOTIFY_SET and XPORT_OUT_NOTIFY_CLEAR macros, you must manually clear the XTCC$W_OW_IOSB field, or set or clear the XTCC$V_WAIT_ON_WRITE bit.

XPORT_WRITE_UNWAIT

Reenables output work queue write operations.

Format

XPORT_WRITE_UNWAIT xtcc, xtpb


Arguments

xtcc


VMS usage: record
type: xtcc
access: modify
mechanism: reference

The XTCC for which you no longer want to wait.

xtpb


VMS usage: record
type: xtpb
access: modify
mechanism: reference

The XTPB for which you no longer want to wait.

Description

The XPORT_WRITE_UNWAIT macro cancels the wait on the output work queue initiated by XPORT_WRITE_WAIT.

XPORT_ABORT_SEND

Declares a user-mode AST to the process indicating that the connection has aborted.

Format

XPORT_ABORT_SEND xtdb, xtcc


Arguments

xtdb


VMS usage: record
type: xtdb
access: modify
mechanism: reference

The XTDB for which you want to abort the connection.

xtcc


VMS usage: record
type: xtcc
access: modify
mechanism: reference

The XTCC for which you want to abort the connection.

Description

The XPORT_ABORT_SEND macro declares a user-mode AST to the user-provided connection-abort notification routine, identified by the XTDB$A_CONNECT_ABORT field, indicating that the connection has aborted.

If the XTCC$V_MARK_FOR_CLOSE flag is set, XPORT_ABORT_SEND does not declare an AST but calls the routine identified by the XTDB$A_CONNECT_ABORT field.

XPORT_ABORT_SEND is called as part of the abort notification.


XPORT_OUT_WRITE_ENABLE

Clears the write disable flag.

Format

XPORT_OUT_WRITE_ENABLE xtcc


RETURNS

VMS usage: longword
type: longword
access: write
mechanism: value

Returns true (1) if the XTCC$L_OWQ_FLAG field was clear, that is, if write operations were already enabled, or false (0) if it was set.


Arguments

xtcc


VMS usage: record
type: xtcc
access: modify
mechanism: reference

The XTCC for which you want to enable write operations.

Description

The XPORT_OUT_WRITE_ENABLE macro clears the write disable flag for this connection and returns true (1) if it was clear or false (0) if it was set.


Previous Next Contents Index