[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

(usagi-users 03136) Re: [Ipsec-tools-devel] How to send additional data from kernel to racoon?



Park Lee <parklee_sel@xxxxxxxxx> wrote:

>  What's a pseudo-device driver? and How to make it?

It's a driver for something which is not connected to a hardware device.
You can talk to your driver through a file in /dev. Communication can be
done through read(), write(), ioctl(), or mmap(). You can also use
select() and poll().

Briefly, each time you use read(), your driver's read() method is
invoked, and you return whatever you want.

> Would you please elaborate it for me? 

Certainly not! :)
Many examples of pseudo-device driver skeletons are available on-line.
Just google for it.

> Can it not absolutely achieve through PF_KEY ? (i.e. can we do some
> modification to PF_KEY to achieve our goal ?) and Is there other method to
> achieve the goal?

The idea behind doing a device driver is that you won't have to mess
with the PF_KEY interface: your kernel/userland IPC is kept separated
from PF_KEY.

-- 
Emmanuel Dreyfus
Il y a 10 sortes de personnes dans le monde: ceux qui comprennent 
le binaire et ceux qui ne le comprennent pas.
manu@xxxxxxxxxx