2013-10-06 22:16:53 +00:00
|
|
|
package internetgateway2
|
|
|
|
|
2014-06-07 19:29:41 +00:00
|
|
|
// Generated file - do not edit by hand. See README.md
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
|
2013-12-31 20:01:17 +00:00
|
|
|
"github.com/huin/goupnp"
|
2013-12-31 16:56:20 +00:00
|
|
|
"github.com/huin/goupnp/soap"
|
|
|
|
)
|
|
|
|
|
|
|
|
// Hack to avoid Go complaining if time isn't used.
|
|
|
|
var _ time.Time
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 18:04:59 +00:00
|
|
|
// Device URNs:
|
2013-10-06 22:16:53 +00:00
|
|
|
const (
|
2013-12-31 18:04:59 +00:00
|
|
|
URN_LANDevice_1 = "urn:schemas-upnp-org:device:LANDevice:1"
|
2013-10-06 22:16:53 +00:00
|
|
|
URN_WANConnectionDevice_1 = "urn:schemas-upnp-org:device:WANConnectionDevice:1"
|
|
|
|
URN_WANConnectionDevice_2 = "urn:schemas-upnp-org:device:WANConnectionDevice:2"
|
2013-12-31 18:04:59 +00:00
|
|
|
URN_WANDevice_1 = "urn:schemas-upnp-org:device:WANDevice:1"
|
|
|
|
URN_WANDevice_2 = "urn:schemas-upnp-org:device:WANDevice:2"
|
2013-10-06 22:16:53 +00:00
|
|
|
)
|
|
|
|
|
2013-12-31 18:04:59 +00:00
|
|
|
// Service URNs:
|
2013-10-06 22:16:53 +00:00
|
|
|
const (
|
2013-12-31 18:04:59 +00:00
|
|
|
URN_LANHostConfigManagement_1 = "urn:schemas-upnp-org:service:LANHostConfigManagement:1"
|
|
|
|
URN_Layer3Forwarding_1 = "urn:schemas-upnp-org:service:Layer3Forwarding:1"
|
|
|
|
URN_WANCableLinkConfig_1 = "urn:schemas-upnp-org:service:WANCableLinkConfig:1"
|
2013-10-06 22:16:53 +00:00
|
|
|
URN_WANCommonInterfaceConfig_1 = "urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1"
|
2013-12-31 18:04:59 +00:00
|
|
|
URN_WANDSLLinkConfig_1 = "urn:schemas-upnp-org:service:WANDSLLinkConfig:1"
|
|
|
|
URN_WANEthernetLinkConfig_1 = "urn:schemas-upnp-org:service:WANEthernetLinkConfig:1"
|
|
|
|
URN_WANIPConnection_1 = "urn:schemas-upnp-org:service:WANIPConnection:1"
|
|
|
|
URN_WANIPConnection_2 = "urn:schemas-upnp-org:service:WANIPConnection:2"
|
|
|
|
URN_WANIPv6FirewallControl_1 = "urn:schemas-upnp-org:service:WANIPv6FirewallControl:1"
|
|
|
|
URN_WANPOTSLinkConfig_1 = "urn:schemas-upnp-org:service:WANPOTSLinkConfig:1"
|
|
|
|
URN_WANPPPConnection_1 = "urn:schemas-upnp-org:service:WANPPPConnection:1"
|
2013-10-06 22:16:53 +00:00
|
|
|
)
|
|
|
|
|
2013-12-31 20:01:17 +00:00
|
|
|
// LANHostConfigManagement1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:LANHostConfigManagement:1". See
|
|
|
|
// goupnp.ServiceClient, which contains RootDevice and Service attributes which
|
|
|
|
// are provided for informational value.
|
2013-10-06 22:16:53 +00:00
|
|
|
type LANHostConfigManagement1 struct {
|
2013-12-31 20:01:17 +00:00
|
|
|
goupnp.ServiceClient
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewLANHostConfigManagement1Clients discovers instances of the service on the network,
|
|
|
|
// and returns clients to any that are found. errors will contain an error for
|
|
|
|
// any devices that replied but which could not be queried, and err will be set
|
|
|
|
// if the discovery process failed outright.
|
|
|
|
//
|
|
|
|
// This is a typical entry calling point into this package.
|
|
|
|
func NewLANHostConfigManagement1Clients() (clients []*LANHostConfigManagement1, errors []error, err error) {
|
|
|
|
var genericClients []goupnp.ServiceClient
|
|
|
|
if genericClients, errors, err = goupnp.NewServiceClients(URN_LANHostConfigManagement_1); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
clients = make([]*LANHostConfigManagement1, len(genericClients))
|
|
|
|
for i := range genericClients {
|
|
|
|
clients[i] = &LANHostConfigManagement1{genericClients[i]}
|
|
|
|
}
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
|
|
|
|
2013-12-31 17:52:43 +00:00
|
|
|
// Arguments:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewDHCPServerConfigurable:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *LANHostConfigManagement1) SetDHCPServerConfigurable(NewDHCPServerConfigurable bool) (err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewDHCPServerConfigurable string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if request.NewDHCPServerConfigurable, err = soap.MarshalBoolean(NewDHCPServerConfigurable); err != nil {
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := interface{}(nil)
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "SetDHCPServerConfigurable", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
// * NewDHCPServerConfigurable:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *LANHostConfigManagement1) GetDHCPServerConfigurable() (NewDHCPServerConfigurable bool, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewDHCPServerConfigurable string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "GetDHCPServerConfigurable", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if NewDHCPServerConfigurable, err = soap.UnmarshalBoolean(response.NewDHCPServerConfigurable); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 17:52:43 +00:00
|
|
|
// Arguments:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewDHCPRelay:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *LANHostConfigManagement1) SetDHCPRelay(NewDHCPRelay bool) (err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewDHCPRelay string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if request.NewDHCPRelay, err = soap.MarshalBoolean(NewDHCPRelay); err != nil {
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := interface{}(nil)
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "SetDHCPRelay", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
// * NewDHCPRelay:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *LANHostConfigManagement1) GetDHCPRelay() (NewDHCPRelay bool, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewDHCPRelay string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "GetDHCPRelay", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if NewDHCPRelay, err = soap.UnmarshalBoolean(response.NewDHCPRelay); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 17:52:43 +00:00
|
|
|
// Arguments:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewSubnetMask:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *LANHostConfigManagement1) SetSubnetMask(NewSubnetMask string) (err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewSubnetMask string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if request.NewSubnetMask, err = soap.MarshalString(NewSubnetMask); err != nil {
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := interface{}(nil)
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "SetSubnetMask", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
// * NewSubnetMask:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *LANHostConfigManagement1) GetSubnetMask() (NewSubnetMask string, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewSubnetMask string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "GetSubnetMask", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if NewSubnetMask, err = soap.UnmarshalString(response.NewSubnetMask); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 17:52:43 +00:00
|
|
|
// Arguments:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewIPRouters:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *LANHostConfigManagement1) SetIPRouter(NewIPRouters string) (err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewIPRouters string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if request.NewIPRouters, err = soap.MarshalString(NewIPRouters); err != nil {
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := interface{}(nil)
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "SetIPRouter", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 17:52:43 +00:00
|
|
|
// Arguments:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewIPRouters:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *LANHostConfigManagement1) DeleteIPRouter(NewIPRouters string) (err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewIPRouters string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if request.NewIPRouters, err = soap.MarshalString(NewIPRouters); err != nil {
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := interface{}(nil)
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "DeleteIPRouter", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
// * NewIPRouters:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *LANHostConfigManagement1) GetIPRoutersList() (NewIPRouters string, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewIPRouters string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "GetIPRoutersList", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if NewIPRouters, err = soap.UnmarshalString(response.NewIPRouters); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 17:52:43 +00:00
|
|
|
// Arguments:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewDomainName:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *LANHostConfigManagement1) SetDomainName(NewDomainName string) (err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewDomainName string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if request.NewDomainName, err = soap.MarshalString(NewDomainName); err != nil {
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := interface{}(nil)
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "SetDomainName", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
// * NewDomainName:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *LANHostConfigManagement1) GetDomainName() (NewDomainName string, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewDomainName string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "GetDomainName", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if NewDomainName, err = soap.UnmarshalString(response.NewDomainName); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 17:52:43 +00:00
|
|
|
// Arguments:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewMinAddress:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewMaxAddress:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *LANHostConfigManagement1) SetAddressRange(NewMinAddress string, NewMaxAddress string) (err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewMinAddress string
|
2014-01-06 20:17:00 +00:00
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
NewMaxAddress string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if request.NewMinAddress, err = soap.MarshalString(NewMinAddress); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.NewMaxAddress, err = soap.MarshalString(NewMaxAddress); err != nil {
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := interface{}(nil)
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "SetAddressRange", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewMinAddress:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewMaxAddress:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *LANHostConfigManagement1) GetAddressRange() (NewMinAddress string, NewMaxAddress string, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewMinAddress string
|
2014-01-06 20:17:00 +00:00
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
NewMaxAddress string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "GetAddressRange", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if NewMinAddress, err = soap.UnmarshalString(response.NewMinAddress); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if NewMaxAddress, err = soap.UnmarshalString(response.NewMaxAddress); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 17:52:43 +00:00
|
|
|
// Arguments:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewReservedAddresses:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *LANHostConfigManagement1) SetReservedAddress(NewReservedAddresses string) (err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewReservedAddresses string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if request.NewReservedAddresses, err = soap.MarshalString(NewReservedAddresses); err != nil {
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := interface{}(nil)
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "SetReservedAddress", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 17:52:43 +00:00
|
|
|
// Arguments:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewReservedAddresses:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *LANHostConfigManagement1) DeleteReservedAddress(NewReservedAddresses string) (err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewReservedAddresses string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if request.NewReservedAddresses, err = soap.MarshalString(NewReservedAddresses); err != nil {
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := interface{}(nil)
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "DeleteReservedAddress", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
// * NewReservedAddresses:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *LANHostConfigManagement1) GetReservedAddresses() (NewReservedAddresses string, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewReservedAddresses string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "GetReservedAddresses", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if NewReservedAddresses, err = soap.UnmarshalString(response.NewReservedAddresses); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 17:52:43 +00:00
|
|
|
// Arguments:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewDNSServers:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *LANHostConfigManagement1) SetDNSServer(NewDNSServers string) (err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewDNSServers string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if request.NewDNSServers, err = soap.MarshalString(NewDNSServers); err != nil {
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := interface{}(nil)
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "SetDNSServer", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 17:52:43 +00:00
|
|
|
// Arguments:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewDNSServers:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *LANHostConfigManagement1) DeleteDNSServer(NewDNSServers string) (err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewDNSServers string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if request.NewDNSServers, err = soap.MarshalString(NewDNSServers); err != nil {
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := interface{}(nil)
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "DeleteDNSServer", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
// * NewDNSServers:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *LANHostConfigManagement1) GetDNSServers() (NewDNSServers string, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewDNSServers string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "GetDNSServers", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if NewDNSServers, err = soap.UnmarshalString(response.NewDNSServers); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 20:01:17 +00:00
|
|
|
// Layer3Forwarding1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:Layer3Forwarding:1". See
|
|
|
|
// goupnp.ServiceClient, which contains RootDevice and Service attributes which
|
|
|
|
// are provided for informational value.
|
2013-10-06 22:16:53 +00:00
|
|
|
type Layer3Forwarding1 struct {
|
2013-12-31 20:01:17 +00:00
|
|
|
goupnp.ServiceClient
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewLayer3Forwarding1Clients discovers instances of the service on the network,
|
|
|
|
// and returns clients to any that are found. errors will contain an error for
|
|
|
|
// any devices that replied but which could not be queried, and err will be set
|
|
|
|
// if the discovery process failed outright.
|
|
|
|
//
|
|
|
|
// This is a typical entry calling point into this package.
|
|
|
|
func NewLayer3Forwarding1Clients() (clients []*Layer3Forwarding1, errors []error, err error) {
|
|
|
|
var genericClients []goupnp.ServiceClient
|
|
|
|
if genericClients, errors, err = goupnp.NewServiceClients(URN_Layer3Forwarding_1); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
clients = make([]*Layer3Forwarding1, len(genericClients))
|
|
|
|
for i := range genericClients {
|
|
|
|
clients[i] = &Layer3Forwarding1{genericClients[i]}
|
|
|
|
}
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
|
|
|
|
2013-12-31 17:52:43 +00:00
|
|
|
// Arguments:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewDefaultConnectionService:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *Layer3Forwarding1) SetDefaultConnectionService(NewDefaultConnectionService string) (err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewDefaultConnectionService string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if request.NewDefaultConnectionService, err = soap.MarshalString(NewDefaultConnectionService); err != nil {
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := interface{}(nil)
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_Layer3Forwarding_1, "SetDefaultConnectionService", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
// * NewDefaultConnectionService:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *Layer3Forwarding1) GetDefaultConnectionService() (NewDefaultConnectionService string, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewDefaultConnectionService string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_Layer3Forwarding_1, "GetDefaultConnectionService", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if NewDefaultConnectionService, err = soap.UnmarshalString(response.NewDefaultConnectionService); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 20:01:17 +00:00
|
|
|
// WANCableLinkConfig1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:WANCableLinkConfig:1". See
|
|
|
|
// goupnp.ServiceClient, which contains RootDevice and Service attributes which
|
|
|
|
// are provided for informational value.
|
2013-10-06 22:16:53 +00:00
|
|
|
type WANCableLinkConfig1 struct {
|
2013-12-31 20:01:17 +00:00
|
|
|
goupnp.ServiceClient
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewWANCableLinkConfig1Clients discovers instances of the service on the network,
|
|
|
|
// and returns clients to any that are found. errors will contain an error for
|
|
|
|
// any devices that replied but which could not be queried, and err will be set
|
|
|
|
// if the discovery process failed outright.
|
|
|
|
//
|
|
|
|
// This is a typical entry calling point into this package.
|
|
|
|
func NewWANCableLinkConfig1Clients() (clients []*WANCableLinkConfig1, errors []error, err error) {
|
|
|
|
var genericClients []goupnp.ServiceClient
|
|
|
|
if genericClients, errors, err = goupnp.NewServiceClients(URN_WANCableLinkConfig_1); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
clients = make([]*WANCableLinkConfig1, len(genericClients))
|
|
|
|
for i := range genericClients {
|
|
|
|
clients[i] = &WANCableLinkConfig1{genericClients[i]}
|
|
|
|
}
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
// * NewCableLinkConfigState: allowed values: notReady, dsSyncComplete, usParamAcquired, rangingComplete, ipComplete, todEstablished, paramTransferComplete, registrationComplete, operational, accessDenied
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
// * NewLinkType: allowed values: Ethernet
|
|
|
|
func (client *WANCableLinkConfig1) GetCableLinkConfigInfo() (NewCableLinkConfigState string, NewLinkType string, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewCableLinkConfigState string
|
2014-01-06 20:17:00 +00:00
|
|
|
|
|
|
|
NewLinkType string
|
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANCableLinkConfig_1, "GetCableLinkConfigInfo", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if NewCableLinkConfigState, err = soap.UnmarshalString(response.NewCableLinkConfigState); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if NewLinkType, err = soap.UnmarshalString(response.NewLinkType); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
|
|
|
return
|
|
|
|
}
|
2013-10-06 22:16:53 +00:00
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
// * NewDownstreamFrequency:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANCableLinkConfig1) GetDownstreamFrequency() (NewDownstreamFrequency uint32, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewDownstreamFrequency string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANCableLinkConfig_1, "GetDownstreamFrequency", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if NewDownstreamFrequency, err = soap.UnmarshalUi4(response.NewDownstreamFrequency); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
// * NewDownstreamModulation: allowed values: 64QAM, 256QAM
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANCableLinkConfig1) GetDownstreamModulation() (NewDownstreamModulation string, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewDownstreamModulation string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANCableLinkConfig_1, "GetDownstreamModulation", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if NewDownstreamModulation, err = soap.UnmarshalString(response.NewDownstreamModulation); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
// * NewUpstreamFrequency:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANCableLinkConfig1) GetUpstreamFrequency() (NewUpstreamFrequency uint32, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewUpstreamFrequency string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANCableLinkConfig_1, "GetUpstreamFrequency", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if NewUpstreamFrequency, err = soap.UnmarshalUi4(response.NewUpstreamFrequency); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
// * NewUpstreamModulation: allowed values: QPSK, 16QAM
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANCableLinkConfig1) GetUpstreamModulation() (NewUpstreamModulation string, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewUpstreamModulation string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANCableLinkConfig_1, "GetUpstreamModulation", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if NewUpstreamModulation, err = soap.UnmarshalString(response.NewUpstreamModulation); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
// * NewUpstreamChannelID:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANCableLinkConfig1) GetUpstreamChannelID() (NewUpstreamChannelID uint32, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewUpstreamChannelID string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANCableLinkConfig_1, "GetUpstreamChannelID", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if NewUpstreamChannelID, err = soap.UnmarshalUi4(response.NewUpstreamChannelID); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
// * NewUpstreamPowerLevel:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANCableLinkConfig1) GetUpstreamPowerLevel() (NewUpstreamPowerLevel uint32, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewUpstreamPowerLevel string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANCableLinkConfig_1, "GetUpstreamPowerLevel", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if NewUpstreamPowerLevel, err = soap.UnmarshalUi4(response.NewUpstreamPowerLevel); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
// * NewBPIEncryptionEnabled:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANCableLinkConfig1) GetBPIEncryptionEnabled() (NewBPIEncryptionEnabled bool, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewBPIEncryptionEnabled string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANCableLinkConfig_1, "GetBPIEncryptionEnabled", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if NewBPIEncryptionEnabled, err = soap.UnmarshalBoolean(response.NewBPIEncryptionEnabled); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
// * NewConfigFile:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANCableLinkConfig1) GetConfigFile() (NewConfigFile string, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewConfigFile string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANCableLinkConfig_1, "GetConfigFile", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if NewConfigFile, err = soap.UnmarshalString(response.NewConfigFile); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
// * NewTFTPServer:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANCableLinkConfig1) GetTFTPServer() (NewTFTPServer string, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewTFTPServer string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANCableLinkConfig_1, "GetTFTPServer", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if NewTFTPServer, err = soap.UnmarshalString(response.NewTFTPServer); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 20:01:17 +00:00
|
|
|
// WANCommonInterfaceConfig1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1". See
|
|
|
|
// goupnp.ServiceClient, which contains RootDevice and Service attributes which
|
|
|
|
// are provided for informational value.
|
2013-10-06 22:16:53 +00:00
|
|
|
type WANCommonInterfaceConfig1 struct {
|
2013-12-31 20:01:17 +00:00
|
|
|
goupnp.ServiceClient
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewWANCommonInterfaceConfig1Clients discovers instances of the service on the network,
|
|
|
|
// and returns clients to any that are found. errors will contain an error for
|
|
|
|
// any devices that replied but which could not be queried, and err will be set
|
|
|
|
// if the discovery process failed outright.
|
|
|
|
//
|
|
|
|
// This is a typical entry calling point into this package.
|
|
|
|
func NewWANCommonInterfaceConfig1Clients() (clients []*WANCommonInterfaceConfig1, errors []error, err error) {
|
|
|
|
var genericClients []goupnp.ServiceClient
|
|
|
|
if genericClients, errors, err = goupnp.NewServiceClients(URN_WANCommonInterfaceConfig_1); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
clients = make([]*WANCommonInterfaceConfig1, len(genericClients))
|
|
|
|
for i := range genericClients {
|
|
|
|
clients[i] = &WANCommonInterfaceConfig1{genericClients[i]}
|
|
|
|
}
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
|
|
|
|
2013-12-31 17:52:43 +00:00
|
|
|
// Arguments:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewEnabledForInternet:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANCommonInterfaceConfig1) SetEnabledForInternet(NewEnabledForInternet bool) (err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewEnabledForInternet string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if request.NewEnabledForInternet, err = soap.MarshalBoolean(NewEnabledForInternet); err != nil {
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := interface{}(nil)
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANCommonInterfaceConfig_1, "SetEnabledForInternet", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
// * NewEnabledForInternet:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANCommonInterfaceConfig1) GetEnabledForInternet() (NewEnabledForInternet bool, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewEnabledForInternet string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANCommonInterfaceConfig_1, "GetEnabledForInternet", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if NewEnabledForInternet, err = soap.UnmarshalBoolean(response.NewEnabledForInternet); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
// * NewWANAccessType: allowed values: DSL, POTS, Cable, Ethernet
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewLayer1UpstreamMaxBitRate:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewLayer1DownstreamMaxBitRate:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
// * NewPhysicalLinkStatus: allowed values: Up, Down
|
|
|
|
func (client *WANCommonInterfaceConfig1) GetCommonLinkProperties() (NewWANAccessType string, NewLayer1UpstreamMaxBitRate uint32, NewLayer1DownstreamMaxBitRate uint32, NewPhysicalLinkStatus string, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
|
|
|
NewWANAccessType string
|
|
|
|
|
|
|
|
NewLayer1UpstreamMaxBitRate string
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
NewLayer1DownstreamMaxBitRate string
|
2014-01-06 20:17:00 +00:00
|
|
|
|
|
|
|
NewPhysicalLinkStatus string
|
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANCommonInterfaceConfig_1, "GetCommonLinkProperties", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if NewWANAccessType, err = soap.UnmarshalString(response.NewWANAccessType); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if NewLayer1UpstreamMaxBitRate, err = soap.UnmarshalUi4(response.NewLayer1UpstreamMaxBitRate); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if NewLayer1DownstreamMaxBitRate, err = soap.UnmarshalUi4(response.NewLayer1DownstreamMaxBitRate); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if NewPhysicalLinkStatus, err = soap.UnmarshalString(response.NewPhysicalLinkStatus); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
// * NewWANAccessProvider:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANCommonInterfaceConfig1) GetWANAccessProvider() (NewWANAccessProvider string, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewWANAccessProvider string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANCommonInterfaceConfig_1, "GetWANAccessProvider", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if NewWANAccessProvider, err = soap.UnmarshalString(response.NewWANAccessProvider); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
// * NewMaximumActiveConnections: allowed value range: minimum=1, step=1
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANCommonInterfaceConfig1) GetMaximumActiveConnections() (NewMaximumActiveConnections uint16, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewMaximumActiveConnections string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANCommonInterfaceConfig_1, "GetMaximumActiveConnections", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if NewMaximumActiveConnections, err = soap.UnmarshalUi2(response.NewMaximumActiveConnections); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
// * NewTotalBytesSent:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANCommonInterfaceConfig1) GetTotalBytesSent() (NewTotalBytesSent uint32, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewTotalBytesSent string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANCommonInterfaceConfig_1, "GetTotalBytesSent", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if NewTotalBytesSent, err = soap.UnmarshalUi4(response.NewTotalBytesSent); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
// * NewTotalBytesReceived:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANCommonInterfaceConfig1) GetTotalBytesReceived() (NewTotalBytesReceived uint32, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewTotalBytesReceived string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANCommonInterfaceConfig_1, "GetTotalBytesReceived", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if NewTotalBytesReceived, err = soap.UnmarshalUi4(response.NewTotalBytesReceived); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
// * NewTotalPacketsSent:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANCommonInterfaceConfig1) GetTotalPacketsSent() (NewTotalPacketsSent uint32, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewTotalPacketsSent string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANCommonInterfaceConfig_1, "GetTotalPacketsSent", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if NewTotalPacketsSent, err = soap.UnmarshalUi4(response.NewTotalPacketsSent); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
// * NewTotalPacketsReceived:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANCommonInterfaceConfig1) GetTotalPacketsReceived() (NewTotalPacketsReceived uint32, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewTotalPacketsReceived string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANCommonInterfaceConfig_1, "GetTotalPacketsReceived", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if NewTotalPacketsReceived, err = soap.UnmarshalUi4(response.NewTotalPacketsReceived); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 17:52:43 +00:00
|
|
|
// Arguments:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewActiveConnectionIndex:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
|
|
|
// Return values:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewActiveConnDeviceContainer:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewActiveConnectionServiceID:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANCommonInterfaceConfig1) GetActiveConnection(NewActiveConnectionIndex uint16) (NewActiveConnDeviceContainer string, NewActiveConnectionServiceID string, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewActiveConnectionIndex string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if request.NewActiveConnectionIndex, err = soap.MarshalUi2(NewActiveConnectionIndex); err != nil {
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewActiveConnDeviceContainer string
|
2014-01-06 20:17:00 +00:00
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
NewActiveConnectionServiceID string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANCommonInterfaceConfig_1, "GetActiveConnection", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if NewActiveConnDeviceContainer, err = soap.UnmarshalString(response.NewActiveConnDeviceContainer); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if NewActiveConnectionServiceID, err = soap.UnmarshalString(response.NewActiveConnectionServiceID); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 20:01:17 +00:00
|
|
|
// WANDSLLinkConfig1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:WANDSLLinkConfig:1". See
|
|
|
|
// goupnp.ServiceClient, which contains RootDevice and Service attributes which
|
|
|
|
// are provided for informational value.
|
2013-10-06 22:16:53 +00:00
|
|
|
type WANDSLLinkConfig1 struct {
|
2013-12-31 20:01:17 +00:00
|
|
|
goupnp.ServiceClient
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewWANDSLLinkConfig1Clients discovers instances of the service on the network,
|
|
|
|
// and returns clients to any that are found. errors will contain an error for
|
|
|
|
// any devices that replied but which could not be queried, and err will be set
|
|
|
|
// if the discovery process failed outright.
|
|
|
|
//
|
|
|
|
// This is a typical entry calling point into this package.
|
|
|
|
func NewWANDSLLinkConfig1Clients() (clients []*WANDSLLinkConfig1, errors []error, err error) {
|
|
|
|
var genericClients []goupnp.ServiceClient
|
|
|
|
if genericClients, errors, err = goupnp.NewServiceClients(URN_WANDSLLinkConfig_1); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
clients = make([]*WANDSLLinkConfig1, len(genericClients))
|
|
|
|
for i := range genericClients {
|
|
|
|
clients[i] = &WANDSLLinkConfig1{genericClients[i]}
|
|
|
|
}
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
|
|
|
|
2013-12-31 17:52:43 +00:00
|
|
|
// Arguments:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewLinkType:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANDSLLinkConfig1) SetDSLLinkType(NewLinkType string) (err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewLinkType string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if request.NewLinkType, err = soap.MarshalString(NewLinkType); err != nil {
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := interface{}(nil)
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANDSLLinkConfig_1, "SetDSLLinkType", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewLinkType:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
// * NewLinkStatus: allowed values: Up, Down
|
|
|
|
func (client *WANDSLLinkConfig1) GetDSLLinkInfo() (NewLinkType string, NewLinkStatus string, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
|
|
|
NewLinkType string
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
NewLinkStatus string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANDSLLinkConfig_1, "GetDSLLinkInfo", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if NewLinkType, err = soap.UnmarshalString(response.NewLinkType); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if NewLinkStatus, err = soap.UnmarshalString(response.NewLinkStatus); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
// * NewAutoConfig:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANDSLLinkConfig1) GetAutoConfig() (NewAutoConfig bool, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewAutoConfig string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANDSLLinkConfig_1, "GetAutoConfig", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if NewAutoConfig, err = soap.UnmarshalBoolean(response.NewAutoConfig); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
// * NewModulationType:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANDSLLinkConfig1) GetModulationType() (NewModulationType string, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewModulationType string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANDSLLinkConfig_1, "GetModulationType", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if NewModulationType, err = soap.UnmarshalString(response.NewModulationType); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 17:52:43 +00:00
|
|
|
// Arguments:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewDestinationAddress:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANDSLLinkConfig1) SetDestinationAddress(NewDestinationAddress string) (err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewDestinationAddress string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if request.NewDestinationAddress, err = soap.MarshalString(NewDestinationAddress); err != nil {
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := interface{}(nil)
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANDSLLinkConfig_1, "SetDestinationAddress", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
// * NewDestinationAddress:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANDSLLinkConfig1) GetDestinationAddress() (NewDestinationAddress string, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewDestinationAddress string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANDSLLinkConfig_1, "GetDestinationAddress", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if NewDestinationAddress, err = soap.UnmarshalString(response.NewDestinationAddress); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 17:52:43 +00:00
|
|
|
// Arguments:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewATMEncapsulation:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANDSLLinkConfig1) SetATMEncapsulation(NewATMEncapsulation string) (err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewATMEncapsulation string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if request.NewATMEncapsulation, err = soap.MarshalString(NewATMEncapsulation); err != nil {
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := interface{}(nil)
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANDSLLinkConfig_1, "SetATMEncapsulation", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
// * NewATMEncapsulation:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANDSLLinkConfig1) GetATMEncapsulation() (NewATMEncapsulation string, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewATMEncapsulation string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANDSLLinkConfig_1, "GetATMEncapsulation", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if NewATMEncapsulation, err = soap.UnmarshalString(response.NewATMEncapsulation); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 17:52:43 +00:00
|
|
|
// Arguments:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewFCSPreserved:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANDSLLinkConfig1) SetFCSPreserved(NewFCSPreserved bool) (err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewFCSPreserved string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if request.NewFCSPreserved, err = soap.MarshalBoolean(NewFCSPreserved); err != nil {
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := interface{}(nil)
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANDSLLinkConfig_1, "SetFCSPreserved", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
// * NewFCSPreserved:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANDSLLinkConfig1) GetFCSPreserved() (NewFCSPreserved bool, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewFCSPreserved string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANDSLLinkConfig_1, "GetFCSPreserved", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if NewFCSPreserved, err = soap.UnmarshalBoolean(response.NewFCSPreserved); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 20:01:17 +00:00
|
|
|
// WANEthernetLinkConfig1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:WANEthernetLinkConfig:1". See
|
|
|
|
// goupnp.ServiceClient, which contains RootDevice and Service attributes which
|
|
|
|
// are provided for informational value.
|
2013-10-06 22:16:53 +00:00
|
|
|
type WANEthernetLinkConfig1 struct {
|
2013-12-31 20:01:17 +00:00
|
|
|
goupnp.ServiceClient
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewWANEthernetLinkConfig1Clients discovers instances of the service on the network,
|
|
|
|
// and returns clients to any that are found. errors will contain an error for
|
|
|
|
// any devices that replied but which could not be queried, and err will be set
|
|
|
|
// if the discovery process failed outright.
|
|
|
|
//
|
|
|
|
// This is a typical entry calling point into this package.
|
|
|
|
func NewWANEthernetLinkConfig1Clients() (clients []*WANEthernetLinkConfig1, errors []error, err error) {
|
|
|
|
var genericClients []goupnp.ServiceClient
|
|
|
|
if genericClients, errors, err = goupnp.NewServiceClients(URN_WANEthernetLinkConfig_1); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
clients = make([]*WANEthernetLinkConfig1, len(genericClients))
|
|
|
|
for i := range genericClients {
|
|
|
|
clients[i] = &WANEthernetLinkConfig1{genericClients[i]}
|
|
|
|
}
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
// * NewEthernetLinkStatus: allowed values: Up, Down
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANEthernetLinkConfig1) GetEthernetLinkStatus() (NewEthernetLinkStatus string, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewEthernetLinkStatus string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANEthernetLinkConfig_1, "GetEthernetLinkStatus", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if NewEthernetLinkStatus, err = soap.UnmarshalString(response.NewEthernetLinkStatus); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 20:01:17 +00:00
|
|
|
// WANIPConnection1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:WANIPConnection:1". See
|
|
|
|
// goupnp.ServiceClient, which contains RootDevice and Service attributes which
|
|
|
|
// are provided for informational value.
|
2013-10-06 22:16:53 +00:00
|
|
|
type WANIPConnection1 struct {
|
2013-12-31 20:01:17 +00:00
|
|
|
goupnp.ServiceClient
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewWANIPConnection1Clients discovers instances of the service on the network,
|
|
|
|
// and returns clients to any that are found. errors will contain an error for
|
|
|
|
// any devices that replied but which could not be queried, and err will be set
|
|
|
|
// if the discovery process failed outright.
|
|
|
|
//
|
|
|
|
// This is a typical entry calling point into this package.
|
|
|
|
func NewWANIPConnection1Clients() (clients []*WANIPConnection1, errors []error, err error) {
|
|
|
|
var genericClients []goupnp.ServiceClient
|
|
|
|
if genericClients, errors, err = goupnp.NewServiceClients(URN_WANIPConnection_1); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
clients = make([]*WANIPConnection1, len(genericClients))
|
|
|
|
for i := range genericClients {
|
|
|
|
clients[i] = &WANIPConnection1{genericClients[i]}
|
|
|
|
}
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
|
|
|
|
2013-12-31 17:52:43 +00:00
|
|
|
// Arguments:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewConnectionType:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANIPConnection1) SetConnectionType(NewConnectionType string) (err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewConnectionType string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if request.NewConnectionType, err = soap.MarshalString(NewConnectionType); err != nil {
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := interface{}(nil)
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANIPConnection_1, "SetConnectionType", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewConnectionType:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
// * NewPossibleConnectionTypes: allowed values: Unconfigured, IP_Routed, IP_Bridged
|
|
|
|
func (client *WANIPConnection1) GetConnectionTypeInfo() (NewConnectionType string, NewPossibleConnectionTypes string, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
|
|
|
NewConnectionType string
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
NewPossibleConnectionTypes string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANIPConnection_1, "GetConnectionTypeInfo", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if NewConnectionType, err = soap.UnmarshalString(response.NewConnectionType); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if NewPossibleConnectionTypes, err = soap.UnmarshalString(response.NewPossibleConnectionTypes); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANIPConnection1) RequestConnection() (err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := interface{}(nil)
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANIPConnection_1, "RequestConnection", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANIPConnection1) RequestTermination() (err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := interface{}(nil)
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANIPConnection_1, "RequestTermination", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANIPConnection1) ForceTermination() (err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := interface{}(nil)
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANIPConnection_1, "ForceTermination", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 17:52:43 +00:00
|
|
|
// Arguments:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewAutoDisconnectTime:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANIPConnection1) SetAutoDisconnectTime(NewAutoDisconnectTime uint32) (err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewAutoDisconnectTime string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if request.NewAutoDisconnectTime, err = soap.MarshalUi4(NewAutoDisconnectTime); err != nil {
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := interface{}(nil)
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANIPConnection_1, "SetAutoDisconnectTime", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 17:52:43 +00:00
|
|
|
// Arguments:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewIdleDisconnectTime:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANIPConnection1) SetIdleDisconnectTime(NewIdleDisconnectTime uint32) (err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewIdleDisconnectTime string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if request.NewIdleDisconnectTime, err = soap.MarshalUi4(NewIdleDisconnectTime); err != nil {
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := interface{}(nil)
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANIPConnection_1, "SetIdleDisconnectTime", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 17:52:43 +00:00
|
|
|
// Arguments:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewWarnDisconnectDelay:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANIPConnection1) SetWarnDisconnectDelay(NewWarnDisconnectDelay uint32) (err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewWarnDisconnectDelay string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if request.NewWarnDisconnectDelay, err = soap.MarshalUi4(NewWarnDisconnectDelay); err != nil {
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := interface{}(nil)
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANIPConnection_1, "SetWarnDisconnectDelay", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
// * NewConnectionStatus: allowed values: Unconfigured, Connected, Disconnected
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
// * NewLastConnectionError: allowed values: ERROR_NONE
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewUptime:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANIPConnection1) GetStatusInfo() (NewConnectionStatus string, NewLastConnectionError string, NewUptime uint32, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
|
|
|
NewConnectionStatus string
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
NewLastConnectionError string
|
2014-01-06 20:17:00 +00:00
|
|
|
|
|
|
|
NewUptime string
|
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANIPConnection_1, "GetStatusInfo", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if NewConnectionStatus, err = soap.UnmarshalString(response.NewConnectionStatus); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if NewLastConnectionError, err = soap.UnmarshalString(response.NewLastConnectionError); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if NewUptime, err = soap.UnmarshalUi4(response.NewUptime); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
// * NewAutoDisconnectTime:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANIPConnection1) GetAutoDisconnectTime() (NewAutoDisconnectTime uint32, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewAutoDisconnectTime string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANIPConnection_1, "GetAutoDisconnectTime", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if NewAutoDisconnectTime, err = soap.UnmarshalUi4(response.NewAutoDisconnectTime); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
// * NewIdleDisconnectTime:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANIPConnection1) GetIdleDisconnectTime() (NewIdleDisconnectTime uint32, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewIdleDisconnectTime string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANIPConnection_1, "GetIdleDisconnectTime", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if NewIdleDisconnectTime, err = soap.UnmarshalUi4(response.NewIdleDisconnectTime); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
// * NewWarnDisconnectDelay:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANIPConnection1) GetWarnDisconnectDelay() (NewWarnDisconnectDelay uint32, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewWarnDisconnectDelay string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANIPConnection_1, "GetWarnDisconnectDelay", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if NewWarnDisconnectDelay, err = soap.UnmarshalUi4(response.NewWarnDisconnectDelay); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewRSIPAvailable:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewNATEnabled:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANIPConnection1) GetNATRSIPStatus() (NewRSIPAvailable bool, NewNATEnabled bool, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewRSIPAvailable string
|
2014-01-06 20:17:00 +00:00
|
|
|
|
|
|
|
NewNATEnabled string
|
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANIPConnection_1, "GetNATRSIPStatus", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if NewRSIPAvailable, err = soap.UnmarshalBoolean(response.NewRSIPAvailable); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if NewNATEnabled, err = soap.UnmarshalBoolean(response.NewNATEnabled); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 17:52:43 +00:00
|
|
|
// Arguments:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewPortMappingIndex:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
|
|
|
// Return values:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewRemoteHost:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewExternalPort:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
// * NewProtocol: allowed values: TCP, UDP
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewInternalPort:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewInternalClient:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewEnabled:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewPortMappingDescription:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewLeaseDuration:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANIPConnection1) GetGenericPortMappingEntry(NewPortMappingIndex uint16) (NewRemoteHost string, NewExternalPort uint16, NewProtocol string, NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewPortMappingIndex string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if request.NewPortMappingIndex, err = soap.MarshalUi2(NewPortMappingIndex); err != nil {
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
|
|
|
NewRemoteHost string
|
|
|
|
|
|
|
|
NewExternalPort string
|
|
|
|
|
|
|
|
NewProtocol string
|
|
|
|
|
|
|
|
NewInternalPort string
|
|
|
|
|
|
|
|
NewInternalClient string
|
|
|
|
|
|
|
|
NewEnabled string
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
NewPortMappingDescription string
|
2014-01-06 20:17:00 +00:00
|
|
|
|
|
|
|
NewLeaseDuration string
|
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANIPConnection_1, "GetGenericPortMappingEntry", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if NewRemoteHost, err = soap.UnmarshalString(response.NewRemoteHost); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if NewExternalPort, err = soap.UnmarshalUi2(response.NewExternalPort); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if NewProtocol, err = soap.UnmarshalString(response.NewProtocol); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if NewInternalPort, err = soap.UnmarshalUi2(response.NewInternalPort); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if NewInternalClient, err = soap.UnmarshalString(response.NewInternalClient); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if NewEnabled, err = soap.UnmarshalBoolean(response.NewEnabled); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if NewPortMappingDescription, err = soap.UnmarshalString(response.NewPortMappingDescription); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if NewLeaseDuration, err = soap.UnmarshalUi4(response.NewLeaseDuration); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 17:52:43 +00:00
|
|
|
// Arguments:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewRemoteHost:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewExternalPort:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
// * NewProtocol: allowed values: TCP, UDP
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
|
|
|
// Return values:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewInternalPort:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewInternalClient:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewEnabled:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewPortMappingDescription:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewLeaseDuration:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANIPConnection1) GetSpecificPortMappingEntry(NewRemoteHost string, NewExternalPort uint16, NewProtocol string) (NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := &struct {
|
|
|
|
NewRemoteHost string
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
NewExternalPort string
|
2014-01-06 20:17:00 +00:00
|
|
|
|
|
|
|
NewProtocol string
|
|
|
|
}{}
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if request.NewRemoteHost, err = soap.MarshalString(NewRemoteHost); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.NewExternalPort, err = soap.MarshalUi2(NewExternalPort); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.NewProtocol, err = soap.MarshalString(NewProtocol); err != nil {
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
|
|
|
NewInternalPort string
|
|
|
|
|
|
|
|
NewInternalClient string
|
|
|
|
|
|
|
|
NewEnabled string
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
NewPortMappingDescription string
|
2014-01-06 20:17:00 +00:00
|
|
|
|
|
|
|
NewLeaseDuration string
|
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANIPConnection_1, "GetSpecificPortMappingEntry", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if NewInternalPort, err = soap.UnmarshalUi2(response.NewInternalPort); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if NewInternalClient, err = soap.UnmarshalString(response.NewInternalClient); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if NewEnabled, err = soap.UnmarshalBoolean(response.NewEnabled); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if NewPortMappingDescription, err = soap.UnmarshalString(response.NewPortMappingDescription); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if NewLeaseDuration, err = soap.UnmarshalUi4(response.NewLeaseDuration); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 17:52:43 +00:00
|
|
|
// Arguments:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewRemoteHost:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewExternalPort:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
// * NewProtocol: allowed values: TCP, UDP
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewInternalPort:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewInternalClient:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewEnabled:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewPortMappingDescription:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewLeaseDuration:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANIPConnection1) AddPortMapping(NewRemoteHost string, NewExternalPort uint16, NewProtocol string, NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32) (err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := &struct {
|
|
|
|
NewRemoteHost string
|
|
|
|
|
|
|
|
NewExternalPort string
|
|
|
|
|
|
|
|
NewProtocol string
|
|
|
|
|
|
|
|
NewInternalPort string
|
|
|
|
|
|
|
|
NewInternalClient string
|
|
|
|
|
|
|
|
NewEnabled string
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
NewPortMappingDescription string
|
2014-01-06 20:17:00 +00:00
|
|
|
|
|
|
|
NewLeaseDuration string
|
|
|
|
}{}
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if request.NewRemoteHost, err = soap.MarshalString(NewRemoteHost); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.NewExternalPort, err = soap.MarshalUi2(NewExternalPort); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.NewProtocol, err = soap.MarshalString(NewProtocol); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.NewInternalPort, err = soap.MarshalUi2(NewInternalPort); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.NewInternalClient, err = soap.MarshalString(NewInternalClient); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.NewEnabled, err = soap.MarshalBoolean(NewEnabled); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.NewPortMappingDescription, err = soap.MarshalString(NewPortMappingDescription); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.NewLeaseDuration, err = soap.MarshalUi4(NewLeaseDuration); err != nil {
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := interface{}(nil)
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANIPConnection_1, "AddPortMapping", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 17:52:43 +00:00
|
|
|
// Arguments:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewRemoteHost:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewExternalPort:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
// * NewProtocol: allowed values: TCP, UDP
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANIPConnection1) DeletePortMapping(NewRemoteHost string, NewExternalPort uint16, NewProtocol string) (err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := &struct {
|
|
|
|
NewRemoteHost string
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
NewExternalPort string
|
2014-01-06 20:17:00 +00:00
|
|
|
|
|
|
|
NewProtocol string
|
|
|
|
}{}
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if request.NewRemoteHost, err = soap.MarshalString(NewRemoteHost); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.NewExternalPort, err = soap.MarshalUi2(NewExternalPort); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.NewProtocol, err = soap.MarshalString(NewProtocol); err != nil {
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := interface{}(nil)
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANIPConnection_1, "DeletePortMapping", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
// * NewExternalIPAddress:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANIPConnection1) GetExternalIPAddress() (NewExternalIPAddress string, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewExternalIPAddress string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANIPConnection_1, "GetExternalIPAddress", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if NewExternalIPAddress, err = soap.UnmarshalString(response.NewExternalIPAddress); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 20:01:17 +00:00
|
|
|
// WANIPConnection2 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:WANIPConnection:2". See
|
|
|
|
// goupnp.ServiceClient, which contains RootDevice and Service attributes which
|
|
|
|
// are provided for informational value.
|
2013-10-06 22:16:53 +00:00
|
|
|
type WANIPConnection2 struct {
|
2013-12-31 20:01:17 +00:00
|
|
|
goupnp.ServiceClient
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewWANIPConnection2Clients discovers instances of the service on the network,
|
|
|
|
// and returns clients to any that are found. errors will contain an error for
|
|
|
|
// any devices that replied but which could not be queried, and err will be set
|
|
|
|
// if the discovery process failed outright.
|
|
|
|
//
|
|
|
|
// This is a typical entry calling point into this package.
|
|
|
|
func NewWANIPConnection2Clients() (clients []*WANIPConnection2, errors []error, err error) {
|
|
|
|
var genericClients []goupnp.ServiceClient
|
|
|
|
if genericClients, errors, err = goupnp.NewServiceClients(URN_WANIPConnection_2); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
clients = make([]*WANIPConnection2, len(genericClients))
|
|
|
|
for i := range genericClients {
|
|
|
|
clients[i] = &WANIPConnection2{genericClients[i]}
|
|
|
|
}
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
|
|
|
|
2013-12-31 17:52:43 +00:00
|
|
|
// Arguments:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
// * NewConnectionType: allowed values: Unconfigured, IP_Routed, IP_Bridged
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANIPConnection2) SetConnectionType(NewConnectionType string) (err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewConnectionType string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if request.NewConnectionType, err = soap.MarshalString(NewConnectionType); err != nil {
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := interface{}(nil)
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANIPConnection_2, "SetConnectionType", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
// * NewConnectionType: allowed values: Unconfigured, IP_Routed, IP_Bridged
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewPossibleConnectionTypes:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANIPConnection2) GetConnectionTypeInfo() (NewConnectionType string, NewPossibleConnectionTypes string, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
|
|
|
NewConnectionType string
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
NewPossibleConnectionTypes string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANIPConnection_2, "GetConnectionTypeInfo", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if NewConnectionType, err = soap.UnmarshalString(response.NewConnectionType); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if NewPossibleConnectionTypes, err = soap.UnmarshalString(response.NewPossibleConnectionTypes); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANIPConnection2) RequestConnection() (err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := interface{}(nil)
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANIPConnection_2, "RequestConnection", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANIPConnection2) RequestTermination() (err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := interface{}(nil)
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANIPConnection_2, "RequestTermination", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANIPConnection2) ForceTermination() (err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := interface{}(nil)
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANIPConnection_2, "ForceTermination", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 17:52:43 +00:00
|
|
|
// Arguments:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewAutoDisconnectTime:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANIPConnection2) SetAutoDisconnectTime(NewAutoDisconnectTime uint32) (err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewAutoDisconnectTime string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if request.NewAutoDisconnectTime, err = soap.MarshalUi4(NewAutoDisconnectTime); err != nil {
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := interface{}(nil)
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANIPConnection_2, "SetAutoDisconnectTime", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 17:52:43 +00:00
|
|
|
// Arguments:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewIdleDisconnectTime:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANIPConnection2) SetIdleDisconnectTime(NewIdleDisconnectTime uint32) (err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewIdleDisconnectTime string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if request.NewIdleDisconnectTime, err = soap.MarshalUi4(NewIdleDisconnectTime); err != nil {
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := interface{}(nil)
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANIPConnection_2, "SetIdleDisconnectTime", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 17:52:43 +00:00
|
|
|
// Arguments:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewWarnDisconnectDelay:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANIPConnection2) SetWarnDisconnectDelay(NewWarnDisconnectDelay uint32) (err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewWarnDisconnectDelay string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if request.NewWarnDisconnectDelay, err = soap.MarshalUi4(NewWarnDisconnectDelay); err != nil {
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := interface{}(nil)
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANIPConnection_2, "SetWarnDisconnectDelay", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
// * NewConnectionStatus: allowed values: Unconfigured, Connected, Disconnected
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
// * NewLastConnectionError: allowed values: ERROR_NONE
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewUptime:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANIPConnection2) GetStatusInfo() (NewConnectionStatus string, NewLastConnectionError string, NewUptime uint32, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
|
|
|
NewConnectionStatus string
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
NewLastConnectionError string
|
2014-01-06 20:17:00 +00:00
|
|
|
|
|
|
|
NewUptime string
|
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANIPConnection_2, "GetStatusInfo", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if NewConnectionStatus, err = soap.UnmarshalString(response.NewConnectionStatus); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if NewLastConnectionError, err = soap.UnmarshalString(response.NewLastConnectionError); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if NewUptime, err = soap.UnmarshalUi4(response.NewUptime); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
// * NewAutoDisconnectTime:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANIPConnection2) GetAutoDisconnectTime() (NewAutoDisconnectTime uint32, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewAutoDisconnectTime string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANIPConnection_2, "GetAutoDisconnectTime", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if NewAutoDisconnectTime, err = soap.UnmarshalUi4(response.NewAutoDisconnectTime); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
// * NewIdleDisconnectTime:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANIPConnection2) GetIdleDisconnectTime() (NewIdleDisconnectTime uint32, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewIdleDisconnectTime string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANIPConnection_2, "GetIdleDisconnectTime", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if NewIdleDisconnectTime, err = soap.UnmarshalUi4(response.NewIdleDisconnectTime); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
// * NewWarnDisconnectDelay:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANIPConnection2) GetWarnDisconnectDelay() (NewWarnDisconnectDelay uint32, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewWarnDisconnectDelay string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANIPConnection_2, "GetWarnDisconnectDelay", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if NewWarnDisconnectDelay, err = soap.UnmarshalUi4(response.NewWarnDisconnectDelay); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewRSIPAvailable:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewNATEnabled:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANIPConnection2) GetNATRSIPStatus() (NewRSIPAvailable bool, NewNATEnabled bool, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewRSIPAvailable string
|
2014-01-06 20:17:00 +00:00
|
|
|
|
|
|
|
NewNATEnabled string
|
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANIPConnection_2, "GetNATRSIPStatus", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if NewRSIPAvailable, err = soap.UnmarshalBoolean(response.NewRSIPAvailable); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if NewNATEnabled, err = soap.UnmarshalBoolean(response.NewNATEnabled); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 17:52:43 +00:00
|
|
|
// Arguments:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewPortMappingIndex:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
|
|
|
// Return values:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewRemoteHost:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewExternalPort:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
// * NewProtocol: allowed values: TCP, UDP
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
// * NewInternalPort: allowed value range: minimum=1, maximum=65535
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewInternalClient:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewEnabled:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewPortMappingDescription:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
// * NewLeaseDuration: allowed value range: minimum=0, maximum=604800
|
|
|
|
func (client *WANIPConnection2) GetGenericPortMappingEntry(NewPortMappingIndex uint16) (NewRemoteHost string, NewExternalPort uint16, NewProtocol string, NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewPortMappingIndex string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if request.NewPortMappingIndex, err = soap.MarshalUi2(NewPortMappingIndex); err != nil {
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
|
|
|
NewRemoteHost string
|
|
|
|
|
|
|
|
NewExternalPort string
|
|
|
|
|
|
|
|
NewProtocol string
|
|
|
|
|
|
|
|
NewInternalPort string
|
|
|
|
|
|
|
|
NewInternalClient string
|
|
|
|
|
|
|
|
NewEnabled string
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
NewPortMappingDescription string
|
2014-01-06 20:17:00 +00:00
|
|
|
|
|
|
|
NewLeaseDuration string
|
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANIPConnection_2, "GetGenericPortMappingEntry", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if NewRemoteHost, err = soap.UnmarshalString(response.NewRemoteHost); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if NewExternalPort, err = soap.UnmarshalUi2(response.NewExternalPort); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if NewProtocol, err = soap.UnmarshalString(response.NewProtocol); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if NewInternalPort, err = soap.UnmarshalUi2(response.NewInternalPort); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if NewInternalClient, err = soap.UnmarshalString(response.NewInternalClient); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if NewEnabled, err = soap.UnmarshalBoolean(response.NewEnabled); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if NewPortMappingDescription, err = soap.UnmarshalString(response.NewPortMappingDescription); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if NewLeaseDuration, err = soap.UnmarshalUi4(response.NewLeaseDuration); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
|
|
|
return
|
|
|
|
}
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 17:52:43 +00:00
|
|
|
// Arguments:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewRemoteHost:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewExternalPort:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
// * NewProtocol: allowed values: TCP, UDP
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
|
|
|
// Return values:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
// * NewInternalPort: allowed value range: minimum=1, maximum=65535
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewInternalClient:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewEnabled:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewPortMappingDescription:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
// * NewLeaseDuration: allowed value range: minimum=0, maximum=604800
|
|
|
|
func (client *WANIPConnection2) GetSpecificPortMappingEntry(NewRemoteHost string, NewExternalPort uint16, NewProtocol string) (NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := &struct {
|
|
|
|
NewRemoteHost string
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
NewExternalPort string
|
2014-01-06 20:17:00 +00:00
|
|
|
|
|
|
|
NewProtocol string
|
|
|
|
}{}
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if request.NewRemoteHost, err = soap.MarshalString(NewRemoteHost); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.NewExternalPort, err = soap.MarshalUi2(NewExternalPort); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.NewProtocol, err = soap.MarshalString(NewProtocol); err != nil {
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
|
|
|
NewInternalPort string
|
|
|
|
|
|
|
|
NewInternalClient string
|
|
|
|
|
|
|
|
NewEnabled string
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
NewPortMappingDescription string
|
2014-01-06 20:17:00 +00:00
|
|
|
|
|
|
|
NewLeaseDuration string
|
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANIPConnection_2, "GetSpecificPortMappingEntry", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if NewInternalPort, err = soap.UnmarshalUi2(response.NewInternalPort); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if NewInternalClient, err = soap.UnmarshalString(response.NewInternalClient); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if NewEnabled, err = soap.UnmarshalBoolean(response.NewEnabled); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if NewPortMappingDescription, err = soap.UnmarshalString(response.NewPortMappingDescription); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if NewLeaseDuration, err = soap.UnmarshalUi4(response.NewLeaseDuration); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 17:52:43 +00:00
|
|
|
// Arguments:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewRemoteHost:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewExternalPort:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
// * NewProtocol: allowed values: TCP, UDP
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
// * NewInternalPort: allowed value range: minimum=1, maximum=65535
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewInternalClient:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewEnabled:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewPortMappingDescription:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
// * NewLeaseDuration: allowed value range: minimum=0, maximum=604800
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANIPConnection2) AddPortMapping(NewRemoteHost string, NewExternalPort uint16, NewProtocol string, NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32) (err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := &struct {
|
|
|
|
NewRemoteHost string
|
|
|
|
|
|
|
|
NewExternalPort string
|
|
|
|
|
|
|
|
NewProtocol string
|
|
|
|
|
|
|
|
NewInternalPort string
|
|
|
|
|
|
|
|
NewInternalClient string
|
|
|
|
|
|
|
|
NewEnabled string
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
NewPortMappingDescription string
|
2014-01-06 20:17:00 +00:00
|
|
|
|
|
|
|
NewLeaseDuration string
|
|
|
|
}{}
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if request.NewRemoteHost, err = soap.MarshalString(NewRemoteHost); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.NewExternalPort, err = soap.MarshalUi2(NewExternalPort); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.NewProtocol, err = soap.MarshalString(NewProtocol); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.NewInternalPort, err = soap.MarshalUi2(NewInternalPort); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.NewInternalClient, err = soap.MarshalString(NewInternalClient); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.NewEnabled, err = soap.MarshalBoolean(NewEnabled); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.NewPortMappingDescription, err = soap.MarshalString(NewPortMappingDescription); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.NewLeaseDuration, err = soap.MarshalUi4(NewLeaseDuration); err != nil {
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := interface{}(nil)
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANIPConnection_2, "AddPortMapping", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 17:52:43 +00:00
|
|
|
// Arguments:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewRemoteHost:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewExternalPort:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
// * NewProtocol: allowed values: TCP, UDP
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANIPConnection2) DeletePortMapping(NewRemoteHost string, NewExternalPort uint16, NewProtocol string) (err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := &struct {
|
|
|
|
NewRemoteHost string
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
NewExternalPort string
|
2014-01-06 20:17:00 +00:00
|
|
|
|
|
|
|
NewProtocol string
|
|
|
|
}{}
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if request.NewRemoteHost, err = soap.MarshalString(NewRemoteHost); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.NewExternalPort, err = soap.MarshalUi2(NewExternalPort); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.NewProtocol, err = soap.MarshalString(NewProtocol); err != nil {
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := interface{}(nil)
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANIPConnection_2, "DeletePortMapping", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 17:52:43 +00:00
|
|
|
// Arguments:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewStartPort:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewEndPort:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
// * NewProtocol: allowed values: TCP, UDP
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewManage:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANIPConnection2) DeletePortMappingRange(NewStartPort uint16, NewEndPort uint16, NewProtocol string, NewManage bool) (err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewStartPort string
|
2014-01-06 20:17:00 +00:00
|
|
|
|
|
|
|
NewEndPort string
|
|
|
|
|
|
|
|
NewProtocol string
|
|
|
|
|
|
|
|
NewManage string
|
|
|
|
}{}
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if request.NewStartPort, err = soap.MarshalUi2(NewStartPort); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.NewEndPort, err = soap.MarshalUi2(NewEndPort); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.NewProtocol, err = soap.MarshalString(NewProtocol); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.NewManage, err = soap.MarshalBoolean(NewManage); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := interface{}(nil)
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANIPConnection_2, "DeletePortMappingRange", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
// * NewExternalIPAddress:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANIPConnection2) GetExternalIPAddress() (NewExternalIPAddress string, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewExternalIPAddress string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANIPConnection_2, "GetExternalIPAddress", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if NewExternalIPAddress, err = soap.UnmarshalString(response.NewExternalIPAddress); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 17:52:43 +00:00
|
|
|
// Arguments:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewStartPort:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewEndPort:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
// * NewProtocol: allowed values: TCP, UDP
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewManage:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewNumberOfPorts:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
|
|
|
// Return values:
|
2013-12-31 17:52:43 +00:00
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
// * NewPortListing:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANIPConnection2) GetListOfPortMappings(NewStartPort uint16, NewEndPort uint16, NewProtocol string, NewManage bool, NewNumberOfPorts uint16) (NewPortListing string, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := &struct {
|
|
|
|
NewStartPort string
|
|
|
|
|
|
|
|
NewEndPort string
|
|
|
|
|
|
|
|
NewProtocol string
|
|
|
|
|
|
|
|
NewManage string
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
NewNumberOfPorts string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if request.NewStartPort, err = soap.MarshalUi2(NewStartPort); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.NewEndPort, err = soap.MarshalUi2(NewEndPort); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.NewProtocol, err = soap.MarshalString(NewProtocol); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.NewManage, err = soap.MarshalBoolean(NewManage); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.NewNumberOfPorts, err = soap.MarshalUi2(NewNumberOfPorts); err != nil {
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewPortListing string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANIPConnection_2, "GetListOfPortMappings", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if NewPortListing, err = soap.UnmarshalString(response.NewPortListing); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 17:52:43 +00:00
|
|
|
// Arguments:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewRemoteHost:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewExternalPort:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
// * NewProtocol: allowed values: TCP, UDP
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
// * NewInternalPort: allowed value range: minimum=1, maximum=65535
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewInternalClient:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewEnabled:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewPortMappingDescription:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
// * NewLeaseDuration: allowed value range: minimum=0, maximum=604800
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
|
|
|
// Return values:
|
2013-12-31 17:52:43 +00:00
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
// * NewReservedPort:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANIPConnection2) AddAnyPortMapping(NewRemoteHost string, NewExternalPort uint16, NewProtocol string, NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32) (NewReservedPort uint16, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := &struct {
|
|
|
|
NewRemoteHost string
|
|
|
|
|
|
|
|
NewExternalPort string
|
|
|
|
|
|
|
|
NewProtocol string
|
|
|
|
|
|
|
|
NewInternalPort string
|
|
|
|
|
|
|
|
NewInternalClient string
|
|
|
|
|
|
|
|
NewEnabled string
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
NewPortMappingDescription string
|
2014-01-06 20:17:00 +00:00
|
|
|
|
|
|
|
NewLeaseDuration string
|
|
|
|
}{}
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if request.NewRemoteHost, err = soap.MarshalString(NewRemoteHost); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.NewExternalPort, err = soap.MarshalUi2(NewExternalPort); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.NewProtocol, err = soap.MarshalString(NewProtocol); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.NewInternalPort, err = soap.MarshalUi2(NewInternalPort); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.NewInternalClient, err = soap.MarshalString(NewInternalClient); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.NewEnabled, err = soap.MarshalBoolean(NewEnabled); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.NewPortMappingDescription, err = soap.MarshalString(NewPortMappingDescription); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.NewLeaseDuration, err = soap.MarshalUi4(NewLeaseDuration); err != nil {
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewReservedPort string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANIPConnection_2, "AddAnyPortMapping", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if NewReservedPort, err = soap.UnmarshalUi2(response.NewReservedPort); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 20:01:17 +00:00
|
|
|
// WANIPv6FirewallControl1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:WANIPv6FirewallControl:1". See
|
|
|
|
// goupnp.ServiceClient, which contains RootDevice and Service attributes which
|
|
|
|
// are provided for informational value.
|
2013-10-06 22:16:53 +00:00
|
|
|
type WANIPv6FirewallControl1 struct {
|
2013-12-31 20:01:17 +00:00
|
|
|
goupnp.ServiceClient
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewWANIPv6FirewallControl1Clients discovers instances of the service on the network,
|
|
|
|
// and returns clients to any that are found. errors will contain an error for
|
|
|
|
// any devices that replied but which could not be queried, and err will be set
|
|
|
|
// if the discovery process failed outright.
|
|
|
|
//
|
|
|
|
// This is a typical entry calling point into this package.
|
|
|
|
func NewWANIPv6FirewallControl1Clients() (clients []*WANIPv6FirewallControl1, errors []error, err error) {
|
|
|
|
var genericClients []goupnp.ServiceClient
|
|
|
|
if genericClients, errors, err = goupnp.NewServiceClients(URN_WANIPv6FirewallControl_1); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
clients = make([]*WANIPv6FirewallControl1, len(genericClients))
|
|
|
|
for i := range genericClients {
|
|
|
|
clients[i] = &WANIPv6FirewallControl1{genericClients[i]}
|
|
|
|
}
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * FirewallEnabled:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * InboundPinholeAllowed:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANIPv6FirewallControl1) GetFirewallStatus() (FirewallEnabled bool, InboundPinholeAllowed bool, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
|
|
|
FirewallEnabled string
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
InboundPinholeAllowed string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANIPv6FirewallControl_1, "GetFirewallStatus", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if FirewallEnabled, err = soap.UnmarshalBoolean(response.FirewallEnabled); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if InboundPinholeAllowed, err = soap.UnmarshalBoolean(response.InboundPinholeAllowed); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 17:52:43 +00:00
|
|
|
// Arguments:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * RemoteHost:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * RemotePort:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * InternalClient:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * InternalPort:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * Protocol:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
|
|
|
// Return values:
|
2013-12-31 17:52:43 +00:00
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
// * OutboundPinholeTimeout:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANIPv6FirewallControl1) GetOutboundPinholeTimeout(RemoteHost string, RemotePort uint16, InternalClient string, InternalPort uint16, Protocol uint16) (OutboundPinholeTimeout uint32, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := &struct {
|
|
|
|
RemoteHost string
|
|
|
|
|
|
|
|
RemotePort string
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
InternalClient string
|
2014-01-06 20:17:00 +00:00
|
|
|
|
|
|
|
InternalPort string
|
|
|
|
|
|
|
|
Protocol string
|
|
|
|
}{}
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if request.RemoteHost, err = soap.MarshalString(RemoteHost); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.RemotePort, err = soap.MarshalUi2(RemotePort); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.InternalClient, err = soap.MarshalString(InternalClient); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.InternalPort, err = soap.MarshalUi2(InternalPort); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.Protocol, err = soap.MarshalUi2(Protocol); err != nil {
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
OutboundPinholeTimeout string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANIPv6FirewallControl_1, "GetOutboundPinholeTimeout", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if OutboundPinholeTimeout, err = soap.UnmarshalUi4(response.OutboundPinholeTimeout); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 17:52:43 +00:00
|
|
|
// Arguments:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * RemoteHost:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * RemotePort:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * InternalClient:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * InternalPort:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * Protocol:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
// * LeaseTime: allowed value range: minimum=1, maximum=86400
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
|
|
|
// Return values:
|
2013-12-31 17:52:43 +00:00
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
// * UniqueID:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANIPv6FirewallControl1) AddPinhole(RemoteHost string, RemotePort uint16, InternalClient string, InternalPort uint16, Protocol uint16, LeaseTime uint32) (UniqueID uint16, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := &struct {
|
|
|
|
RemoteHost string
|
|
|
|
|
|
|
|
RemotePort string
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
InternalClient string
|
2014-01-06 20:17:00 +00:00
|
|
|
|
|
|
|
InternalPort string
|
|
|
|
|
|
|
|
Protocol string
|
|
|
|
|
|
|
|
LeaseTime string
|
|
|
|
}{}
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if request.RemoteHost, err = soap.MarshalString(RemoteHost); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.RemotePort, err = soap.MarshalUi2(RemotePort); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.InternalClient, err = soap.MarshalString(InternalClient); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.InternalPort, err = soap.MarshalUi2(InternalPort); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.Protocol, err = soap.MarshalUi2(Protocol); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.LeaseTime, err = soap.MarshalUi4(LeaseTime); err != nil {
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
UniqueID string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANIPv6FirewallControl_1, "AddPinhole", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if UniqueID, err = soap.UnmarshalUi2(response.UniqueID); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 17:52:43 +00:00
|
|
|
// Arguments:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * UniqueID:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
// * NewLeaseTime: allowed value range: minimum=1, maximum=86400
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANIPv6FirewallControl1) UpdatePinhole(UniqueID uint16, NewLeaseTime uint32) (err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := &struct {
|
|
|
|
UniqueID string
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
NewLeaseTime string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if request.UniqueID, err = soap.MarshalUi2(UniqueID); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.NewLeaseTime, err = soap.MarshalUi4(NewLeaseTime); err != nil {
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := interface{}(nil)
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANIPv6FirewallControl_1, "UpdatePinhole", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 17:52:43 +00:00
|
|
|
// Arguments:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * UniqueID:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANIPv6FirewallControl1) DeletePinhole(UniqueID uint16) (err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
UniqueID string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if request.UniqueID, err = soap.MarshalUi2(UniqueID); err != nil {
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := interface{}(nil)
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANIPv6FirewallControl_1, "DeletePinhole", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 17:52:43 +00:00
|
|
|
// Arguments:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * UniqueID:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
|
|
|
// Return values:
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
// * PinholePackets:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANIPv6FirewallControl1) GetPinholePackets(UniqueID uint16) (PinholePackets uint32, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
UniqueID string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if request.UniqueID, err = soap.MarshalUi2(UniqueID); err != nil {
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
PinholePackets string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANIPv6FirewallControl_1, "GetPinholePackets", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if PinholePackets, err = soap.UnmarshalUi4(response.PinholePackets); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 17:52:43 +00:00
|
|
|
// Arguments:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * UniqueID:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
|
|
|
// Return values:
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
// * IsWorking:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANIPv6FirewallControl1) CheckPinholeWorking(UniqueID uint16) (IsWorking bool, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
UniqueID string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if request.UniqueID, err = soap.MarshalUi2(UniqueID); err != nil {
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
IsWorking string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANIPv6FirewallControl_1, "CheckPinholeWorking", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if IsWorking, err = soap.UnmarshalBoolean(response.IsWorking); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 20:01:17 +00:00
|
|
|
// WANPOTSLinkConfig1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:WANPOTSLinkConfig:1". See
|
|
|
|
// goupnp.ServiceClient, which contains RootDevice and Service attributes which
|
|
|
|
// are provided for informational value.
|
2013-10-06 22:16:53 +00:00
|
|
|
type WANPOTSLinkConfig1 struct {
|
2013-12-31 20:01:17 +00:00
|
|
|
goupnp.ServiceClient
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewWANPOTSLinkConfig1Clients discovers instances of the service on the network,
|
|
|
|
// and returns clients to any that are found. errors will contain an error for
|
|
|
|
// any devices that replied but which could not be queried, and err will be set
|
|
|
|
// if the discovery process failed outright.
|
|
|
|
//
|
|
|
|
// This is a typical entry calling point into this package.
|
|
|
|
func NewWANPOTSLinkConfig1Clients() (clients []*WANPOTSLinkConfig1, errors []error, err error) {
|
|
|
|
var genericClients []goupnp.ServiceClient
|
|
|
|
if genericClients, errors, err = goupnp.NewServiceClients(URN_WANPOTSLinkConfig_1); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
clients = make([]*WANPOTSLinkConfig1, len(genericClients))
|
|
|
|
for i := range genericClients {
|
|
|
|
clients[i] = &WANPOTSLinkConfig1{genericClients[i]}
|
|
|
|
}
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
|
|
|
|
2013-12-31 17:52:43 +00:00
|
|
|
// Arguments:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewISPPhoneNumber:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewISPInfo:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
// * NewLinkType: allowed values: PPP_Dialup
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANPOTSLinkConfig1) SetISPInfo(NewISPPhoneNumber string, NewISPInfo string, NewLinkType string) (err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewISPPhoneNumber string
|
2014-01-06 20:17:00 +00:00
|
|
|
|
|
|
|
NewISPInfo string
|
|
|
|
|
|
|
|
NewLinkType string
|
|
|
|
}{}
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if request.NewISPPhoneNumber, err = soap.MarshalString(NewISPPhoneNumber); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.NewISPInfo, err = soap.MarshalString(NewISPInfo); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.NewLinkType, err = soap.MarshalString(NewLinkType); err != nil {
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := interface{}(nil)
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANPOTSLinkConfig_1, "SetISPInfo", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 17:52:43 +00:00
|
|
|
// Arguments:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewNumberOfRetries:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewDelayBetweenRetries:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANPOTSLinkConfig1) SetCallRetryInfo(NewNumberOfRetries uint32, NewDelayBetweenRetries uint32) (err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := &struct {
|
|
|
|
NewNumberOfRetries string
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
NewDelayBetweenRetries string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if request.NewNumberOfRetries, err = soap.MarshalUi4(NewNumberOfRetries); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.NewDelayBetweenRetries, err = soap.MarshalUi4(NewDelayBetweenRetries); err != nil {
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := interface{}(nil)
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANPOTSLinkConfig_1, "SetCallRetryInfo", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewISPPhoneNumber:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewISPInfo:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
// * NewLinkType: allowed values: PPP_Dialup
|
|
|
|
func (client *WANPOTSLinkConfig1) GetISPInfo() (NewISPPhoneNumber string, NewISPInfo string, NewLinkType string, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewISPPhoneNumber string
|
2014-01-06 20:17:00 +00:00
|
|
|
|
|
|
|
NewISPInfo string
|
|
|
|
|
|
|
|
NewLinkType string
|
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANPOTSLinkConfig_1, "GetISPInfo", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if NewISPPhoneNumber, err = soap.UnmarshalString(response.NewISPPhoneNumber); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if NewISPInfo, err = soap.UnmarshalString(response.NewISPInfo); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if NewLinkType, err = soap.UnmarshalString(response.NewLinkType); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewNumberOfRetries:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewDelayBetweenRetries:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANPOTSLinkConfig1) GetCallRetryInfo() (NewNumberOfRetries uint32, NewDelayBetweenRetries uint32, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
|
|
|
NewNumberOfRetries string
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
NewDelayBetweenRetries string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANPOTSLinkConfig_1, "GetCallRetryInfo", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if NewNumberOfRetries, err = soap.UnmarshalUi4(response.NewNumberOfRetries); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if NewDelayBetweenRetries, err = soap.UnmarshalUi4(response.NewDelayBetweenRetries); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
// * NewFclass:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANPOTSLinkConfig1) GetFclass() (NewFclass string, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewFclass string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANPOTSLinkConfig_1, "GetFclass", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if NewFclass, err = soap.UnmarshalString(response.NewFclass); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
// * NewDataModulationSupported:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANPOTSLinkConfig1) GetDataModulationSupported() (NewDataModulationSupported string, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewDataModulationSupported string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANPOTSLinkConfig_1, "GetDataModulationSupported", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if NewDataModulationSupported, err = soap.UnmarshalString(response.NewDataModulationSupported); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
// * NewDataProtocol:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANPOTSLinkConfig1) GetDataProtocol() (NewDataProtocol string, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewDataProtocol string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANPOTSLinkConfig_1, "GetDataProtocol", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if NewDataProtocol, err = soap.UnmarshalString(response.NewDataProtocol); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
// * NewDataCompression:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANPOTSLinkConfig1) GetDataCompression() (NewDataCompression string, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewDataCompression string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANPOTSLinkConfig_1, "GetDataCompression", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if NewDataCompression, err = soap.UnmarshalString(response.NewDataCompression); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
// * NewPlusVTRCommandSupported:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANPOTSLinkConfig1) GetPlusVTRCommandSupported() (NewPlusVTRCommandSupported bool, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewPlusVTRCommandSupported string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANPOTSLinkConfig_1, "GetPlusVTRCommandSupported", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if NewPlusVTRCommandSupported, err = soap.UnmarshalBoolean(response.NewPlusVTRCommandSupported); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 20:01:17 +00:00
|
|
|
// WANPPPConnection1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:WANPPPConnection:1". See
|
|
|
|
// goupnp.ServiceClient, which contains RootDevice and Service attributes which
|
|
|
|
// are provided for informational value.
|
2013-10-06 22:16:53 +00:00
|
|
|
type WANPPPConnection1 struct {
|
2013-12-31 20:01:17 +00:00
|
|
|
goupnp.ServiceClient
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewWANPPPConnection1Clients discovers instances of the service on the network,
|
|
|
|
// and returns clients to any that are found. errors will contain an error for
|
|
|
|
// any devices that replied but which could not be queried, and err will be set
|
|
|
|
// if the discovery process failed outright.
|
|
|
|
//
|
|
|
|
// This is a typical entry calling point into this package.
|
|
|
|
func NewWANPPPConnection1Clients() (clients []*WANPPPConnection1, errors []error, err error) {
|
|
|
|
var genericClients []goupnp.ServiceClient
|
|
|
|
if genericClients, errors, err = goupnp.NewServiceClients(URN_WANPPPConnection_1); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
clients = make([]*WANPPPConnection1, len(genericClients))
|
|
|
|
for i := range genericClients {
|
|
|
|
clients[i] = &WANPPPConnection1{genericClients[i]}
|
|
|
|
}
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
|
|
|
|
2013-12-31 17:52:43 +00:00
|
|
|
// Arguments:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewConnectionType:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANPPPConnection1) SetConnectionType(NewConnectionType string) (err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewConnectionType string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if request.NewConnectionType, err = soap.MarshalString(NewConnectionType); err != nil {
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := interface{}(nil)
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "SetConnectionType", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewConnectionType:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
// * NewPossibleConnectionTypes: allowed values: Unconfigured, IP_Routed, DHCP_Spoofed, PPPoE_Bridged, PPTP_Relay, L2TP_Relay, PPPoE_Relay
|
|
|
|
func (client *WANPPPConnection1) GetConnectionTypeInfo() (NewConnectionType string, NewPossibleConnectionTypes string, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
|
|
|
NewConnectionType string
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
NewPossibleConnectionTypes string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "GetConnectionTypeInfo", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if NewConnectionType, err = soap.UnmarshalString(response.NewConnectionType); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if NewPossibleConnectionTypes, err = soap.UnmarshalString(response.NewPossibleConnectionTypes); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 17:52:43 +00:00
|
|
|
// Arguments:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewUserName:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewPassword:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANPPPConnection1) ConfigureConnection(NewUserName string, NewPassword string) (err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewUserName string
|
2014-01-06 20:17:00 +00:00
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
NewPassword string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if request.NewUserName, err = soap.MarshalString(NewUserName); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.NewPassword, err = soap.MarshalString(NewPassword); err != nil {
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := interface{}(nil)
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "ConfigureConnection", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANPPPConnection1) RequestConnection() (err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := interface{}(nil)
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "RequestConnection", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANPPPConnection1) RequestTermination() (err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := interface{}(nil)
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "RequestTermination", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANPPPConnection1) ForceTermination() (err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := interface{}(nil)
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "ForceTermination", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 17:52:43 +00:00
|
|
|
// Arguments:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewAutoDisconnectTime:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANPPPConnection1) SetAutoDisconnectTime(NewAutoDisconnectTime uint32) (err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewAutoDisconnectTime string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if request.NewAutoDisconnectTime, err = soap.MarshalUi4(NewAutoDisconnectTime); err != nil {
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := interface{}(nil)
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "SetAutoDisconnectTime", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 17:52:43 +00:00
|
|
|
// Arguments:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewIdleDisconnectTime:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANPPPConnection1) SetIdleDisconnectTime(NewIdleDisconnectTime uint32) (err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewIdleDisconnectTime string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if request.NewIdleDisconnectTime, err = soap.MarshalUi4(NewIdleDisconnectTime); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := interface{}(nil)
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "SetIdleDisconnectTime", request, response); err != nil {
|
2013-12-31 16:56:20 +00:00
|
|
|
return
|
|
|
|
}
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Unmarshal arguments from response.
|
|
|
|
return
|
|
|
|
}
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 17:52:43 +00:00
|
|
|
// Arguments:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewWarnDisconnectDelay:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANPPPConnection1) SetWarnDisconnectDelay(NewWarnDisconnectDelay uint32) (err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewWarnDisconnectDelay string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if request.NewWarnDisconnectDelay, err = soap.MarshalUi4(NewWarnDisconnectDelay); err != nil {
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := interface{}(nil)
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "SetWarnDisconnectDelay", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
// * NewConnectionStatus: allowed values: Unconfigured, Connected, Disconnected
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
// * NewLastConnectionError: allowed values: ERROR_NONE
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewUptime:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANPPPConnection1) GetStatusInfo() (NewConnectionStatus string, NewLastConnectionError string, NewUptime uint32, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
|
|
|
NewConnectionStatus string
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
NewLastConnectionError string
|
2014-01-06 20:17:00 +00:00
|
|
|
|
|
|
|
NewUptime string
|
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "GetStatusInfo", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if NewConnectionStatus, err = soap.UnmarshalString(response.NewConnectionStatus); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if NewLastConnectionError, err = soap.UnmarshalString(response.NewLastConnectionError); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if NewUptime, err = soap.UnmarshalUi4(response.NewUptime); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewUpstreamMaxBitRate:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewDownstreamMaxBitRate:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANPPPConnection1) GetLinkLayerMaxBitRates() (NewUpstreamMaxBitRate uint32, NewDownstreamMaxBitRate uint32, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
|
|
|
NewUpstreamMaxBitRate string
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
NewDownstreamMaxBitRate string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "GetLinkLayerMaxBitRates", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if NewUpstreamMaxBitRate, err = soap.UnmarshalUi4(response.NewUpstreamMaxBitRate); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if NewDownstreamMaxBitRate, err = soap.UnmarshalUi4(response.NewDownstreamMaxBitRate); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
// * NewPPPEncryptionProtocol:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANPPPConnection1) GetPPPEncryptionProtocol() (NewPPPEncryptionProtocol string, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewPPPEncryptionProtocol string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "GetPPPEncryptionProtocol", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if NewPPPEncryptionProtocol, err = soap.UnmarshalString(response.NewPPPEncryptionProtocol); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
// * NewPPPCompressionProtocol:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANPPPConnection1) GetPPPCompressionProtocol() (NewPPPCompressionProtocol string, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewPPPCompressionProtocol string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "GetPPPCompressionProtocol", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if NewPPPCompressionProtocol, err = soap.UnmarshalString(response.NewPPPCompressionProtocol); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
// * NewPPPAuthenticationProtocol:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANPPPConnection1) GetPPPAuthenticationProtocol() (NewPPPAuthenticationProtocol string, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewPPPAuthenticationProtocol string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "GetPPPAuthenticationProtocol", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if NewPPPAuthenticationProtocol, err = soap.UnmarshalString(response.NewPPPAuthenticationProtocol); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
// * NewUserName:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANPPPConnection1) GetUserName() (NewUserName string, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewUserName string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "GetUserName", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if NewUserName, err = soap.UnmarshalString(response.NewUserName); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
// * NewPassword:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANPPPConnection1) GetPassword() (NewPassword string, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewPassword string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "GetPassword", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if NewPassword, err = soap.UnmarshalString(response.NewPassword); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
// * NewAutoDisconnectTime:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANPPPConnection1) GetAutoDisconnectTime() (NewAutoDisconnectTime uint32, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewAutoDisconnectTime string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "GetAutoDisconnectTime", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if NewAutoDisconnectTime, err = soap.UnmarshalUi4(response.NewAutoDisconnectTime); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
// * NewIdleDisconnectTime:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANPPPConnection1) GetIdleDisconnectTime() (NewIdleDisconnectTime uint32, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewIdleDisconnectTime string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "GetIdleDisconnectTime", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if NewIdleDisconnectTime, err = soap.UnmarshalUi4(response.NewIdleDisconnectTime); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
// * NewWarnDisconnectDelay:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANPPPConnection1) GetWarnDisconnectDelay() (NewWarnDisconnectDelay uint32, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewWarnDisconnectDelay string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "GetWarnDisconnectDelay", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if NewWarnDisconnectDelay, err = soap.UnmarshalUi4(response.NewWarnDisconnectDelay); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewRSIPAvailable:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewNATEnabled:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANPPPConnection1) GetNATRSIPStatus() (NewRSIPAvailable bool, NewNATEnabled bool, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewRSIPAvailable string
|
2014-01-06 20:17:00 +00:00
|
|
|
|
|
|
|
NewNATEnabled string
|
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "GetNATRSIPStatus", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if NewRSIPAvailable, err = soap.UnmarshalBoolean(response.NewRSIPAvailable); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if NewNATEnabled, err = soap.UnmarshalBoolean(response.NewNATEnabled); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 17:52:43 +00:00
|
|
|
// Arguments:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewPortMappingIndex:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
|
|
|
// Return values:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewRemoteHost:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewExternalPort:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
// * NewProtocol: allowed values: TCP, UDP
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewInternalPort:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewInternalClient:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewEnabled:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewPortMappingDescription:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewLeaseDuration:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANPPPConnection1) GetGenericPortMappingEntry(NewPortMappingIndex uint16) (NewRemoteHost string, NewExternalPort uint16, NewProtocol string, NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewPortMappingIndex string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if request.NewPortMappingIndex, err = soap.MarshalUi2(NewPortMappingIndex); err != nil {
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
|
|
|
NewRemoteHost string
|
|
|
|
|
|
|
|
NewExternalPort string
|
|
|
|
|
|
|
|
NewProtocol string
|
|
|
|
|
|
|
|
NewInternalPort string
|
|
|
|
|
|
|
|
NewInternalClient string
|
|
|
|
|
|
|
|
NewEnabled string
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
NewPortMappingDescription string
|
2014-01-06 20:17:00 +00:00
|
|
|
|
|
|
|
NewLeaseDuration string
|
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "GetGenericPortMappingEntry", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if NewRemoteHost, err = soap.UnmarshalString(response.NewRemoteHost); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if NewExternalPort, err = soap.UnmarshalUi2(response.NewExternalPort); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if NewProtocol, err = soap.UnmarshalString(response.NewProtocol); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if NewInternalPort, err = soap.UnmarshalUi2(response.NewInternalPort); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if NewInternalClient, err = soap.UnmarshalString(response.NewInternalClient); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if NewEnabled, err = soap.UnmarshalBoolean(response.NewEnabled); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if NewPortMappingDescription, err = soap.UnmarshalString(response.NewPortMappingDescription); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if NewLeaseDuration, err = soap.UnmarshalUi4(response.NewLeaseDuration); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 17:52:43 +00:00
|
|
|
// Arguments:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewRemoteHost:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewExternalPort:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
// * NewProtocol: allowed values: TCP, UDP
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
|
|
|
// Return values:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewInternalPort:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewInternalClient:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewEnabled:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewPortMappingDescription:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewLeaseDuration:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANPPPConnection1) GetSpecificPortMappingEntry(NewRemoteHost string, NewExternalPort uint16, NewProtocol string) (NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := &struct {
|
|
|
|
NewRemoteHost string
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
NewExternalPort string
|
2014-01-06 20:17:00 +00:00
|
|
|
|
|
|
|
NewProtocol string
|
|
|
|
}{}
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if request.NewRemoteHost, err = soap.MarshalString(NewRemoteHost); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.NewExternalPort, err = soap.MarshalUi2(NewExternalPort); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.NewProtocol, err = soap.MarshalString(NewProtocol); err != nil {
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
|
|
|
NewInternalPort string
|
|
|
|
|
|
|
|
NewInternalClient string
|
|
|
|
|
|
|
|
NewEnabled string
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
NewPortMappingDescription string
|
2014-01-06 20:17:00 +00:00
|
|
|
|
|
|
|
NewLeaseDuration string
|
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "GetSpecificPortMappingEntry", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if NewInternalPort, err = soap.UnmarshalUi2(response.NewInternalPort); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if NewInternalClient, err = soap.UnmarshalString(response.NewInternalClient); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if NewEnabled, err = soap.UnmarshalBoolean(response.NewEnabled); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if NewPortMappingDescription, err = soap.UnmarshalString(response.NewPortMappingDescription); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if NewLeaseDuration, err = soap.UnmarshalUi4(response.NewLeaseDuration); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 17:52:43 +00:00
|
|
|
// Arguments:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewRemoteHost:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewExternalPort:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
// * NewProtocol: allowed values: TCP, UDP
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewInternalPort:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewInternalClient:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewEnabled:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewPortMappingDescription:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewLeaseDuration:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANPPPConnection1) AddPortMapping(NewRemoteHost string, NewExternalPort uint16, NewProtocol string, NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32) (err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := &struct {
|
|
|
|
NewRemoteHost string
|
|
|
|
|
|
|
|
NewExternalPort string
|
|
|
|
|
|
|
|
NewProtocol string
|
|
|
|
|
|
|
|
NewInternalPort string
|
|
|
|
|
|
|
|
NewInternalClient string
|
|
|
|
|
|
|
|
NewEnabled string
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
NewPortMappingDescription string
|
2014-01-06 20:17:00 +00:00
|
|
|
|
|
|
|
NewLeaseDuration string
|
|
|
|
}{}
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if request.NewRemoteHost, err = soap.MarshalString(NewRemoteHost); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.NewExternalPort, err = soap.MarshalUi2(NewExternalPort); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.NewProtocol, err = soap.MarshalString(NewProtocol); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.NewInternalPort, err = soap.MarshalUi2(NewInternalPort); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.NewInternalClient, err = soap.MarshalString(NewInternalClient); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.NewEnabled, err = soap.MarshalBoolean(NewEnabled); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.NewPortMappingDescription, err = soap.MarshalString(NewPortMappingDescription); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.NewLeaseDuration, err = soap.MarshalUi4(NewLeaseDuration); err != nil {
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := interface{}(nil)
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "AddPortMapping", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 17:52:43 +00:00
|
|
|
// Arguments:
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewRemoteHost:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 16:56:20 +00:00
|
|
|
// * NewExternalPort:
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
// * NewProtocol: allowed values: TCP, UDP
|
2013-10-06 22:16:53 +00:00
|
|
|
//
|
|
|
|
//
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANPPPConnection1) DeletePortMapping(NewRemoteHost string, NewExternalPort uint16, NewProtocol string) (err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := &struct {
|
|
|
|
NewRemoteHost string
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
NewExternalPort string
|
2014-01-06 20:17:00 +00:00
|
|
|
|
|
|
|
NewProtocol string
|
|
|
|
}{}
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
if request.NewRemoteHost, err = soap.MarshalString(NewRemoteHost); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.NewExternalPort, err = soap.MarshalUi2(NewExternalPort); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if request.NewProtocol, err = soap.MarshalString(NewProtocol); err != nil {
|
|
|
|
return
|
2013-10-06 22:16:53 +00:00
|
|
|
}
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := interface{}(nil)
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "DeletePortMapping", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
//
|
2013-10-06 22:16:53 +00:00
|
|
|
// Return values:
|
|
|
|
//
|
2013-12-31 18:04:59 +00:00
|
|
|
// * NewExternalIPAddress:
|
2013-12-31 17:52:43 +00:00
|
|
|
func (client *WANPPPConnection1) GetExternalIPAddress() (NewExternalIPAddress string, err error) {
|
2013-12-31 17:06:15 +00:00
|
|
|
// Request structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
request := interface{}(nil)
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Marshal arguments into request.
|
2013-10-06 22:16:53 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// END Marshal arguments into request.
|
|
|
|
|
2013-12-31 17:06:15 +00:00
|
|
|
// Response structure.
|
2014-01-06 20:17:00 +00:00
|
|
|
response := &struct {
|
2013-12-31 17:06:15 +00:00
|
|
|
NewExternalIPAddress string
|
2014-01-06 20:17:00 +00:00
|
|
|
}{}
|
2013-12-31 17:06:15 +00:00
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// Perform the SOAP call.
|
2014-01-06 20:17:00 +00:00
|
|
|
if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "GetExternalIPAddress", request, response); err != nil {
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2013-12-31 16:56:20 +00:00
|
|
|
// BEGIN Unmarshal arguments from response.
|
|
|
|
|
|
|
|
if NewExternalIPAddress, err = soap.UnmarshalString(response.NewExternalIPAddress); err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// END Unmarshal arguments from response.
|
2013-10-06 22:16:53 +00:00
|
|
|
return
|
|
|
|
}
|