I want to know how a device node is created when a hardware is connected to the system.
When a piece of hardware is connected to the system, the device name is compared with the driver name, if it matches, then probe is called.
At which point is the device node created and who is creating it? (In other words, I want to know where mknod is happening?)
This one thing is bugging my mind from so many months. Please tell me programatically where is this happening.
On most (but not all!) Linux systems this is handled by Udev.
It is notified of the new hardware through a netlink socket. It then creates the device node, based on its configuration.