Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Networking /
Chapter 5 - AppleTalk Data Stream Protocol (ADSP) / Using ADSP


Creating and Using a Connection Control Block

When you establish an ADSP connection end, you must allocate a nonrelocatable block of memory for (and provide a pointer to) a connection control block (CCB) data structure, which ADSP uses to store state information about the connection end. This memory belongs to ADSP until you explicitly remove the connection end using the dspRemove routine (see "dspRemove" on page 5-62). Only then can you release or reuse the memory that you allocated for the CCB.

Most of the fields of the CCB are for ADSP's internal use. Although you must not alter any of the CCB fields except one, the userFlags field, you may poll them to gain information about the current state of the connection end.

When your connection end receives an unsolicited event, such as an attention message or a forward reset, ADSP's interrupt handler sets a bit corresponding to the event type in the userFlags field and calls your user routine, if you provided one. If you did not provide a user routine, you can test these bits to determine when an unsolicited event occurs on the connection end.

After you read them, you must clear the bits either through your user routine or directly before you handle the event.

The CCB is a record of type TRCCB that must consist of 242 bytes. See "The ADSP Connection Control Block Record" beginning on page 5-35 for a description of the
CCB and the fields that comprise it.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996