improvements to network detection based on port type