Getxbyname


There is a subtle difference between the Intel and RISC implementations
of the winsock function getservbyname in MSVC 4.2.  The function takes
two arguments, LPCSTR name (service name) and LPCSTR proto (protocol
name).  It is frequently used to retrieve the port number for a service. 
The NT and Win95 implementations just parse the SERVICES file, returning
a pointer to a servent structure populated from the matching entry in
the file.

The Intel version of getservbyname is case insensitive when matching the
first argument (service name); the RISC version however is case
sensitive.  Just to make things a little more interesting, the
gethostbyname function is case insensitive on both platform
implementations.  The documentation makes no mention of this.

Copyright ©1997 by Frank Brown.