how to get the interrupt number of netcard in program?

how to get the interrupt number of netcard in program? thanks for ideas

$QNX_TARGET/usr/include/sys/dcmd_io-net.h and $QNX_TARGET/usr/include/hw/nicinfo.h provide all the information necessary to retrieve the interrupt of a particular interface programatically.

That will only work if the driver is started. Otherwise you have to talk to the PCI server to get that info.

While it’s true that a devctl to the driver can’t be done if the driver is not running, it is also true that the device in question may not be on a PCI bus, and thus doing a devctl is a universal solution, whilst talking to the PCI server is not (a fair number of SOCs have an EMAC that is not on the PCI bus).