Add method for obtaining integer indices of ports in PortMapper instance.