Export data from kernel module

Hello,
I am currently writing a kernel module which needs to export some data to userland space, what is the preferred way of doing this ?
I was thinking of maybe using /proc but I am rather lost on how to do this (It is my first try at developing a kernel module).

A basic example of what i wish to do is (maybe procfs is not what i need but it illustrates well my need):

Code:
#!/bin/sh

ACTIVE_LINK=`cat /proc/active_link`

if [ $ACTIVE_LINK == 1 ];then
[...]

What I need to export is a single integer.
Thanks for any pointers :)

PS: I tried to do a search but frankly I don't even know what to search for :\
 
besides sysctl, u can use of course copyin copyout if there is some userland daemon or tool waiting for information.

cheers,
 
Back
Top