For a certain application we were trying to use UNIX domain sockets(also
referred to as 'File Namespace sockets')
We have used examples from a.o. the GNU C Library Reference Manual and
other sources.
Running such a 'server' works fine on Digital Unix and ULTRIX.
However running the server on Linux gives the following error
message:
errno = 95
recfrom (server): Operation not supported on transport endpoint
What could cause this error. Or: what does the message actually mean?
Note: Internet Domain sockets work fine on the same Linux box!
Thanks in advance,
Jos Beck
That doesn't mean it's correct. Many programs work fine in one place,
but bugs ``appear'' when they are ported.
>However running the server on Linux gives the following error
>message:
>
>errno = 95
>recfrom (server): Operation not supported on transport endpoint
>
>What could cause this error. Or: what does the message actually mean?
It means you are trying to perform an operation whose semantics don't
apply to the type of socket you are dealing with. For example, calling
listen() or accept() on a SOCK_STREAM socket. Or trying to send/receive OOB
data on AF_UNIX sockets. Read the code in /usr/src/linux/net/unix.
You probably have a bad program---get it checked out on comp.unix.programmer.
Unfortunately, it means datagram Unix domain sockets are not supported
in the Linux
kernel you're using. I'm guessing you're running Linux 1.2.13 and
trying to use
datagram (not stream) sockets (these are things you probably want to
mention next
time you post a question!) Now might not be a bad time to upgrade to
Linux 2.0.x,
where networking code is more fully developed. Or you could just use
Internet
domain sockets with the loopback address as a workaround.
What you can do to be sure is look at the source code itself. Do some
greps for the recvfrom function call and expolore the source code a bit.
You'll see that for send/recv, etc., on datagram Unix domain sockets,
the
calls simply return errno 95.
In 1.2.13, AF_UNIX SOCK_DGRAM sockets weren're yet supported, whereas
AF_UNIX
SOCK_STREAM, AF_INET SOCK_DGRAM, and AF_INET SOCK_STREAM sockets were
supported. Remember, Linux 1.2.13 has been around for some time, and a
major
kernel upgrade is out.
--Paul