The HyperNews Linux KHG Discussion Pages

## how to simulate a tape driver + to access a remote tape via a driver

  Forum: Device Drivers
  Keywords: tape device, remote access
  Date: Wed, 08 Jul 1998 11:31:41 GMT
  From: devin seze <e1061845@ceng.metu.edu.tr>

This is the first time that I ( and my friend) ever try to write a device driver. Since we have no experience with programming some part of the kernel, we are quite puzzled as to where to start and how to do the following task: The thing that we are trying to do is this: There is a tape drive on some machine ( say B) in our network. And we want to be able to manipulate that device remotely from our machine ( say A). and we want it to take place in the following way: When a program on machine A opens the device ( the local /dev/tape_device file on A) and does some reads, writes, ioctls on it ( and whatever can be done on a tape device) we want these calls to be redirected to the device on machine B, and when the device on B responds to these calls (to some ioctl , read ,write, close ,open) we want these responds to be returned to the call that was made from the program on machine A How would this be best done? The obvious thing we have in mind is to (if it is possible:) open a tcp socket from within our device driver and connect to B ( where a daemon is working for this purpose ) and have that daemon to do the required read/write/open/close/ioctl and get back replies from this socket- or again is it possible to do rpc calls from within a device driver? if it is does it make sense to write remote versions of read/write/ioctl/open/close/etc? I will be getting Rubini's book on drivers in which - i hope- i will find more info about tape drivers. but in the meanwhile is there any place ( besides the kernel source) where i can get more info on tapes? The machine we are working on is a Pentium200MMX - the kernel is 2.0.30 and the tape device we are tinkering with is ( the only thing i know about it) connected via the floppy disk controller.
    with best regards
    devin

    devin sezer
    e1061845@ceng.metu.edu.tr