As Klaus Rudolph wrote:
I have no idea how avrdude internally is searching the device, but it
looks like that it scans over all usb busses until it finds a device of
given type.
This is the way USB works, in general.
If we are able to restrict the found device type to a specific hardware
address like: pci-0000:00:14.0-usb-0:1.6:1.0 like we can do in udev
rules, we can address each one individual.
libusb abstracts the underlying OS. libusb_device is just an opaque
pointer to an implementation-defined struct; any details about how
that OS handles the hardware access is hidden, and cannot be used by
an application on top of libusb.