# DISP_COMMAND buffer flags

The following table describes which flag needs to be set in the size field in the DISP_COMMAND structure based upon how the buffer pointer is being used:

Buffer pointer used as... | Usage mode of buffer is... | Flag set in size# field is...
--- | --- | ---
Input | Synchronous | none (default)
Input | Asynchronous | CTA_ASYNC_BUF_IN
Output | Synchronous | CTA_VIRTUAL_BUF
Output | Asynchronous | CTA_ASYNC_BUF_OUT

Asynchronous buffers dynamically allocated by either the service interface or by the application cannot be freed until the service manager generates an associated DONE event.

The Natural Access dispatcher provides two functions for setting the asynchronous command buffer flags: dispSetAsyncIn and dispSetAsyncOut. The Natural Access dispatcher clears these buffer flags prior to delivering a DISP_COMMAND structure to a service manager.