SYSCTL fails

Chris Johns chrisj at rtems.org
Fri Aug 22 00:22:05 UTC 2008


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.

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



More information about the users mailing list