SO_ACCEPTCONN in getsockopt

Alexander Chetyrbock bock at bock.nnov.ru
Thu Apr 3 12:35:02 PST 2003


-----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-----



More information about the freebsd-standards mailing list