def portMappings() 
            joinThread()
            i, r = 0, 0
            mappings = Array.new
            while r == 0 
                rhost = getCString()
                enabled = getCString()
                duration = getCString()
                description = getCString()
                nport = getCString()
                lport = getCString()
                duration = getCString()
                client = getCString()
                protocol = getCString()

                r = MiniUPnP.UPNP_GetGenericPortMappingEntry(@urls.controlURL,
                                  @data.servicetype,i.to_s,nport,client,lport,
                                  protocol,description,enabled,rhost,duration)
                if r != 0 then
                    break;
                end
                i = i+1
                mappings << PortMapping.new(client.rstrip,lport.rstrip.to_i,
                                  nport.rstrip.to_i,protocol.rstrip,
                                  description.rstrip,enabled.rstrip,
                                  rhost.rstrip,duration.rstrip)
            end 
            return  mappings
        end
def portMappings() 
            joinThread()
            i, r = 0, 0
            mappings = Array.new
            while r == 0 
                rhost = getCString()
                enabled = getCString()
                duration = getCString()
                description = getCString()
                nport = getCString()
                lport = getCString()
                duration = getCString()
                client = getCString()
                protocol = getCString()

                r = MiniUPnP.UPNP_GetGenericPortMappingEntry(@urls.controlURL,
                                  @data.servicetype,i.to_s,nport,client,lport,
                                  protocol,description,enabled,rhost,duration)
                if r != 0 then
                    break;
                end
                i = i+1
                mappings << PortMapping.new(client.rstrip,lport.rstrip.to_i,
                                  nport.rstrip.to_i,protocol.rstrip,
                                  description.rstrip,enabled.rstrip,
                                  rhost.rstrip,duration.rstrip)
            end 
            return  mappings
        end
An array of mappings registered on the router