views:

32

answers:

1

Hi everyone there, can anybody tell me how to make file descriptors behave like atm nodes in /dev directory. Since i dnt have atm switch to test my program, i have to test with normal files, is there any method to make special type of file descriptors that behave like atm nodes.

+1  A: 

You can write a dummy device driver that simulates the behavior that you expect from your ATM switch. This dummy driver would then provide a device driver node in /dev/atmXYZ.

Writing a minimal linux driver is not much work. See Linux Device Drivers, Third Edition http://lwn.net/Kernel/LDD3/ for the details. The link points to a full copy of the book.

I guess most work would be to figure out what behavior you expect from the switch and then to implement that correctly. It might turn out that its not worth the trouble.

Frank Meerkötter
Thanks i got a hint.
evil.coder