SYSCTL fails

Leon Pollak leonp at plris.com
Sun Aug 24 09:57:41 UTC 2008


On Friday, 22 בAugust 2008, Chris Johns wrote:
> Leon Pollak wrote:
> > Hello, all.
> >
> > I am trying to change the default value of 'ipqmaxlen', which is defined
> > in file ../netinet/ip_input.c as:
> > static int      ipqmaxlen = IFQ_MAXLEN;
> > SYSCTL_INT(_net_inet_ip, IPCTL_INTRQMAXLEN, intr_queue_maxlen,
> > CTLFLAG_RD, &ipintrq.ifq_maxlen, 0, "");

> The CTLFLAG_RD says this is a read only MIB variable. A check of FreeBSD
> 7.0 shows this is read/write (CTLFLAG_RW) so I suggest you make this change
> and submit a patch.

Thanks, Chris.
I did as you said - no result.
I tried to trace the problem and noticed that line 1103 in kern_sysctl.c:
oid = SLIST_FIRST(&sysctl__children);
returns zero, which causes the error.

1. Do you know what does it mean?
2. Although I did this in both ways, but still when is it correct to use this 
SYSCTL - before or after the network initializing?

Thank you for your help.

> > I read the wiki and WEB and found that IPCTL_INTRQMAXLEN relates to
> > CTL_NET->PF_INET->IPPROTO_IP. So I did:
> >
> > int mib[4], value;
> > size_t len;
> > ulong result;
> > mib[0] = CTL_NET;
> > mib[1] = PF_INET;
> > mib[2] = IPPROTO_IP;
> > mib[3] = IPCTL_INTRQMAXLEN;
> > value = 100;
> > len = sizeof (value);
> > result = sysctl (mib, 4, NULL, 0, &value, len);
> >
> > and the result is -1, while errno is 2 (no such).
> >
> > Can someone recommend how to change this?
>
> I do not know why you are getting this error. Try the change to RW. If it
> fails it may require some debugging.
>
> Regards
> Chris



-- 
            Dr.Leon M.Pollak
                Director
       PLR Information Systems Ltd.
Tel.:+972-98657670  |  POB 8130, H'Aomanut 9,
Fax.:+972-98657621  |  Poleg Industrial Zone,
Mob.:+972-544739246 |  Netanya, 42160, Israel.



More information about the users mailing list