According to the docs:
> EAFNOSUPPORT: Specified address family is not supported

In this case "address family" == domain. So "rc" code assignments should be swapped I think. I.e. code should become ``EINVAL`` if at least one socket with specified domain is found, otherwise ``EAFNOSUPPORT``