wendy wrote:
Hi,
Since user applications can use ioctl to control driver, I am wondering if I
can use ioctl to get status of driver? I want to check status of mii, pci or
ethernet driver, so, I want to use something like:
char tempBuf[1000];
......
fd = fopen("/dev/myDriver",O_RDWR);
ioctl(fd, GET_MII_STATUS,tempBuf);
printf(tempBuf);
.......
But doesn't work. Nothing printed. Where is the problem? Must I use kstate
instead?
Generally speaking, yes.
Many Linux IOCTLs are not supported by the various networking drivers,
and pretty much none of the ethernet drivers support any common IOCTLs
except the undocumented ones used for ndd.
Someday we hope the drivers will get to be more uniform. But kstat is
likely to be the preferred interface for querying most driver state for
the foreseeable future.
-- Garrett
Wendy
This message posted from opensolaris.org
_______________________________________________
networking-discuss mailing list
[email protected]
_______________________________________________
networking-discuss mailing list
[email protected]