Add initial list_ports code.