Who is the maintainer of this code?

They appear to use SOMAXCONN, incorrectly.

The value of SOMAXCONN is not valis; the valid limit is only
obtainable from sysctl (kern.ipc.somaxconn).

Here is a function which does the right thing:

        int
        getsomaxconn( void)
        {
                char    *name = "kern.ipc.somaxconn";
                int     somaxconn;
                size_t  size = sizeof(somaxconn);

                if( sysctlbyname(name, &somaxconn,&size, NULL, 0))  
                        somaxconn = SOMAXCONN;

                return( somaxconn);
        }

If someone wants something prettier (e.g. sysctl instead of
sysctlbyname), they are welcome to write it.


                                        Terry Lambert
                                        [EMAIL PROTECTED]
---
Any opinions in this posting are my own and not those of my present
or previous employers.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to