@return 0 on success, ENOTFOUND, EINVALIDSPEC or an error code.