Debian Codegraph @

dcps/internetgateway2/internetgateway2.go

raw symbols SCIP
1 // Client for UPnP Device Control Protocol Internet Gateway Device v2.
2 //
3 // This DCP is documented in detail at: http://upnp.org/specs/gw/UPnP-gw-InternetGatewayDevice-v2-Device.pdf
4 //
5 // Typically, use one of the New* functions to create clients for services.
6 package internetgateway2
7
8 // Generated file - do not edit by hand. See README.md
9
10 import (
11 "net/url"
12 "time"
13
14 "github.com/huin/goupnp"
15 "github.com/huin/goupnp/soap"
16 )
17
18 // Hack to avoid Go complaining if time isn't used.
19 var _ time.Time
20
21 // Device URNs:
22 const (
23 URN_LANDevice_1 = "urn:schemas-upnp-org:device:LANDevice:1"
24 URN_WANConnectionDevice_1 = "urn:schemas-upnp-org:device:WANConnectionDevice:1"
25 URN_WANConnectionDevice_2 = "urn:schemas-upnp-org:device:WANConnectionDevice:2"
26 URN_WANDevice_1 = "urn:schemas-upnp-org:device:WANDevice:1"
27 URN_WANDevice_2 = "urn:schemas-upnp-org:device:WANDevice:2"
28 )
29
30 // Service URNs:
31 const (
32 URN_DeviceProtection_1 = "urn:schemas-upnp-org:service:DeviceProtection:1"
33 URN_LANHostConfigManagement_1 = "urn:schemas-upnp-org:service:LANHostConfigManagement:1"
34 URN_Layer3Forwarding_1 = "urn:schemas-upnp-org:service:Layer3Forwarding:1"
35 URN_WANCableLinkConfig_1 = "urn:schemas-upnp-org:service:WANCableLinkConfig:1"
36 URN_WANCommonInterfaceConfig_1 = "urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1"
37 URN_WANDSLLinkConfig_1 = "urn:schemas-upnp-org:service:WANDSLLinkConfig:1"
38 URN_WANEthernetLinkConfig_1 = "urn:schemas-upnp-org:service:WANEthernetLinkConfig:1"
39 URN_WANIPConnection_1 = "urn:schemas-upnp-org:service:WANIPConnection:1"
40 URN_WANIPConnection_2 = "urn:schemas-upnp-org:service:WANIPConnection:2"
41 URN_WANIPv6FirewallControl_1 = "urn:schemas-upnp-org:service:WANIPv6FirewallControl:1"
42 URN_WANPOTSLinkConfig_1 = "urn:schemas-upnp-org:service:WANPOTSLinkConfig:1"
43 URN_WANPPPConnection_1 = "urn:schemas-upnp-org:service:WANPPPConnection:1"
44 )
45
46 // DeviceProtection1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:DeviceProtection:1". See
47 // goupnp.ServiceClient, which contains RootDevice and Service attributes which
48 // are provided for informational value.
49 type DeviceProtection1 struct {
50 goupnp.ServiceClient
51 }
52
53 // NewDeviceProtection1Clients discovers instances of the service on the network,
54 // and returns clients to any that are found. errors will contain an error for
55 // any devices that replied but which could not be queried, and err will be set
56 // if the discovery process failed outright.
57 //
58 // This is a typical entry calling point into this package.
59 func NewDeviceProtection1Clients() (clients []*DeviceProtection1, errors []error, err error) {
60 var genericClients []goupnp.ServiceClient
61 if genericClients, errors, err = goupnp.NewServiceClients(URN_DeviceProtection_1); err != nil {
62 return
63 }
64 clients = newDeviceProtection1ClientsFromGenericClients(genericClients)
65 return
66 }
67
68 // NewDeviceProtection1ClientsByURL discovers instances of the service at the given
69 // URL, and returns clients to any that are found. An error is returned if
70 // there was an error probing the service.
71 //
72 // This is a typical entry calling point into this package when reusing an
73 // previously discovered service URL.
74 func NewDeviceProtection1ClientsByURL(loc *url.URL) ([]*DeviceProtection1, error) {
75 genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_DeviceProtection_1)
76 if err != nil {
77 return nil, err
78 }
79 return newDeviceProtection1ClientsFromGenericClients(genericClients), nil
80 }
81
82 // NewDeviceProtection1ClientsFromRootDevice discovers instances of the service in
83 // a given root device, and returns clients to any that are found. An error is
84 // returned if there was not at least one instance of the service within the
85 // device. The location parameter is simply assigned to the Location attribute
86 // of the wrapped ServiceClient(s).
87 //
88 // This is a typical entry calling point into this package when reusing an
89 // previously discovered root device.
90 func NewDeviceProtection1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*DeviceProtection1, error) {
91 genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_DeviceProtection_1)
92 if err != nil {
93 return nil, err
94 }
95 return newDeviceProtection1ClientsFromGenericClients(genericClients), nil
96 }
97
98 func newDeviceProtection1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*DeviceProtection1 {
99 clients := make([]*DeviceProtection1, len(genericClients))
100 for i := range genericClients {
101 clients[i] = &DeviceProtection1{genericClients[i]}
102 }
103 return clients
104 }
105
106 func (client *DeviceProtection1) SendSetupMessage(ProtocolType string, InMessage []byte) (OutMessage []byte, err error) {
107 // Request structure.
108 request := &struct {
109 ProtocolType string
110
111 InMessage string
112 }{}
113 // BEGIN Marshal arguments into request.
114
115 if request.ProtocolType, err = soap.MarshalString(ProtocolType); err != nil {
116 return
117 }
118 if request.InMessage, err = soap.MarshalBinBase64(InMessage); err != nil {
119 return
120 }
121 // END Marshal arguments into request.
122
123 // Response structure.
124 response := &struct {
125 OutMessage string
126 }{}
127
128 // Perform the SOAP call.
129 if err = client.SOAPClient.PerformAction(URN_DeviceProtection_1, "SendSetupMessage", request, response); err != nil {
130 return
131 }
132
133 // BEGIN Unmarshal arguments from response.
134
135 if OutMessage, err = soap.UnmarshalBinBase64(response.OutMessage); err != nil {
136 return
137 }
138 // END Unmarshal arguments from response.
139 return
140 }
141
142 func (client *DeviceProtection1) GetSupportedProtocols() (ProtocolList string, err error) {
143 // Request structure.
144 request := interface{}(nil)
145 // BEGIN Marshal arguments into request.
146
147 // END Marshal arguments into request.
148
149 // Response structure.
150 response := &struct {
151 ProtocolList string
152 }{}
153
154 // Perform the SOAP call.
155 if err = client.SOAPClient.PerformAction(URN_DeviceProtection_1, "GetSupportedProtocols", request, response); err != nil {
156 return
157 }
158
159 // BEGIN Unmarshal arguments from response.
160
161 if ProtocolList, err = soap.UnmarshalString(response.ProtocolList); err != nil {
162 return
163 }
164 // END Unmarshal arguments from response.
165 return
166 }
167
168 func (client *DeviceProtection1) GetAssignedRoles() (RoleList string, err error) {
169 // Request structure.
170 request := interface{}(nil)
171 // BEGIN Marshal arguments into request.
172
173 // END Marshal arguments into request.
174
175 // Response structure.
176 response := &struct {
177 RoleList string
178 }{}
179
180 // Perform the SOAP call.
181 if err = client.SOAPClient.PerformAction(URN_DeviceProtection_1, "GetAssignedRoles", request, response); err != nil {
182 return
183 }
184
185 // BEGIN Unmarshal arguments from response.
186
187 if RoleList, err = soap.UnmarshalString(response.RoleList); err != nil {
188 return
189 }
190 // END Unmarshal arguments from response.
191 return
192 }
193
194 func (client *DeviceProtection1) GetRolesForAction(DeviceUDN string, ServiceId string, ActionName string) (RoleList string, RestrictedRoleList string, err error) {
195 // Request structure.
196 request := &struct {
197 DeviceUDN string
198
199 ServiceId string
200
201 ActionName string
202 }{}
203 // BEGIN Marshal arguments into request.
204
205 if request.DeviceUDN, err = soap.MarshalString(DeviceUDN); err != nil {
206 return
207 }
208 if request.ServiceId, err = soap.MarshalString(ServiceId); err != nil {
209 return
210 }
211 if request.ActionName, err = soap.MarshalString(ActionName); err != nil {
212 return
213 }
214 // END Marshal arguments into request.
215
216 // Response structure.
217 response := &struct {
218 RoleList string
219
220 RestrictedRoleList string
221 }{}
222
223 // Perform the SOAP call.
224 if err = client.SOAPClient.PerformAction(URN_DeviceProtection_1, "GetRolesForAction", request, response); err != nil {
225 return
226 }
227
228 // BEGIN Unmarshal arguments from response.
229
230 if RoleList, err = soap.UnmarshalString(response.RoleList); err != nil {
231 return
232 }
233 if RestrictedRoleList, err = soap.UnmarshalString(response.RestrictedRoleList); err != nil {
234 return
235 }
236 // END Unmarshal arguments from response.
237 return
238 }
239
240 func (client *DeviceProtection1) GetUserLoginChallenge(ProtocolType string, Name string) (Salt []byte, Challenge []byte, err error) {
241 // Request structure.
242 request := &struct {
243 ProtocolType string
244
245 Name string
246 }{}
247 // BEGIN Marshal arguments into request.
248
249 if request.ProtocolType, err = soap.MarshalString(ProtocolType); err != nil {
250 return
251 }
252 if request.Name, err = soap.MarshalString(Name); err != nil {
253 return
254 }
255 // END Marshal arguments into request.
256
257 // Response structure.
258 response := &struct {
259 Salt string
260
261 Challenge string
262 }{}
263
264 // Perform the SOAP call.
265 if err = client.SOAPClient.PerformAction(URN_DeviceProtection_1, "GetUserLoginChallenge", request, response); err != nil {
266 return
267 }
268
269 // BEGIN Unmarshal arguments from response.
270
271 if Salt, err = soap.UnmarshalBinBase64(response.Salt); err != nil {
272 return
273 }
274 if Challenge, err = soap.UnmarshalBinBase64(response.Challenge); err != nil {
275 return
276 }
277 // END Unmarshal arguments from response.
278 return
279 }
280
281 func (client *DeviceProtection1) UserLogin(ProtocolType string, Challenge []byte, Authenticator []byte) (err error) {
282 // Request structure.
283 request := &struct {
284 ProtocolType string
285
286 Challenge string
287
288 Authenticator string
289 }{}
290 // BEGIN Marshal arguments into request.
291
292 if request.ProtocolType, err = soap.MarshalString(ProtocolType); err != nil {
293 return
294 }
295 if request.Challenge, err = soap.MarshalBinBase64(Challenge); err != nil {
296 return
297 }
298 if request.Authenticator, err = soap.MarshalBinBase64(Authenticator); err != nil {
299 return
300 }
301 // END Marshal arguments into request.
302
303 // Response structure.
304 response := interface{}(nil)
305
306 // Perform the SOAP call.
307 if err = client.SOAPClient.PerformAction(URN_DeviceProtection_1, "UserLogin", request, response); err != nil {
308 return
309 }
310
311 // BEGIN Unmarshal arguments from response.
312
313 // END Unmarshal arguments from response.
314 return
315 }
316
317 func (client *DeviceProtection1) UserLogout() (err error) {
318 // Request structure.
319 request := interface{}(nil)
320 // BEGIN Marshal arguments into request.
321
322 // END Marshal arguments into request.
323
324 // Response structure.
325 response := interface{}(nil)
326
327 // Perform the SOAP call.
328 if err = client.SOAPClient.PerformAction(URN_DeviceProtection_1, "UserLogout", request, response); err != nil {
329 return
330 }
331
332 // BEGIN Unmarshal arguments from response.
333
334 // END Unmarshal arguments from response.
335 return
336 }
337
338 func (client *DeviceProtection1) GetACLData() (ACL string, err error) {
339 // Request structure.
340 request := interface{}(nil)
341 // BEGIN Marshal arguments into request.
342
343 // END Marshal arguments into request.
344
345 // Response structure.
346 response := &struct {
347 ACL string
348 }{}
349
350 // Perform the SOAP call.
351 if err = client.SOAPClient.PerformAction(URN_DeviceProtection_1, "GetACLData", request, response); err != nil {
352 return
353 }
354
355 // BEGIN Unmarshal arguments from response.
356
357 if ACL, err = soap.UnmarshalString(response.ACL); err != nil {
358 return
359 }
360 // END Unmarshal arguments from response.
361 return
362 }
363
364 func (client *DeviceProtection1) AddIdentityList(IdentityList string) (IdentityListResult string, err error) {
365 // Request structure.
366 request := &struct {
367 IdentityList string
368 }{}
369 // BEGIN Marshal arguments into request.
370
371 if request.IdentityList, err = soap.MarshalString(IdentityList); err != nil {
372 return
373 }
374 // END Marshal arguments into request.
375
376 // Response structure.
377 response := &struct {
378 IdentityListResult string
379 }{}
380
381 // Perform the SOAP call.
382 if err = client.SOAPClient.PerformAction(URN_DeviceProtection_1, "AddIdentityList", request, response); err != nil {
383 return
384 }
385
386 // BEGIN Unmarshal arguments from response.
387
388 if IdentityListResult, err = soap.UnmarshalString(response.IdentityListResult); err != nil {
389 return
390 }
391 // END Unmarshal arguments from response.
392 return
393 }
394
395 func (client *DeviceProtection1) RemoveIdentity(Identity string) (err error) {
396 // Request structure.
397 request := &struct {
398 Identity string
399 }{}
400 // BEGIN Marshal arguments into request.
401
402 if request.Identity, err = soap.MarshalString(Identity); err != nil {
403 return
404 }
405 // END Marshal arguments into request.
406
407 // Response structure.
408 response := interface{}(nil)
409
410 // Perform the SOAP call.
411 if err = client.SOAPClient.PerformAction(URN_DeviceProtection_1, "RemoveIdentity", request, response); err != nil {
412 return
413 }
414
415 // BEGIN Unmarshal arguments from response.
416
417 // END Unmarshal arguments from response.
418 return
419 }
420
421 func (client *DeviceProtection1) SetUserLoginPassword(ProtocolType string, Name string, Stored []byte, Salt []byte) (err error) {
422 // Request structure.
423 request := &struct {
424 ProtocolType string
425
426 Name string
427
428 Stored string
429
430 Salt string
431 }{}
432 // BEGIN Marshal arguments into request.
433
434 if request.ProtocolType, err = soap.MarshalString(ProtocolType); err != nil {
435 return
436 }
437 if request.Name, err = soap.MarshalString(Name); err != nil {
438 return
439 }
440 if request.Stored, err = soap.MarshalBinBase64(Stored); err != nil {
441 return
442 }
443 if request.Salt, err = soap.MarshalBinBase64(Salt); err != nil {
444 return
445 }
446 // END Marshal arguments into request.
447
448 // Response structure.
449 response := interface{}(nil)
450
451 // Perform the SOAP call.
452 if err = client.SOAPClient.PerformAction(URN_DeviceProtection_1, "SetUserLoginPassword", request, response); err != nil {
453 return
454 }
455
456 // BEGIN Unmarshal arguments from response.
457
458 // END Unmarshal arguments from response.
459 return
460 }
461
462 func (client *DeviceProtection1) AddRolesForIdentity(Identity string, RoleList string) (err error) {
463 // Request structure.
464 request := &struct {
465 Identity string
466
467 RoleList string
468 }{}
469 // BEGIN Marshal arguments into request.
470
471 if request.Identity, err = soap.MarshalString(Identity); err != nil {
472 return
473 }
474 if request.RoleList, err = soap.MarshalString(RoleList); err != nil {
475 return
476 }
477 // END Marshal arguments into request.
478
479 // Response structure.
480 response := interface{}(nil)
481
482 // Perform the SOAP call.
483 if err = client.SOAPClient.PerformAction(URN_DeviceProtection_1, "AddRolesForIdentity", request, response); err != nil {
484 return
485 }
486
487 // BEGIN Unmarshal arguments from response.
488
489 // END Unmarshal arguments from response.
490 return
491 }
492
493 func (client *DeviceProtection1) RemoveRolesForIdentity(Identity string, RoleList string) (err error) {
494 // Request structure.
495 request := &struct {
496 Identity string
497
498 RoleList string
499 }{}
500 // BEGIN Marshal arguments into request.
501
502 if request.Identity, err = soap.MarshalString(Identity); err != nil {
503 return
504 }
505 if request.RoleList, err = soap.MarshalString(RoleList); err != nil {
506 return
507 }
508 // END Marshal arguments into request.
509
510 // Response structure.
511 response := interface{}(nil)
512
513 // Perform the SOAP call.
514 if err = client.SOAPClient.PerformAction(URN_DeviceProtection_1, "RemoveRolesForIdentity", request, response); err != nil {
515 return
516 }
517
518 // BEGIN Unmarshal arguments from response.
519
520 // END Unmarshal arguments from response.
521 return
522 }
523
524 // LANHostConfigManagement1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:LANHostConfigManagement:1". See
525 // goupnp.ServiceClient, which contains RootDevice and Service attributes which
526 // are provided for informational value.
527 type LANHostConfigManagement1 struct {
528 goupnp.ServiceClient
529 }
530
531 // NewLANHostConfigManagement1Clients discovers instances of the service on the network,
532 // and returns clients to any that are found. errors will contain an error for
533 // any devices that replied but which could not be queried, and err will be set
534 // if the discovery process failed outright.
535 //
536 // This is a typical entry calling point into this package.
537 func NewLANHostConfigManagement1Clients() (clients []*LANHostConfigManagement1, errors []error, err error) {
538 var genericClients []goupnp.ServiceClient
539 if genericClients, errors, err = goupnp.NewServiceClients(URN_LANHostConfigManagement_1); err != nil {
540 return
541 }
542 clients = newLANHostConfigManagement1ClientsFromGenericClients(genericClients)
543 return
544 }
545
546 // NewLANHostConfigManagement1ClientsByURL discovers instances of the service at the given
547 // URL, and returns clients to any that are found. An error is returned if
548 // there was an error probing the service.
549 //
550 // This is a typical entry calling point into this package when reusing an
551 // previously discovered service URL.
552 func NewLANHostConfigManagement1ClientsByURL(loc *url.URL) ([]*LANHostConfigManagement1, error) {
553 genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_LANHostConfigManagement_1)
554 if err != nil {
555 return nil, err
556 }
557 return newLANHostConfigManagement1ClientsFromGenericClients(genericClients), nil
558 }
559
560 // NewLANHostConfigManagement1ClientsFromRootDevice discovers instances of the service in
561 // a given root device, and returns clients to any that are found. An error is
562 // returned if there was not at least one instance of the service within the
563 // device. The location parameter is simply assigned to the Location attribute
564 // of the wrapped ServiceClient(s).
565 //
566 // This is a typical entry calling point into this package when reusing an
567 // previously discovered root device.
568 func NewLANHostConfigManagement1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*LANHostConfigManagement1, error) {
569 genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_LANHostConfigManagement_1)
570 if err != nil {
571 return nil, err
572 }
573 return newLANHostConfigManagement1ClientsFromGenericClients(genericClients), nil
574 }
575
576 func newLANHostConfigManagement1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*LANHostConfigManagement1 {
577 clients := make([]*LANHostConfigManagement1, len(genericClients))
578 for i := range genericClients {
579 clients[i] = &LANHostConfigManagement1{genericClients[i]}
580 }
581 return clients
582 }
583
584 func (client *LANHostConfigManagement1) SetDHCPServerConfigurable(NewDHCPServerConfigurable bool) (err error) {
585 // Request structure.
586 request := &struct {
587 NewDHCPServerConfigurable string
588 }{}
589 // BEGIN Marshal arguments into request.
590
591 if request.NewDHCPServerConfigurable, err = soap.MarshalBoolean(NewDHCPServerConfigurable); err != nil {
592 return
593 }
594 // END Marshal arguments into request.
595
596 // Response structure.
597 response := interface{}(nil)
598
599 // Perform the SOAP call.
600 if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "SetDHCPServerConfigurable", request, response); err != nil {
601 return
602 }
603
604 // BEGIN Unmarshal arguments from response.
605
606 // END Unmarshal arguments from response.
607 return
608 }
609
610 func (client *LANHostConfigManagement1) GetDHCPServerConfigurable() (NewDHCPServerConfigurable bool, err error) {
611 // Request structure.
612 request := interface{}(nil)
613 // BEGIN Marshal arguments into request.
614
615 // END Marshal arguments into request.
616
617 // Response structure.
618 response := &struct {
619 NewDHCPServerConfigurable string
620 }{}
621
622 // Perform the SOAP call.
623 if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "GetDHCPServerConfigurable", request, response); err != nil {
624 return
625 }
626
627 // BEGIN Unmarshal arguments from response.
628
629 if NewDHCPServerConfigurable, err = soap.UnmarshalBoolean(response.NewDHCPServerConfigurable); err != nil {
630 return
631 }
632 // END Unmarshal arguments from response.
633 return
634 }
635
636 func (client *LANHostConfigManagement1) SetDHCPRelay(NewDHCPRelay bool) (err error) {
637 // Request structure.
638 request := &struct {
639 NewDHCPRelay string
640 }{}
641 // BEGIN Marshal arguments into request.
642
643 if request.NewDHCPRelay, err = soap.MarshalBoolean(NewDHCPRelay); err != nil {
644 return
645 }
646 // END Marshal arguments into request.
647
648 // Response structure.
649 response := interface{}(nil)
650
651 // Perform the SOAP call.
652 if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "SetDHCPRelay", request, response); err != nil {
653 return
654 }
655
656 // BEGIN Unmarshal arguments from response.
657
658 // END Unmarshal arguments from response.
659 return
660 }
661
662 func (client *LANHostConfigManagement1) GetDHCPRelay() (NewDHCPRelay bool, err error) {
663 // Request structure.
664 request := interface{}(nil)
665 // BEGIN Marshal arguments into request.
666
667 // END Marshal arguments into request.
668
669 // Response structure.
670 response := &struct {
671 NewDHCPRelay string
672 }{}
673
674 // Perform the SOAP call.
675 if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "GetDHCPRelay", request, response); err != nil {
676 return
677 }
678
679 // BEGIN Unmarshal arguments from response.
680
681 if NewDHCPRelay, err = soap.UnmarshalBoolean(response.NewDHCPRelay); err != nil {
682 return
683 }
684 // END Unmarshal arguments from response.
685 return
686 }
687
688 func (client *LANHostConfigManagement1) SetSubnetMask(NewSubnetMask string) (err error) {
689 // Request structure.
690 request := &struct {
691 NewSubnetMask string
692 }{}
693 // BEGIN Marshal arguments into request.
694
695 if request.NewSubnetMask, err = soap.MarshalString(NewSubnetMask); err != nil {
696 return
697 }
698 // END Marshal arguments into request.
699
700 // Response structure.
701 response := interface{}(nil)
702
703 // Perform the SOAP call.
704 if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "SetSubnetMask", request, response); err != nil {
705 return
706 }
707
708 // BEGIN Unmarshal arguments from response.
709
710 // END Unmarshal arguments from response.
711 return
712 }
713
714 func (client *LANHostConfigManagement1) GetSubnetMask() (NewSubnetMask string, err error) {
715 // Request structure.
716 request := interface{}(nil)
717 // BEGIN Marshal arguments into request.
718
719 // END Marshal arguments into request.
720
721 // Response structure.
722 response := &struct {
723 NewSubnetMask string
724 }{}
725
726 // Perform the SOAP call.
727 if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "GetSubnetMask", request, response); err != nil {
728 return
729 }
730
731 // BEGIN Unmarshal arguments from response.
732
733 if NewSubnetMask, err = soap.UnmarshalString(response.NewSubnetMask); err != nil {
734 return
735 }
736 // END Unmarshal arguments from response.
737 return
738 }
739
740 func (client *LANHostConfigManagement1) SetIPRouter(NewIPRouters string) (err error) {
741 // Request structure.
742 request := &struct {
743 NewIPRouters string
744 }{}
745 // BEGIN Marshal arguments into request.
746
747 if request.NewIPRouters, err = soap.MarshalString(NewIPRouters); err != nil {
748 return
749 }
750 // END Marshal arguments into request.
751
752 // Response structure.
753 response := interface{}(nil)
754
755 // Perform the SOAP call.
756 if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "SetIPRouter", request, response); err != nil {
757 return
758 }
759
760 // BEGIN Unmarshal arguments from response.
761
762 // END Unmarshal arguments from response.
763 return
764 }
765
766 func (client *LANHostConfigManagement1) DeleteIPRouter(NewIPRouters string) (err error) {
767 // Request structure.
768 request := &struct {
769 NewIPRouters string
770 }{}
771 // BEGIN Marshal arguments into request.
772
773 if request.NewIPRouters, err = soap.MarshalString(NewIPRouters); err != nil {
774 return
775 }
776 // END Marshal arguments into request.
777
778 // Response structure.
779 response := interface{}(nil)
780
781 // Perform the SOAP call.
782 if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "DeleteIPRouter", request, response); err != nil {
783 return
784 }
785
786 // BEGIN Unmarshal arguments from response.
787
788 // END Unmarshal arguments from response.
789 return
790 }
791
792 func (client *LANHostConfigManagement1) GetIPRoutersList() (NewIPRouters string, err error) {
793 // Request structure.
794 request := interface{}(nil)
795 // BEGIN Marshal arguments into request.
796
797 // END Marshal arguments into request.
798
799 // Response structure.
800 response := &struct {
801 NewIPRouters string
802 }{}
803
804 // Perform the SOAP call.
805 if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "GetIPRoutersList", request, response); err != nil {
806 return
807 }
808
809 // BEGIN Unmarshal arguments from response.
810
811 if NewIPRouters, err = soap.UnmarshalString(response.NewIPRouters); err != nil {
812 return
813 }
814 // END Unmarshal arguments from response.
815 return
816 }
817
818 func (client *LANHostConfigManagement1) SetDomainName(NewDomainName string) (err error) {
819 // Request structure.
820 request := &struct {
821 NewDomainName string
822 }{}
823 // BEGIN Marshal arguments into request.
824
825 if request.NewDomainName, err = soap.MarshalString(NewDomainName); err != nil {
826 return
827 }
828 // END Marshal arguments into request.
829
830 // Response structure.
831 response := interface{}(nil)
832
833 // Perform the SOAP call.
834 if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "SetDomainName", request, response); err != nil {
835 return
836 }
837
838 // BEGIN Unmarshal arguments from response.
839
840 // END Unmarshal arguments from response.
841 return
842 }
843
844 func (client *LANHostConfigManagement1) GetDomainName() (NewDomainName string, err error) {
845 // Request structure.
846 request := interface{}(nil)
847 // BEGIN Marshal arguments into request.
848
849 // END Marshal arguments into request.
850
851 // Response structure.
852 response := &struct {
853 NewDomainName string
854 }{}
855
856 // Perform the SOAP call.
857 if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "GetDomainName", request, response); err != nil {
858 return
859 }
860
861 // BEGIN Unmarshal arguments from response.
862
863 if NewDomainName, err = soap.UnmarshalString(response.NewDomainName); err != nil {
864 return
865 }
866 // END Unmarshal arguments from response.
867 return
868 }
869
870 func (client *LANHostConfigManagement1) SetAddressRange(NewMinAddress string, NewMaxAddress string) (err error) {
871 // Request structure.
872 request := &struct {
873 NewMinAddress string
874
875 NewMaxAddress string
876 }{}
877 // BEGIN Marshal arguments into request.
878
879 if request.NewMinAddress, err = soap.MarshalString(NewMinAddress); err != nil {
880 return
881 }
882 if request.NewMaxAddress, err = soap.MarshalString(NewMaxAddress); err != nil {
883 return
884 }
885 // END Marshal arguments into request.
886
887 // Response structure.
888 response := interface{}(nil)
889
890 // Perform the SOAP call.
891 if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "SetAddressRange", request, response); err != nil {
892 return
893 }
894
895 // BEGIN Unmarshal arguments from response.
896
897 // END Unmarshal arguments from response.
898 return
899 }
900
901 func (client *LANHostConfigManagement1) GetAddressRange() (NewMinAddress string, NewMaxAddress string, err error) {
902 // Request structure.
903 request := interface{}(nil)
904 // BEGIN Marshal arguments into request.
905
906 // END Marshal arguments into request.
907
908 // Response structure.
909 response := &struct {
910 NewMinAddress string
911
912 NewMaxAddress string
913 }{}
914
915 // Perform the SOAP call.
916 if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "GetAddressRange", request, response); err != nil {
917 return
918 }
919
920 // BEGIN Unmarshal arguments from response.
921
922 if NewMinAddress, err = soap.UnmarshalString(response.NewMinAddress); err != nil {
923 return
924 }
925 if NewMaxAddress, err = soap.UnmarshalString(response.NewMaxAddress); err != nil {
926 return
927 }
928 // END Unmarshal arguments from response.
929 return
930 }
931
932 func (client *LANHostConfigManagement1) SetReservedAddress(NewReservedAddresses string) (err error) {
933 // Request structure.
934 request := &struct {
935 NewReservedAddresses string
936 }{}
937 // BEGIN Marshal arguments into request.
938
939 if request.NewReservedAddresses, err = soap.MarshalString(NewReservedAddresses); err != nil {
940 return
941 }
942 // END Marshal arguments into request.
943
944 // Response structure.
945 response := interface{}(nil)
946
947 // Perform the SOAP call.
948 if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "SetReservedAddress", request, response); err != nil {
949 return
950 }
951
952 // BEGIN Unmarshal arguments from response.
953
954 // END Unmarshal arguments from response.
955 return
956 }
957
958 func (client *LANHostConfigManagement1) DeleteReservedAddress(NewReservedAddresses string) (err error) {
959 // Request structure.
960 request := &struct {
961 NewReservedAddresses string
962 }{}
963 // BEGIN Marshal arguments into request.
964
965 if request.NewReservedAddresses, err = soap.MarshalString(NewReservedAddresses); err != nil {
966 return
967 }
968 // END Marshal arguments into request.
969
970 // Response structure.
971 response := interface{}(nil)
972
973 // Perform the SOAP call.
974 if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "DeleteReservedAddress", request, response); err != nil {
975 return
976 }
977
978 // BEGIN Unmarshal arguments from response.
979
980 // END Unmarshal arguments from response.
981 return
982 }
983
984 func (client *LANHostConfigManagement1) GetReservedAddresses() (NewReservedAddresses string, err error) {
985 // Request structure.
986 request := interface{}(nil)
987 // BEGIN Marshal arguments into request.
988
989 // END Marshal arguments into request.
990
991 // Response structure.
992 response := &struct {
993 NewReservedAddresses string
994 }{}
995
996 // Perform the SOAP call.
997 if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "GetReservedAddresses", request, response); err != nil {
998 return
999 }
1000
1001 // BEGIN Unmarshal arguments from response.
1002
1003 if NewReservedAddresses, err = soap.UnmarshalString(response.NewReservedAddresses); err != nil {
1004 return
1005 }
1006 // END Unmarshal arguments from response.
1007 return
1008 }
1009
1010 func (client *LANHostConfigManagement1) SetDNSServer(NewDNSServers string) (err error) {
1011 // Request structure.
1012 request := &struct {
1013 NewDNSServers string
1014 }{}
1015 // BEGIN Marshal arguments into request.
1016
1017 if request.NewDNSServers, err = soap.MarshalString(NewDNSServers); err != nil {
1018 return
1019 }
1020 // END Marshal arguments into request.
1021
1022 // Response structure.
1023 response := interface{}(nil)
1024
1025 // Perform the SOAP call.
1026 if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "SetDNSServer", request, response); err != nil {
1027 return
1028 }
1029
1030 // BEGIN Unmarshal arguments from response.
1031
1032 // END Unmarshal arguments from response.
1033 return
1034 }
1035
1036 func (client *LANHostConfigManagement1) DeleteDNSServer(NewDNSServers string) (err error) {
1037 // Request structure.
1038 request := &struct {
1039 NewDNSServers string
1040 }{}
1041 // BEGIN Marshal arguments into request.
1042
1043 if request.NewDNSServers, err = soap.MarshalString(NewDNSServers); err != nil {
1044 return
1045 }
1046 // END Marshal arguments into request.
1047
1048 // Response structure.
1049 response := interface{}(nil)
1050
1051 // Perform the SOAP call.
1052 if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "DeleteDNSServer", request, response); err != nil {
1053 return
1054 }
1055
1056 // BEGIN Unmarshal arguments from response.
1057
1058 // END Unmarshal arguments from response.
1059 return
1060 }
1061
1062 func (client *LANHostConfigManagement1) GetDNSServers() (NewDNSServers string, err error) {
1063 // Request structure.
1064 request := interface{}(nil)
1065 // BEGIN Marshal arguments into request.
1066
1067 // END Marshal arguments into request.
1068
1069 // Response structure.
1070 response := &struct {
1071 NewDNSServers string
1072 }{}
1073
1074 // Perform the SOAP call.
1075 if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "GetDNSServers", request, response); err != nil {
1076 return
1077 }
1078
1079 // BEGIN Unmarshal arguments from response.
1080
1081 if NewDNSServers, err = soap.UnmarshalString(response.NewDNSServers); err != nil {
1082 return
1083 }
1084 // END Unmarshal arguments from response.
1085 return
1086 }
1087
1088 // Layer3Forwarding1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:Layer3Forwarding:1". See
1089 // goupnp.ServiceClient, which contains RootDevice and Service attributes which
1090 // are provided for informational value.
1091 type Layer3Forwarding1 struct {
1092 goupnp.ServiceClient
1093 }
1094
1095 // NewLayer3Forwarding1Clients discovers instances of the service on the network,
1096 // and returns clients to any that are found. errors will contain an error for
1097 // any devices that replied but which could not be queried, and err will be set
1098 // if the discovery process failed outright.
1099 //
1100 // This is a typical entry calling point into this package.
1101 func NewLayer3Forwarding1Clients() (clients []*Layer3Forwarding1, errors []error, err error) {
1102 var genericClients []goupnp.ServiceClient
1103 if genericClients, errors, err = goupnp.NewServiceClients(URN_Layer3Forwarding_1); err != nil {
1104 return
1105 }
1106 clients = newLayer3Forwarding1ClientsFromGenericClients(genericClients)
1107 return
1108 }
1109
1110 // NewLayer3Forwarding1ClientsByURL discovers instances of the service at the given
1111 // URL, and returns clients to any that are found. An error is returned if
1112 // there was an error probing the service.
1113 //
1114 // This is a typical entry calling point into this package when reusing an
1115 // previously discovered service URL.
1116 func NewLayer3Forwarding1ClientsByURL(loc *url.URL) ([]*Layer3Forwarding1, error) {
1117 genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_Layer3Forwarding_1)
1118 if err != nil {
1119 return nil, err
1120 }
1121 return newLayer3Forwarding1ClientsFromGenericClients(genericClients), nil
1122 }
1123
1124 // NewLayer3Forwarding1ClientsFromRootDevice discovers instances of the service in
1125 // a given root device, and returns clients to any that are found. An error is
1126 // returned if there was not at least one instance of the service within the
1127 // device. The location parameter is simply assigned to the Location attribute
1128 // of the wrapped ServiceClient(s).
1129 //
1130 // This is a typical entry calling point into this package when reusing an
1131 // previously discovered root device.
1132 func NewLayer3Forwarding1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*Layer3Forwarding1, error) {
1133 genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_Layer3Forwarding_1)
1134 if err != nil {
1135 return nil, err
1136 }
1137 return newLayer3Forwarding1ClientsFromGenericClients(genericClients), nil
1138 }
1139
1140 func newLayer3Forwarding1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*Layer3Forwarding1 {
1141 clients := make([]*Layer3Forwarding1, len(genericClients))
1142 for i := range genericClients {
1143 clients[i] = &Layer3Forwarding1{genericClients[i]}
1144 }
1145 return clients
1146 }
1147
1148 func (client *Layer3Forwarding1) SetDefaultConnectionService(NewDefaultConnectionService string) (err error) {
1149 // Request structure.
1150 request := &struct {
1151 NewDefaultConnectionService string
1152 }{}
1153 // BEGIN Marshal arguments into request.
1154
1155 if request.NewDefaultConnectionService, err = soap.MarshalString(NewDefaultConnectionService); err != nil {
1156 return
1157 }
1158 // END Marshal arguments into request.
1159
1160 // Response structure.
1161 response := interface{}(nil)
1162
1163 // Perform the SOAP call.
1164 if err = client.SOAPClient.PerformAction(URN_Layer3Forwarding_1, "SetDefaultConnectionService", request, response); err != nil {
1165 return
1166 }
1167
1168 // BEGIN Unmarshal arguments from response.
1169
1170 // END Unmarshal arguments from response.
1171 return
1172 }
1173
1174 func (client *Layer3Forwarding1) GetDefaultConnectionService() (NewDefaultConnectionService string, err error) {
1175 // Request structure.
1176 request := interface{}(nil)
1177 // BEGIN Marshal arguments into request.
1178
1179 // END Marshal arguments into request.
1180
1181 // Response structure.
1182 response := &struct {
1183 NewDefaultConnectionService string
1184 }{}
1185
1186 // Perform the SOAP call.
1187 if err = client.SOAPClient.PerformAction(URN_Layer3Forwarding_1, "GetDefaultConnectionService", request, response); err != nil {
1188 return
1189 }
1190
1191 // BEGIN Unmarshal arguments from response.
1192
1193 if NewDefaultConnectionService, err = soap.UnmarshalString(response.NewDefaultConnectionService); err != nil {
1194 return
1195 }
1196 // END Unmarshal arguments from response.
1197 return
1198 }
1199
1200 // WANCableLinkConfig1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:WANCableLinkConfig:1". See
1201 // goupnp.ServiceClient, which contains RootDevice and Service attributes which
1202 // are provided for informational value.
1203 type WANCableLinkConfig1 struct {
1204 goupnp.ServiceClient
1205 }
1206
1207 // NewWANCableLinkConfig1Clients discovers instances of the service on the network,
1208 // and returns clients to any that are found. errors will contain an error for
1209 // any devices that replied but which could not be queried, and err will be set
1210 // if the discovery process failed outright.
1211 //
1212 // This is a typical entry calling point into this package.
1213 func NewWANCableLinkConfig1Clients() (clients []*WANCableLinkConfig1, errors []error, err error) {
1214 var genericClients []goupnp.ServiceClient
1215 if genericClients, errors, err = goupnp.NewServiceClients(URN_WANCableLinkConfig_1); err != nil {
1216 return
1217 }
1218 clients = newWANCableLinkConfig1ClientsFromGenericClients(genericClients)
1219 return
1220 }
1221
1222 // NewWANCableLinkConfig1ClientsByURL discovers instances of the service at the given
1223 // URL, and returns clients to any that are found. An error is returned if
1224 // there was an error probing the service.
1225 //
1226 // This is a typical entry calling point into this package when reusing an
1227 // previously discovered service URL.
1228 func NewWANCableLinkConfig1ClientsByURL(loc *url.URL) ([]*WANCableLinkConfig1, error) {
1229 genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANCableLinkConfig_1)
1230 if err != nil {
1231 return nil, err
1232 }
1233 return newWANCableLinkConfig1ClientsFromGenericClients(genericClients), nil
1234 }
1235
1236 // NewWANCableLinkConfig1ClientsFromRootDevice discovers instances of the service in
1237 // a given root device, and returns clients to any that are found. An error is
1238 // returned if there was not at least one instance of the service within the
1239 // device. The location parameter is simply assigned to the Location attribute
1240 // of the wrapped ServiceClient(s).
1241 //
1242 // This is a typical entry calling point into this package when reusing an
1243 // previously discovered root device.
1244 func NewWANCableLinkConfig1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*WANCableLinkConfig1, error) {
1245 genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_WANCableLinkConfig_1)
1246 if err != nil {
1247 return nil, err
1248 }
1249 return newWANCableLinkConfig1ClientsFromGenericClients(genericClients), nil
1250 }
1251
1252 func newWANCableLinkConfig1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*WANCableLinkConfig1 {
1253 clients := make([]*WANCableLinkConfig1, len(genericClients))
1254 for i := range genericClients {
1255 clients[i] = &WANCableLinkConfig1{genericClients[i]}
1256 }
1257 return clients
1258 }
1259
1260 //
1261 // Return values:
1262 //
1263 // * NewCableLinkConfigState: allowed values: notReady, dsSyncComplete, usParamAcquired, rangingComplete, ipComplete, todEstablished, paramTransferComplete, registrationComplete, operational, accessDenied
1264 //
1265 // * NewLinkType: allowed values: Ethernet
1266 func (client *WANCableLinkConfig1) GetCableLinkConfigInfo() (NewCableLinkConfigState string, NewLinkType string, err error) {
1267 // Request structure.
1268 request := interface{}(nil)
1269 // BEGIN Marshal arguments into request.
1270
1271 // END Marshal arguments into request.
1272
1273 // Response structure.
1274 response := &struct {
1275 NewCableLinkConfigState string
1276
1277 NewLinkType string
1278 }{}
1279
1280 // Perform the SOAP call.
1281 if err = client.SOAPClient.PerformAction(URN_WANCableLinkConfig_1, "GetCableLinkConfigInfo", request, response); err != nil {
1282 return
1283 }
1284
1285 // BEGIN Unmarshal arguments from response.
1286
1287 if NewCableLinkConfigState, err = soap.UnmarshalString(response.NewCableLinkConfigState); err != nil {
1288 return
1289 }
1290 if NewLinkType, err = soap.UnmarshalString(response.NewLinkType); err != nil {
1291 return
1292 }
1293 // END Unmarshal arguments from response.
1294 return
1295 }
1296
1297 func (client *WANCableLinkConfig1) GetDownstreamFrequency() (NewDownstreamFrequency uint32, err error) {
1298 // Request structure.
1299 request := interface{}(nil)
1300 // BEGIN Marshal arguments into request.
1301
1302 // END Marshal arguments into request.
1303
1304 // Response structure.
1305 response := &struct {
1306 NewDownstreamFrequency string
1307 }{}
1308
1309 // Perform the SOAP call.
1310 if err = client.SOAPClient.PerformAction(URN_WANCableLinkConfig_1, "GetDownstreamFrequency", request, response); err != nil {
1311 return
1312 }
1313
1314 // BEGIN Unmarshal arguments from response.
1315
1316 if NewDownstreamFrequency, err = soap.UnmarshalUi4(response.NewDownstreamFrequency); err != nil {
1317 return
1318 }
1319 // END Unmarshal arguments from response.
1320 return
1321 }
1322
1323 //
1324 // Return values:
1325 //
1326 // * NewDownstreamModulation: allowed values: 64QAM, 256QAM
1327 func (client *WANCableLinkConfig1) GetDownstreamModulation() (NewDownstreamModulation string, err error) {
1328 // Request structure.
1329 request := interface{}(nil)
1330 // BEGIN Marshal arguments into request.
1331
1332 // END Marshal arguments into request.
1333
1334 // Response structure.
1335 response := &struct {
1336 NewDownstreamModulation string
1337 }{}
1338
1339 // Perform the SOAP call.
1340 if err = client.SOAPClient.PerformAction(URN_WANCableLinkConfig_1, "GetDownstreamModulation", request, response); err != nil {
1341 return
1342 }
1343
1344 // BEGIN Unmarshal arguments from response.
1345
1346 if NewDownstreamModulation, err = soap.UnmarshalString(response.NewDownstreamModulation); err != nil {
1347 return
1348 }
1349 // END Unmarshal arguments from response.
1350 return
1351 }
1352
1353 func (client *WANCableLinkConfig1) GetUpstreamFrequency() (NewUpstreamFrequency uint32, err error) {
1354 // Request structure.
1355 request := interface{}(nil)
1356 // BEGIN Marshal arguments into request.
1357
1358 // END Marshal arguments into request.
1359
1360 // Response structure.
1361 response := &struct {
1362 NewUpstreamFrequency string
1363 }{}
1364
1365 // Perform the SOAP call.
1366 if err = client.SOAPClient.PerformAction(URN_WANCableLinkConfig_1, "GetUpstreamFrequency", request, response); err != nil {
1367 return
1368 }
1369
1370 // BEGIN Unmarshal arguments from response.
1371
1372 if NewUpstreamFrequency, err = soap.UnmarshalUi4(response.NewUpstreamFrequency); err != nil {
1373 return
1374 }
1375 // END Unmarshal arguments from response.
1376 return
1377 }
1378
1379 //
1380 // Return values:
1381 //
1382 // * NewUpstreamModulation: allowed values: QPSK, 16QAM
1383 func (client *WANCableLinkConfig1) GetUpstreamModulation() (NewUpstreamModulation string, err error) {
1384 // Request structure.
1385 request := interface{}(nil)
1386 // BEGIN Marshal arguments into request.
1387
1388 // END Marshal arguments into request.
1389
1390 // Response structure.
1391 response := &struct {
1392 NewUpstreamModulation string
1393 }{}
1394
1395 // Perform the SOAP call.
1396 if err = client.SOAPClient.PerformAction(URN_WANCableLinkConfig_1, "GetUpstreamModulation", request, response); err != nil {
1397 return
1398 }
1399
1400 // BEGIN Unmarshal arguments from response.
1401
1402 if NewUpstreamModulation, err = soap.UnmarshalString(response.NewUpstreamModulation); err != nil {
1403 return
1404 }
1405 // END Unmarshal arguments from response.
1406 return
1407 }
1408
1409 func (client *WANCableLinkConfig1) GetUpstreamChannelID() (NewUpstreamChannelID uint32, err error) {
1410 // Request structure.
1411 request := interface{}(nil)
1412 // BEGIN Marshal arguments into request.
1413
1414 // END Marshal arguments into request.
1415
1416 // Response structure.
1417 response := &struct {
1418 NewUpstreamChannelID string
1419 }{}
1420
1421 // Perform the SOAP call.
1422 if err = client.SOAPClient.PerformAction(URN_WANCableLinkConfig_1, "GetUpstreamChannelID", request, response); err != nil {
1423 return
1424 }
1425
1426 // BEGIN Unmarshal arguments from response.
1427
1428 if NewUpstreamChannelID, err = soap.UnmarshalUi4(response.NewUpstreamChannelID); err != nil {
1429 return
1430 }
1431 // END Unmarshal arguments from response.
1432 return
1433 }
1434
1435 func (client *WANCableLinkConfig1) GetUpstreamPowerLevel() (NewUpstreamPowerLevel uint32, err error) {
1436 // Request structure.
1437 request := interface{}(nil)
1438 // BEGIN Marshal arguments into request.
1439
1440 // END Marshal arguments into request.
1441
1442 // Response structure.
1443 response := &struct {
1444 NewUpstreamPowerLevel string
1445 }{}
1446
1447 // Perform the SOAP call.
1448 if err = client.SOAPClient.PerformAction(URN_WANCableLinkConfig_1, "GetUpstreamPowerLevel", request, response); err != nil {
1449 return
1450 }
1451
1452 // BEGIN Unmarshal arguments from response.
1453
1454 if NewUpstreamPowerLevel, err = soap.UnmarshalUi4(response.NewUpstreamPowerLevel); err != nil {
1455 return
1456 }
1457 // END Unmarshal arguments from response.
1458 return
1459 }
1460
1461 func (client *WANCableLinkConfig1) GetBPIEncryptionEnabled() (NewBPIEncryptionEnabled bool, err error) {
1462 // Request structure.
1463 request := interface{}(nil)
1464 // BEGIN Marshal arguments into request.
1465
1466 // END Marshal arguments into request.
1467
1468 // Response structure.
1469 response := &struct {
1470 NewBPIEncryptionEnabled string
1471 }{}
1472
1473 // Perform the SOAP call.
1474 if err = client.SOAPClient.PerformAction(URN_WANCableLinkConfig_1, "GetBPIEncryptionEnabled", request, response); err != nil {
1475 return
1476 }
1477
1478 // BEGIN Unmarshal arguments from response.
1479
1480 if NewBPIEncryptionEnabled, err = soap.UnmarshalBoolean(response.NewBPIEncryptionEnabled); err != nil {
1481 return
1482 }
1483 // END Unmarshal arguments from response.
1484 return
1485 }
1486
1487 func (client *WANCableLinkConfig1) GetConfigFile() (NewConfigFile string, err error) {
1488 // Request structure.
1489 request := interface{}(nil)
1490 // BEGIN Marshal arguments into request.
1491
1492 // END Marshal arguments into request.
1493
1494 // Response structure.
1495 response := &struct {
1496 NewConfigFile string
1497 }{}
1498
1499 // Perform the SOAP call.
1500 if err = client.SOAPClient.PerformAction(URN_WANCableLinkConfig_1, "GetConfigFile", request, response); err != nil {
1501 return
1502 }
1503
1504 // BEGIN Unmarshal arguments from response.
1505
1506 if NewConfigFile, err = soap.UnmarshalString(response.NewConfigFile); err != nil {
1507 return
1508 }
1509 // END Unmarshal arguments from response.
1510 return
1511 }
1512
1513 func (client *WANCableLinkConfig1) GetTFTPServer() (NewTFTPServer string, err error) {
1514 // Request structure.
1515 request := interface{}(nil)
1516 // BEGIN Marshal arguments into request.
1517
1518 // END Marshal arguments into request.
1519
1520 // Response structure.
1521 response := &struct {
1522 NewTFTPServer string
1523 }{}
1524
1525 // Perform the SOAP call.
1526 if err = client.SOAPClient.PerformAction(URN_WANCableLinkConfig_1, "GetTFTPServer", request, response); err != nil {
1527 return
1528 }
1529
1530 // BEGIN Unmarshal arguments from response.
1531
1532 if NewTFTPServer, err = soap.UnmarshalString(response.NewTFTPServer); err != nil {
1533 return
1534 }
1535 // END Unmarshal arguments from response.
1536 return
1537 }
1538
1539 // WANCommonInterfaceConfig1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1". See
1540 // goupnp.ServiceClient, which contains RootDevice and Service attributes which
1541 // are provided for informational value.
1542 type WANCommonInterfaceConfig1 struct {
1543 goupnp.ServiceClient
1544 }
1545
1546 // NewWANCommonInterfaceConfig1Clients discovers instances of the service on the network,
1547 // and returns clients to any that are found. errors will contain an error for
1548 // any devices that replied but which could not be queried, and err will be set
1549 // if the discovery process failed outright.
1550 //
1551 // This is a typical entry calling point into this package.
1552 func NewWANCommonInterfaceConfig1Clients() (clients []*WANCommonInterfaceConfig1, errors []error, err error) {
1553 var genericClients []goupnp.ServiceClient
1554 if genericClients, errors, err = goupnp.NewServiceClients(URN_WANCommonInterfaceConfig_1); err != nil {
1555 return
1556 }
1557 clients = newWANCommonInterfaceConfig1ClientsFromGenericClients(genericClients)
1558 return
1559 }
1560
1561 // NewWANCommonInterfaceConfig1ClientsByURL discovers instances of the service at the given
1562 // URL, and returns clients to any that are found. An error is returned if
1563 // there was an error probing the service.
1564 //
1565 // This is a typical entry calling point into this package when reusing an
1566 // previously discovered service URL.
1567 func NewWANCommonInterfaceConfig1ClientsByURL(loc *url.URL) ([]*WANCommonInterfaceConfig1, error) {
1568 genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANCommonInterfaceConfig_1)
1569 if err != nil {
1570 return nil, err
1571 }
1572 return newWANCommonInterfaceConfig1ClientsFromGenericClients(genericClients), nil
1573 }
1574
1575 // NewWANCommonInterfaceConfig1ClientsFromRootDevice discovers instances of the service in
1576 // a given root device, and returns clients to any that are found. An error is
1577 // returned if there was not at least one instance of the service within the
1578 // device. The location parameter is simply assigned to the Location attribute
1579 // of the wrapped ServiceClient(s).
1580 //
1581 // This is a typical entry calling point into this package when reusing an
1582 // previously discovered root device.
1583 func NewWANCommonInterfaceConfig1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*WANCommonInterfaceConfig1, error) {
1584 genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_WANCommonInterfaceConfig_1)
1585 if err != nil {
1586 return nil, err
1587 }
1588 return newWANCommonInterfaceConfig1ClientsFromGenericClients(genericClients), nil
1589 }
1590
1591 func newWANCommonInterfaceConfig1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*WANCommonInterfaceConfig1 {
1592 clients := make([]*WANCommonInterfaceConfig1, len(genericClients))
1593 for i := range genericClients {
1594 clients[i] = &WANCommonInterfaceConfig1{genericClients[i]}
1595 }
1596 return clients
1597 }
1598
1599 func (client *WANCommonInterfaceConfig1) SetEnabledForInternet(NewEnabledForInternet bool) (err error) {
1600 // Request structure.
1601 request := &struct {
1602 NewEnabledForInternet string
1603 }{}
1604 // BEGIN Marshal arguments into request.
1605
1606 if request.NewEnabledForInternet, err = soap.MarshalBoolean(NewEnabledForInternet); err != nil {
1607 return
1608 }
1609 // END Marshal arguments into request.
1610
1611 // Response structure.
1612 response := interface{}(nil)
1613
1614 // Perform the SOAP call.
1615 if err = client.SOAPClient.PerformAction(URN_WANCommonInterfaceConfig_1, "SetEnabledForInternet", request, response); err != nil {
1616 return
1617 }
1618
1619 // BEGIN Unmarshal arguments from response.
1620
1621 // END Unmarshal arguments from response.
1622 return
1623 }
1624
1625 func (client *WANCommonInterfaceConfig1) GetEnabledForInternet() (NewEnabledForInternet bool, err error) {
1626 // Request structure.
1627 request := interface{}(nil)
1628 // BEGIN Marshal arguments into request.
1629
1630 // END Marshal arguments into request.
1631
1632 // Response structure.
1633 response := &struct {
1634 NewEnabledForInternet string
1635 }{}
1636
1637 // Perform the SOAP call.
1638 if err = client.SOAPClient.PerformAction(URN_WANCommonInterfaceConfig_1, "GetEnabledForInternet", request, response); err != nil {
1639 return
1640 }
1641
1642 // BEGIN Unmarshal arguments from response.
1643
1644 if NewEnabledForInternet, err = soap.UnmarshalBoolean(response.NewEnabledForInternet); err != nil {
1645 return
1646 }
1647 // END Unmarshal arguments from response.
1648 return
1649 }
1650
1651 //
1652 // Return values:
1653 //
1654 // * NewWANAccessType: allowed values: DSL, POTS, Cable, Ethernet
1655 //
1656 // * NewPhysicalLinkStatus: allowed values: Up, Down
1657 func (client *WANCommonInterfaceConfig1) GetCommonLinkProperties() (NewWANAccessType string, NewLayer1UpstreamMaxBitRate uint32, NewLayer1DownstreamMaxBitRate uint32, NewPhysicalLinkStatus string, err error) {
1658 // Request structure.
1659 request := interface{}(nil)
1660 // BEGIN Marshal arguments into request.
1661
1662 // END Marshal arguments into request.
1663
1664 // Response structure.
1665 response := &struct {
1666 NewWANAccessType string
1667
1668 NewLayer1UpstreamMaxBitRate string
1669
1670 NewLayer1DownstreamMaxBitRate string
1671
1672 NewPhysicalLinkStatus string
1673 }{}
1674
1675 // Perform the SOAP call.
1676 if err = client.SOAPClient.PerformAction(URN_WANCommonInterfaceConfig_1, "GetCommonLinkProperties", request, response); err != nil {
1677 return
1678 }
1679
1680 // BEGIN Unmarshal arguments from response.
1681
1682 if NewWANAccessType, err = soap.UnmarshalString(response.NewWANAccessType); err != nil {
1683 return
1684 }
1685 if NewLayer1UpstreamMaxBitRate, err = soap.UnmarshalUi4(response.NewLayer1UpstreamMaxBitRate); err != nil {
1686 return
1687 }
1688 if NewLayer1DownstreamMaxBitRate, err = soap.UnmarshalUi4(response.NewLayer1DownstreamMaxBitRate); err != nil {
1689 return
1690 }
1691 if NewPhysicalLinkStatus, err = soap.UnmarshalString(response.NewPhysicalLinkStatus); err != nil {
1692 return
1693 }
1694 // END Unmarshal arguments from response.
1695 return
1696 }
1697
1698 func (client *WANCommonInterfaceConfig1) GetWANAccessProvider() (NewWANAccessProvider string, err error) {
1699 // Request structure.
1700 request := interface{}(nil)
1701 // BEGIN Marshal arguments into request.
1702
1703 // END Marshal arguments into request.
1704
1705 // Response structure.
1706 response := &struct {
1707 NewWANAccessProvider string
1708 }{}
1709
1710 // Perform the SOAP call.
1711 if err = client.SOAPClient.PerformAction(URN_WANCommonInterfaceConfig_1, "GetWANAccessProvider", request, response); err != nil {
1712 return
1713 }
1714
1715 // BEGIN Unmarshal arguments from response.
1716
1717 if NewWANAccessProvider, err = soap.UnmarshalString(response.NewWANAccessProvider); err != nil {
1718 return
1719 }
1720 // END Unmarshal arguments from response.
1721 return
1722 }
1723
1724 //
1725 // Return values:
1726 //
1727 // * NewMaximumActiveConnections: allowed value range: minimum=1, step=1
1728 func (client *WANCommonInterfaceConfig1) GetMaximumActiveConnections() (NewMaximumActiveConnections uint16, err error) {
1729 // Request structure.
1730 request := interface{}(nil)
1731 // BEGIN Marshal arguments into request.
1732
1733 // END Marshal arguments into request.
1734
1735 // Response structure.
1736 response := &struct {
1737 NewMaximumActiveConnections string
1738 }{}
1739
1740 // Perform the SOAP call.
1741 if err = client.SOAPClient.PerformAction(URN_WANCommonInterfaceConfig_1, "GetMaximumActiveConnections", request, response); err != nil {
1742 return
1743 }
1744
1745 // BEGIN Unmarshal arguments from response.
1746
1747 if NewMaximumActiveConnections, err = soap.UnmarshalUi2(response.NewMaximumActiveConnections); err != nil {
1748 return
1749 }
1750 // END Unmarshal arguments from response.
1751 return
1752 }
1753
1754 func (client *WANCommonInterfaceConfig1) GetTotalBytesSent() (NewTotalBytesSent uint32, err error) {
1755 // Request structure.
1756 request := interface{}(nil)
1757 // BEGIN Marshal arguments into request.
1758
1759 // END Marshal arguments into request.
1760
1761 // Response structure.
1762 response := &struct {
1763 NewTotalBytesSent string
1764 }{}
1765
1766 // Perform the SOAP call.
1767 if err = client.SOAPClient.PerformAction(URN_WANCommonInterfaceConfig_1, "GetTotalBytesSent", request, response); err != nil {
1768 return
1769 }
1770
1771 // BEGIN Unmarshal arguments from response.
1772
1773 if NewTotalBytesSent, err = soap.UnmarshalUi4(response.NewTotalBytesSent); err != nil {
1774 return
1775 }
1776 // END Unmarshal arguments from response.
1777 return
1778 }
1779
1780 func (client *WANCommonInterfaceConfig1) GetTotalBytesReceived() (NewTotalBytesReceived uint32, err error) {
1781 // Request structure.
1782 request := interface{}(nil)
1783 // BEGIN Marshal arguments into request.
1784
1785 // END Marshal arguments into request.
1786
1787 // Response structure.
1788 response := &struct {
1789 NewTotalBytesReceived string
1790 }{}
1791
1792 // Perform the SOAP call.
1793 if err = client.SOAPClient.PerformAction(URN_WANCommonInterfaceConfig_1, "GetTotalBytesReceived", request, response); err != nil {
1794 return
1795 }
1796
1797 // BEGIN Unmarshal arguments from response.
1798
1799 if NewTotalBytesReceived, err = soap.UnmarshalUi4(response.NewTotalBytesReceived); err != nil {
1800 return
1801 }
1802 // END Unmarshal arguments from response.
1803 return
1804 }
1805
1806 func (client *WANCommonInterfaceConfig1) GetTotalPacketsSent() (NewTotalPacketsSent uint32, err error) {
1807 // Request structure.
1808 request := interface{}(nil)
1809 // BEGIN Marshal arguments into request.
1810
1811 // END Marshal arguments into request.
1812
1813 // Response structure.
1814 response := &struct {
1815 NewTotalPacketsSent string
1816 }{}
1817
1818 // Perform the SOAP call.
1819 if err = client.SOAPClient.PerformAction(URN_WANCommonInterfaceConfig_1, "GetTotalPacketsSent", request, response); err != nil {
1820 return
1821 }
1822
1823 // BEGIN Unmarshal arguments from response.
1824
1825 if NewTotalPacketsSent, err = soap.UnmarshalUi4(response.NewTotalPacketsSent); err != nil {
1826 return
1827 }
1828 // END Unmarshal arguments from response.
1829 return
1830 }
1831
1832 func (client *WANCommonInterfaceConfig1) GetTotalPacketsReceived() (NewTotalPacketsReceived uint32, err error) {
1833 // Request structure.
1834 request := interface{}(nil)
1835 // BEGIN Marshal arguments into request.
1836
1837 // END Marshal arguments into request.
1838
1839 // Response structure.
1840 response := &struct {
1841 NewTotalPacketsReceived string
1842 }{}
1843
1844 // Perform the SOAP call.
1845 if err = client.SOAPClient.PerformAction(URN_WANCommonInterfaceConfig_1, "GetTotalPacketsReceived", request, response); err != nil {
1846 return
1847 }
1848
1849 // BEGIN Unmarshal arguments from response.
1850
1851 if NewTotalPacketsReceived, err = soap.UnmarshalUi4(response.NewTotalPacketsReceived); err != nil {
1852 return
1853 }
1854 // END Unmarshal arguments from response.
1855 return
1856 }
1857
1858 func (client *WANCommonInterfaceConfig1) GetActiveConnection(NewActiveConnectionIndex uint16) (NewActiveConnDeviceContainer string, NewActiveConnectionServiceID string, err error) {
1859 // Request structure.
1860 request := &struct {
1861 NewActiveConnectionIndex string
1862 }{}
1863 // BEGIN Marshal arguments into request.
1864
1865 if request.NewActiveConnectionIndex, err = soap.MarshalUi2(NewActiveConnectionIndex); err != nil {
1866 return
1867 }
1868 // END Marshal arguments into request.
1869
1870 // Response structure.
1871 response := &struct {
1872 NewActiveConnDeviceContainer string
1873
1874 NewActiveConnectionServiceID string
1875 }{}
1876
1877 // Perform the SOAP call.
1878 if err = client.SOAPClient.PerformAction(URN_WANCommonInterfaceConfig_1, "GetActiveConnection", request, response); err != nil {
1879 return
1880 }
1881
1882 // BEGIN Unmarshal arguments from response.
1883
1884 if NewActiveConnDeviceContainer, err = soap.UnmarshalString(response.NewActiveConnDeviceContainer); err != nil {
1885 return
1886 }
1887 if NewActiveConnectionServiceID, err = soap.UnmarshalString(response.NewActiveConnectionServiceID); err != nil {
1888 return
1889 }
1890 // END Unmarshal arguments from response.
1891 return
1892 }
1893
1894 // WANDSLLinkConfig1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:WANDSLLinkConfig:1". See
1895 // goupnp.ServiceClient, which contains RootDevice and Service attributes which
1896 // are provided for informational value.
1897 type WANDSLLinkConfig1 struct {
1898 goupnp.ServiceClient
1899 }
1900
1901 // NewWANDSLLinkConfig1Clients discovers instances of the service on the network,
1902 // and returns clients to any that are found. errors will contain an error for
1903 // any devices that replied but which could not be queried, and err will be set
1904 // if the discovery process failed outright.
1905 //
1906 // This is a typical entry calling point into this package.
1907 func NewWANDSLLinkConfig1Clients() (clients []*WANDSLLinkConfig1, errors []error, err error) {
1908 var genericClients []goupnp.ServiceClient
1909 if genericClients, errors, err = goupnp.NewServiceClients(URN_WANDSLLinkConfig_1); err != nil {
1910 return
1911 }
1912 clients = newWANDSLLinkConfig1ClientsFromGenericClients(genericClients)
1913 return
1914 }
1915
1916 // NewWANDSLLinkConfig1ClientsByURL discovers instances of the service at the given
1917 // URL, and returns clients to any that are found. An error is returned if
1918 // there was an error probing the service.
1919 //
1920 // This is a typical entry calling point into this package when reusing an
1921 // previously discovered service URL.
1922 func NewWANDSLLinkConfig1ClientsByURL(loc *url.URL) ([]*WANDSLLinkConfig1, error) {
1923 genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANDSLLinkConfig_1)
1924 if err != nil {
1925 return nil, err
1926 }
1927 return newWANDSLLinkConfig1ClientsFromGenericClients(genericClients), nil
1928 }
1929
1930 // NewWANDSLLinkConfig1ClientsFromRootDevice discovers instances of the service in
1931 // a given root device, and returns clients to any that are found. An error is
1932 // returned if there was not at least one instance of the service within the
1933 // device. The location parameter is simply assigned to the Location attribute
1934 // of the wrapped ServiceClient(s).
1935 //
1936 // This is a typical entry calling point into this package when reusing an
1937 // previously discovered root device.
1938 func NewWANDSLLinkConfig1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*WANDSLLinkConfig1, error) {
1939 genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_WANDSLLinkConfig_1)
1940 if err != nil {
1941 return nil, err
1942 }
1943 return newWANDSLLinkConfig1ClientsFromGenericClients(genericClients), nil
1944 }
1945
1946 func newWANDSLLinkConfig1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*WANDSLLinkConfig1 {
1947 clients := make([]*WANDSLLinkConfig1, len(genericClients))
1948 for i := range genericClients {
1949 clients[i] = &WANDSLLinkConfig1{genericClients[i]}
1950 }
1951 return clients
1952 }
1953
1954 func (client *WANDSLLinkConfig1) SetDSLLinkType(NewLinkType string) (err error) {
1955 // Request structure.
1956 request := &struct {
1957 NewLinkType string
1958 }{}
1959 // BEGIN Marshal arguments into request.
1960
1961 if request.NewLinkType, err = soap.MarshalString(NewLinkType); err != nil {
1962 return
1963 }
1964 // END Marshal arguments into request.
1965
1966 // Response structure.
1967 response := interface{}(nil)
1968
1969 // Perform the SOAP call.
1970 if err = client.SOAPClient.PerformAction(URN_WANDSLLinkConfig_1, "SetDSLLinkType", request, response); err != nil {
1971 return
1972 }
1973
1974 // BEGIN Unmarshal arguments from response.
1975
1976 // END Unmarshal arguments from response.
1977 return
1978 }
1979
1980 //
1981 // Return values:
1982 //
1983 // * NewLinkStatus: allowed values: Up, Down
1984 func (client *WANDSLLinkConfig1) GetDSLLinkInfo() (NewLinkType string, NewLinkStatus string, err error) {
1985 // Request structure.
1986 request := interface{}(nil)
1987 // BEGIN Marshal arguments into request.
1988
1989 // END Marshal arguments into request.
1990
1991 // Response structure.
1992 response := &struct {
1993 NewLinkType string
1994
1995 NewLinkStatus string
1996 }{}
1997
1998 // Perform the SOAP call.
1999 if err = client.SOAPClient.PerformAction(URN_WANDSLLinkConfig_1, "GetDSLLinkInfo", request, response); err != nil {
2000 return
2001 }
2002
2003 // BEGIN Unmarshal arguments from response.
2004
2005 if NewLinkType, err = soap.UnmarshalString(response.NewLinkType); err != nil {
2006 return
2007 }
2008 if NewLinkStatus, err = soap.UnmarshalString(response.NewLinkStatus); err != nil {
2009 return
2010 }
2011 // END Unmarshal arguments from response.
2012 return
2013 }
2014
2015 func (client *WANDSLLinkConfig1) GetAutoConfig() (NewAutoConfig bool, err error) {
2016 // Request structure.
2017 request := interface{}(nil)
2018 // BEGIN Marshal arguments into request.
2019
2020 // END Marshal arguments into request.
2021
2022 // Response structure.
2023 response := &struct {
2024 NewAutoConfig string
2025 }{}
2026
2027 // Perform the SOAP call.
2028 if err = client.SOAPClient.PerformAction(URN_WANDSLLinkConfig_1, "GetAutoConfig", request, response); err != nil {
2029 return
2030 }
2031
2032 // BEGIN Unmarshal arguments from response.
2033
2034 if NewAutoConfig, err = soap.UnmarshalBoolean(response.NewAutoConfig); err != nil {
2035 return
2036 }
2037 // END Unmarshal arguments from response.
2038 return
2039 }
2040
2041 func (client *WANDSLLinkConfig1) GetModulationType() (NewModulationType string, err error) {
2042 // Request structure.
2043 request := interface{}(nil)
2044 // BEGIN Marshal arguments into request.
2045
2046 // END Marshal arguments into request.
2047
2048 // Response structure.
2049 response := &struct {
2050 NewModulationType string
2051 }{}
2052
2053 // Perform the SOAP call.
2054 if err = client.SOAPClient.PerformAction(URN_WANDSLLinkConfig_1, "GetModulationType", request, response); err != nil {
2055 return
2056 }
2057
2058 // BEGIN Unmarshal arguments from response.
2059
2060 if NewModulationType, err = soap.UnmarshalString(response.NewModulationType); err != nil {
2061 return
2062 }
2063 // END Unmarshal arguments from response.
2064 return
2065 }
2066
2067 func (client *WANDSLLinkConfig1) SetDestinationAddress(NewDestinationAddress string) (err error) {
2068 // Request structure.
2069 request := &struct {
2070 NewDestinationAddress string
2071 }{}
2072 // BEGIN Marshal arguments into request.
2073
2074 if request.NewDestinationAddress, err = soap.MarshalString(NewDestinationAddress); err != nil {
2075 return
2076 }
2077 // END Marshal arguments into request.
2078
2079 // Response structure.
2080 response := interface{}(nil)
2081
2082 // Perform the SOAP call.
2083 if err = client.SOAPClient.PerformAction(URN_WANDSLLinkConfig_1, "SetDestinationAddress", request, response); err != nil {
2084 return
2085 }
2086
2087 // BEGIN Unmarshal arguments from response.
2088
2089 // END Unmarshal arguments from response.
2090 return
2091 }
2092
2093 func (client *WANDSLLinkConfig1) GetDestinationAddress() (NewDestinationAddress string, err error) {
2094 // Request structure.
2095 request := interface{}(nil)
2096 // BEGIN Marshal arguments into request.
2097
2098 // END Marshal arguments into request.
2099
2100 // Response structure.
2101 response := &struct {
2102 NewDestinationAddress string
2103 }{}
2104
2105 // Perform the SOAP call.
2106 if err = client.SOAPClient.PerformAction(URN_WANDSLLinkConfig_1, "GetDestinationAddress", request, response); err != nil {
2107 return
2108 }
2109
2110 // BEGIN Unmarshal arguments from response.
2111
2112 if NewDestinationAddress, err = soap.UnmarshalString(response.NewDestinationAddress); err != nil {
2113 return
2114 }
2115 // END Unmarshal arguments from response.
2116 return
2117 }
2118
2119 func (client *WANDSLLinkConfig1) SetATMEncapsulation(NewATMEncapsulation string) (err error) {
2120 // Request structure.
2121 request := &struct {
2122 NewATMEncapsulation string
2123 }{}
2124 // BEGIN Marshal arguments into request.
2125
2126 if request.NewATMEncapsulation, err = soap.MarshalString(NewATMEncapsulation); err != nil {
2127 return
2128 }
2129 // END Marshal arguments into request.
2130
2131 // Response structure.
2132 response := interface{}(nil)
2133
2134 // Perform the SOAP call.
2135 if err = client.SOAPClient.PerformAction(URN_WANDSLLinkConfig_1, "SetATMEncapsulation", request, response); err != nil {
2136 return
2137 }
2138
2139 // BEGIN Unmarshal arguments from response.
2140
2141 // END Unmarshal arguments from response.
2142 return
2143 }
2144
2145 func (client *WANDSLLinkConfig1) GetATMEncapsulation() (NewATMEncapsulation string, err error) {
2146 // Request structure.
2147 request := interface{}(nil)
2148 // BEGIN Marshal arguments into request.
2149
2150 // END Marshal arguments into request.
2151
2152 // Response structure.
2153 response := &struct {
2154 NewATMEncapsulation string
2155 }{}
2156
2157 // Perform the SOAP call.
2158 if err = client.SOAPClient.PerformAction(URN_WANDSLLinkConfig_1, "GetATMEncapsulation", request, response); err != nil {
2159 return
2160 }
2161
2162 // BEGIN Unmarshal arguments from response.
2163
2164 if NewATMEncapsulation, err = soap.UnmarshalString(response.NewATMEncapsulation); err != nil {
2165 return
2166 }
2167 // END Unmarshal arguments from response.
2168 return
2169 }
2170
2171 func (client *WANDSLLinkConfig1) SetFCSPreserved(NewFCSPreserved bool) (err error) {
2172 // Request structure.
2173 request := &struct {
2174 NewFCSPreserved string
2175 }{}
2176 // BEGIN Marshal arguments into request.
2177
2178 if request.NewFCSPreserved, err = soap.MarshalBoolean(NewFCSPreserved); err != nil {
2179 return
2180 }
2181 // END Marshal arguments into request.
2182
2183 // Response structure.
2184 response := interface{}(nil)
2185
2186 // Perform the SOAP call.
2187 if err = client.SOAPClient.PerformAction(URN_WANDSLLinkConfig_1, "SetFCSPreserved", request, response); err != nil {
2188 return
2189 }
2190
2191 // BEGIN Unmarshal arguments from response.
2192
2193 // END Unmarshal arguments from response.
2194 return
2195 }
2196
2197 func (client *WANDSLLinkConfig1) GetFCSPreserved() (NewFCSPreserved bool, err error) {
2198 // Request structure.
2199 request := interface{}(nil)
2200 // BEGIN Marshal arguments into request.
2201
2202 // END Marshal arguments into request.
2203
2204 // Response structure.
2205 response := &struct {
2206 NewFCSPreserved string
2207 }{}
2208
2209 // Perform the SOAP call.
2210 if err = client.SOAPClient.PerformAction(URN_WANDSLLinkConfig_1, "GetFCSPreserved", request, response); err != nil {
2211 return
2212 }
2213
2214 // BEGIN Unmarshal arguments from response.
2215
2216 if NewFCSPreserved, err = soap.UnmarshalBoolean(response.NewFCSPreserved); err != nil {
2217 return
2218 }
2219 // END Unmarshal arguments from response.
2220 return
2221 }
2222
2223 // WANEthernetLinkConfig1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:WANEthernetLinkConfig:1". See
2224 // goupnp.ServiceClient, which contains RootDevice and Service attributes which
2225 // are provided for informational value.
2226 type WANEthernetLinkConfig1 struct {
2227 goupnp.ServiceClient
2228 }
2229
2230 // NewWANEthernetLinkConfig1Clients discovers instances of the service on the network,
2231 // and returns clients to any that are found. errors will contain an error for
2232 // any devices that replied but which could not be queried, and err will be set
2233 // if the discovery process failed outright.
2234 //
2235 // This is a typical entry calling point into this package.
2236 func NewWANEthernetLinkConfig1Clients() (clients []*WANEthernetLinkConfig1, errors []error, err error) {
2237 var genericClients []goupnp.ServiceClient
2238 if genericClients, errors, err = goupnp.NewServiceClients(URN_WANEthernetLinkConfig_1); err != nil {
2239 return
2240 }
2241 clients = newWANEthernetLinkConfig1ClientsFromGenericClients(genericClients)
2242 return
2243 }
2244
2245 // NewWANEthernetLinkConfig1ClientsByURL discovers instances of the service at the given
2246 // URL, and returns clients to any that are found. An error is returned if
2247 // there was an error probing the service.
2248 //
2249 // This is a typical entry calling point into this package when reusing an
2250 // previously discovered service URL.
2251 func NewWANEthernetLinkConfig1ClientsByURL(loc *url.URL) ([]*WANEthernetLinkConfig1, error) {
2252 genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANEthernetLinkConfig_1)
2253 if err != nil {
2254 return nil, err
2255 }
2256 return newWANEthernetLinkConfig1ClientsFromGenericClients(genericClients), nil
2257 }
2258
2259 // NewWANEthernetLinkConfig1ClientsFromRootDevice discovers instances of the service in
2260 // a given root device, and returns clients to any that are found. An error is
2261 // returned if there was not at least one instance of the service within the
2262 // device. The location parameter is simply assigned to the Location attribute
2263 // of the wrapped ServiceClient(s).
2264 //
2265 // This is a typical entry calling point into this package when reusing an
2266 // previously discovered root device.
2267 func NewWANEthernetLinkConfig1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*WANEthernetLinkConfig1, error) {
2268 genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_WANEthernetLinkConfig_1)
2269 if err != nil {
2270 return nil, err
2271 }
2272 return newWANEthernetLinkConfig1ClientsFromGenericClients(genericClients), nil
2273 }
2274
2275 func newWANEthernetLinkConfig1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*WANEthernetLinkConfig1 {
2276 clients := make([]*WANEthernetLinkConfig1, len(genericClients))
2277 for i := range genericClients {
2278 clients[i] = &WANEthernetLinkConfig1{genericClients[i]}
2279 }
2280 return clients
2281 }
2282
2283 //
2284 // Return values:
2285 //
2286 // * NewEthernetLinkStatus: allowed values: Up, Down
2287 func (client *WANEthernetLinkConfig1) GetEthernetLinkStatus() (NewEthernetLinkStatus string, err error) {
2288 // Request structure.
2289 request := interface{}(nil)
2290 // BEGIN Marshal arguments into request.
2291
2292 // END Marshal arguments into request.
2293
2294 // Response structure.
2295 response := &struct {
2296 NewEthernetLinkStatus string
2297 }{}
2298
2299 // Perform the SOAP call.
2300 if err = client.SOAPClient.PerformAction(URN_WANEthernetLinkConfig_1, "GetEthernetLinkStatus", request, response); err != nil {
2301 return
2302 }
2303
2304 // BEGIN Unmarshal arguments from response.
2305
2306 if NewEthernetLinkStatus, err = soap.UnmarshalString(response.NewEthernetLinkStatus); err != nil {
2307 return
2308 }
2309 // END Unmarshal arguments from response.
2310 return
2311 }
2312
2313 // WANIPConnection1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:WANIPConnection:1". See
2314 // goupnp.ServiceClient, which contains RootDevice and Service attributes which
2315 // are provided for informational value.
2316 type WANIPConnection1 struct {
2317 goupnp.ServiceClient
2318 }
2319
2320 // NewWANIPConnection1Clients discovers instances of the service on the network,
2321 // and returns clients to any that are found. errors will contain an error for
2322 // any devices that replied but which could not be queried, and err will be set
2323 // if the discovery process failed outright.
2324 //
2325 // This is a typical entry calling point into this package.
2326 func NewWANIPConnection1Clients() (clients []*WANIPConnection1, errors []error, err error) {
2327 var genericClients []goupnp.ServiceClient
2328 if genericClients, errors, err = goupnp.NewServiceClients(URN_WANIPConnection_1); err != nil {
2329 return
2330 }
2331 clients = newWANIPConnection1ClientsFromGenericClients(genericClients)
2332 return
2333 }
2334
2335 // NewWANIPConnection1ClientsByURL discovers instances of the service at the given
2336 // URL, and returns clients to any that are found. An error is returned if
2337 // there was an error probing the service.
2338 //
2339 // This is a typical entry calling point into this package when reusing an
2340 // previously discovered service URL.
2341 func NewWANIPConnection1ClientsByURL(loc *url.URL) ([]*WANIPConnection1, error) {
2342 genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANIPConnection_1)
2343 if err != nil {
2344 return nil, err
2345 }
2346 return newWANIPConnection1ClientsFromGenericClients(genericClients), nil
2347 }
2348
2349 // NewWANIPConnection1ClientsFromRootDevice discovers instances of the service in
2350 // a given root device, and returns clients to any that are found. An error is
2351 // returned if there was not at least one instance of the service within the
2352 // device. The location parameter is simply assigned to the Location attribute
2353 // of the wrapped ServiceClient(s).
2354 //
2355 // This is a typical entry calling point into this package when reusing an
2356 // previously discovered root device.
2357 func NewWANIPConnection1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*WANIPConnection1, error) {
2358 genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_WANIPConnection_1)
2359 if err != nil {
2360 return nil, err
2361 }
2362 return newWANIPConnection1ClientsFromGenericClients(genericClients), nil
2363 }
2364
2365 func newWANIPConnection1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*WANIPConnection1 {
2366 clients := make([]*WANIPConnection1, len(genericClients))
2367 for i := range genericClients {
2368 clients[i] = &WANIPConnection1{genericClients[i]}
2369 }
2370 return clients
2371 }
2372
2373 func (client *WANIPConnection1) SetConnectionType(NewConnectionType string) (err error) {
2374 // Request structure.
2375 request := &struct {
2376 NewConnectionType string
2377 }{}
2378 // BEGIN Marshal arguments into request.
2379
2380 if request.NewConnectionType, err = soap.MarshalString(NewConnectionType); err != nil {
2381 return
2382 }
2383 // END Marshal arguments into request.
2384
2385 // Response structure.
2386 response := interface{}(nil)
2387
2388 // Perform the SOAP call.
2389 if err = client.SOAPClient.PerformAction(URN_WANIPConnection_1, "SetConnectionType", request, response); err != nil {
2390 return
2391 }
2392
2393 // BEGIN Unmarshal arguments from response.
2394
2395 // END Unmarshal arguments from response.
2396 return
2397 }
2398
2399 //
2400 // Return values:
2401 //
2402 // * NewPossibleConnectionTypes: allowed values: Unconfigured, IP_Routed, IP_Bridged
2403 func (client *WANIPConnection1) GetConnectionTypeInfo() (NewConnectionType string, NewPossibleConnectionTypes string, err error) {
2404 // Request structure.
2405 request := interface{}(nil)
2406 // BEGIN Marshal arguments into request.
2407
2408 // END Marshal arguments into request.
2409
2410 // Response structure.
2411 response := &struct {
2412 NewConnectionType string
2413
2414 NewPossibleConnectionTypes string
2415 }{}
2416
2417 // Perform the SOAP call.
2418 if err = client.SOAPClient.PerformAction(URN_WANIPConnection_1, "GetConnectionTypeInfo", request, response); err != nil {
2419 return
2420 }
2421
2422 // BEGIN Unmarshal arguments from response.
2423
2424 if NewConnectionType, err = soap.UnmarshalString(response.NewConnectionType); err != nil {
2425 return
2426 }
2427 if NewPossibleConnectionTypes, err = soap.UnmarshalString(response.NewPossibleConnectionTypes); err != nil {
2428 return
2429 }
2430 // END Unmarshal arguments from response.
2431 return
2432 }
2433
2434 func (client *WANIPConnection1) RequestConnection() (err error) {
2435 // Request structure.
2436 request := interface{}(nil)
2437 // BEGIN Marshal arguments into request.
2438
2439 // END Marshal arguments into request.
2440
2441 // Response structure.
2442 response := interface{}(nil)
2443
2444 // Perform the SOAP call.
2445 if err = client.SOAPClient.PerformAction(URN_WANIPConnection_1, "RequestConnection", request, response); err != nil {
2446 return
2447 }
2448
2449 // BEGIN Unmarshal arguments from response.
2450
2451 // END Unmarshal arguments from response.
2452 return
2453 }
2454
2455 func (client *WANIPConnection1) RequestTermination() (err error) {
2456 // Request structure.
2457 request := interface{}(nil)
2458 // BEGIN Marshal arguments into request.
2459
2460 // END Marshal arguments into request.
2461
2462 // Response structure.
2463 response := interface{}(nil)
2464
2465 // Perform the SOAP call.
2466 if err = client.SOAPClient.PerformAction(URN_WANIPConnection_1, "RequestTermination", request, response); err != nil {
2467 return
2468 }
2469
2470 // BEGIN Unmarshal arguments from response.
2471
2472 // END Unmarshal arguments from response.
2473 return
2474 }
2475
2476 func (client *WANIPConnection1) ForceTermination() (err error) {
2477 // Request structure.
2478 request := interface{}(nil)
2479 // BEGIN Marshal arguments into request.
2480
2481 // END Marshal arguments into request.
2482
2483 // Response structure.
2484 response := interface{}(nil)
2485
2486 // Perform the SOAP call.
2487 if err = client.SOAPClient.PerformAction(URN_WANIPConnection_1, "ForceTermination", request, response); err != nil {
2488 return
2489 }
2490
2491 // BEGIN Unmarshal arguments from response.
2492
2493 // END Unmarshal arguments from response.
2494 return
2495 }
2496
2497 func (client *WANIPConnection1) SetAutoDisconnectTime(NewAutoDisconnectTime uint32) (err error) {
2498 // Request structure.
2499 request := &struct {
2500 NewAutoDisconnectTime string
2501 }{}
2502 // BEGIN Marshal arguments into request.
2503
2504 if request.NewAutoDisconnectTime, err = soap.MarshalUi4(NewAutoDisconnectTime); err != nil {
2505 return
2506 }
2507 // END Marshal arguments into request.
2508
2509 // Response structure.
2510 response := interface{}(nil)
2511
2512 // Perform the SOAP call.
2513 if err = client.SOAPClient.PerformAction(URN_WANIPConnection_1, "SetAutoDisconnectTime", request, response); err != nil {
2514 return
2515 }
2516
2517 // BEGIN Unmarshal arguments from response.
2518
2519 // END Unmarshal arguments from response.
2520 return
2521 }
2522
2523 func (client *WANIPConnection1) SetIdleDisconnectTime(NewIdleDisconnectTime uint32) (err error) {
2524 // Request structure.
2525 request := &struct {
2526 NewIdleDisconnectTime string
2527 }{}
2528 // BEGIN Marshal arguments into request.
2529
2530 if request.NewIdleDisconnectTime, err = soap.MarshalUi4(NewIdleDisconnectTime); err != nil {
2531 return
2532 }
2533 // END Marshal arguments into request.
2534
2535 // Response structure.
2536 response := interface{}(nil)
2537
2538 // Perform the SOAP call.
2539 if err = client.SOAPClient.PerformAction(URN_WANIPConnection_1, "SetIdleDisconnectTime", request, response); err != nil {
2540 return
2541 }
2542
2543 // BEGIN Unmarshal arguments from response.
2544
2545 // END Unmarshal arguments from response.
2546 return
2547 }
2548
2549 func (client *WANIPConnection1) SetWarnDisconnectDelay(NewWarnDisconnectDelay uint32) (err error) {
2550 // Request structure.
2551 request := &struct {
2552 NewWarnDisconnectDelay string
2553 }{}
2554 // BEGIN Marshal arguments into request.
2555
2556 if request.NewWarnDisconnectDelay, err = soap.MarshalUi4(NewWarnDisconnectDelay); err != nil {
2557 return
2558 }
2559 // END Marshal arguments into request.
2560
2561 // Response structure.
2562 response := interface{}(nil)
2563
2564 // Perform the SOAP call.
2565 if err = client.SOAPClient.PerformAction(URN_WANIPConnection_1, "SetWarnDisconnectDelay", request, response); err != nil {
2566 return
2567 }
2568
2569 // BEGIN Unmarshal arguments from response.
2570
2571 // END Unmarshal arguments from response.
2572 return
2573 }
2574
2575 //
2576 // Return values:
2577 //
2578 // * NewConnectionStatus: allowed values: Unconfigured, Connected, Disconnected
2579 //
2580 // * NewLastConnectionError: allowed values: ERROR_NONE
2581 func (client *WANIPConnection1) GetStatusInfo() (NewConnectionStatus string, NewLastConnectionError string, NewUptime uint32, err error) {
2582 // Request structure.
2583 request := interface{}(nil)
2584 // BEGIN Marshal arguments into request.
2585
2586 // END Marshal arguments into request.
2587
2588 // Response structure.
2589 response := &struct {
2590 NewConnectionStatus string
2591
2592 NewLastConnectionError string
2593
2594 NewUptime string
2595 }{}
2596
2597 // Perform the SOAP call.
2598 if err = client.SOAPClient.PerformAction(URN_WANIPConnection_1, "GetStatusInfo", request, response); err != nil {
2599 return
2600 }
2601
2602 // BEGIN Unmarshal arguments from response.
2603
2604 if NewConnectionStatus, err = soap.UnmarshalString(response.NewConnectionStatus); err != nil {
2605 return
2606 }
2607 if NewLastConnectionError, err = soap.UnmarshalString(response.NewLastConnectionError); err != nil {
2608 return
2609 }
2610 if NewUptime, err = soap.UnmarshalUi4(response.NewUptime); err != nil {
2611 return
2612 }
2613 // END Unmarshal arguments from response.
2614 return
2615 }
2616
2617 func (client *WANIPConnection1) GetAutoDisconnectTime() (NewAutoDisconnectTime uint32, err error) {
2618 // Request structure.
2619 request := interface{}(nil)
2620 // BEGIN Marshal arguments into request.
2621
2622 // END Marshal arguments into request.
2623
2624 // Response structure.
2625 response := &struct {
2626 NewAutoDisconnectTime string
2627 }{}
2628
2629 // Perform the SOAP call.
2630 if err = client.SOAPClient.PerformAction(URN_WANIPConnection_1, "GetAutoDisconnectTime", request, response); err != nil {
2631 return
2632 }
2633
2634 // BEGIN Unmarshal arguments from response.
2635
2636 if NewAutoDisconnectTime, err = soap.UnmarshalUi4(response.NewAutoDisconnectTime); err != nil {
2637 return
2638 }
2639 // END Unmarshal arguments from response.
2640 return
2641 }
2642
2643 func (client *WANIPConnection1) GetIdleDisconnectTime() (NewIdleDisconnectTime uint32, err error) {
2644 // Request structure.
2645 request := interface{}(nil)
2646 // BEGIN Marshal arguments into request.
2647
2648 // END Marshal arguments into request.
2649
2650 // Response structure.
2651 response := &struct {
2652 NewIdleDisconnectTime string
2653 }{}
2654
2655 // Perform the SOAP call.
2656 if err = client.SOAPClient.PerformAction(URN_WANIPConnection_1, "GetIdleDisconnectTime", request, response); err != nil {
2657 return
2658 }
2659
2660 // BEGIN Unmarshal arguments from response.
2661
2662 if NewIdleDisconnectTime, err = soap.UnmarshalUi4(response.NewIdleDisconnectTime); err != nil {
2663 return
2664 }
2665 // END Unmarshal arguments from response.
2666 return
2667 }
2668
2669 func (client *WANIPConnection1) GetWarnDisconnectDelay() (NewWarnDisconnectDelay uint32, err error) {
2670 // Request structure.
2671 request := interface{}(nil)
2672 // BEGIN Marshal arguments into request.
2673
2674 // END Marshal arguments into request.
2675
2676 // Response structure.
2677 response := &struct {
2678 NewWarnDisconnectDelay string
2679 }{}
2680
2681 // Perform the SOAP call.
2682 if err = client.SOAPClient.PerformAction(URN_WANIPConnection_1, "GetWarnDisconnectDelay", request, response); err != nil {
2683 return
2684 }
2685
2686 // BEGIN Unmarshal arguments from response.
2687
2688 if NewWarnDisconnectDelay, err = soap.UnmarshalUi4(response.NewWarnDisconnectDelay); err != nil {
2689 return
2690 }
2691 // END Unmarshal arguments from response.
2692 return
2693 }
2694
2695 func (client *WANIPConnection1) GetNATRSIPStatus() (NewRSIPAvailable bool, NewNATEnabled bool, err error) {
2696 // Request structure.
2697 request := interface{}(nil)
2698 // BEGIN Marshal arguments into request.
2699
2700 // END Marshal arguments into request.
2701
2702 // Response structure.
2703 response := &struct {
2704 NewRSIPAvailable string
2705
2706 NewNATEnabled string
2707 }{}
2708
2709 // Perform the SOAP call.
2710 if err = client.SOAPClient.PerformAction(URN_WANIPConnection_1, "GetNATRSIPStatus", request, response); err != nil {
2711 return
2712 }
2713
2714 // BEGIN Unmarshal arguments from response.
2715
2716 if NewRSIPAvailable, err = soap.UnmarshalBoolean(response.NewRSIPAvailable); err != nil {
2717 return
2718 }
2719 if NewNATEnabled, err = soap.UnmarshalBoolean(response.NewNATEnabled); err != nil {
2720 return
2721 }
2722 // END Unmarshal arguments from response.
2723 return
2724 }
2725
2726 //
2727 // Return values:
2728 //
2729 // * NewProtocol: allowed values: TCP, UDP
2730 func (client *WANIPConnection1) GetGenericPortMappingEntry(NewPortMappingIndex uint16) (NewRemoteHost string, NewExternalPort uint16, NewProtocol string, NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) {
2731 // Request structure.
2732 request := &struct {
2733 NewPortMappingIndex string
2734 }{}
2735 // BEGIN Marshal arguments into request.
2736
2737 if request.NewPortMappingIndex, err = soap.MarshalUi2(NewPortMappingIndex); err != nil {
2738 return
2739 }
2740 // END Marshal arguments into request.
2741
2742 // Response structure.
2743 response := &struct {
2744 NewRemoteHost string
2745
2746 NewExternalPort string
2747
2748 NewProtocol string
2749
2750 NewInternalPort string
2751
2752 NewInternalClient string
2753
2754 NewEnabled string
2755
2756 NewPortMappingDescription string
2757
2758 NewLeaseDuration string
2759 }{}
2760
2761 // Perform the SOAP call.
2762 if err = client.SOAPClient.PerformAction(URN_WANIPConnection_1, "GetGenericPortMappingEntry", request, response); err != nil {
2763 return
2764 }
2765
2766 // BEGIN Unmarshal arguments from response.
2767
2768 if NewRemoteHost, err = soap.UnmarshalString(response.NewRemoteHost); err != nil {
2769 return
2770 }
2771 if NewExternalPort, err = soap.UnmarshalUi2(response.NewExternalPort); err != nil {
2772 return
2773 }
2774 if NewProtocol, err = soap.UnmarshalString(response.NewProtocol); err != nil {
2775 return
2776 }
2777 if NewInternalPort, err = soap.UnmarshalUi2(response.NewInternalPort); err != nil {
2778 return
2779 }
2780 if NewInternalClient, err = soap.UnmarshalString(response.NewInternalClient); err != nil {
2781 return
2782 }
2783 if NewEnabled, err = soap.UnmarshalBoolean(response.NewEnabled); err != nil {
2784 return
2785 }
2786 if NewPortMappingDescription, err = soap.UnmarshalString(response.NewPortMappingDescription); err != nil {
2787 return
2788 }
2789 if NewLeaseDuration, err = soap.UnmarshalUi4(response.NewLeaseDuration); err != nil {
2790 return
2791 }
2792 // END Unmarshal arguments from response.
2793 return
2794 }
2795
2796 //
2797 // Arguments:
2798 //
2799 // * NewProtocol: allowed values: TCP, UDP
2800
2801 func (client *WANIPConnection1) GetSpecificPortMappingEntry(NewRemoteHost string, NewExternalPort uint16, NewProtocol string) (NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) {
2802 // Request structure.
2803 request := &struct {
2804 NewRemoteHost string
2805
2806 NewExternalPort string
2807
2808 NewProtocol string
2809 }{}
2810 // BEGIN Marshal arguments into request.
2811
2812 if request.NewRemoteHost, err = soap.MarshalString(NewRemoteHost); err != nil {
2813 return
2814 }
2815 if request.NewExternalPort, err = soap.MarshalUi2(NewExternalPort); err != nil {
2816 return
2817 }
2818 if request.NewProtocol, err = soap.MarshalString(NewProtocol); err != nil {
2819 return
2820 }
2821 // END Marshal arguments into request.
2822
2823 // Response structure.
2824 response := &struct {
2825 NewInternalPort string
2826
2827 NewInternalClient string
2828
2829 NewEnabled string
2830
2831 NewPortMappingDescription string
2832
2833 NewLeaseDuration string
2834 }{}
2835
2836 // Perform the SOAP call.
2837 if err = client.SOAPClient.PerformAction(URN_WANIPConnection_1, "GetSpecificPortMappingEntry", request, response); err != nil {
2838 return
2839 }
2840
2841 // BEGIN Unmarshal arguments from response.
2842
2843 if NewInternalPort, err = soap.UnmarshalUi2(response.NewInternalPort); err != nil {
2844 return
2845 }
2846 if NewInternalClient, err = soap.UnmarshalString(response.NewInternalClient); err != nil {
2847 return
2848 }
2849 if NewEnabled, err = soap.UnmarshalBoolean(response.NewEnabled); err != nil {
2850 return
2851 }
2852 if NewPortMappingDescription, err = soap.UnmarshalString(response.NewPortMappingDescription); err != nil {
2853 return
2854 }
2855 if NewLeaseDuration, err = soap.UnmarshalUi4(response.NewLeaseDuration); err != nil {
2856 return
2857 }
2858 // END Unmarshal arguments from response.
2859 return
2860 }
2861
2862 //
2863 // Arguments:
2864 //
2865 // * NewProtocol: allowed values: TCP, UDP
2866
2867 func (client *WANIPConnection1) AddPortMapping(NewRemoteHost string, NewExternalPort uint16, NewProtocol string, NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32) (err error) {
2868 // Request structure.
2869 request := &struct {
2870 NewRemoteHost string
2871
2872 NewExternalPort string
2873
2874 NewProtocol string
2875
2876 NewInternalPort string
2877
2878 NewInternalClient string
2879
2880 NewEnabled string
2881
2882 NewPortMappingDescription string
2883
2884 NewLeaseDuration string
2885 }{}
2886 // BEGIN Marshal arguments into request.
2887
2888 if request.NewRemoteHost, err = soap.MarshalString(NewRemoteHost); err != nil {
2889 return
2890 }
2891 if request.NewExternalPort, err = soap.MarshalUi2(NewExternalPort); err != nil {
2892 return
2893 }
2894 if request.NewProtocol, err = soap.MarshalString(NewProtocol); err != nil {
2895 return
2896 }
2897 if request.NewInternalPort, err = soap.MarshalUi2(NewInternalPort); err != nil {
2898 return
2899 }
2900 if request.NewInternalClient, err = soap.MarshalString(NewInternalClient); err != nil {
2901 return
2902 }
2903 if request.NewEnabled, err = soap.MarshalBoolean(NewEnabled); err != nil {
2904 return
2905 }
2906 if request.NewPortMappingDescription, err = soap.MarshalString(NewPortMappingDescription); err != nil {
2907 return
2908 }
2909 if request.NewLeaseDuration, err = soap.MarshalUi4(NewLeaseDuration); err != nil {
2910 return
2911 }
2912 // END Marshal arguments into request.
2913
2914 // Response structure.
2915 response := interface{}(nil)
2916
2917 // Perform the SOAP call.
2918 if err = client.SOAPClient.PerformAction(URN_WANIPConnection_1, "AddPortMapping", request, response); err != nil {
2919 return
2920 }
2921
2922 // BEGIN Unmarshal arguments from response.
2923
2924 // END Unmarshal arguments from response.
2925 return
2926 }
2927
2928 //
2929 // Arguments:
2930 //
2931 // * NewProtocol: allowed values: TCP, UDP
2932
2933 func (client *WANIPConnection1) DeletePortMapping(NewRemoteHost string, NewExternalPort uint16, NewProtocol string) (err error) {
2934 // Request structure.
2935 request := &struct {
2936 NewRemoteHost string
2937
2938 NewExternalPort string
2939
2940 NewProtocol string
2941 }{}
2942 // BEGIN Marshal arguments into request.
2943
2944 if request.NewRemoteHost, err = soap.MarshalString(NewRemoteHost); err != nil {
2945 return
2946 }
2947 if request.NewExternalPort, err = soap.MarshalUi2(NewExternalPort); err != nil {
2948 return
2949 }
2950 if request.NewProtocol, err = soap.MarshalString(NewProtocol); err != nil {
2951 return
2952 }
2953 // END Marshal arguments into request.
2954
2955 // Response structure.
2956 response := interface{}(nil)
2957
2958 // Perform the SOAP call.
2959 if err = client.SOAPClient.PerformAction(URN_WANIPConnection_1, "DeletePortMapping", request, response); err != nil {
2960 return
2961 }
2962
2963 // BEGIN Unmarshal arguments from response.
2964
2965 // END Unmarshal arguments from response.
2966 return
2967 }
2968
2969 func (client *WANIPConnection1) GetExternalIPAddress() (NewExternalIPAddress string, err error) {
2970 // Request structure.
2971 request := interface{}(nil)
2972 // BEGIN Marshal arguments into request.
2973
2974 // END Marshal arguments into request.
2975
2976 // Response structure.
2977 response := &struct {
2978 NewExternalIPAddress string
2979 }{}
2980
2981 // Perform the SOAP call.
2982 if err = client.SOAPClient.PerformAction(URN_WANIPConnection_1, "GetExternalIPAddress", request, response); err != nil {
2983 return
2984 }
2985
2986 // BEGIN Unmarshal arguments from response.
2987
2988 if NewExternalIPAddress, err = soap.UnmarshalString(response.NewExternalIPAddress); err != nil {
2989 return
2990 }
2991 // END Unmarshal arguments from response.
2992 return
2993 }
2994
2995 // WANIPConnection2 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:WANIPConnection:2". See
2996 // goupnp.ServiceClient, which contains RootDevice and Service attributes which
2997 // are provided for informational value.
2998 type WANIPConnection2 struct {
2999 goupnp.ServiceClient
3000 }
3001
3002 // NewWANIPConnection2Clients discovers instances of the service on the network,
3003 // and returns clients to any that are found. errors will contain an error for
3004 // any devices that replied but which could not be queried, and err will be set
3005 // if the discovery process failed outright.
3006 //
3007 // This is a typical entry calling point into this package.
3008 func NewWANIPConnection2Clients() (clients []*WANIPConnection2, errors []error, err error) {
3009 var genericClients []goupnp.ServiceClient
3010 if genericClients, errors, err = goupnp.NewServiceClients(URN_WANIPConnection_2); err != nil {
3011 return
3012 }
3013 clients = newWANIPConnection2ClientsFromGenericClients(genericClients)
3014 return
3015 }
3016
3017 // NewWANIPConnection2ClientsByURL discovers instances of the service at the given
3018 // URL, and returns clients to any that are found. An error is returned if
3019 // there was an error probing the service.
3020 //
3021 // This is a typical entry calling point into this package when reusing an
3022 // previously discovered service URL.
3023 func NewWANIPConnection2ClientsByURL(loc *url.URL) ([]*WANIPConnection2, error) {
3024 genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANIPConnection_2)
3025 if err != nil {
3026 return nil, err
3027 }
3028 return newWANIPConnection2ClientsFromGenericClients(genericClients), nil
3029 }
3030
3031 // NewWANIPConnection2ClientsFromRootDevice discovers instances of the service in
3032 // a given root device, and returns clients to any that are found. An error is
3033 // returned if there was not at least one instance of the service within the
3034 // device. The location parameter is simply assigned to the Location attribute
3035 // of the wrapped ServiceClient(s).
3036 //
3037 // This is a typical entry calling point into this package when reusing an
3038 // previously discovered root device.
3039 func NewWANIPConnection2ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*WANIPConnection2, error) {
3040 genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_WANIPConnection_2)
3041 if err != nil {
3042 return nil, err
3043 }
3044 return newWANIPConnection2ClientsFromGenericClients(genericClients), nil
3045 }
3046
3047 func newWANIPConnection2ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*WANIPConnection2 {
3048 clients := make([]*WANIPConnection2, len(genericClients))
3049 for i := range genericClients {
3050 clients[i] = &WANIPConnection2{genericClients[i]}
3051 }
3052 return clients
3053 }
3054
3055 func (client *WANIPConnection2) SetConnectionType(NewConnectionType string) (err error) {
3056 // Request structure.
3057 request := &struct {
3058 NewConnectionType string
3059 }{}
3060 // BEGIN Marshal arguments into request.
3061
3062 if request.NewConnectionType, err = soap.MarshalString(NewConnectionType); err != nil {
3063 return
3064 }
3065 // END Marshal arguments into request.
3066
3067 // Response structure.
3068 response := interface{}(nil)
3069
3070 // Perform the SOAP call.
3071 if err = client.SOAPClient.PerformAction(URN_WANIPConnection_2, "SetConnectionType", request, response); err != nil {
3072 return
3073 }
3074
3075 // BEGIN Unmarshal arguments from response.
3076
3077 // END Unmarshal arguments from response.
3078 return
3079 }
3080
3081 func (client *WANIPConnection2) GetConnectionTypeInfo() (NewConnectionType string, NewPossibleConnectionTypes string, err error) {
3082 // Request structure.
3083 request := interface{}(nil)
3084 // BEGIN Marshal arguments into request.
3085
3086 // END Marshal arguments into request.
3087
3088 // Response structure.
3089 response := &struct {
3090 NewConnectionType string
3091
3092 NewPossibleConnectionTypes string
3093 }{}
3094
3095 // Perform the SOAP call.
3096 if err = client.SOAPClient.PerformAction(URN_WANIPConnection_2, "GetConnectionTypeInfo", request, response); err != nil {
3097 return
3098 }
3099
3100 // BEGIN Unmarshal arguments from response.
3101
3102 if NewConnectionType, err = soap.UnmarshalString(response.NewConnectionType); err != nil {
3103 return
3104 }
3105 if NewPossibleConnectionTypes, err = soap.UnmarshalString(response.NewPossibleConnectionTypes); err != nil {
3106 return
3107 }
3108 // END Unmarshal arguments from response.
3109 return
3110 }
3111
3112 func (client *WANIPConnection2) RequestConnection() (err error) {
3113 // Request structure.
3114 request := interface{}(nil)
3115 // BEGIN Marshal arguments into request.
3116
3117 // END Marshal arguments into request.
3118
3119 // Response structure.
3120 response := interface{}(nil)
3121
3122 // Perform the SOAP call.
3123 if err = client.SOAPClient.PerformAction(URN_WANIPConnection_2, "RequestConnection", request, response); err != nil {
3124 return
3125 }
3126
3127 // BEGIN Unmarshal arguments from response.
3128
3129 // END Unmarshal arguments from response.
3130 return
3131 }
3132
3133 func (client *WANIPConnection2) RequestTermination() (err error) {
3134 // Request structure.
3135 request := interface{}(nil)
3136 // BEGIN Marshal arguments into request.
3137
3138 // END Marshal arguments into request.
3139
3140 // Response structure.
3141 response := interface{}(nil)
3142
3143 // Perform the SOAP call.
3144 if err = client.SOAPClient.PerformAction(URN_WANIPConnection_2, "RequestTermination", request, response); err != nil {
3145 return
3146 }
3147
3148 // BEGIN Unmarshal arguments from response.
3149
3150 // END Unmarshal arguments from response.
3151 return
3152 }
3153
3154 func (client *WANIPConnection2) ForceTermination() (err error) {
3155 // Request structure.
3156 request := interface{}(nil)
3157 // BEGIN Marshal arguments into request.
3158
3159 // END Marshal arguments into request.
3160
3161 // Response structure.
3162 response := interface{}(nil)
3163
3164 // Perform the SOAP call.
3165 if err = client.SOAPClient.PerformAction(URN_WANIPConnection_2, "ForceTermination", request, response); err != nil {
3166 return
3167 }
3168
3169 // BEGIN Unmarshal arguments from response.
3170
3171 // END Unmarshal arguments from response.
3172 return
3173 }
3174
3175 func (client *WANIPConnection2) SetAutoDisconnectTime(NewAutoDisconnectTime uint32) (err error) {
3176 // Request structure.
3177 request := &struct {
3178 NewAutoDisconnectTime string
3179 }{}
3180 // BEGIN Marshal arguments into request.
3181
3182 if request.NewAutoDisconnectTime, err = soap.MarshalUi4(NewAutoDisconnectTime); err != nil {
3183 return
3184 }
3185 // END Marshal arguments into request.
3186
3187 // Response structure.
3188 response := interface{}(nil)
3189
3190 // Perform the SOAP call.
3191 if err = client.SOAPClient.PerformAction(URN_WANIPConnection_2, "SetAutoDisconnectTime", request, response); err != nil {
3192 return
3193 }
3194
3195 // BEGIN Unmarshal arguments from response.
3196
3197 // END Unmarshal arguments from response.
3198 return
3199 }
3200
3201 func (client *WANIPConnection2) SetIdleDisconnectTime(NewIdleDisconnectTime uint32) (err error) {
3202 // Request structure.
3203 request := &struct {
3204 NewIdleDisconnectTime string
3205 }{}
3206 // BEGIN Marshal arguments into request.
3207
3208 if request.NewIdleDisconnectTime, err = soap.MarshalUi4(NewIdleDisconnectTime); err != nil {
3209 return
3210 }
3211 // END Marshal arguments into request.
3212
3213 // Response structure.
3214 response := interface{}(nil)
3215
3216 // Perform the SOAP call.
3217 if err = client.SOAPClient.PerformAction(URN_WANIPConnection_2, "SetIdleDisconnectTime", request, response); err != nil {
3218 return
3219 }
3220
3221 // BEGIN Unmarshal arguments from response.
3222
3223 // END Unmarshal arguments from response.
3224 return
3225 }
3226
3227 func (client *WANIPConnection2) SetWarnDisconnectDelay(NewWarnDisconnectDelay uint32) (err error) {
3228 // Request structure.
3229 request := &struct {
3230 NewWarnDisconnectDelay string
3231 }{}
3232 // BEGIN Marshal arguments into request.
3233
3234 if request.NewWarnDisconnectDelay, err = soap.MarshalUi4(NewWarnDisconnectDelay); err != nil {
3235 return
3236 }
3237 // END Marshal arguments into request.
3238
3239 // Response structure.
3240 response := interface{}(nil)
3241
3242 // Perform the SOAP call.
3243 if err = client.SOAPClient.PerformAction(URN_WANIPConnection_2, "SetWarnDisconnectDelay", request, response); err != nil {
3244 return
3245 }
3246
3247 // BEGIN Unmarshal arguments from response.
3248
3249 // END Unmarshal arguments from response.
3250 return
3251 }
3252
3253 //
3254 // Return values:
3255 //
3256 // * NewConnectionStatus: allowed values: Unconfigured, Connecting, Connected, PendingDisconnect, Disconnecting, Disconnected
3257 //
3258 // * NewLastConnectionError: allowed values: ERROR_NONE, ERROR_COMMAND_ABORTED, ERROR_NOT_ENABLED_FOR_INTERNET, ERROR_USER_DISCONNECT, ERROR_ISP_DISCONNECT, ERROR_IDLE_DISCONNECT, ERROR_FORCED_DISCONNECT, ERROR_NO_CARRIER, ERROR_IP_CONFIGURATION, ERROR_UNKNOWN
3259 func (client *WANIPConnection2) GetStatusInfo() (NewConnectionStatus string, NewLastConnectionError string, NewUptime uint32, err error) {
3260 // Request structure.
3261 request := interface{}(nil)
3262 // BEGIN Marshal arguments into request.
3263
3264 // END Marshal arguments into request.
3265
3266 // Response structure.
3267 response := &struct {
3268 NewConnectionStatus string
3269
3270 NewLastConnectionError string
3271
3272 NewUptime string
3273 }{}
3274
3275 // Perform the SOAP call.
3276 if err = client.SOAPClient.PerformAction(URN_WANIPConnection_2, "GetStatusInfo", request, response); err != nil {
3277 return
3278 }
3279
3280 // BEGIN Unmarshal arguments from response.
3281
3282 if NewConnectionStatus, err = soap.UnmarshalString(response.NewConnectionStatus); err != nil {
3283 return
3284 }
3285 if NewLastConnectionError, err = soap.UnmarshalString(response.NewLastConnectionError); err != nil {
3286 return
3287 }
3288 if NewUptime, err = soap.UnmarshalUi4(response.NewUptime); err != nil {
3289 return
3290 }
3291 // END Unmarshal arguments from response.
3292 return
3293 }
3294
3295 func (client *WANIPConnection2) GetAutoDisconnectTime() (NewAutoDisconnectTime uint32, err error) {
3296 // Request structure.
3297 request := interface{}(nil)
3298 // BEGIN Marshal arguments into request.
3299
3300 // END Marshal arguments into request.
3301
3302 // Response structure.
3303 response := &struct {
3304 NewAutoDisconnectTime string
3305 }{}
3306
3307 // Perform the SOAP call.
3308 if err = client.SOAPClient.PerformAction(URN_WANIPConnection_2, "GetAutoDisconnectTime", request, response); err != nil {
3309 return
3310 }
3311
3312 // BEGIN Unmarshal arguments from response.
3313
3314 if NewAutoDisconnectTime, err = soap.UnmarshalUi4(response.NewAutoDisconnectTime); err != nil {
3315 return
3316 }
3317 // END Unmarshal arguments from response.
3318 return
3319 }
3320
3321 func (client *WANIPConnection2) GetIdleDisconnectTime() (NewIdleDisconnectTime uint32, err error) {
3322 // Request structure.
3323 request := interface{}(nil)
3324 // BEGIN Marshal arguments into request.
3325
3326 // END Marshal arguments into request.
3327
3328 // Response structure.
3329 response := &struct {
3330 NewIdleDisconnectTime string
3331 }{}
3332
3333 // Perform the SOAP call.
3334 if err = client.SOAPClient.PerformAction(URN_WANIPConnection_2, "GetIdleDisconnectTime", request, response); err != nil {
3335 return
3336 }
3337
3338 // BEGIN Unmarshal arguments from response.
3339
3340 if NewIdleDisconnectTime, err = soap.UnmarshalUi4(response.NewIdleDisconnectTime); err != nil {
3341 return
3342 }
3343 // END Unmarshal arguments from response.
3344 return
3345 }
3346
3347 func (client *WANIPConnection2) GetWarnDisconnectDelay() (NewWarnDisconnectDelay uint32, err error) {
3348 // Request structure.
3349 request := interface{}(nil)
3350 // BEGIN Marshal arguments into request.
3351
3352 // END Marshal arguments into request.
3353
3354 // Response structure.
3355 response := &struct {
3356 NewWarnDisconnectDelay string
3357 }{}
3358
3359 // Perform the SOAP call.
3360 if err = client.SOAPClient.PerformAction(URN_WANIPConnection_2, "GetWarnDisconnectDelay", request, response); err != nil {
3361 return
3362 }
3363
3364 // BEGIN Unmarshal arguments from response.
3365
3366 if NewWarnDisconnectDelay, err = soap.UnmarshalUi4(response.NewWarnDisconnectDelay); err != nil {
3367 return
3368 }
3369 // END Unmarshal arguments from response.
3370 return
3371 }
3372
3373 func (client *WANIPConnection2) GetNATRSIPStatus() (NewRSIPAvailable bool, NewNATEnabled bool, err error) {
3374 // Request structure.
3375 request := interface{}(nil)
3376 // BEGIN Marshal arguments into request.
3377
3378 // END Marshal arguments into request.
3379
3380 // Response structure.
3381 response := &struct {
3382 NewRSIPAvailable string
3383
3384 NewNATEnabled string
3385 }{}
3386
3387 // Perform the SOAP call.
3388 if err = client.SOAPClient.PerformAction(URN_WANIPConnection_2, "GetNATRSIPStatus", request, response); err != nil {
3389 return
3390 }
3391
3392 // BEGIN Unmarshal arguments from response.
3393
3394 if NewRSIPAvailable, err = soap.UnmarshalBoolean(response.NewRSIPAvailable); err != nil {
3395 return
3396 }
3397 if NewNATEnabled, err = soap.UnmarshalBoolean(response.NewNATEnabled); err != nil {
3398 return
3399 }
3400 // END Unmarshal arguments from response.
3401 return
3402 }
3403
3404 //
3405 // Return values:
3406 //
3407 // * NewProtocol: allowed values: TCP, UDP
3408 func (client *WANIPConnection2) GetGenericPortMappingEntry(NewPortMappingIndex uint16) (NewRemoteHost string, NewExternalPort uint16, NewProtocol string, NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) {
3409 // Request structure.
3410 request := &struct {
3411 NewPortMappingIndex string
3412 }{}
3413 // BEGIN Marshal arguments into request.
3414
3415 if request.NewPortMappingIndex, err = soap.MarshalUi2(NewPortMappingIndex); err != nil {
3416 return
3417 }
3418 // END Marshal arguments into request.
3419
3420 // Response structure.
3421 response := &struct {
3422 NewRemoteHost string
3423
3424 NewExternalPort string
3425
3426 NewProtocol string
3427
3428 NewInternalPort string
3429
3430 NewInternalClient string
3431
3432 NewEnabled string
3433
3434 NewPortMappingDescription string
3435
3436 NewLeaseDuration string
3437 }{}
3438
3439 // Perform the SOAP call.
3440 if err = client.SOAPClient.PerformAction(URN_WANIPConnection_2, "GetGenericPortMappingEntry", request, response); err != nil {
3441 return
3442 }
3443
3444 // BEGIN Unmarshal arguments from response.
3445
3446 if NewRemoteHost, err = soap.UnmarshalString(response.NewRemoteHost); err != nil {
3447 return
3448 }
3449 if NewExternalPort, err = soap.UnmarshalUi2(response.NewExternalPort); err != nil {
3450 return
3451 }
3452 if NewProtocol, err = soap.UnmarshalString(response.NewProtocol); err != nil {
3453 return
3454 }
3455 if NewInternalPort, err = soap.UnmarshalUi2(response.NewInternalPort); err != nil {
3456 return
3457 }
3458 if NewInternalClient, err = soap.UnmarshalString(response.NewInternalClient); err != nil {
3459 return
3460 }
3461 if NewEnabled, err = soap.UnmarshalBoolean(response.NewEnabled); err != nil {
3462 return
3463 }
3464 if NewPortMappingDescription, err = soap.UnmarshalString(response.NewPortMappingDescription); err != nil {
3465 return
3466 }
3467 if NewLeaseDuration, err = soap.UnmarshalUi4(response.NewLeaseDuration); err != nil {
3468 return
3469 }
3470 // END Unmarshal arguments from response.
3471 return
3472 }
3473
3474 //
3475 // Arguments:
3476 //
3477 // * NewProtocol: allowed values: TCP, UDP
3478
3479 func (client *WANIPConnection2) GetSpecificPortMappingEntry(NewRemoteHost string, NewExternalPort uint16, NewProtocol string) (NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) {
3480 // Request structure.
3481 request := &struct {
3482 NewRemoteHost string
3483
3484 NewExternalPort string
3485
3486 NewProtocol string
3487 }{}
3488 // BEGIN Marshal arguments into request.
3489
3490 if request.NewRemoteHost, err = soap.MarshalString(NewRemoteHost); err != nil {
3491 return
3492 }
3493 if request.NewExternalPort, err = soap.MarshalUi2(NewExternalPort); err != nil {
3494 return
3495 }
3496 if request.NewProtocol, err = soap.MarshalString(NewProtocol); err != nil {
3497 return
3498 }
3499 // END Marshal arguments into request.
3500
3501 // Response structure.
3502 response := &struct {
3503 NewInternalPort string
3504
3505 NewInternalClient string
3506
3507 NewEnabled string
3508
3509 NewPortMappingDescription string
3510
3511 NewLeaseDuration string
3512 }{}
3513
3514 // Perform the SOAP call.
3515 if err = client.SOAPClient.PerformAction(URN_WANIPConnection_2, "GetSpecificPortMappingEntry", request, response); err != nil {
3516 return
3517 }
3518
3519 // BEGIN Unmarshal arguments from response.
3520
3521 if NewInternalPort, err = soap.UnmarshalUi2(response.NewInternalPort); err != nil {
3522 return
3523 }
3524 if NewInternalClient, err = soap.UnmarshalString(response.NewInternalClient); err != nil {
3525 return
3526 }
3527 if NewEnabled, err = soap.UnmarshalBoolean(response.NewEnabled); err != nil {
3528 return
3529 }
3530 if NewPortMappingDescription, err = soap.UnmarshalString(response.NewPortMappingDescription); err != nil {
3531 return
3532 }
3533 if NewLeaseDuration, err = soap.UnmarshalUi4(response.NewLeaseDuration); err != nil {
3534 return
3535 }
3536 // END Unmarshal arguments from response.
3537 return
3538 }
3539
3540 //
3541 // Arguments:
3542 //
3543 // * NewProtocol: allowed values: TCP, UDP
3544
3545 func (client *WANIPConnection2) AddPortMapping(NewRemoteHost string, NewExternalPort uint16, NewProtocol string, NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32) (err error) {
3546 // Request structure.
3547 request := &struct {
3548 NewRemoteHost string
3549
3550 NewExternalPort string
3551
3552 NewProtocol string
3553
3554 NewInternalPort string
3555
3556 NewInternalClient string
3557
3558 NewEnabled string
3559
3560 NewPortMappingDescription string
3561
3562 NewLeaseDuration string
3563 }{}
3564 // BEGIN Marshal arguments into request.
3565
3566 if request.NewRemoteHost, err = soap.MarshalString(NewRemoteHost); err != nil {
3567 return
3568 }
3569 if request.NewExternalPort, err = soap.MarshalUi2(NewExternalPort); err != nil {
3570 return
3571 }
3572 if request.NewProtocol, err = soap.MarshalString(NewProtocol); err != nil {
3573 return
3574 }
3575 if request.NewInternalPort, err = soap.MarshalUi2(NewInternalPort); err != nil {
3576 return
3577 }
3578 if request.NewInternalClient, err = soap.MarshalString(NewInternalClient); err != nil {
3579 return
3580 }
3581 if request.NewEnabled, err = soap.MarshalBoolean(NewEnabled); err != nil {
3582 return
3583 }
3584 if request.NewPortMappingDescription, err = soap.MarshalString(NewPortMappingDescription); err != nil {
3585 return
3586 }
3587 if request.NewLeaseDuration, err = soap.MarshalUi4(NewLeaseDuration); err != nil {
3588 return
3589 }
3590 // END Marshal arguments into request.
3591
3592 // Response structure.
3593 response := interface{}(nil)
3594
3595 // Perform the SOAP call.
3596 if err = client.SOAPClient.PerformAction(URN_WANIPConnection_2, "AddPortMapping", request, response); err != nil {
3597 return
3598 }
3599
3600 // BEGIN Unmarshal arguments from response.
3601
3602 // END Unmarshal arguments from response.
3603 return
3604 }
3605
3606 //
3607 // Arguments:
3608 //
3609 // * NewProtocol: allowed values: TCP, UDP
3610
3611 func (client *WANIPConnection2) DeletePortMapping(NewRemoteHost string, NewExternalPort uint16, NewProtocol string) (err error) {
3612 // Request structure.
3613 request := &struct {
3614 NewRemoteHost string
3615
3616 NewExternalPort string
3617
3618 NewProtocol string
3619 }{}
3620 // BEGIN Marshal arguments into request.
3621
3622 if request.NewRemoteHost, err = soap.MarshalString(NewRemoteHost); err != nil {
3623 return
3624 }
3625 if request.NewExternalPort, err = soap.MarshalUi2(NewExternalPort); err != nil {
3626 return
3627 }
3628 if request.NewProtocol, err = soap.MarshalString(NewProtocol); err != nil {
3629 return
3630 }
3631 // END Marshal arguments into request.
3632
3633 // Response structure.
3634 response := interface{}(nil)
3635
3636 // Perform the SOAP call.
3637 if err = client.SOAPClient.PerformAction(URN_WANIPConnection_2, "DeletePortMapping", request, response); err != nil {
3638 return
3639 }
3640
3641 // BEGIN Unmarshal arguments from response.
3642
3643 // END Unmarshal arguments from response.
3644 return
3645 }
3646
3647 //
3648 // Arguments:
3649 //
3650 // * NewProtocol: allowed values: TCP, UDP
3651
3652 func (client *WANIPConnection2) DeletePortMappingRange(NewStartPort uint16, NewEndPort uint16, NewProtocol string, NewManage bool) (err error) {
3653 // Request structure.
3654 request := &struct {
3655 NewStartPort string
3656
3657 NewEndPort string
3658
3659 NewProtocol string
3660
3661 NewManage string
3662 }{}
3663 // BEGIN Marshal arguments into request.
3664
3665 if request.NewStartPort, err = soap.MarshalUi2(NewStartPort); err != nil {
3666 return
3667 }
3668 if request.NewEndPort, err = soap.MarshalUi2(NewEndPort); err != nil {
3669 return
3670 }
3671 if request.NewProtocol, err = soap.MarshalString(NewProtocol); err != nil {
3672 return
3673 }
3674 if request.NewManage, err = soap.MarshalBoolean(NewManage); err != nil {
3675 return
3676 }
3677 // END Marshal arguments into request.
3678
3679 // Response structure.
3680 response := interface{}(nil)
3681
3682 // Perform the SOAP call.
3683 if err = client.SOAPClient.PerformAction(URN_WANIPConnection_2, "DeletePortMappingRange", request, response); err != nil {
3684 return
3685 }
3686
3687 // BEGIN Unmarshal arguments from response.
3688
3689 // END Unmarshal arguments from response.
3690 return
3691 }
3692
3693 func (client *WANIPConnection2) GetExternalIPAddress() (NewExternalIPAddress string, err error) {
3694 // Request structure.
3695 request := interface{}(nil)
3696 // BEGIN Marshal arguments into request.
3697
3698 // END Marshal arguments into request.
3699
3700 // Response structure.
3701 response := &struct {
3702 NewExternalIPAddress string
3703 }{}
3704
3705 // Perform the SOAP call.
3706 if err = client.SOAPClient.PerformAction(URN_WANIPConnection_2, "GetExternalIPAddress", request, response); err != nil {
3707 return
3708 }
3709
3710 // BEGIN Unmarshal arguments from response.
3711
3712 if NewExternalIPAddress, err = soap.UnmarshalString(response.NewExternalIPAddress); err != nil {
3713 return
3714 }
3715 // END Unmarshal arguments from response.
3716 return
3717 }
3718
3719 //
3720 // Arguments:
3721 //
3722 // * NewProtocol: allowed values: TCP, UDP
3723
3724 func (client *WANIPConnection2) GetListOfPortMappings(NewStartPort uint16, NewEndPort uint16, NewProtocol string, NewManage bool, NewNumberOfPorts uint16) (NewPortListing string, err error) {
3725 // Request structure.
3726 request := &struct {
3727 NewStartPort string
3728
3729 NewEndPort string
3730
3731 NewProtocol string
3732
3733 NewManage string
3734
3735 NewNumberOfPorts string
3736 }{}
3737 // BEGIN Marshal arguments into request.
3738
3739 if request.NewStartPort, err = soap.MarshalUi2(NewStartPort); err != nil {
3740 return
3741 }
3742 if request.NewEndPort, err = soap.MarshalUi2(NewEndPort); err != nil {
3743 return
3744 }
3745 if request.NewProtocol, err = soap.MarshalString(NewProtocol); err != nil {
3746 return
3747 }
3748 if request.NewManage, err = soap.MarshalBoolean(NewManage); err != nil {
3749 return
3750 }
3751 if request.NewNumberOfPorts, err = soap.MarshalUi2(NewNumberOfPorts); err != nil {
3752 return
3753 }
3754 // END Marshal arguments into request.
3755
3756 // Response structure.
3757 response := &struct {
3758 NewPortListing string
3759 }{}
3760
3761 // Perform the SOAP call.
3762 if err = client.SOAPClient.PerformAction(URN_WANIPConnection_2, "GetListOfPortMappings", request, response); err != nil {
3763 return
3764 }
3765
3766 // BEGIN Unmarshal arguments from response.
3767
3768 if NewPortListing, err = soap.UnmarshalString(response.NewPortListing); err != nil {
3769 return
3770 }
3771 // END Unmarshal arguments from response.
3772 return
3773 }
3774
3775 //
3776 // Arguments:
3777 //
3778 // * NewProtocol: allowed values: TCP, UDP
3779
3780 func (client *WANIPConnection2) AddAnyPortMapping(NewRemoteHost string, NewExternalPort uint16, NewProtocol string, NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32) (NewReservedPort uint16, err error) {
3781 // Request structure.
3782 request := &struct {
3783 NewRemoteHost string
3784
3785 NewExternalPort string
3786
3787 NewProtocol string
3788
3789 NewInternalPort string
3790
3791 NewInternalClient string
3792
3793 NewEnabled string
3794
3795 NewPortMappingDescription string
3796
3797 NewLeaseDuration string
3798 }{}
3799 // BEGIN Marshal arguments into request.
3800
3801 if request.NewRemoteHost, err = soap.MarshalString(NewRemoteHost); err != nil {
3802 return
3803 }
3804 if request.NewExternalPort, err = soap.MarshalUi2(NewExternalPort); err != nil {
3805 return
3806 }
3807 if request.NewProtocol, err = soap.MarshalString(NewProtocol); err != nil {
3808 return
3809 }
3810 if request.NewInternalPort, err = soap.MarshalUi2(NewInternalPort); err != nil {
3811 return
3812 }
3813 if request.NewInternalClient, err = soap.MarshalString(NewInternalClient); err != nil {
3814 return
3815 }
3816 if request.NewEnabled, err = soap.MarshalBoolean(NewEnabled); err != nil {
3817 return
3818 }
3819 if request.NewPortMappingDescription, err = soap.MarshalString(NewPortMappingDescription); err != nil {
3820 return
3821 }
3822 if request.NewLeaseDuration, err = soap.MarshalUi4(NewLeaseDuration); err != nil {
3823 return
3824 }
3825 // END Marshal arguments into request.
3826
3827 // Response structure.
3828 response := &struct {
3829 NewReservedPort string
3830 }{}
3831
3832 // Perform the SOAP call.
3833 if err = client.SOAPClient.PerformAction(URN_WANIPConnection_2, "AddAnyPortMapping", request, response); err != nil {
3834 return
3835 }
3836
3837 // BEGIN Unmarshal arguments from response.
3838
3839 if NewReservedPort, err = soap.UnmarshalUi2(response.NewReservedPort); err != nil {
3840 return
3841 }
3842 // END Unmarshal arguments from response.
3843 return
3844 }
3845
3846 // WANIPv6FirewallControl1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:WANIPv6FirewallControl:1". See
3847 // goupnp.ServiceClient, which contains RootDevice and Service attributes which
3848 // are provided for informational value.
3849 type WANIPv6FirewallControl1 struct {
3850 goupnp.ServiceClient
3851 }
3852
3853 // NewWANIPv6FirewallControl1Clients discovers instances of the service on the network,
3854 // and returns clients to any that are found. errors will contain an error for
3855 // any devices that replied but which could not be queried, and err will be set
3856 // if the discovery process failed outright.
3857 //
3858 // This is a typical entry calling point into this package.
3859 func NewWANIPv6FirewallControl1Clients() (clients []*WANIPv6FirewallControl1, errors []error, err error) {
3860 var genericClients []goupnp.ServiceClient
3861 if genericClients, errors, err = goupnp.NewServiceClients(URN_WANIPv6FirewallControl_1); err != nil {
3862 return
3863 }
3864 clients = newWANIPv6FirewallControl1ClientsFromGenericClients(genericClients)
3865 return
3866 }
3867
3868 // NewWANIPv6FirewallControl1ClientsByURL discovers instances of the service at the given
3869 // URL, and returns clients to any that are found. An error is returned if
3870 // there was an error probing the service.
3871 //
3872 // This is a typical entry calling point into this package when reusing an
3873 // previously discovered service URL.
3874 func NewWANIPv6FirewallControl1ClientsByURL(loc *url.URL) ([]*WANIPv6FirewallControl1, error) {
3875 genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANIPv6FirewallControl_1)
3876 if err != nil {
3877 return nil, err
3878 }
3879 return newWANIPv6FirewallControl1ClientsFromGenericClients(genericClients), nil
3880 }
3881
3882 // NewWANIPv6FirewallControl1ClientsFromRootDevice discovers instances of the service in
3883 // a given root device, and returns clients to any that are found. An error is
3884 // returned if there was not at least one instance of the service within the
3885 // device. The location parameter is simply assigned to the Location attribute
3886 // of the wrapped ServiceClient(s).
3887 //
3888 // This is a typical entry calling point into this package when reusing an
3889 // previously discovered root device.
3890 func NewWANIPv6FirewallControl1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*WANIPv6FirewallControl1, error) {
3891 genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_WANIPv6FirewallControl_1)
3892 if err != nil {
3893 return nil, err
3894 }
3895 return newWANIPv6FirewallControl1ClientsFromGenericClients(genericClients), nil
3896 }
3897
3898 func newWANIPv6FirewallControl1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*WANIPv6FirewallControl1 {
3899 clients := make([]*WANIPv6FirewallControl1, len(genericClients))
3900 for i := range genericClients {
3901 clients[i] = &WANIPv6FirewallControl1{genericClients[i]}
3902 }
3903 return clients
3904 }
3905
3906 func (client *WANIPv6FirewallControl1) GetFirewallStatus() (FirewallEnabled bool, InboundPinholeAllowed bool, err error) {
3907 // Request structure.
3908 request := interface{}(nil)
3909 // BEGIN Marshal arguments into request.
3910
3911 // END Marshal arguments into request.
3912
3913 // Response structure.
3914 response := &struct {
3915 FirewallEnabled string
3916
3917 InboundPinholeAllowed string
3918 }{}
3919
3920 // Perform the SOAP call.
3921 if err = client.SOAPClient.PerformAction(URN_WANIPv6FirewallControl_1, "GetFirewallStatus", request, response); err != nil {
3922 return
3923 }
3924
3925 // BEGIN Unmarshal arguments from response.
3926
3927 if FirewallEnabled, err = soap.UnmarshalBoolean(response.FirewallEnabled); err != nil {
3928 return
3929 }
3930 if InboundPinholeAllowed, err = soap.UnmarshalBoolean(response.InboundPinholeAllowed); err != nil {
3931 return
3932 }
3933 // END Unmarshal arguments from response.
3934 return
3935 }
3936
3937 func (client *WANIPv6FirewallControl1) GetOutboundPinholeTimeout(RemoteHost string, RemotePort uint16, InternalClient string, InternalPort uint16, Protocol uint16) (OutboundPinholeTimeout uint32, err error) {
3938 // Request structure.
3939 request := &struct {
3940 RemoteHost string
3941
3942 RemotePort string
3943
3944 InternalClient string
3945
3946 InternalPort string
3947
3948 Protocol string
3949 }{}
3950 // BEGIN Marshal arguments into request.
3951
3952 if request.RemoteHost, err = soap.MarshalString(RemoteHost); err != nil {
3953 return
3954 }
3955 if request.RemotePort, err = soap.MarshalUi2(RemotePort); err != nil {
3956 return
3957 }
3958 if request.InternalClient, err = soap.MarshalString(InternalClient); err != nil {
3959 return
3960 }
3961 if request.InternalPort, err = soap.MarshalUi2(InternalPort); err != nil {
3962 return
3963 }
3964 if request.Protocol, err = soap.MarshalUi2(Protocol); err != nil {
3965 return
3966 }
3967 // END Marshal arguments into request.
3968
3969 // Response structure.
3970 response := &struct {
3971 OutboundPinholeTimeout string
3972 }{}
3973
3974 // Perform the SOAP call.
3975 if err = client.SOAPClient.PerformAction(URN_WANIPv6FirewallControl_1, "GetOutboundPinholeTimeout", request, response); err != nil {
3976 return
3977 }
3978
3979 // BEGIN Unmarshal arguments from response.
3980
3981 if OutboundPinholeTimeout, err = soap.UnmarshalUi4(response.OutboundPinholeTimeout); err != nil {
3982 return
3983 }
3984 // END Unmarshal arguments from response.
3985 return
3986 }
3987
3988 //
3989 // Arguments:
3990 //
3991 // * LeaseTime: allowed value range: minimum=1, maximum=86400
3992
3993 func (client *WANIPv6FirewallControl1) AddPinhole(RemoteHost string, RemotePort uint16, InternalClient string, InternalPort uint16, Protocol uint16, LeaseTime uint32) (UniqueID uint16, err error) {
3994 // Request structure.
3995 request := &struct {
3996 RemoteHost string
3997
3998 RemotePort string
3999
4000 InternalClient string
4001
4002 InternalPort string
4003
4004 Protocol string
4005
4006 LeaseTime string
4007 }{}
4008 // BEGIN Marshal arguments into request.
4009
4010 if request.RemoteHost, err = soap.MarshalString(RemoteHost); err != nil {
4011 return
4012 }
4013 if request.RemotePort, err = soap.MarshalUi2(RemotePort); err != nil {
4014 return
4015 }
4016 if request.InternalClient, err = soap.MarshalString(InternalClient); err != nil {
4017 return
4018 }
4019 if request.InternalPort, err = soap.MarshalUi2(InternalPort); err != nil {
4020 return
4021 }
4022 if request.Protocol, err = soap.MarshalUi2(Protocol); err != nil {
4023 return
4024 }
4025 if request.LeaseTime, err = soap.MarshalUi4(LeaseTime); err != nil {
4026 return
4027 }
4028 // END Marshal arguments into request.
4029
4030 // Response structure.
4031 response := &struct {
4032 UniqueID string
4033 }{}
4034
4035 // Perform the SOAP call.
4036 if err = client.SOAPClient.PerformAction(URN_WANIPv6FirewallControl_1, "AddPinhole", request, response); err != nil {
4037 return
4038 }
4039
4040 // BEGIN Unmarshal arguments from response.
4041
4042 if UniqueID, err = soap.UnmarshalUi2(response.UniqueID); err != nil {
4043 return
4044 }
4045 // END Unmarshal arguments from response.
4046 return
4047 }
4048
4049 //
4050 // Arguments:
4051 //
4052 // * NewLeaseTime: allowed value range: minimum=1, maximum=86400
4053
4054 func (client *WANIPv6FirewallControl1) UpdatePinhole(UniqueID uint16, NewLeaseTime uint32) (err error) {
4055 // Request structure.
4056 request := &struct {
4057 UniqueID string
4058
4059 NewLeaseTime string
4060 }{}
4061 // BEGIN Marshal arguments into request.
4062
4063 if request.UniqueID, err = soap.MarshalUi2(UniqueID); err != nil {
4064 return
4065 }
4066 if request.NewLeaseTime, err = soap.MarshalUi4(NewLeaseTime); err != nil {
4067 return
4068 }
4069 // END Marshal arguments into request.
4070
4071 // Response structure.
4072 response := interface{}(nil)
4073
4074 // Perform the SOAP call.
4075 if err = client.SOAPClient.PerformAction(URN_WANIPv6FirewallControl_1, "UpdatePinhole", request, response); err != nil {
4076 return
4077 }
4078
4079 // BEGIN Unmarshal arguments from response.
4080
4081 // END Unmarshal arguments from response.
4082 return
4083 }
4084
4085 func (client *WANIPv6FirewallControl1) DeletePinhole(UniqueID uint16) (err error) {
4086 // Request structure.
4087 request := &struct {
4088 UniqueID string
4089 }{}
4090 // BEGIN Marshal arguments into request.
4091
4092 if request.UniqueID, err = soap.MarshalUi2(UniqueID); err != nil {
4093 return
4094 }
4095 // END Marshal arguments into request.
4096
4097 // Response structure.
4098 response := interface{}(nil)
4099
4100 // Perform the SOAP call.
4101 if err = client.SOAPClient.PerformAction(URN_WANIPv6FirewallControl_1, "DeletePinhole", request, response); err != nil {
4102 return
4103 }
4104
4105 // BEGIN Unmarshal arguments from response.
4106
4107 // END Unmarshal arguments from response.
4108 return
4109 }
4110
4111 func (client *WANIPv6FirewallControl1) GetPinholePackets(UniqueID uint16) (PinholePackets uint32, err error) {
4112 // Request structure.
4113 request := &struct {
4114 UniqueID string
4115 }{}
4116 // BEGIN Marshal arguments into request.
4117
4118 if request.UniqueID, err = soap.MarshalUi2(UniqueID); err != nil {
4119 return
4120 }
4121 // END Marshal arguments into request.
4122
4123 // Response structure.
4124 response := &struct {
4125 PinholePackets string
4126 }{}
4127
4128 // Perform the SOAP call.
4129 if err = client.SOAPClient.PerformAction(URN_WANIPv6FirewallControl_1, "GetPinholePackets", request, response); err != nil {
4130 return
4131 }
4132
4133 // BEGIN Unmarshal arguments from response.
4134
4135 if PinholePackets, err = soap.UnmarshalUi4(response.PinholePackets); err != nil {
4136 return
4137 }
4138 // END Unmarshal arguments from response.
4139 return
4140 }
4141
4142 func (client *WANIPv6FirewallControl1) CheckPinholeWorking(UniqueID uint16) (IsWorking bool, err error) {
4143 // Request structure.
4144 request := &struct {
4145 UniqueID string
4146 }{}
4147 // BEGIN Marshal arguments into request.
4148
4149 if request.UniqueID, err = soap.MarshalUi2(UniqueID); err != nil {
4150 return
4151 }
4152 // END Marshal arguments into request.
4153
4154 // Response structure.
4155 response := &struct {
4156 IsWorking string
4157 }{}
4158
4159 // Perform the SOAP call.
4160 if err = client.SOAPClient.PerformAction(URN_WANIPv6FirewallControl_1, "CheckPinholeWorking", request, response); err != nil {
4161 return
4162 }
4163
4164 // BEGIN Unmarshal arguments from response.
4165
4166 if IsWorking, err = soap.UnmarshalBoolean(response.IsWorking); err != nil {
4167 return
4168 }
4169 // END Unmarshal arguments from response.
4170 return
4171 }
4172
4173 // WANPOTSLinkConfig1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:WANPOTSLinkConfig:1". See
4174 // goupnp.ServiceClient, which contains RootDevice and Service attributes which
4175 // are provided for informational value.
4176 type WANPOTSLinkConfig1 struct {
4177 goupnp.ServiceClient
4178 }
4179
4180 // NewWANPOTSLinkConfig1Clients discovers instances of the service on the network,
4181 // and returns clients to any that are found. errors will contain an error for
4182 // any devices that replied but which could not be queried, and err will be set
4183 // if the discovery process failed outright.
4184 //
4185 // This is a typical entry calling point into this package.
4186 func NewWANPOTSLinkConfig1Clients() (clients []*WANPOTSLinkConfig1, errors []error, err error) {
4187 var genericClients []goupnp.ServiceClient
4188 if genericClients, errors, err = goupnp.NewServiceClients(URN_WANPOTSLinkConfig_1); err != nil {
4189 return
4190 }
4191 clients = newWANPOTSLinkConfig1ClientsFromGenericClients(genericClients)
4192 return
4193 }
4194
4195 // NewWANPOTSLinkConfig1ClientsByURL discovers instances of the service at the given
4196 // URL, and returns clients to any that are found. An error is returned if
4197 // there was an error probing the service.
4198 //
4199 // This is a typical entry calling point into this package when reusing an
4200 // previously discovered service URL.
4201 func NewWANPOTSLinkConfig1ClientsByURL(loc *url.URL) ([]*WANPOTSLinkConfig1, error) {
4202 genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANPOTSLinkConfig_1)
4203 if err != nil {
4204 return nil, err
4205 }
4206 return newWANPOTSLinkConfig1ClientsFromGenericClients(genericClients), nil
4207 }
4208
4209 // NewWANPOTSLinkConfig1ClientsFromRootDevice discovers instances of the service in
4210 // a given root device, and returns clients to any that are found. An error is
4211 // returned if there was not at least one instance of the service within the
4212 // device. The location parameter is simply assigned to the Location attribute
4213 // of the wrapped ServiceClient(s).
4214 //
4215 // This is a typical entry calling point into this package when reusing an
4216 // previously discovered root device.
4217 func NewWANPOTSLinkConfig1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*WANPOTSLinkConfig1, error) {
4218 genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_WANPOTSLinkConfig_1)
4219 if err != nil {
4220 return nil, err
4221 }
4222 return newWANPOTSLinkConfig1ClientsFromGenericClients(genericClients), nil
4223 }
4224
4225 func newWANPOTSLinkConfig1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*WANPOTSLinkConfig1 {
4226 clients := make([]*WANPOTSLinkConfig1, len(genericClients))
4227 for i := range genericClients {
4228 clients[i] = &WANPOTSLinkConfig1{genericClients[i]}
4229 }
4230 return clients
4231 }
4232
4233 //
4234 // Arguments:
4235 //
4236 // * NewLinkType: allowed values: PPP_Dialup
4237
4238 func (client *WANPOTSLinkConfig1) SetISPInfo(NewISPPhoneNumber string, NewISPInfo string, NewLinkType string) (err error) {
4239 // Request structure.
4240 request := &struct {
4241 NewISPPhoneNumber string
4242
4243 NewISPInfo string
4244
4245 NewLinkType string
4246 }{}
4247 // BEGIN Marshal arguments into request.
4248
4249 if request.NewISPPhoneNumber, err = soap.MarshalString(NewISPPhoneNumber); err != nil {
4250 return
4251 }
4252 if request.NewISPInfo, err = soap.MarshalString(NewISPInfo); err != nil {
4253 return
4254 }
4255 if request.NewLinkType, err = soap.MarshalString(NewLinkType); err != nil {
4256 return
4257 }
4258 // END Marshal arguments into request.
4259
4260 // Response structure.
4261 response := interface{}(nil)
4262
4263 // Perform the SOAP call.
4264 if err = client.SOAPClient.PerformAction(URN_WANPOTSLinkConfig_1, "SetISPInfo", request, response); err != nil {
4265 return
4266 }
4267
4268 // BEGIN Unmarshal arguments from response.
4269
4270 // END Unmarshal arguments from response.
4271 return
4272 }
4273
4274 func (client *WANPOTSLinkConfig1) SetCallRetryInfo(NewNumberOfRetries uint32, NewDelayBetweenRetries uint32) (err error) {
4275 // Request structure.
4276 request := &struct {
4277 NewNumberOfRetries string
4278
4279 NewDelayBetweenRetries string
4280 }{}
4281 // BEGIN Marshal arguments into request.
4282
4283 if request.NewNumberOfRetries, err = soap.MarshalUi4(NewNumberOfRetries); err != nil {
4284 return
4285 }
4286 if request.NewDelayBetweenRetries, err = soap.MarshalUi4(NewDelayBetweenRetries); err != nil {
4287 return
4288 }
4289 // END Marshal arguments into request.
4290
4291 // Response structure.
4292 response := interface{}(nil)
4293
4294 // Perform the SOAP call.
4295 if err = client.SOAPClient.PerformAction(URN_WANPOTSLinkConfig_1, "SetCallRetryInfo", request, response); err != nil {
4296 return
4297 }
4298
4299 // BEGIN Unmarshal arguments from response.
4300
4301 // END Unmarshal arguments from response.
4302 return
4303 }
4304
4305 //
4306 // Return values:
4307 //
4308 // * NewLinkType: allowed values: PPP_Dialup
4309 func (client *WANPOTSLinkConfig1) GetISPInfo() (NewISPPhoneNumber string, NewISPInfo string, NewLinkType string, err error) {
4310 // Request structure.
4311 request := interface{}(nil)
4312 // BEGIN Marshal arguments into request.
4313
4314 // END Marshal arguments into request.
4315
4316 // Response structure.
4317 response := &struct {
4318 NewISPPhoneNumber string
4319
4320 NewISPInfo string
4321
4322 NewLinkType string
4323 }{}
4324
4325 // Perform the SOAP call.
4326 if err = client.SOAPClient.PerformAction(URN_WANPOTSLinkConfig_1, "GetISPInfo", request, response); err != nil {
4327 return
4328 }
4329
4330 // BEGIN Unmarshal arguments from response.
4331
4332 if NewISPPhoneNumber, err = soap.UnmarshalString(response.NewISPPhoneNumber); err != nil {
4333 return
4334 }
4335 if NewISPInfo, err = soap.UnmarshalString(response.NewISPInfo); err != nil {
4336 return
4337 }
4338 if NewLinkType, err = soap.UnmarshalString(response.NewLinkType); err != nil {
4339 return
4340 }
4341 // END Unmarshal arguments from response.
4342 return
4343 }
4344
4345 func (client *WANPOTSLinkConfig1) GetCallRetryInfo() (NewNumberOfRetries uint32, NewDelayBetweenRetries uint32, err error) {
4346 // Request structure.
4347 request := interface{}(nil)
4348 // BEGIN Marshal arguments into request.
4349
4350 // END Marshal arguments into request.
4351
4352 // Response structure.
4353 response := &struct {
4354 NewNumberOfRetries string
4355
4356 NewDelayBetweenRetries string
4357 }{}
4358
4359 // Perform the SOAP call.
4360 if err = client.SOAPClient.PerformAction(URN_WANPOTSLinkConfig_1, "GetCallRetryInfo", request, response); err != nil {
4361 return
4362 }
4363
4364 // BEGIN Unmarshal arguments from response.
4365
4366 if NewNumberOfRetries, err = soap.UnmarshalUi4(response.NewNumberOfRetries); err != nil {
4367 return
4368 }
4369 if NewDelayBetweenRetries, err = soap.UnmarshalUi4(response.NewDelayBetweenRetries); err != nil {
4370 return
4371 }
4372 // END Unmarshal arguments from response.
4373 return
4374 }
4375
4376 func (client *WANPOTSLinkConfig1) GetFclass() (NewFclass string, err error) {
4377 // Request structure.
4378 request := interface{}(nil)
4379 // BEGIN Marshal arguments into request.
4380
4381 // END Marshal arguments into request.
4382
4383 // Response structure.
4384 response := &struct {
4385 NewFclass string
4386 }{}
4387
4388 // Perform the SOAP call.
4389 if err = client.SOAPClient.PerformAction(URN_WANPOTSLinkConfig_1, "GetFclass", request, response); err != nil {
4390 return
4391 }
4392
4393 // BEGIN Unmarshal arguments from response.
4394
4395 if NewFclass, err = soap.UnmarshalString(response.NewFclass); err != nil {
4396 return
4397 }
4398 // END Unmarshal arguments from response.
4399 return
4400 }
4401
4402 func (client *WANPOTSLinkConfig1) GetDataModulationSupported() (NewDataModulationSupported string, err error) {
4403 // Request structure.
4404 request := interface{}(nil)
4405 // BEGIN Marshal arguments into request.
4406
4407 // END Marshal arguments into request.
4408
4409 // Response structure.
4410 response := &struct {
4411 NewDataModulationSupported string
4412 }{}
4413
4414 // Perform the SOAP call.
4415 if err = client.SOAPClient.PerformAction(URN_WANPOTSLinkConfig_1, "GetDataModulationSupported", request, response); err != nil {
4416 return
4417 }
4418
4419 // BEGIN Unmarshal arguments from response.
4420
4421 if NewDataModulationSupported, err = soap.UnmarshalString(response.NewDataModulationSupported); err != nil {
4422 return
4423 }
4424 // END Unmarshal arguments from response.
4425 return
4426 }
4427
4428 func (client *WANPOTSLinkConfig1) GetDataProtocol() (NewDataProtocol string, err error) {
4429 // Request structure.
4430 request := interface{}(nil)
4431 // BEGIN Marshal arguments into request.
4432
4433 // END Marshal arguments into request.
4434
4435 // Response structure.
4436 response := &struct {
4437 NewDataProtocol string
4438 }{}
4439
4440 // Perform the SOAP call.
4441 if err = client.SOAPClient.PerformAction(URN_WANPOTSLinkConfig_1, "GetDataProtocol", request, response); err != nil {
4442 return
4443 }
4444
4445 // BEGIN Unmarshal arguments from response.
4446
4447 if NewDataProtocol, err = soap.UnmarshalString(response.NewDataProtocol); err != nil {
4448 return
4449 }
4450 // END Unmarshal arguments from response.
4451 return
4452 }
4453
4454 func (client *WANPOTSLinkConfig1) GetDataCompression() (NewDataCompression string, err error) {
4455 // Request structure.
4456 request := interface{}(nil)
4457 // BEGIN Marshal arguments into request.
4458
4459 // END Marshal arguments into request.
4460
4461 // Response structure.
4462 response := &struct {
4463 NewDataCompression string
4464 }{}
4465
4466 // Perform the SOAP call.
4467 if err = client.SOAPClient.PerformAction(URN_WANPOTSLinkConfig_1, "GetDataCompression", request, response); err != nil {
4468 return
4469 }
4470
4471 // BEGIN Unmarshal arguments from response.
4472
4473 if NewDataCompression, err = soap.UnmarshalString(response.NewDataCompression); err != nil {
4474 return
4475 }
4476 // END Unmarshal arguments from response.
4477 return
4478 }
4479
4480 func (client *WANPOTSLinkConfig1) GetPlusVTRCommandSupported() (NewPlusVTRCommandSupported bool, err error) {
4481 // Request structure.
4482 request := interface{}(nil)
4483 // BEGIN Marshal arguments into request.
4484
4485 // END Marshal arguments into request.
4486
4487 // Response structure.
4488 response := &struct {
4489 NewPlusVTRCommandSupported string
4490 }{}
4491
4492 // Perform the SOAP call.
4493 if err = client.SOAPClient.PerformAction(URN_WANPOTSLinkConfig_1, "GetPlusVTRCommandSupported", request, response); err != nil {
4494 return
4495 }
4496
4497 // BEGIN Unmarshal arguments from response.
4498
4499 if NewPlusVTRCommandSupported, err = soap.UnmarshalBoolean(response.NewPlusVTRCommandSupported); err != nil {
4500 return
4501 }
4502 // END Unmarshal arguments from response.
4503 return
4504 }
4505
4506 // WANPPPConnection1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:WANPPPConnection:1". See
4507 // goupnp.ServiceClient, which contains RootDevice and Service attributes which
4508 // are provided for informational value.
4509 type WANPPPConnection1 struct {
4510 goupnp.ServiceClient
4511 }
4512
4513 // NewWANPPPConnection1Clients discovers instances of the service on the network,
4514 // and returns clients to any that are found. errors will contain an error for
4515 // any devices that replied but which could not be queried, and err will be set
4516 // if the discovery process failed outright.
4517 //
4518 // This is a typical entry calling point into this package.
4519 func NewWANPPPConnection1Clients() (clients []*WANPPPConnection1, errors []error, err error) {
4520 var genericClients []goupnp.ServiceClient
4521 if genericClients, errors, err = goupnp.NewServiceClients(URN_WANPPPConnection_1); err != nil {
4522 return
4523 }
4524 clients = newWANPPPConnection1ClientsFromGenericClients(genericClients)
4525 return
4526 }
4527
4528 // NewWANPPPConnection1ClientsByURL discovers instances of the service at the given
4529 // URL, and returns clients to any that are found. An error is returned if
4530 // there was an error probing the service.
4531 //
4532 // This is a typical entry calling point into this package when reusing an
4533 // previously discovered service URL.
4534 func NewWANPPPConnection1ClientsByURL(loc *url.URL) ([]*WANPPPConnection1, error) {
4535 genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANPPPConnection_1)
4536 if err != nil {
4537 return nil, err
4538 }
4539 return newWANPPPConnection1ClientsFromGenericClients(genericClients), nil
4540 }
4541
4542 // NewWANPPPConnection1ClientsFromRootDevice discovers instances of the service in
4543 // a given root device, and returns clients to any that are found. An error is
4544 // returned if there was not at least one instance of the service within the
4545 // device. The location parameter is simply assigned to the Location attribute
4546 // of the wrapped ServiceClient(s).
4547 //
4548 // This is a typical entry calling point into this package when reusing an
4549 // previously discovered root device.
4550 func NewWANPPPConnection1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*WANPPPConnection1, error) {
4551 genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_WANPPPConnection_1)
4552 if err != nil {
4553 return nil, err
4554 }
4555 return newWANPPPConnection1ClientsFromGenericClients(genericClients), nil
4556 }
4557
4558 func newWANPPPConnection1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*WANPPPConnection1 {
4559 clients := make([]*WANPPPConnection1, len(genericClients))
4560 for i := range genericClients {
4561 clients[i] = &WANPPPConnection1{genericClients[i]}
4562 }
4563 return clients
4564 }
4565
4566 func (client *WANPPPConnection1) SetConnectionType(NewConnectionType string) (err error) {
4567 // Request structure.
4568 request := &struct {
4569 NewConnectionType string
4570 }{}
4571 // BEGIN Marshal arguments into request.
4572
4573 if request.NewConnectionType, err = soap.MarshalString(NewConnectionType); err != nil {
4574 return
4575 }
4576 // END Marshal arguments into request.
4577
4578 // Response structure.
4579 response := interface{}(nil)
4580
4581 // Perform the SOAP call.
4582 if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "SetConnectionType", request, response); err != nil {
4583 return
4584 }
4585
4586 // BEGIN Unmarshal arguments from response.
4587
4588 // END Unmarshal arguments from response.
4589 return
4590 }
4591
4592 //
4593 // Return values:
4594 //
4595 // * NewPossibleConnectionTypes: allowed values: Unconfigured, IP_Routed, DHCP_Spoofed, PPPoE_Bridged, PPTP_Relay, L2TP_Relay, PPPoE_Relay
4596 func (client *WANPPPConnection1) GetConnectionTypeInfo() (NewConnectionType string, NewPossibleConnectionTypes string, err error) {
4597 // Request structure.
4598 request := interface{}(nil)
4599 // BEGIN Marshal arguments into request.
4600
4601 // END Marshal arguments into request.
4602
4603 // Response structure.
4604 response := &struct {
4605 NewConnectionType string
4606
4607 NewPossibleConnectionTypes string
4608 }{}
4609
4610 // Perform the SOAP call.
4611 if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "GetConnectionTypeInfo", request, response); err != nil {
4612 return
4613 }
4614
4615 // BEGIN Unmarshal arguments from response.
4616
4617 if NewConnectionType, err = soap.UnmarshalString(response.NewConnectionType); err != nil {
4618 return
4619 }
4620 if NewPossibleConnectionTypes, err = soap.UnmarshalString(response.NewPossibleConnectionTypes); err != nil {
4621 return
4622 }
4623 // END Unmarshal arguments from response.
4624 return
4625 }
4626
4627 func (client *WANPPPConnection1) ConfigureConnection(NewUserName string, NewPassword string) (err error) {
4628 // Request structure.
4629 request := &struct {
4630 NewUserName string
4631
4632 NewPassword string
4633 }{}
4634 // BEGIN Marshal arguments into request.
4635
4636 if request.NewUserName, err = soap.MarshalString(NewUserName); err != nil {
4637 return
4638 }
4639 if request.NewPassword, err = soap.MarshalString(NewPassword); err != nil {
4640 return
4641 }
4642 // END Marshal arguments into request.
4643
4644 // Response structure.
4645 response := interface{}(nil)
4646
4647 // Perform the SOAP call.
4648 if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "ConfigureConnection", request, response); err != nil {
4649 return
4650 }
4651
4652 // BEGIN Unmarshal arguments from response.
4653
4654 // END Unmarshal arguments from response.
4655 return
4656 }
4657
4658 func (client *WANPPPConnection1) RequestConnection() (err error) {
4659 // Request structure.
4660 request := interface{}(nil)
4661 // BEGIN Marshal arguments into request.
4662
4663 // END Marshal arguments into request.
4664
4665 // Response structure.
4666 response := interface{}(nil)
4667
4668 // Perform the SOAP call.
4669 if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "RequestConnection", request, response); err != nil {
4670 return
4671 }
4672
4673 // BEGIN Unmarshal arguments from response.
4674
4675 // END Unmarshal arguments from response.
4676 return
4677 }
4678
4679 func (client *WANPPPConnection1) RequestTermination() (err error) {
4680 // Request structure.
4681 request := interface{}(nil)
4682 // BEGIN Marshal arguments into request.
4683
4684 // END Marshal arguments into request.
4685
4686 // Response structure.
4687 response := interface{}(nil)
4688
4689 // Perform the SOAP call.
4690 if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "RequestTermination", request, response); err != nil {
4691 return
4692 }
4693
4694 // BEGIN Unmarshal arguments from response.
4695
4696 // END Unmarshal arguments from response.
4697 return
4698 }
4699
4700 func (client *WANPPPConnection1) ForceTermination() (err error) {
4701 // Request structure.
4702 request := interface{}(nil)
4703 // BEGIN Marshal arguments into request.
4704
4705 // END Marshal arguments into request.
4706
4707 // Response structure.
4708 response := interface{}(nil)
4709
4710 // Perform the SOAP call.
4711 if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "ForceTermination", request, response); err != nil {
4712 return
4713 }
4714
4715 // BEGIN Unmarshal arguments from response.
4716
4717 // END Unmarshal arguments from response.
4718 return
4719 }
4720
4721 func (client *WANPPPConnection1) SetAutoDisconnectTime(NewAutoDisconnectTime uint32) (err error) {
4722 // Request structure.
4723 request := &struct {
4724 NewAutoDisconnectTime string
4725 }{}
4726 // BEGIN Marshal arguments into request.
4727
4728 if request.NewAutoDisconnectTime, err = soap.MarshalUi4(NewAutoDisconnectTime); err != nil {
4729 return
4730 }
4731 // END Marshal arguments into request.
4732
4733 // Response structure.
4734 response := interface{}(nil)
4735
4736 // Perform the SOAP call.
4737 if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "SetAutoDisconnectTime", request, response); err != nil {
4738 return
4739 }
4740
4741 // BEGIN Unmarshal arguments from response.
4742
4743 // END Unmarshal arguments from response.
4744 return
4745 }
4746
4747 func (client *WANPPPConnection1) SetIdleDisconnectTime(NewIdleDisconnectTime uint32) (err error) {
4748 // Request structure.
4749 request := &struct {
4750 NewIdleDisconnectTime string
4751 }{}
4752 // BEGIN Marshal arguments into request.
4753
4754 if request.NewIdleDisconnectTime, err = soap.MarshalUi4(NewIdleDisconnectTime); err != nil {
4755 return
4756 }
4757 // END Marshal arguments into request.
4758
4759 // Response structure.
4760 response := interface{}(nil)
4761
4762 // Perform the SOAP call.
4763 if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "SetIdleDisconnectTime", request, response); err != nil {
4764 return
4765 }
4766
4767 // BEGIN Unmarshal arguments from response.
4768
4769 // END Unmarshal arguments from response.
4770 return
4771 }
4772
4773 func (client *WANPPPConnection1) SetWarnDisconnectDelay(NewWarnDisconnectDelay uint32) (err error) {
4774 // Request structure.
4775 request := &struct {
4776 NewWarnDisconnectDelay string
4777 }{}
4778 // BEGIN Marshal arguments into request.
4779
4780 if request.NewWarnDisconnectDelay, err = soap.MarshalUi4(NewWarnDisconnectDelay); err != nil {
4781 return
4782 }
4783 // END Marshal arguments into request.
4784
4785 // Response structure.
4786 response := interface{}(nil)
4787
4788 // Perform the SOAP call.
4789 if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "SetWarnDisconnectDelay", request, response); err != nil {
4790 return
4791 }
4792
4793 // BEGIN Unmarshal arguments from response.
4794
4795 // END Unmarshal arguments from response.
4796 return
4797 }
4798
4799 //
4800 // Return values:
4801 //
4802 // * NewConnectionStatus: allowed values: Unconfigured, Connected, Disconnected
4803 //
4804 // * NewLastConnectionError: allowed values: ERROR_NONE
4805 func (client *WANPPPConnection1) GetStatusInfo() (NewConnectionStatus string, NewLastConnectionError string, NewUptime uint32, err error) {
4806 // Request structure.
4807 request := interface{}(nil)
4808 // BEGIN Marshal arguments into request.
4809
4810 // END Marshal arguments into request.
4811
4812 // Response structure.
4813 response := &struct {
4814 NewConnectionStatus string
4815
4816 NewLastConnectionError string
4817
4818 NewUptime string
4819 }{}
4820
4821 // Perform the SOAP call.
4822 if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "GetStatusInfo", request, response); err != nil {
4823 return
4824 }
4825
4826 // BEGIN Unmarshal arguments from response.
4827
4828 if NewConnectionStatus, err = soap.UnmarshalString(response.NewConnectionStatus); err != nil {
4829 return
4830 }
4831 if NewLastConnectionError, err = soap.UnmarshalString(response.NewLastConnectionError); err != nil {
4832 return
4833 }
4834 if NewUptime, err = soap.UnmarshalUi4(response.NewUptime); err != nil {
4835 return
4836 }
4837 // END Unmarshal arguments from response.
4838 return
4839 }
4840
4841 func (client *WANPPPConnection1) GetLinkLayerMaxBitRates() (NewUpstreamMaxBitRate uint32, NewDownstreamMaxBitRate uint32, err error) {
4842 // Request structure.
4843 request := interface{}(nil)
4844 // BEGIN Marshal arguments into request.
4845
4846 // END Marshal arguments into request.
4847
4848 // Response structure.
4849 response := &struct {
4850 NewUpstreamMaxBitRate string
4851
4852 NewDownstreamMaxBitRate string
4853 }{}
4854
4855 // Perform the SOAP call.
4856 if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "GetLinkLayerMaxBitRates", request, response); err != nil {
4857 return
4858 }
4859
4860 // BEGIN Unmarshal arguments from response.
4861
4862 if NewUpstreamMaxBitRate, err = soap.UnmarshalUi4(response.NewUpstreamMaxBitRate); err != nil {
4863 return
4864 }
4865 if NewDownstreamMaxBitRate, err = soap.UnmarshalUi4(response.NewDownstreamMaxBitRate); err != nil {
4866 return
4867 }
4868 // END Unmarshal arguments from response.
4869 return
4870 }
4871
4872 func (client *WANPPPConnection1) GetPPPEncryptionProtocol() (NewPPPEncryptionProtocol string, err error) {
4873 // Request structure.
4874 request := interface{}(nil)
4875 // BEGIN Marshal arguments into request.
4876
4877 // END Marshal arguments into request.
4878
4879 // Response structure.
4880 response := &struct {
4881 NewPPPEncryptionProtocol string
4882 }{}
4883
4884 // Perform the SOAP call.
4885 if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "GetPPPEncryptionProtocol", request, response); err != nil {
4886 return
4887 }
4888
4889 // BEGIN Unmarshal arguments from response.
4890
4891 if NewPPPEncryptionProtocol, err = soap.UnmarshalString(response.NewPPPEncryptionProtocol); err != nil {
4892 return
4893 }
4894 // END Unmarshal arguments from response.
4895 return
4896 }
4897
4898 func (client *WANPPPConnection1) GetPPPCompressionProtocol() (NewPPPCompressionProtocol string, err error) {
4899 // Request structure.
4900 request := interface{}(nil)
4901 // BEGIN Marshal arguments into request.
4902
4903 // END Marshal arguments into request.
4904
4905 // Response structure.
4906 response := &struct {
4907 NewPPPCompressionProtocol string
4908 }{}
4909
4910 // Perform the SOAP call.
4911 if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "GetPPPCompressionProtocol", request, response); err != nil {
4912 return
4913 }
4914
4915 // BEGIN Unmarshal arguments from response.
4916
4917 if NewPPPCompressionProtocol, err = soap.UnmarshalString(response.NewPPPCompressionProtocol); err != nil {
4918 return
4919 }
4920 // END Unmarshal arguments from response.
4921 return
4922 }
4923
4924 func (client *WANPPPConnection1) GetPPPAuthenticationProtocol() (NewPPPAuthenticationProtocol string, err error) {
4925 // Request structure.
4926 request := interface{}(nil)
4927 // BEGIN Marshal arguments into request.
4928
4929 // END Marshal arguments into request.
4930
4931 // Response structure.
4932 response := &struct {
4933 NewPPPAuthenticationProtocol string
4934 }{}
4935
4936 // Perform the SOAP call.
4937 if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "GetPPPAuthenticationProtocol", request, response); err != nil {
4938 return
4939 }
4940
4941 // BEGIN Unmarshal arguments from response.
4942
4943 if NewPPPAuthenticationProtocol, err = soap.UnmarshalString(response.NewPPPAuthenticationProtocol); err != nil {
4944 return
4945 }
4946 // END Unmarshal arguments from response.
4947 return
4948 }
4949
4950 func (client *WANPPPConnection1) GetUserName() (NewUserName string, err error) {
4951 // Request structure.
4952 request := interface{}(nil)
4953 // BEGIN Marshal arguments into request.
4954
4955 // END Marshal arguments into request.
4956
4957 // Response structure.
4958 response := &struct {
4959 NewUserName string
4960 }{}
4961
4962 // Perform the SOAP call.
4963 if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "GetUserName", request, response); err != nil {
4964 return
4965 }
4966
4967 // BEGIN Unmarshal arguments from response.
4968
4969 if NewUserName, err = soap.UnmarshalString(response.NewUserName); err != nil {
4970 return
4971 }
4972 // END Unmarshal arguments from response.
4973 return
4974 }
4975
4976 func (client *WANPPPConnection1) GetPassword() (NewPassword string, err error) {
4977 // Request structure.
4978 request := interface{}(nil)
4979 // BEGIN Marshal arguments into request.
4980
4981 // END Marshal arguments into request.
4982
4983 // Response structure.
4984 response := &struct {
4985 NewPassword string
4986 }{}
4987
4988 // Perform the SOAP call.
4989 if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "GetPassword", request, response); err != nil {
4990 return
4991 }
4992
4993 // BEGIN Unmarshal arguments from response.
4994
4995 if NewPassword, err = soap.UnmarshalString(response.NewPassword); err != nil {
4996 return
4997 }
4998 // END Unmarshal arguments from response.
4999 return
5000 }
5001
5002 func (client *WANPPPConnection1) GetAutoDisconnectTime() (NewAutoDisconnectTime uint32, err error) {
5003 // Request structure.
5004 request := interface{}(nil)
5005 // BEGIN Marshal arguments into request.
5006
5007 // END Marshal arguments into request.
5008
5009 // Response structure.
5010 response := &struct {
5011 NewAutoDisconnectTime string
5012 }{}
5013
5014 // Perform the SOAP call.
5015 if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "GetAutoDisconnectTime", request, response); err != nil {
5016 return
5017 }
5018
5019 // BEGIN Unmarshal arguments from response.
5020
5021 if NewAutoDisconnectTime, err = soap.UnmarshalUi4(response.NewAutoDisconnectTime); err != nil {
5022 return
5023 }
5024 // END Unmarshal arguments from response.
5025 return
5026 }
5027
5028 func (client *WANPPPConnection1) GetIdleDisconnectTime() (NewIdleDisconnectTime uint32, err error) {
5029 // Request structure.
5030 request := interface{}(nil)
5031 // BEGIN Marshal arguments into request.
5032
5033 // END Marshal arguments into request.
5034
5035 // Response structure.
5036 response := &struct {
5037 NewIdleDisconnectTime string
5038 }{}
5039
5040 // Perform the SOAP call.
5041 if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "GetIdleDisconnectTime", request, response); err != nil {
5042 return
5043 }
5044
5045 // BEGIN Unmarshal arguments from response.
5046
5047 if NewIdleDisconnectTime, err = soap.UnmarshalUi4(response.NewIdleDisconnectTime); err != nil {
5048 return
5049 }
5050 // END Unmarshal arguments from response.
5051 return
5052 }
5053
5054 func (client *WANPPPConnection1) GetWarnDisconnectDelay() (NewWarnDisconnectDelay uint32, err error) {
5055 // Request structure.
5056 request := interface{}(nil)
5057 // BEGIN Marshal arguments into request.
5058
5059 // END Marshal arguments into request.
5060
5061 // Response structure.
5062 response := &struct {
5063 NewWarnDisconnectDelay string
5064 }{}
5065
5066 // Perform the SOAP call.
5067 if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "GetWarnDisconnectDelay", request, response); err != nil {
5068 return
5069 }
5070
5071 // BEGIN Unmarshal arguments from response.
5072
5073 if NewWarnDisconnectDelay, err = soap.UnmarshalUi4(response.NewWarnDisconnectDelay); err != nil {
5074 return
5075 }
5076 // END Unmarshal arguments from response.
5077 return
5078 }
5079
5080 func (client *WANPPPConnection1) GetNATRSIPStatus() (NewRSIPAvailable bool, NewNATEnabled bool, err error) {
5081 // Request structure.
5082 request := interface{}(nil)
5083 // BEGIN Marshal arguments into request.
5084
5085 // END Marshal arguments into request.
5086
5087 // Response structure.
5088 response := &struct {
5089 NewRSIPAvailable string
5090
5091 NewNATEnabled string
5092 }{}
5093
5094 // Perform the SOAP call.
5095 if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "GetNATRSIPStatus", request, response); err != nil {
5096 return
5097 }
5098
5099 // BEGIN Unmarshal arguments from response.
5100
5101 if NewRSIPAvailable, err = soap.UnmarshalBoolean(response.NewRSIPAvailable); err != nil {
5102 return
5103 }
5104 if NewNATEnabled, err = soap.UnmarshalBoolean(response.NewNATEnabled); err != nil {
5105 return
5106 }
5107 // END Unmarshal arguments from response.
5108 return
5109 }
5110
5111 //
5112 // Return values:
5113 //
5114 // * NewProtocol: allowed values: TCP, UDP
5115 func (client *WANPPPConnection1) GetGenericPortMappingEntry(NewPortMappingIndex uint16) (NewRemoteHost string, NewExternalPort uint16, NewProtocol string, NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) {
5116 // Request structure.
5117 request := &struct {
5118 NewPortMappingIndex string
5119 }{}
5120 // BEGIN Marshal arguments into request.
5121
5122 if request.NewPortMappingIndex, err = soap.MarshalUi2(NewPortMappingIndex); err != nil {
5123 return
5124 }
5125 // END Marshal arguments into request.
5126
5127 // Response structure.
5128 response := &struct {
5129 NewRemoteHost string
5130
5131 NewExternalPort string
5132
5133 NewProtocol string
5134
5135 NewInternalPort string
5136
5137 NewInternalClient string
5138
5139 NewEnabled string
5140
5141 NewPortMappingDescription string
5142
5143 NewLeaseDuration string
5144 }{}
5145
5146 // Perform the SOAP call.
5147 if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "GetGenericPortMappingEntry", request, response); err != nil {
5148 return
5149 }
5150
5151 // BEGIN Unmarshal arguments from response.
5152
5153 if NewRemoteHost, err = soap.UnmarshalString(response.NewRemoteHost); err != nil {
5154 return
5155 }
5156 if NewExternalPort, err = soap.UnmarshalUi2(response.NewExternalPort); err != nil {
5157 return
5158 }
5159 if NewProtocol, err = soap.UnmarshalString(response.NewProtocol); err != nil {
5160 return
5161 }
5162 if NewInternalPort, err = soap.UnmarshalUi2(response.NewInternalPort); err != nil {
5163 return
5164 }
5165 if NewInternalClient, err = soap.UnmarshalString(response.NewInternalClient); err != nil {
5166 return
5167 }
5168 if NewEnabled, err = soap.UnmarshalBoolean(response.NewEnabled); err != nil {
5169 return
5170 }
5171 if NewPortMappingDescription, err = soap.UnmarshalString(response.NewPortMappingDescription); err != nil {
5172 return
5173 }
5174 if NewLeaseDuration, err = soap.UnmarshalUi4(response.NewLeaseDuration); err != nil {
5175 return
5176 }
5177 // END Unmarshal arguments from response.
5178 return
5179 }
5180
5181 //
5182 // Arguments:
5183 //
5184 // * NewProtocol: allowed values: TCP, UDP
5185
5186 func (client *WANPPPConnection1) GetSpecificPortMappingEntry(NewRemoteHost string, NewExternalPort uint16, NewProtocol string) (NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32, err error) {
5187 // Request structure.
5188 request := &struct {
5189 NewRemoteHost string
5190
5191 NewExternalPort string
5192
5193 NewProtocol string
5194 }{}
5195 // BEGIN Marshal arguments into request.
5196
5197 if request.NewRemoteHost, err = soap.MarshalString(NewRemoteHost); err != nil {
5198 return
5199 }
5200 if request.NewExternalPort, err = soap.MarshalUi2(NewExternalPort); err != nil {
5201 return
5202 }
5203 if request.NewProtocol, err = soap.MarshalString(NewProtocol); err != nil {
5204 return
5205 }
5206 // END Marshal arguments into request.
5207
5208 // Response structure.
5209 response := &struct {
5210 NewInternalPort string
5211
5212 NewInternalClient string
5213
5214 NewEnabled string
5215
5216 NewPortMappingDescription string
5217
5218 NewLeaseDuration string
5219 }{}
5220
5221 // Perform the SOAP call.
5222 if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "GetSpecificPortMappingEntry", request, response); err != nil {
5223 return
5224 }
5225
5226 // BEGIN Unmarshal arguments from response.
5227
5228 if NewInternalPort, err = soap.UnmarshalUi2(response.NewInternalPort); err != nil {
5229 return
5230 }
5231 if NewInternalClient, err = soap.UnmarshalString(response.NewInternalClient); err != nil {
5232 return
5233 }
5234 if NewEnabled, err = soap.UnmarshalBoolean(response.NewEnabled); err != nil {
5235 return
5236 }
5237 if NewPortMappingDescription, err = soap.UnmarshalString(response.NewPortMappingDescription); err != nil {
5238 return
5239 }
5240 if NewLeaseDuration, err = soap.UnmarshalUi4(response.NewLeaseDuration); err != nil {
5241 return
5242 }
5243 // END Unmarshal arguments from response.
5244 return
5245 }
5246
5247 //
5248 // Arguments:
5249 //
5250 // * NewProtocol: allowed values: TCP, UDP
5251
5252 func (client *WANPPPConnection1) AddPortMapping(NewRemoteHost string, NewExternalPort uint16, NewProtocol string, NewInternalPort uint16, NewInternalClient string, NewEnabled bool, NewPortMappingDescription string, NewLeaseDuration uint32) (err error) {
5253 // Request structure.
5254 request := &struct {
5255 NewRemoteHost string
5256
5257 NewExternalPort string
5258
5259 NewProtocol string
5260
5261 NewInternalPort string
5262
5263 NewInternalClient string
5264
5265 NewEnabled string
5266
5267 NewPortMappingDescription string
5268
5269 NewLeaseDuration string
5270 }{}
5271 // BEGIN Marshal arguments into request.
5272
5273 if request.NewRemoteHost, err = soap.MarshalString(NewRemoteHost); err != nil {
5274 return
5275 }
5276 if request.NewExternalPort, err = soap.MarshalUi2(NewExternalPort); err != nil {
5277 return
5278 }
5279 if request.NewProtocol, err = soap.MarshalString(NewProtocol); err != nil {
5280 return
5281 }
5282 if request.NewInternalPort, err = soap.MarshalUi2(NewInternalPort); err != nil {
5283 return
5284 }
5285 if request.NewInternalClient, err = soap.MarshalString(NewInternalClient); err != nil {
5286 return
5287 }
5288 if request.NewEnabled, err = soap.MarshalBoolean(NewEnabled); err != nil {
5289 return
5290 }
5291 if request.NewPortMappingDescription, err = soap.MarshalString(NewPortMappingDescription); err != nil {
5292 return
5293 }
5294 if request.NewLeaseDuration, err = soap.MarshalUi4(NewLeaseDuration); err != nil {
5295 return
5296 }
5297 // END Marshal arguments into request.
5298
5299 // Response structure.
5300 response := interface{}(nil)
5301
5302 // Perform the SOAP call.
5303 if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "AddPortMapping", request, response); err != nil {
5304 return
5305 }
5306
5307 // BEGIN Unmarshal arguments from response.
5308
5309 // END Unmarshal arguments from response.
5310 return
5311 }
5312
5313 //
5314 // Arguments:
5315 //
5316 // * NewProtocol: allowed values: TCP, UDP
5317
5318 func (client *WANPPPConnection1) DeletePortMapping(NewRemoteHost string, NewExternalPort uint16, NewProtocol string) (err error) {
5319 // Request structure.
5320 request := &struct {
5321 NewRemoteHost string
5322
5323 NewExternalPort string
5324
5325 NewProtocol string
5326 }{}
5327 // BEGIN Marshal arguments into request.
5328
5329 if request.NewRemoteHost, err = soap.MarshalString(NewRemoteHost); err != nil {
5330 return
5331 }
5332 if request.NewExternalPort, err = soap.MarshalUi2(NewExternalPort); err != nil {
5333 return
5334 }
5335 if request.NewProtocol, err = soap.MarshalString(NewProtocol); err != nil {
5336 return
5337 }
5338 // END Marshal arguments into request.
5339
5340 // Response structure.
5341 response := interface{}(nil)
5342
5343 // Perform the SOAP call.
5344 if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "DeletePortMapping", request, response); err != nil {
5345 return
5346 }
5347
5348 // BEGIN Unmarshal arguments from response.
5349
5350 // END Unmarshal arguments from response.
5351 return
5352 }
5353
5354 func (client *WANPPPConnection1) GetExternalIPAddress() (NewExternalIPAddress string, err error) {
5355 // Request structure.
5356 request := interface{}(nil)
5357 // BEGIN Marshal arguments into request.
5358
5359 // END Marshal arguments into request.
5360
5361 // Response structure.
5362 response := &struct {
5363 NewExternalIPAddress string
5364 }{}
5365
5366 // Perform the SOAP call.
5367 if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "GetExternalIPAddress", request, response); err != nil {
5368 return
5369 }
5370
5371 // BEGIN Unmarshal arguments from response.
5372
5373 if NewExternalIPAddress, err = soap.UnmarshalString(response.NewExternalIPAddress); err != nil {
5374 return
5375 }
5376 // END Unmarshal arguments from response.
5377 return
5378 }