This is one of the very simple errno valus: "Socket operation on non-socket". If you attempt to do anything sockety on a non-socket file descriptor, this will be returned (for example, getsockname, connect, bind, etc. on non-sockets would be nonsensical). In the kernel, this means that an open file descriptor's type is not equal to DTYPE_SOCK, or for PF_LOCAL (Unix local domain) socket, the path specified for connect(2) does not point to a vnode of type VSOCK.