/* gservbyp.c (rsxnt) -- Copyright (c) 1996-1997 Rainer Schnitker */

#include <rsxnt.h>
#include <rsxntso.h>

int __getservbyport (int port, __const__ char *proto, struct servent **dst)
{
    if (!_rsxnt_socket_inited)
      return _rsxnt_errno(ENETDOWN);

    if ((*dst = (*wsa_getservbyport) (port, proto)) != NULL)
        return 0;
    else
        return _rsxnt_socket_errno();
}
