net: create device lookup API with reference tracking