SYSCTL fails

Leon Pollak leonp at plris.com
Thu Aug 21 13:19:20 UTC 2008


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, "");

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?

Thanks a lot ahead.
-- 
Leon



More information about the users mailing list