sysctl

Stefano Giacometti (giacometti@coritel.it)
Thu, 25 Jun 1998 17:37:23 +0200


Hi all, I have setup, by means of register_ctl_table() call, some entries in
/proc/sys filesystem, and I can read and write to these entries with no
problems using:

- echo 15 > /proc/sys/var to write

- cat /proc/sys/var ro read

The problem is that I cannot find the way to read/write from inside a user
space apps, using the sysctl() call. I can read the other /proc/sys/kernel,
/proc/sys/net, /proc/sys/vm, but I cannot find my table. Maybe because this
table has been defined someway dinamically (that is I did not modify the
sysctl.h files adding my CTL_VAR defines).

In normal conditions to read /proc/sys/kernel/osname (for example) I pass
the CTL_KERN(=1) and KERN_OSTYPE(=1) parameters to the sysctl and the call
returns me the right answer. But what must be done if I have registered my
table (eg /proc/sys/atm/) from the device driver, without defining it in the
sysctl.h? Which parameter (number) must be passed to sysctl?

Thanks to everybody in advance!

PS (if anyone has more infos on sysctl usage, I'll be glad to know!!)

******************************************************************
Stefano Giacometti
CoRiTeL - Consorzio di Ricerca sulle Telecomunicazioni

MAILTO:giacometti@coritel.it URL : http://www.coritel.it
TEL : +39 6 20410028 ADDRESS : Via di Tor Vergata, 135
FAX : +39 6 20410037 00133 Roma - ITALY
ICQ : 1051773
*****************************************************************

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu