Add support for specifying port type in get_common_ports().