At 5:11 PM -0700 7/30/03, Mark Berryman wrote:
>Craig A. Berry wrote:

> > Net::Ping won't work because of its dependence on fcntl().  It also depends
>> on the presence of an echo server (port 7), which is not installed by
>> default with HP TCP/IP Services, though it is with Multinet.
>
>Net::Ping is using fcntl() to set and clear blocking mode on a Socket.
>In VMS, as in Windows (and Posix? I'll have to check), this is done with
>FIONBIO - an ioctl call.  In fact, there is a special check in Net::Ping
>to use ioctl() instead of fcntl() for Windows and the values used there
>are the same ones used by VMS.  Unfortunately, when I add VMS to that
>special check I get the message:
>
>ioctl is not implemented at blib/lib/Net/Ping.pm line 324.

I tried the same thing (see earlier patch in the Net::Ping thread).
I got a different error which I no longer remember exactly, but I
took it to mean that ioctl() was there but it didn't know how to do
FIONBIO.  That was with Multinet 4.3 on OpenVMS Alpha 7.1.  Later
versions (particularly of VMS) stand a much better chance of
providing the necessary support, but I don't have an environment
where I can test that.

>I'm testing with Perl v5.6.1.  Is ioctl() normally included in a VMS
>build of 5.8.1?

Yes:

$ perl -e "$x = ioctl(1,2,3) or die $!;"
bad file number at -e line 1.
%RMS-F-IFI, invalid internal file identifier (IFI) value

So it's definitely getting far enough to know "1" is not a valid file
number, which I think means the function is there in Perl if it's
there in the CRTL, or, more likely, it's there if Perl was compiled
and linked on a system that has ioctl() in the CRTL.

But to be able set FIONBIO on a socket, ioctl() in the CRTL needs to
talk to the network stack.  There are newsgroup reports that this
started working on VMS 7.0, and others that it did not work until a
CRTL ECO to VMS 7.1.  As I think I mentioned earlier, I have no idea
whether this can be expected to work with network stacks other than
hp's.  Multinet documentation lists a separate socket_ioctl()
function and makes no reference to interoperability with the standard
function in the CRTL.
-- 
________________________________________
Craig A. Berry
mailto:[EMAIL PROTECTED]

"... getting out of a sonnet is much more
 difficult than getting in."
                 Brad Leithauser

Reply via email to