Skip to contentSkip to conversation

writing a module to expose information

DISCUSSION Littlefield, Tyler 3 participants 3 messages Mar 6, 2011

lore
Share & tools
lore
#0 lore raw

Hello all:
I'm curious what or where I might begin writing a module that will allow a program to retrieve information from it? Essentially: I need some sort of interface through which I can request information and get it returned somehow.

Signature · 2 lines
Thanks,
Ty
#1 lore raw

Hi Ty,

Quoted 5 lines · Tyler

Hello all:
I'm curious what or where I might begin writing a module that will allow a program to retrieve information from it? Essentially: I need some sort of interface through which I can request information and get it returned somehow.

Your module could create a device driver and you could issue ioctl's to send/retrieve arbitrary information.

You could use proc entries to set/retrieve information.

These are probably the most common methods to do what you want.

Signature · 3 lines
Dave Hylands
Shuswap, BC, Canada
http://www.davehylands.com
#2 lore raw
In reply to Littlefield, Tyler

Hi,

Quoted 4 lines · Tyler

I'm curious what or where I might begin writing a module that will allow a program to retrieve information from it? Essentially: I need some sort of interface through which I can request information and get it returned somehow.

Most likely you will want to expose your information through a /proc or /sys entry. There are plenty of tutorials about how to do this on the web.

Alex.