net: socket: additional POSIX constants

The POSIX spec requires that `SO_LINGER`, `SO_RCVLOWAT`,
and `SO_SNDLOWAT`, and `SOMAXCONN` are defined in
`<sys/socket.h>`. However, most of the existing socket
options and related constants are defined in
`<zephyr/net/socket.h>`.

For now, we'll co-locate them. It would be
good to properly namespace things.

Additionally, a no-op for setsockopt for `SO_LINGER` to
make things Just Work (TM) for now.

Signed-off-by: Chris Friedt <cfriedt@meta.com>
This commit is contained in:
Chris Friedt 2022-10-28 14:57:41 -04:00 committed by Marti Bolivar
commit 6ac402bb3a
2 changed files with 13 additions and 0 deletions

View file

@ -2167,6 +2167,9 @@ int zsock_setsockopt_ctx(struct net_context *ctx, int level, int optname,
return 0;
}
case SO_LINGER:
/* ignored. for compatibility purposes only */
return 0;
}
break;