Hi community,
I was wondering about handling of ioctl on multiplexer. The small
architecture I have in mind is the following: StreamDriver <-> Module
<-> multiplexer. The driver is opened and the module is I_PUSH'ed on it,
then the muxer is opened and I_LINK'ed to the module. In another
process, I reopen the driver and try to send an ioctl request. It fails
and the encountered error is the following: "[Errno 22] Invalid argument".
I already checked that the ioctl is correctly handled when the muxer is
not linked. I add a lot of debug logging and apparently the driver does
*not* receive a mblk of type M_IOCTL. So the first question is: "why
don't I receive a mblk of type M_IOCTL when the muxer is linked ?".
Neither the muxer, nor the module, nor the driver ... is it possible the
stream framework is rejecting any ioctl for the linked stream ?
I also though of a work-around for this problem. Maybe I can open the
muxer instead of the driver and the muxer would forward the ioctl to the
driver. However the forwarding wasn't mention in the stream framework
pdf, so I didn't implement it. I also fail to find any reference to such
a technique in the source of opensolaris, that's why I'm asking: "Should
the muxer forward the ioctl downstream ?". I don't think so as it a
driver (it should drop unknown ioctl) but it's a special driver, so I'm
a bit perplex here :)
Last thing I tested. I open the driver and push the module on it. In
another process, I reopen the driver, push the module and link the
muxer. Then I used the first handle to the driver and send the ioctl
request and it works. So, driver and module ioctl handling are working
but it doesn't work anymore once I linked the muxer and reopen the
driver after the I_LINK.
Thanks for any clue you can provide me with,
Sebastien
_______________________________________________
driver-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/driver-discuss