-
Notifications
You must be signed in to change notification settings - Fork 1
/
internetgateway2.go
5378 lines (4295 loc) · 152 KB
/
internetgateway2.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Client for UPnP Device Control Protocol Internet Gateway Device v2.
//
// This DCP is documented in detail at: http://upnp.org/specs/gw/UPnP-gw-InternetGatewayDevice-v2-Device.pdf
//
// Typically, use one of the New* functions to create clients for services.
package internetgateway2
// Generated file - do not edit by hand. See README.md
import (
"net/url"
"time"
"github.com/huin/goupnp"
"github.com/huin/goupnp/soap"
)
// Hack to avoid Go complaining if time isn't used.
var _ time.Time
// Device URNs:
const (
URN_LANDevice_1 = "urn:schemas-upnp-org:device:LANDevice:1"
URN_WANConnectionDevice_1 = "urn:schemas-upnp-org:device:WANConnectionDevice:1"
URN_WANConnectionDevice_2 = "urn:schemas-upnp-org:device:WANConnectionDevice:2"
URN_WANDevice_1 = "urn:schemas-upnp-org:device:WANDevice:1"
URN_WANDevice_2 = "urn:schemas-upnp-org:device:WANDevice:2"
)
// Service URNs:
const (
URN_DeviceProtection_1 = "urn:schemas-upnp-org:service:DeviceProtection:1"
URN_LANHostConfigManagement_1 = "urn:schemas-upnp-org:service:LANHostConfigManagement:1"
URN_Layer3Forwarding_1 = "urn:schemas-upnp-org:service:Layer3Forwarding:1"
URN_WANCableLinkConfig_1 = "urn:schemas-upnp-org:service:WANCableLinkConfig:1"
URN_WANCommonInterfaceConfig_1 = "urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1"
URN_WANDSLLinkConfig_1 = "urn:schemas-upnp-org:service:WANDSLLinkConfig:1"
URN_WANEthernetLinkConfig_1 = "urn:schemas-upnp-org:service:WANEthernetLinkConfig:1"
URN_WANIPConnection_1 = "urn:schemas-upnp-org:service:WANIPConnection:1"
URN_WANIPConnection_2 = "urn:schemas-upnp-org:service:WANIPConnection:2"
URN_WANIPv6FirewallControl_1 = "urn:schemas-upnp-org:service:WANIPv6FirewallControl:1"
URN_WANPOTSLinkConfig_1 = "urn:schemas-upnp-org:service:WANPOTSLinkConfig:1"
URN_WANPPPConnection_1 = "urn:schemas-upnp-org:service:WANPPPConnection:1"
)
// DeviceProtection1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:DeviceProtection:1". See
// goupnp.ServiceClient, which contains RootDevice and Service attributes which
// are provided for informational value.
type DeviceProtection1 struct {
goupnp.ServiceClient
}
// NewDeviceProtection1Clients discovers instances of the service on the network,
// and returns clients to any that are found. errors will contain an error for
// any devices that replied but which could not be queried, and err will be set
// if the discovery process failed outright.
//
// This is a typical entry calling point into this package.
func NewDeviceProtection1Clients() (clients []*DeviceProtection1, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_DeviceProtection_1); err != nil {
return
}
clients = newDeviceProtection1ClientsFromGenericClients(genericClients)
return
}
// NewDeviceProtection1ClientsByURL discovers instances of the service at the given
// URL, and returns clients to any that are found. An error is returned if
// there was an error probing the service.
//
// This is a typical entry calling point into this package when reusing an
// previously discovered service URL.
func NewDeviceProtection1ClientsByURL(loc *url.URL) ([]*DeviceProtection1, error) {
genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_DeviceProtection_1)
if err != nil {
return nil, err
}
return newDeviceProtection1ClientsFromGenericClients(genericClients), nil
}
// NewDeviceProtection1ClientsFromRootDevice discovers instances of the service in
// a given root device, and returns clients to any that are found. An error is
// returned if there was not at least one instance of the service within the
// device. The location parameter is simply assigned to the Location attribute
// of the wrapped ServiceClient(s).
//
// This is a typical entry calling point into this package when reusing an
// previously discovered root device.
func NewDeviceProtection1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*DeviceProtection1, error) {
genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_DeviceProtection_1)
if err != nil {
return nil, err
}
return newDeviceProtection1ClientsFromGenericClients(genericClients), nil
}
func newDeviceProtection1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*DeviceProtection1 {
clients := make([]*DeviceProtection1, len(genericClients))
for i := range genericClients {
clients[i] = &DeviceProtection1{genericClients[i]}
}
return clients
}
func (client *DeviceProtection1) SendSetupMessage(ProtocolType string, InMessage []byte) (OutMessage []byte, err error) {
// Request structure.
request := &struct {
ProtocolType string
InMessage string
}{}
// BEGIN Marshal arguments into request.
if request.ProtocolType, err = soap.MarshalString(ProtocolType); err != nil {
return
}
if request.InMessage, err = soap.MarshalBinBase64(InMessage); err != nil {
return
}
// END Marshal arguments into request.
// Response structure.
response := &struct {
OutMessage string
}{}
// Perform the SOAP call.
if err = client.SOAPClient.PerformAction(URN_DeviceProtection_1, "SendSetupMessage", request, response); err != nil {
return
}
// BEGIN Unmarshal arguments from response.
if OutMessage, err = soap.UnmarshalBinBase64(response.OutMessage); err != nil {
return
}
// END Unmarshal arguments from response.
return
}
func (client *DeviceProtection1) GetSupportedProtocols() (ProtocolList string, err error) {
// Request structure.
request := interface{}(nil)
// BEGIN Marshal arguments into request.
// END Marshal arguments into request.
// Response structure.
response := &struct {
ProtocolList string
}{}
// Perform the SOAP call.
if err = client.SOAPClient.PerformAction(URN_DeviceProtection_1, "GetSupportedProtocols", request, response); err != nil {
return
}
// BEGIN Unmarshal arguments from response.
if ProtocolList, err = soap.UnmarshalString(response.ProtocolList); err != nil {
return
}
// END Unmarshal arguments from response.
return
}
func (client *DeviceProtection1) GetAssignedRoles() (RoleList string, err error) {
// Request structure.
request := interface{}(nil)
// BEGIN Marshal arguments into request.
// END Marshal arguments into request.
// Response structure.
response := &struct {
RoleList string
}{}
// Perform the SOAP call.
if err = client.SOAPClient.PerformAction(URN_DeviceProtection_1, "GetAssignedRoles", request, response); err != nil {
return
}
// BEGIN Unmarshal arguments from response.
if RoleList, err = soap.UnmarshalString(response.RoleList); err != nil {
return
}
// END Unmarshal arguments from response.
return
}
func (client *DeviceProtection1) GetRolesForAction(DeviceUDN string, ServiceId string, ActionName string) (RoleList string, RestrictedRoleList string, err error) {
// Request structure.
request := &struct {
DeviceUDN string
ServiceId string
ActionName string
}{}
// BEGIN Marshal arguments into request.
if request.DeviceUDN, err = soap.MarshalString(DeviceUDN); err != nil {
return
}
if request.ServiceId, err = soap.MarshalString(ServiceId); err != nil {
return
}
if request.ActionName, err = soap.MarshalString(ActionName); err != nil {
return
}
// END Marshal arguments into request.
// Response structure.
response := &struct {
RoleList string
RestrictedRoleList string
}{}
// Perform the SOAP call.
if err = client.SOAPClient.PerformAction(URN_DeviceProtection_1, "GetRolesForAction", request, response); err != nil {
return
}
// BEGIN Unmarshal arguments from response.
if RoleList, err = soap.UnmarshalString(response.RoleList); err != nil {
return
}
if RestrictedRoleList, err = soap.UnmarshalString(response.RestrictedRoleList); err != nil {
return
}
// END Unmarshal arguments from response.
return
}
func (client *DeviceProtection1) GetUserLoginChallenge(ProtocolType string, Name string) (Salt []byte, Challenge []byte, err error) {
// Request structure.
request := &struct {
ProtocolType string
Name string
}{}
// BEGIN Marshal arguments into request.
if request.ProtocolType, err = soap.MarshalString(ProtocolType); err != nil {
return
}
if request.Name, err = soap.MarshalString(Name); err != nil {
return
}
// END Marshal arguments into request.
// Response structure.
response := &struct {
Salt string
Challenge string
}{}
// Perform the SOAP call.
if err = client.SOAPClient.PerformAction(URN_DeviceProtection_1, "GetUserLoginChallenge", request, response); err != nil {
return
}
// BEGIN Unmarshal arguments from response.
if Salt, err = soap.UnmarshalBinBase64(response.Salt); err != nil {
return
}
if Challenge, err = soap.UnmarshalBinBase64(response.Challenge); err != nil {
return
}
// END Unmarshal arguments from response.
return
}
func (client *DeviceProtection1) UserLogin(ProtocolType string, Challenge []byte, Authenticator []byte) (err error) {
// Request structure.
request := &struct {
ProtocolType string
Challenge string
Authenticator string
}{}
// BEGIN Marshal arguments into request.
if request.ProtocolType, err = soap.MarshalString(ProtocolType); err != nil {
return
}
if request.Challenge, err = soap.MarshalBinBase64(Challenge); err != nil {
return
}
if request.Authenticator, err = soap.MarshalBinBase64(Authenticator); err != nil {
return
}
// END Marshal arguments into request.
// Response structure.
response := interface{}(nil)
// Perform the SOAP call.
if err = client.SOAPClient.PerformAction(URN_DeviceProtection_1, "UserLogin", request, response); err != nil {
return
}
// BEGIN Unmarshal arguments from response.
// END Unmarshal arguments from response.
return
}
func (client *DeviceProtection1) UserLogout() (err error) {
// Request structure.
request := interface{}(nil)
// BEGIN Marshal arguments into request.
// END Marshal arguments into request.
// Response structure.
response := interface{}(nil)
// Perform the SOAP call.
if err = client.SOAPClient.PerformAction(URN_DeviceProtection_1, "UserLogout", request, response); err != nil {
return
}
// BEGIN Unmarshal arguments from response.
// END Unmarshal arguments from response.
return
}
func (client *DeviceProtection1) GetACLData() (ACL string, err error) {
// Request structure.
request := interface{}(nil)
// BEGIN Marshal arguments into request.
// END Marshal arguments into request.
// Response structure.
response := &struct {
ACL string
}{}
// Perform the SOAP call.
if err = client.SOAPClient.PerformAction(URN_DeviceProtection_1, "GetACLData", request, response); err != nil {
return
}
// BEGIN Unmarshal arguments from response.
if ACL, err = soap.UnmarshalString(response.ACL); err != nil {
return
}
// END Unmarshal arguments from response.
return
}
func (client *DeviceProtection1) AddIdentityList(IdentityList string) (IdentityListResult string, err error) {
// Request structure.
request := &struct {
IdentityList string
}{}
// BEGIN Marshal arguments into request.
if request.IdentityList, err = soap.MarshalString(IdentityList); err != nil {
return
}
// END Marshal arguments into request.
// Response structure.
response := &struct {
IdentityListResult string
}{}
// Perform the SOAP call.
if err = client.SOAPClient.PerformAction(URN_DeviceProtection_1, "AddIdentityList", request, response); err != nil {
return
}
// BEGIN Unmarshal arguments from response.
if IdentityListResult, err = soap.UnmarshalString(response.IdentityListResult); err != nil {
return
}
// END Unmarshal arguments from response.
return
}
func (client *DeviceProtection1) RemoveIdentity(Identity string) (err error) {
// Request structure.
request := &struct {
Identity string
}{}
// BEGIN Marshal arguments into request.
if request.Identity, err = soap.MarshalString(Identity); err != nil {
return
}
// END Marshal arguments into request.
// Response structure.
response := interface{}(nil)
// Perform the SOAP call.
if err = client.SOAPClient.PerformAction(URN_DeviceProtection_1, "RemoveIdentity", request, response); err != nil {
return
}
// BEGIN Unmarshal arguments from response.
// END Unmarshal arguments from response.
return
}
func (client *DeviceProtection1) SetUserLoginPassword(ProtocolType string, Name string, Stored []byte, Salt []byte) (err error) {
// Request structure.
request := &struct {
ProtocolType string
Name string
Stored string
Salt string
}{}
// BEGIN Marshal arguments into request.
if request.ProtocolType, err = soap.MarshalString(ProtocolType); err != nil {
return
}
if request.Name, err = soap.MarshalString(Name); err != nil {
return
}
if request.Stored, err = soap.MarshalBinBase64(Stored); err != nil {
return
}
if request.Salt, err = soap.MarshalBinBase64(Salt); err != nil {
return
}
// END Marshal arguments into request.
// Response structure.
response := interface{}(nil)
// Perform the SOAP call.
if err = client.SOAPClient.PerformAction(URN_DeviceProtection_1, "SetUserLoginPassword", request, response); err != nil {
return
}
// BEGIN Unmarshal arguments from response.
// END Unmarshal arguments from response.
return
}
func (client *DeviceProtection1) AddRolesForIdentity(Identity string, RoleList string) (err error) {
// Request structure.
request := &struct {
Identity string
RoleList string
}{}
// BEGIN Marshal arguments into request.
if request.Identity, err = soap.MarshalString(Identity); err != nil {
return
}
if request.RoleList, err = soap.MarshalString(RoleList); err != nil {
return
}
// END Marshal arguments into request.
// Response structure.
response := interface{}(nil)
// Perform the SOAP call.
if err = client.SOAPClient.PerformAction(URN_DeviceProtection_1, "AddRolesForIdentity", request, response); err != nil {
return
}
// BEGIN Unmarshal arguments from response.
// END Unmarshal arguments from response.
return
}
func (client *DeviceProtection1) RemoveRolesForIdentity(Identity string, RoleList string) (err error) {
// Request structure.
request := &struct {
Identity string
RoleList string
}{}
// BEGIN Marshal arguments into request.
if request.Identity, err = soap.MarshalString(Identity); err != nil {
return
}
if request.RoleList, err = soap.MarshalString(RoleList); err != nil {
return
}
// END Marshal arguments into request.
// Response structure.
response := interface{}(nil)
// Perform the SOAP call.
if err = client.SOAPClient.PerformAction(URN_DeviceProtection_1, "RemoveRolesForIdentity", request, response); err != nil {
return
}
// BEGIN Unmarshal arguments from response.
// END Unmarshal arguments from response.
return
}
// LANHostConfigManagement1 is a client for UPnP SOAP service with URN "urn:schemas-upnp-org:service:LANHostConfigManagement:1". See
// goupnp.ServiceClient, which contains RootDevice and Service attributes which
// are provided for informational value.
type LANHostConfigManagement1 struct {
goupnp.ServiceClient
}
// NewLANHostConfigManagement1Clients discovers instances of the service on the network,
// and returns clients to any that are found. errors will contain an error for
// any devices that replied but which could not be queried, and err will be set
// if the discovery process failed outright.
//
// This is a typical entry calling point into this package.
func NewLANHostConfigManagement1Clients() (clients []*LANHostConfigManagement1, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_LANHostConfigManagement_1); err != nil {
return
}
clients = newLANHostConfigManagement1ClientsFromGenericClients(genericClients)
return
}
// NewLANHostConfigManagement1ClientsByURL discovers instances of the service at the given
// URL, and returns clients to any that are found. An error is returned if
// there was an error probing the service.
//
// This is a typical entry calling point into this package when reusing an
// previously discovered service URL.
func NewLANHostConfigManagement1ClientsByURL(loc *url.URL) ([]*LANHostConfigManagement1, error) {
genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_LANHostConfigManagement_1)
if err != nil {
return nil, err
}
return newLANHostConfigManagement1ClientsFromGenericClients(genericClients), nil
}
// NewLANHostConfigManagement1ClientsFromRootDevice discovers instances of the service in
// a given root device, and returns clients to any that are found. An error is
// returned if there was not at least one instance of the service within the
// device. The location parameter is simply assigned to the Location attribute
// of the wrapped ServiceClient(s).
//
// This is a typical entry calling point into this package when reusing an
// previously discovered root device.
func NewLANHostConfigManagement1ClientsFromRootDevice(rootDevice *goupnp.RootDevice, loc *url.URL) ([]*LANHostConfigManagement1, error) {
genericClients, err := goupnp.NewServiceClientsFromRootDevice(rootDevice, loc, URN_LANHostConfigManagement_1)
if err != nil {
return nil, err
}
return newLANHostConfigManagement1ClientsFromGenericClients(genericClients), nil
}
func newLANHostConfigManagement1ClientsFromGenericClients(genericClients []goupnp.ServiceClient) []*LANHostConfigManagement1 {
clients := make([]*LANHostConfigManagement1, len(genericClients))
for i := range genericClients {
clients[i] = &LANHostConfigManagement1{genericClients[i]}
}
return clients
}
func (client *LANHostConfigManagement1) SetDHCPServerConfigurable(NewDHCPServerConfigurable bool) (err error) {
// Request structure.
request := &struct {
NewDHCPServerConfigurable string
}{}
// BEGIN Marshal arguments into request.
if request.NewDHCPServerConfigurable, err = soap.MarshalBoolean(NewDHCPServerConfigurable); err != nil {
return
}
// END Marshal arguments into request.
// Response structure.
response := interface{}(nil)
// Perform the SOAP call.
if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "SetDHCPServerConfigurable", request, response); err != nil {
return
}
// BEGIN Unmarshal arguments from response.
// END Unmarshal arguments from response.
return
}
func (client *LANHostConfigManagement1) GetDHCPServerConfigurable() (NewDHCPServerConfigurable bool, err error) {
// Request structure.
request := interface{}(nil)
// BEGIN Marshal arguments into request.
// END Marshal arguments into request.
// Response structure.
response := &struct {
NewDHCPServerConfigurable string
}{}
// Perform the SOAP call.
if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "GetDHCPServerConfigurable", request, response); err != nil {
return
}
// BEGIN Unmarshal arguments from response.
if NewDHCPServerConfigurable, err = soap.UnmarshalBoolean(response.NewDHCPServerConfigurable); err != nil {
return
}
// END Unmarshal arguments from response.
return
}
func (client *LANHostConfigManagement1) SetDHCPRelay(NewDHCPRelay bool) (err error) {
// Request structure.
request := &struct {
NewDHCPRelay string
}{}
// BEGIN Marshal arguments into request.
if request.NewDHCPRelay, err = soap.MarshalBoolean(NewDHCPRelay); err != nil {
return
}
// END Marshal arguments into request.
// Response structure.
response := interface{}(nil)
// Perform the SOAP call.
if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "SetDHCPRelay", request, response); err != nil {
return
}
// BEGIN Unmarshal arguments from response.
// END Unmarshal arguments from response.
return
}
func (client *LANHostConfigManagement1) GetDHCPRelay() (NewDHCPRelay bool, err error) {
// Request structure.
request := interface{}(nil)
// BEGIN Marshal arguments into request.
// END Marshal arguments into request.
// Response structure.
response := &struct {
NewDHCPRelay string
}{}
// Perform the SOAP call.
if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "GetDHCPRelay", request, response); err != nil {
return
}
// BEGIN Unmarshal arguments from response.
if NewDHCPRelay, err = soap.UnmarshalBoolean(response.NewDHCPRelay); err != nil {
return
}
// END Unmarshal arguments from response.
return
}
func (client *LANHostConfigManagement1) SetSubnetMask(NewSubnetMask string) (err error) {
// Request structure.
request := &struct {
NewSubnetMask string
}{}
// BEGIN Marshal arguments into request.
if request.NewSubnetMask, err = soap.MarshalString(NewSubnetMask); err != nil {
return
}
// END Marshal arguments into request.
// Response structure.
response := interface{}(nil)
// Perform the SOAP call.
if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "SetSubnetMask", request, response); err != nil {
return
}
// BEGIN Unmarshal arguments from response.
// END Unmarshal arguments from response.
return
}
func (client *LANHostConfigManagement1) GetSubnetMask() (NewSubnetMask string, err error) {
// Request structure.
request := interface{}(nil)
// BEGIN Marshal arguments into request.
// END Marshal arguments into request.
// Response structure.
response := &struct {
NewSubnetMask string
}{}
// Perform the SOAP call.
if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "GetSubnetMask", request, response); err != nil {
return
}
// BEGIN Unmarshal arguments from response.
if NewSubnetMask, err = soap.UnmarshalString(response.NewSubnetMask); err != nil {
return
}
// END Unmarshal arguments from response.
return
}
func (client *LANHostConfigManagement1) SetIPRouter(NewIPRouters string) (err error) {
// Request structure.
request := &struct {
NewIPRouters string
}{}
// BEGIN Marshal arguments into request.
if request.NewIPRouters, err = soap.MarshalString(NewIPRouters); err != nil {
return
}
// END Marshal arguments into request.
// Response structure.
response := interface{}(nil)
// Perform the SOAP call.
if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "SetIPRouter", request, response); err != nil {
return
}
// BEGIN Unmarshal arguments from response.
// END Unmarshal arguments from response.
return
}
func (client *LANHostConfigManagement1) DeleteIPRouter(NewIPRouters string) (err error) {
// Request structure.
request := &struct {
NewIPRouters string
}{}
// BEGIN Marshal arguments into request.
if request.NewIPRouters, err = soap.MarshalString(NewIPRouters); err != nil {
return
}
// END Marshal arguments into request.
// Response structure.
response := interface{}(nil)
// Perform the SOAP call.
if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "DeleteIPRouter", request, response); err != nil {
return
}
// BEGIN Unmarshal arguments from response.
// END Unmarshal arguments from response.
return
}
func (client *LANHostConfigManagement1) GetIPRoutersList() (NewIPRouters string, err error) {
// Request structure.
request := interface{}(nil)
// BEGIN Marshal arguments into request.
// END Marshal arguments into request.
// Response structure.
response := &struct {
NewIPRouters string
}{}
// Perform the SOAP call.
if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "GetIPRoutersList", request, response); err != nil {
return
}
// BEGIN Unmarshal arguments from response.
if NewIPRouters, err = soap.UnmarshalString(response.NewIPRouters); err != nil {
return
}
// END Unmarshal arguments from response.
return
}
func (client *LANHostConfigManagement1) SetDomainName(NewDomainName string) (err error) {
// Request structure.
request := &struct {
NewDomainName string
}{}
// BEGIN Marshal arguments into request.
if request.NewDomainName, err = soap.MarshalString(NewDomainName); err != nil {
return
}
// END Marshal arguments into request.
// Response structure.
response := interface{}(nil)
// Perform the SOAP call.
if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "SetDomainName", request, response); err != nil {
return
}
// BEGIN Unmarshal arguments from response.
// END Unmarshal arguments from response.
return
}
func (client *LANHostConfigManagement1) GetDomainName() (NewDomainName string, err error) {
// Request structure.
request := interface{}(nil)
// BEGIN Marshal arguments into request.
// END Marshal arguments into request.
// Response structure.
response := &struct {
NewDomainName string
}{}
// Perform the SOAP call.
if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "GetDomainName", request, response); err != nil {
return
}
// BEGIN Unmarshal arguments from response.
if NewDomainName, err = soap.UnmarshalString(response.NewDomainName); err != nil {
return
}
// END Unmarshal arguments from response.
return
}
func (client *LANHostConfigManagement1) SetAddressRange(NewMinAddress string, NewMaxAddress string) (err error) {
// Request structure.
request := &struct {
NewMinAddress string
NewMaxAddress string
}{}
// BEGIN Marshal arguments into request.
if request.NewMinAddress, err = soap.MarshalString(NewMinAddress); err != nil {
return
}
if request.NewMaxAddress, err = soap.MarshalString(NewMaxAddress); err != nil {
return
}
// END Marshal arguments into request.
// Response structure.
response := interface{}(nil)
// Perform the SOAP call.
if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "SetAddressRange", request, response); err != nil {
return
}
// BEGIN Unmarshal arguments from response.
// END Unmarshal arguments from response.
return
}
func (client *LANHostConfigManagement1) GetAddressRange() (NewMinAddress string, NewMaxAddress string, err error) {
// Request structure.
request := interface{}(nil)
// BEGIN Marshal arguments into request.
// END Marshal arguments into request.
// Response structure.
response := &struct {
NewMinAddress string
NewMaxAddress string
}{}
// Perform the SOAP call.
if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "GetAddressRange", request, response); err != nil {
return
}
// BEGIN Unmarshal arguments from response.
if NewMinAddress, err = soap.UnmarshalString(response.NewMinAddress); err != nil {
return
}
if NewMaxAddress, err = soap.UnmarshalString(response.NewMaxAddress); err != nil {
return
}
// END Unmarshal arguments from response.
return
}
func (client *LANHostConfigManagement1) SetReservedAddress(NewReservedAddresses string) (err error) {
// Request structure.
request := &struct {
NewReservedAddresses string
}{}
// BEGIN Marshal arguments into request.
if request.NewReservedAddresses, err = soap.MarshalString(NewReservedAddresses); err != nil {
return
}
// END Marshal arguments into request.
// Response structure.
response := interface{}(nil)
// Perform the SOAP call.
if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "SetReservedAddress", request, response); err != nil {
return
}
// BEGIN Unmarshal arguments from response.
// END Unmarshal arguments from response.
return
}
func (client *LANHostConfigManagement1) DeleteReservedAddress(NewReservedAddresses string) (err error) {
// Request structure.
request := &struct {
NewReservedAddresses string
}{}
// BEGIN Marshal arguments into request.
if request.NewReservedAddresses, err = soap.MarshalString(NewReservedAddresses); err != nil {
return
}
// END Marshal arguments into request.
// Response structure.
response := interface{}(nil)
// Perform the SOAP call.
if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "DeleteReservedAddress", request, response); err != nil {
return
}
// BEGIN Unmarshal arguments from response.
// END Unmarshal arguments from response.
return
}
func (client *LANHostConfigManagement1) GetReservedAddresses() (NewReservedAddresses string, err error) {
// Request structure.
request := interface{}(nil)
// BEGIN Marshal arguments into request.
// END Marshal arguments into request.
// Response structure.
response := &struct {
NewReservedAddresses string
}{}
// Perform the SOAP call.
if err = client.SOAPClient.PerformAction(URN_LANHostConfigManagement_1, "GetReservedAddresses", request, response); err != nil {
return
}