User`s guide
3: Programming Using the DLITE Embedded Interface
DC 900-1516D 43
User requests are verified against the
MaxBufs and MaxBufSize DLITE configuration
parameters. Requests exceeding either of these return a buffer allocation error.
Buffers allocated using
dlBufAlloc are allocated with room for the ICP and Protocol
header, and a small DLITE work area prefacing the user’s data area. This area is added
to the user’s request; users do not have to account for these requirements in their buffer
request. DLITE also “tags” each buffer, and verifies the buffer was allocated using
dlBufAlloc before it frees the buffer in dlBufFree. Users can not free a buffer they allo-
cated directly from the system using
dlBufFree. Buffer alignment requirements for com-
munications with the VMS ICP2432 driver are performed by
dlBufAlloc. The buffer
returned is correctly aligned.
Note
The user’s buffer allocation request should be only for the user’s
data; the space required for the ICP and Protocol headers are
“silently” added to the buffer request by
dlBufAlloc. If the applica-
tion is not using the DLITE buffer allocation service, it must
account for the following:
• Sixteen (16) bytes for the protocol header immediately
prefacing the data buffer
• Sixteen (16) bytes for the ICP header immediately prefacing
the protocol header
• Alignment of the buffer address on the correct boundary
dlBufFree
This service has also changed its implementation. In concert with the change in buffer
allocation, a call to
dlBufFree returns the requested buffer to the VMS memory services
(using
free). Where previously the user could use the buffer pointer returned with the
successful
dlBufFree request (the buffer still existed in the TSI buffer pool), now that