net: add portprint() helper and test