LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 09-19-2009, 07:32 PM   #1
wizumwalt
LQ Newbie
 
Registered: Jan 2009
Posts: 11

Rep: Reputation: 0
sockets within a kernel module


Trying to learn the kernel ... when a user opens a socket (using an application protocol I want to make) and streams data to it, I want to be able to read that within a kernel module, add a few fields to it, then put it on UDP from within the kernel module.

But I'm not clear on if I would be interrupting system calls or how that would work? Can anyone point me to how this would be done, tutorials, anything?

Thanks,
 
Old 09-19-2009, 08:04 PM   #2
jhwilliams
Senior Member
 
Registered: Apr 2007
Location: Portland, OR
Distribution: Debian, Android, LFS
Posts: 1,168

Rep: Reputation: 211Reputation: 211Reputation: 211
This doesn't sound like stuff you'd want to do in the kernel, really -- socket programming, et al is more of a user space thing. This might be of interest for you, in case you haven't seen something along these lines: http://www.linuxjournal.com/article/7660

Last edited by jhwilliams; 09-19-2009 at 08:06 PM.
 
Old 09-19-2009, 10:05 PM   #3
wizumwalt
LQ Newbie
 
Registered: Jan 2009
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jhwilliams View Post
This doesn't sound like stuff you'd want to do in the kernel, really -- socket programming, et al is more of a user space thing. This might be of interest for you, in case you haven't seen something along these lines: http://www.linuxjournal.com/article/7660
Maybe I explained that wrong. I want to use sockets as one normally would in user space. And the data coming from these user space sockets I want to wrap up in my own application layer protocol (inside a kernel module) and have it depend on another kernel module like UDP. That's a very normal thing. NFS does this as well, but I'm having a hard time following NFS and was looking for something more basic.

I think your post will help. Thanks,
 
  


Reply



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
Program to forward tcp sockets to unix domain sockets mikepol Linux - Networking 0 09-27-2007 09:49 AM
[Error] Kernel Module : No kernel module build environment saman007uk Debian 7 09-09-2006 06:34 PM
what are kernel sockets? bhuvan007 Linux - Networking 5 12-24-2005 03:35 AM
Kernel module using netlink sockets arunka Programming 1 03-31-2005 07:42 AM
kernel module ignorant newbie looking for any one with kernel module knowledge cpoet Slackware 4 11-24-2003 09:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 03:17 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration