next up previous contents
Next: Header Files Up: x-kernel Tutorial Previous: Map Library

Example Protocol

 

This section presents an example protocol---A Simple Protocol (ASP)---that illustrates how the interfaces and support routines described in previous sections are used. ASP is a complete, working protocol that is typically configured on top of IP in an x-kernel protocol graph. Because of its simplicity, ASP does not implement any interesting algorithms; it only serves to illustrate the boilerplate code that is common to all protocols. The next section illustrates some of the more complicated things that protocols do.

ASP supports an unreliable message delivery service, where the two end-points of an ASP channel are identified by a pair of ports. In the x-kernel, a session object implements each end-point of an ASP channel, with each session uniquely identified by the following 4-tuple:

local IP host, remote IP host, local ASP port, remote ASP port

In other words, ASP demultiplexes each incoming message to the appropriate session by using this 4-tuple as a demux key. This is ASP's only significant function---to add a multiplexing/demultiplexing function to the protocols below it.

ASP does very little processing on each message---it only checks the length of the received messages, and truncates the message to the specified length, if necessary. ASP is an unreliable protocol, in the sense that it adds no reliability to the protocols below it; i.e., it does not retransmit lost messages.





Larry Peterson
Wed Feb 21 13:58:06 MST 1996