^Z disconnects but the next read seems to return an error instead
of blocking? (Fixed?)

Change readdir operations to use the 1.3 getdents interface.

SIOGIFFLAGS seems to get passed an empty string as the interface name
(ISC ping). What is supposed to be happening?

While SCO ELF and SVR4 ELF shared libraries are more or less interchangable
(at least as far as libc.so.1 is concerned) the syscall mappings are
different. Since the syscall mapping depends on the personality and the
personality is determined from the binary it will be wrong if we mix
and match shared libraries. It may be better to detect personality of
ELF binaries by looking at the program interpreter (i.e. the dynamic
linker) rather than the program itself. This would assume that syscalls
are only made from libraries, never embedded in application code and that
all library interfaces (calls, structures, error codes etc.) are compatible.
N.B. You can't simply use both sets of libraries because both sets want
to be in the same place. One day we might be able to get round this
using a modified version of Eric's emulation libc.so.1?

If a timod putmsg fails we should set an error status on the socket and
return it on future calls for strict compatibility. Currently we recover
from things such as protocol errors rather more than we should.

Getmsg() - when select returns we may not be the first process to wake
up and handle the event. So the recvfrom ought to be non-blocking (not
possible?). If it would block we should go back to the select (unless
the descriptor is in non-blocking mode). (DONE?)

How should we go about returning TLOOK? Currently we are only working
synchronously so it isn't essential yet. It looks like it's all handled
in libnsl_s.

The T_MORE flag on t_snd() and t_rcv() marks message boundaries. Strictly
these should be preserved end-to-end. Possible across sockets?
(X/Open specify that message boundaries shouldn't be relied on with TCP)

Need I_SETSIG ioctl to enable SIGPOLL on available input etc. Note that
a control message counts as input. This should interface with poll() too.

getmsg() returns EINTR if a signal interrupts it but the t_*() functions
don't seem to propogate this back to the application. Presumably they
loop round?

To do an accept() the socket needs to have a listen() done on it. But a
listen() cannot be undone. The problem is that with TLI a TEP is created,
bound and may then be connected or may receive a connection event. There
is no explicit message to determine whether a socket acts as a listener
or a connector. How can we test for pending connections to generate
events? Should we assume that any getmsg() on an idle SOCK_STREAM with
no outstanding control messages is an attempt to get a connection event?
It will probably work with most code even if it isn't strictly correct
I think...
(A T_BIND_REQ contains a CONIND_number that, I think, gives the number
of outstanding connections to allow at once. If it is non-zero we should
do a listen but not otherwise. I think.)

Could we make socksys/TLI a separate module?

The SCO timod doesn't seem to pay much attention to the TI_* command
in an ioctl but uses the T_* primitive in the message block. i.e. if
you have T_BIND_REQ in the message but TI_GETINFO as the ioctl command
timod will do a bind. Currently we use the TI_* by preference. This
needs to change to avoid breaking programs that worked on SCO even
though broken. It shouldn't be _essential_ though as all this is
normally hidden in libnsl_s so should be consistent.

Connects are currently forced synchronous. It wouldn't be too much
to allow them to happen asynchronously but the async confirmation
is supposed to contain the address we connected to and that is only
available from the connection request message. Unless we save it
somewhere or look it up from the socket. Hang on, we have getpeername()
capabilities...

There are slight semantic differences between O_NDELAY and O_NONBLOCK
which cause different behaviour on SCO at least. For instance O_NDELAY
does cause t_connect to work asynchronously but O_NONBLOCK doesn't.
Under Linux O_NDELAY and O_NONBLOCK are the same. This could cause
problems at some point I guess...

Under SCO at least poll and select are different. Poll works on things
that select can be used on but select cannot necessarily work on things
that can be polled. Specifically you can poll a transport end point
but not select on it. Badly written programs could block when they
wouldn't normally.

If we poll or select on a TEP that is a bound but unconnected SOCK_STREAM
we are waiting for incoming connections and should issue a listen() if
we haven't already.
