How to get (in c/c++) PCI device list ?

How to get (in c / c++) PCI device list ?

PCI server functions can only check
if a specific device is present;
so, to get full list a have to check every vendor / device id ?

I was surprised there isn’t a ‘get all’ command in the pci server too.
I’d probably go with searching for the class codes since there aren’t very many of those.
Here’s a link to a list:
acm.uiuc.edu/sigops/roll_your_own/7.c.1.html

Then just use the QNX pci_find_class() function and walk through everything you find.
qnx.com/developers/docs/mome … class.html

maybe there’s some other way, but reading the pci server source code I couldn’t find it…
hope that helps.