ArticleslgStudy

computer science

Data Stream Interface

Data Stream Interface is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Data Stream Interface rather than just read about it. In short: The Data Stream Interface (DSI) is a session layer used to carry Apple Filing Protocol traffic over Transmission Control Protocol. Overview When Apple introduced TCP with MacTCP and Open Transport in System 7 in the 1990s, they needed their file sharing protocol (AFP) to run on both TCP and AppleTalk.

Key takeaways

  • Data Stream Interface belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Data Stream Interface to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Data Stream Interface from memory before moving on to harder problems.

Reference excerpt

The Data Stream Interface (DSI) is a session layer used to carry Apple Filing Protocol traffic over Transmission Control Protocol.

Overview When Apple introduced TCP with MacTCP and Open Transport in System 7 in the 1990s, they needed their file sharing protocol (AFP) to run on both TCP and AppleTalk. They introduced AppleTalk Session Protocol (ASP) and DSI for TCP coincidentally with AFP 2.x. DSI is implemented directly into AFP clients such as in Mac OS and afpfs-ng.

Protocol DSI is spoken between a client and an AFP server. All DSI communication contains the following DSI header:

Packet structure

The fields are:

Flags: whether the packet is a request (0x00) or a reply (0x01) Command: one of 7 possible commands (see below) Request ID: a sequential identifier set on the request and copied in the reply Error code/ enclosed data offset: For requests, this is left as 0, except when using the DSIWrite command. For replies, this is an error code. Total data length: the entire length of data after the DSI header Reserved: for future expansion Payload: this is where limited DSI data or more commonly AFP header is placed

Commands There are seven possible commands:

Requests and replies Upon receiving most DSI requests, the client or server sends a reply message. This reply contains:

the flags field set to 0x01 (reply) the command field set to the same value as the request's command field the same request ID sent in the request (used for the client to find the request being acknowledged) totalDataLength set to the payload length (if applicable). where applicable, the data payload itself following the DSI header. (See the individual command for details.) The DSITickle and DSICloseSession commands do not trigger a reply.

Session creation, maintenance and teardown A session is set up by the client sending a DSIOpenSession, which will include the size of the receive buffer the client has for packets (called the request quantum, typically 1024 bytes). The server acknowledges the request and returns the size of its data receive buffer (typically 256k on Mac OS X Leopard). Session closure can be initiated by either side by sending DSICloseSession. The sender does not need to wait for a reply and should immediately close the session after sending the message. Maintaining the connection is done by tickling. DSI provides a mechanism for ensuring that client and server know that the other is still active. Every 30 seconds of inactivity, the server sends a tickle request to the client. Similarly, the client also sends its own tickle. (This is NOT a response packet.) Either the client or server can terminate the DSI session if they fail to hear from the other for 120 seconds. The client may also disconnect if a request is in flight and neither a response nor tickle is received within 60 seconds (in Mac OS X v.10.2 and later).

Getting server information with GetStatus This DSI command encapsulates an FPGetSrvrInfo packet. It is used by a client to get information from a server it isn't logged into. The data elements are organized in the packet with a catalog of indices pointing to structured data. The request to a DSIGetStatus request will cause the server to respond with the following information:

flags for basic server characteristics server name (7-bit ASCII and UTF-8) signature: used to uniquely identify the server for other AFP transactions server type: typically "Macintosh" or "Netatalk" a list of strings describing AFP versions spoken (e.g. "AFP3.2") UAM list: a list of strings describing User Authentication Methods (e.g. "DHX2") a 64x64 pixel icon directory server list DSIGetStatus reply format is identical to AFP's FPGetSrvrInfo and is used for ASPGetStatus.

Error codes The error codes returned are AFP result codes.

Further research DSI is never documented separately, and is sufficiently simple and static that older references are suitable for modern implementations. The concepts of DSI are identical to AppleTalk Session Protocol (ASP), and the overview in Inside AppleTalk, Second Edition can be helpful. The most succinct guide is the "AFP over TCP" chapter of Apple Filing Protocol Programming Guide. A significant source of information in understanding DSI can be found by analyzing communication between AFP clients and servers using a packet sniffer.

Footnotes

References AppleTalk Filing Protocol Version 2.1 and 2.2 [1] Inside AppleTalk Sidhu, Gurharan S.; Andrews, Richard F.; Oppenheimer, Alan B. (May 1990), Inside AppleTalk, Second Edition, Addison-Wesley Publishing Company, Inc., ISBN 0-201-55021-0 Apple Filing Protocol Programming Guide [2] Apple Filing Protocol Reference [3]

Worked examples

Example 1 — a first encounter with Data Stream Interface

Start with the simplest possible case. Write down what Data Stream Interface claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Data Stream Interface before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Data Stream Interface ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Data Stream Interface

In research
Data Stream Interface appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Data Stream Interface in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Data Stream Interface is common in secondary-school and first-year university syllabi. It links to neighbouring topics Apple Inc. software, Network file systems, Network protocols, so understanding it makes those chapters shorter.
In everyday life
Look for Data Stream Interface outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Data Stream Interface” →

How to study Data Stream Interface in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Data Stream Interface means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Data Stream Interface out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Data Stream Interface in simple terms?

The Data Stream Interface (DSI) is a session layer used to carry Apple Filing Protocol traffic over Transmission Control Protocol. Overview When Apple introduced TCP with MacTCP and Open Transport in System 7 in the 1990s, they needed their file sharing protocol (AFP) to run on both TCP and AppleTa…

Why does Data Stream Interface matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Data Stream Interface?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Data Stream Interface.

Tags

  • Apple Inc. software
  • Network file systems
  • Network protocols
  • Session layer protocols

Keep exploring