Streams Service Interface

Streams Service Interface

Post by Kevin Purce » Wed, 25 Jan 1995 14:52:50

I am starting to get into writing TCP/IP applications using the TCP streams modules
(/dev/tcp) for Solaris 2.x.  I can push the module onto the stream but do not know the
format of the messages (ie service interface) for the the module.  I believe TLI acts
an interface translating your requests into stream control messages.  The header file
<sys/tihdr.h> has what I believe to be the structures for some of the control messages
such as BIND_REQ and DATA_REQ.  The header file is not really clear and I have no idea
if it includes all the control messages.  I have consulted the Streams Programming
Guide from Sun but it makes no mention.  How does one find the control messages format
for modules like (/dev/tcp /dev/ip /dev/udp)?

As I am just starting out, I could be completely off base about the TLI assumption.
Any help or insight would be appreciated.  


1. STREAMS queue returned to stream head during service routine execution

We are seeing something rather strange when running our STREAMS multiplexor
drivers on a Solaris 2.3 dual CPU SPARC 20. What is happening is that
occasionally, I believe after an I_UNLINK, the queue associated w/ a
running lower write service routine will revert back to the stream head
part way thru execution of the service routine.  Needless to say this has
devastating consequences.  What seems to be happening is that there is a
lack of synchronization wrt the running of the lower service routines and
the return of a "borrowed" queue pair. We have never seen this occur on
single CPU SPARC 10s or on a dual CPU SPARC 20 w/ one CPU disabled.

We do not use perimeters (should we?), but instead do mutex locking on a
driver basis. I.e., each driver has a single mutex which is acquired first
thing in each put and service routine. The mutex is released prior to
putnext() and family, and qreply(), and it is reacquired afterwards if
necessary. Just prior to return from the service or put routine, the mutex
is released. You can't get much coarser granularity than that.

Is this a Solaris bug? If so, is there a work-around? If not, what are we
doing incorrectly? Is there a lock of some sort that we should grab prior
to performing processing in the service routine?

Any help gratefully accepted.

Jim Robinson


2. Modem again!! X link 33.6I

3. Transport Layer Interface and Streams Interface

4. ?patch? ac5 + sparc64

5. STREAMS driver per-adaptor read service routine

6. XFree86 Frequently Asked Questions

7. STREAMS module between IP & Network Interface

8. CDE & multiple Front Panels/dtwms ...

9. Streams-pseudo network interface.

10. Everex Stream 60: what interface?

11. Streams interface to Sun HSI cards, Need help

12. interfacing a stream to a file descriptor

13. STREAMS Data Link Interface (Dell SVR4)