develooper Front page | perl.vmsperl | Postings from January 2002

Re: Net::Ping tests -- who should run them?

Craig A. Berry
January 6, 2002 13:34
Re: Net::Ping tests -- who should run them?
Message ID:
At 5:17 PM -0700 1/5/02, Rob Brown wrote:

> I was not aware there were
>such systems that getservbyname acted differently or
>were unable to resolve 'echo' to a port correctly.
>:        $self->{"port_num"} = (getservbyname('echo', 'tcp'))[2] ||
>:            croak("Can't get tcp echo port by name");
>Wouldn't that be a problem with perl itself?  Or do
>some systems just not have an updated "services" file?
>Or what do you think is best?

Thanks for the reply, Rob.  The beast in question appears not to have
a named service called "echo" though it responds just fine to ping
requests from other systems.  Some other info that may be relevant:

$ perl -e "print join(qq/\t/,getservbyname('echo','udp'));"
$ perl -e "print join(qq/\t/,getservbyname('telnet','tcp'));"
TELNET                          23      TCP

[so the getservbyname function does work if there is a service]

$ tcpip show version

  Compaq TCP/IP Services for OpenVMS Alpha Version V5.1 - ECO 3
  on a AlphaStation 200 4/233 running OpenVMS V7.3

This is the latest greatest vendor-supplied IP stack (and one that
was ported from Tru64 UNIX).  That doesn't of course guarantee that
it isn't broken.  On another VMS system with a third party IP stack
(Multinet), echo *does* show up as a named service.  I'm afraid I'm
too ignorant of networking to know whether the echo service is
required by some standard or is just conventional.  My guess would be
that with Compaq TCP/IP Services the master server handles the echo
requests itself without needing a separate service.  HTH.

Craig A. Berry

"... getting out of a sonnet is much more
 difficult than getting in."
                 Brad Leithauser Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About