As demonstrated, STREAMS provides a mechanism for building multiplexed Stream configurations. However, the criteria by which a multiplexer routes data is driver dependent. For example, the protocol multiplexer might use address information found in a protocol header to determine over which subnetwork data should be routed. You must define its routing criteria.
One routing option available to the multiplexer is to use the muxid value to determine the Stream to which data is routed (remember that each multiplexer link has a muxid). I_LINK passes the muxid value to the driver and returns this value to the user. The driver can therefore specify that the muxid value accompany data routed through it. For example, if a multiplexer routed data from a single upper Stream to one of several lower Streams (as did the IP driver), the multiplexer can require the user to insert the muxid of the desired lower Stream into the first four bytes of each message passed to it. The driver can then match the muxid in each message with the muxid of each lower Stream, and route the data accordingly.