Class: UPnP::Control::Service::WANIPConnection
- Inherits:
-
UPnP::Control::Service
- Object
- UPnP::Control::Service
- UPnP::Control::Service::WANIPConnection
- Defined in:
- lib/UPnP/control/service/wan_ip_connection.rb
Overview
The UPnP WAN IP Connection service.
This service is used to configure and control IP connections on the WAN device of an InternetGatewayDevice.
Constant Summary collapse
- URN_1 =
Version 1 URN for the WANIPConnection
[UPnP::SERVICE_SCHEMA_PREFIX, name.split(':').last, 1].join ':'
Instance Method Summary collapse
-
#port_mappings ⇒ Object
Collects all the port mappings via GetGenericPortMappingEntry and returns an Array containing each response.
Instance Method Details
#port_mappings ⇒ Object
Collects all the port mappings via GetGenericPortMappingEntry and returns an Array containing each response.
21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/UPnP/control/service/wan_ip_connection.rb', line 21 def port_mappings port_mappings = [] i = 0 loop do port_mappings << GetGenericPortMappingEntry(i) i += 1 end rescue UPnP::Control::Service::UPnPError => e raise unless e.code == 713 port_mappings end |