From: Lars Aronsson (aronsson@lysator.liu.se)
Date: 10/17/92


From: aronsson@lysator.liu.se (Lars Aronsson)
Subject: Re: [Q]: TCP/IP and LPmud
Date: Sun, 18 Oct 1992 03:26:04 GMT

ckub11@zx1.Darkcrystal.Cyberspace (Martin Reising) writes:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^
See, that mail address is useless. This is why I post. I tried
replying by e-mail first, but it bounced of course. One day Germans
will have to make up their minds: should e-mail domains be poetry or
should they be effective addresses for reply mail.

>I currently try to port LPmud (V.3.1.2) to Linux.

Great!

>ioctl: socket FIONBIO: Invalid argument

LPMUD was developed under SunOS, and the SunOS manual pages indicates
that SunOS is more tolerant than needed. FIONBIO is an fcntl
operation.

If the source code says
        ioctl(..., FIONBIO, ...)
then change that to
        fcntl(..., FIONBIO, ...)

This is my best guess. Fcntl(2) is used to control the file
_descriptor_ while ioctl(2) is used to control the underlying I/O unit
(disk file, socket, serial port, etc.). SunOS man page filio(4) says
that fcntl is the _primary_ way to do FIONBIO (set or clear
non-blocking I/O), so possibly SunOS tolerates ioctl() for FIONBIO,
while LINUX might be less tolerant.

On the other hand, if the error message is "invalid argument", that
sounds like the third argument to ioctl() -- the argument to operation
FIONBIO. The argument should be a pointer to an int having value 0
(zero, to clear for non-blocking I/O) or value 1 (one, to set for
non-blocking I/O). No other values are mentioned in SunOS man page
filio(4).