Matz: Thanks for the speedy reply! <excerpt from "Programming Ruby.chm"> gethostbyname Returns a four-element array containing the canonical host name, a subarray of host aliases, the address family, and the address portion of the sockaddr structure. </excerpt> OpenVMS: A:...RUBY181.RUBY_181> ruby -r socket a = Socket.gethostbyname("216.87.136.211") res = Socket.gethostbyaddr(a[3], a[2]) res.join(', ') p res Exit -:2:in `gethostbyaddr': host not found (SocketError) from -:2 Windows: C:\Documents and Settings\bh>ruby -r socket a = Socket.gethostbyname("216.87.136.211") res = Socket.gethostbyaddr(a[3], a[2]) res.join(', ') p res ^Z ["pragdave211.august.net", [], 2, "\330W\210\323"] NOTE: The example was taken directly from "Programming Ruby.chm" (with the exception of the "p res" line) Why the difference? Shouldn't the value returned from gethostbyname be usable by gethostbyaddr as in the example from windows. NOTE: Ruby for Windows test is 1.6.8 and ruby on OpenVMS is 1.8.1 Regards, Brad -----Original Message----- From: Yukihiro Matsumoto [mailto:matz / ruby-lang.org] Sent: Wednesday, May 19, 2004 12:13 AM To: ruby-core / ruby-lang.org Subject: Re: [Help] Problem with SOCKET API on OpenVMS Hi, In message "[Help] Problem with SOCKET API on OpenVMS" on 04/05/19, BH - Brad Coish <BCoish / Dymaxion.com> writes: |Problem: | TCP/IP socket routine(s) not functioning properly on OpenVMS. | |Specifics: | The Socket.gethostbyname routine does not return the proper | values. It's supposed to return an array filled with the | canonical host name, sub-list of aliases, the connection family | and the address portion of the host sockaddr. It's not OpenVMS specific problem. Socket.gethostbyname returns packed struct sockaddr, not address portion. matz.