HP OpenVMS Systems

ICMP ping protocol number?

About a week ago I posted a question for a hint to why our homeware ping
that works on pre 7.2 does not work on later versions. I have since learned
more. Using TCP(IP)TRACE and some debugging I ended up calling getprotoent()
with the following results fo
r protocolnumber/protocolname/protocolalias
TCP/IP 5.0A
OpenVMS 7.2.1
0/ip/IP
2/icmp/ICMP
3/ggp/GGP
6/tcp/TCP
12/pup/PUP
17/udp/UDP
TCP/IP 4.2 ECO 3
OpenVMS 7.1-1H2
17/udp
12/pup
6/tcp
3/ggp
1/icmp
0/ip
The 2 lists are identical - except for the order, no aliases with the latter
and the icmp protocol no. being different.
Our ping program uses getprotobyname() to get the protcol no. for the socket
call. If I instead in the socket call pass a hardcoded "1" then our ping
works also from the 7.2-1 system. Please explain.
Thanks

The Answer is :

This appears related to a known bug in the getprotobyname call in
V5.0 and V5.0A. (log number: HPAQA1VJN)
When establishing socket connections for protocol "icmp", specify "1"
for the protocol instead of using getprotobyname or getprotobyname.
Alternatively, please contact the Compaq Customer Support Center
for assistance in acquiring an ECO.