exchange data from user space to kernel space

exchange data from user space to kernel space

Post by Michae » Mon, 26 Nov 2001 09:07:48



Hi !
I am making a simple network device driver. I think i have some of the
functionality incorporated into the device driver, and now i want to test it
further.
I want to make a user program that can give the device drive some data,
which the device driver will send out on the network.
My problem is that i have no idea of how to do that. Maybe something with
ioctl ??
Please give me some ideas (small examples would be great since i am new to
write kernel-space "programs") of how to give the device driver some data
from user space.

i am looking forward to get some input.

Thanks in advance
Michael

 
 
 

exchange data from user space to kernel space

Post by Igor Lauta » Mon, 26 Nov 2001 20:27:06




> Hi !
> I am making a simple network device driver. I think i have some of the
> functionality incorporated into the device driver, and now i want to
> test it further.
> I want to make a user program that can give the device drive some data,
> which the device driver will send out on the network. My problem is that
> i have no idea of how to do that. Maybe something with ioctl ??
> Please give me some ideas (small examples would be great since i am new
> to write kernel-space "programs") of how to give the device driver some
> data from user space.

just register character device, create node in /dev for it and there you
have it, you can send, receive, do ioctl and much more with it.

You should look into some books avaiable for linux device drivers
development. I think one of the best is from O'Reilly ( look at amazon ).

regards,
Igor

 
 
 

exchange data from user space to kernel space

Post by Michae » Tue, 27 Nov 2001 06:23:07


Quote:> just register character device, create node in /dev for it and there you
> have it, you can send, receive, do ioctl and much more with it.

I have registered the card as a network device, but i have no idea of how to
use ioctl or any other
smart thing for exchange data from user space to kernel space.

Quote:> You should look into some books avaiable for linux device drivers
> development. I think one of the best is from O'Reilly ( look at amazon ).

I have the Linux device driver book from O'Reilly but i can't find any help
(or can't figure it out) on my problem.

Michael

 
 
 

1. Writing Data from Kernel Space to User Space.

Hello All.

I am required to write some data from
Kernel Space to User Space, (write
some data from within a NIC Driver to
a user application).

The write would be basically for every 'x' frames
received on the NIC Card. The user application
needs to capture the data and update a few fields in a
structure in the kernel address space, This would be
read by the Driver and processed.

Kindly let me know how to go about achieving this.

Thanks & Regards.

Ramesh

2. IP Masquerading with quake

3. Writing data from Kernel to a data file in user space

4. Can't browse Samba workgroup

5. ****CD-ROM recorder questions****

6. Compression Software

7. Kernel space to user space

8. kernel space access to user space functions

9. Kernel space <-> User space

10. User space to kernel space addr translation?

11. user-space <-> kernel-space