LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 12-13-2004, 12:54 PM   #1
starbuck8968
LQ Newbie
 
Registered: Sep 2003
Distribution: slack/deb/rhel/fc
Posts: 4

Rep: Reputation: 0
accessing functions in kernel modules


Hi, I've written a module that has some kernel space functions that I'd like to acces using a user space program. Anyone have any experience doing this? I've tried using EXPORT_SYMBOL and extern but that doesn't work, actually I don't think this is how its done anyways. The module sets some parameter that I'd like to control using the program.

Thanks in advance
 
Old 12-13-2004, 02:41 PM   #2
m00t00
Member
 
Registered: Sep 2004
Distribution: Slackware 10, Gentoo
Posts: 292

Rep: Reputation: 30
short answer, you dont. you can use a device file or something in /proc though.
 
Old 12-13-2004, 04:25 PM   #3
starbuck8968
LQ Newbie
 
Registered: Sep 2003
Distribution: slack/deb/rhel/fc
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by m00t00
short answer, you dont. you can use a device file or something in /proc though.
Ok then, would you have any pointers for doing this via /proc or device file? I think /proc would probably be better, what I'm interested in is changing a parameter to invoke a kernel space function that would apply that parameter.
 
Old 12-14-2004, 12:39 AM   #4
shy
Member
 
Registered: Dec 2002
Location: Russia
Distribution: ASP linux
Posts: 94

Rep: Reputation: 15
Have you read this great book? Try it, I think it can help.
 
Old 12-14-2004, 05:46 AM   #5
mayur
LQ Newbie
 
Registered: Jun 2003
Posts: 14

Rep: Reputation: 0
use open(),write(),read() system call
 
Old 12-14-2004, 09:42 AM   #6
m00t00
Member
 
Registered: Sep 2004
Distribution: Slackware 10, Gentoo
Posts: 292

Rep: Reputation: 30
Quote:
Originally posted by mayur
use open(),write(),read() system call
uh... no.
theyre not ordinary files.
check here , theres a chapter or two on it (chapters 5-7)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
accessing functions using strings in runtime shyam_d_sundar Programming 3 05-18-2005 08:02 AM
Calling User-space program functions from Kernel modules shivanu Programming 1 03-05-2005 02:11 PM
Accessing member functions of sockaddr_in Stack Overflow Programming 4 01-27-2005 05:11 PM
error while accessing math functions in kernel modules dypgrp Programming 0 01-19-2005 09:12 AM
error in accessing structure variable in kernel modules dypgrp Programming 3 01-17-2005 07:42 AM


All times are GMT -5. The time now is 10:24 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration