I am writing a new operating system for learning and exploration purposes. And I would like to be able to scan the machine for connected devices (network, keyboard, HDDs, and what have you). This will be used as a first step to install the appropriate drivers.
I have been searching for this on the Internet for a while, but nothing that is of help.