| Jens.Toerring@physik.fu-berlin.de 2004-10-26, 5:51 pm |
| Joseph <te0543@giga.net.tw> wrote:
> Can I use open("/dev/if1"),open("/dev/if2") to read data from if1 and
> write data to if2?
If you have read permission for /dev/if1 and write permission for
/dev/if2 (and annotate the open() calls with the required flags)
and if the device driver for /dev/if1 allows reads and the one for
/dev/if2 supports write operations, then yes. Or, to be predantic,
no, because just opening the device files doesn't read or write
data, you of course also have to call e.g. the read(2) and write(2)
functions to do the reading and writing (but I guess doing so was
silently implied by your question;-).
Regards, Jens
--
\ Jens Thoms Toerring ___ Jens.Toerring@physik.fu-berlin.de
\__________________________ http://www.toerring.de
|