Date: Fri, 04 Apr 2003 00:36:18 +0400 From: Alexander Chetyrbock <bock@bock.nnov.ru> To: freebsd-standards@FreeBSD.org Subject: SO_ACCEPTCONN in getsockopt Message-ID: <3E8C9B42.4070805@bock.nnov.ru>
next in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi POSIX-compliant getsockopt should have possibility to obtain SO_ACCEPTCONN flag value from so_options. See http://www.opengroup.org/onlinepubs/007904975/functions/getsockopt.html But FreeBSD getopt doesn't have this possibility. I think that commiters can add one line to sys/kern/uipc_socket.c (to sogetopt function) to provide that functionality. It can be something like this: ==== ~ case SO_USELOOPBACK: ~ case SO_DONTROUTE: ~ case SO_DEBUG: ~ case SO_KEEPALIVE: ~ case SO_REUSEADDR: ~ case SO_REUSEPORT: ~ case SO_BROADCAST: ~ case SO_OOBINLINE: + case SO_ACCEPTCONN: ~ case SO_TIMESTAMP: ~ optval = so->so_options & sopt->sopt_name; ~ integer: ~ error = sooptcopyout(sopt, &optval, sizeof optval); ~ ==== PS. Is there any other way to obtain this value from kernel to userspace? May be ioctl? - -- Alexander Chetyrbock -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQE+jJtCjQ0dJI1fBVgRAjqyAJ9PTYiEiHg3r9s/s9qzmkx1acWD7ACfdugX ur61a95xva37YIvxg+7rbNk= =6P3M -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3E8C9B42.4070805>