-
Notifications
You must be signed in to change notification settings - Fork 1
/
server.go
1400 lines (1335 loc) · 88.5 KB
/
server.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
package srvsvc
import (
"context"
"fmt"
"strings"
"unicode/utf16"
dcerpc "github.com/oiweiwei/go-msrpc/dcerpc"
errors "github.com/oiweiwei/go-msrpc/dcerpc/errors"
uuid "github.com/oiweiwei/go-msrpc/midl/uuid"
ndr "github.com/oiweiwei/go-msrpc/ndr"
)
var (
_ = context.Background
_ = fmt.Errorf
_ = utf16.Encode
_ = strings.TrimPrefix
_ = ndr.ZeroString
_ = (*uuid.UUID)(nil)
_ = (*dcerpc.SyntaxID)(nil)
_ = (*errors.Error)(nil)
)
// srvsvc server interface.
type SrvsvcServer interface {
// Opnum0NotUsedOnWire operation.
// Opnum0NotUsedOnWire
// Opnum1NotUsedOnWire operation.
// Opnum1NotUsedOnWire
// Opnum2NotUsedOnWire operation.
// Opnum2NotUsedOnWire
// Opnum3NotUsedOnWire operation.
// Opnum3NotUsedOnWire
// Opnum4NotUsedOnWire operation.
// Opnum4NotUsedOnWire
// Opnum5NotUsedOnWire operation.
// Opnum5NotUsedOnWire
// Opnum6NotUsedOnWire operation.
// Opnum6NotUsedOnWire
// Opnum7NotUsedOnWire operation.
// Opnum7NotUsedOnWire
// The NetrConnectionEnum method lists all the treeconnects made to a shared resource
// on the server or all treeconnects established from a particular computer.
//
// Return Values: The method returns 0x00000000 (NERR_Success) to indicate success;
// otherwise, it returns a nonzero error code. The method can take any specific error
// code value, as specified in [MS-ERREF] section 2.2.
ConnectionEnum(context.Context, *ConnectionEnumRequest) (*ConnectionEnumResponse, error)
// The NetrFileEnum method MUST return information about some or all open files on a
// server, depending on the parameters specified, or return an error code.
//
// Return Values: The method returns 0x00000000 (NERR_Success) to indicate success;
// otherwise, it returns a nonzero error code. The method can take any specific error
// code value, as specified in [MS-ERREF] section 2.2. The most common error codes are
// listed in the following table.
//
// +------------------------------------+----------------------------------------------------------------------------------+
// | RETURN | |
// | VALUE/CODE | DESCRIPTION |
// | | |
// +------------------------------------+----------------------------------------------------------------------------------+
// +------------------------------------+----------------------------------------------------------------------------------+
// | 0x00000000 NERR_Success | The client request succeeded. |
// +------------------------------------+----------------------------------------------------------------------------------+
// | 0x00000005 ERROR_ACCESS_DENIED | Access is denied. |
// +------------------------------------+----------------------------------------------------------------------------------+
// | 0x0000007C ERROR_INVALID_LEVEL | The system call level is not correct. |
// +------------------------------------+----------------------------------------------------------------------------------+
// | 0x000000EA ERROR_MORE_DATA | The client request succeeded. More entries are available. Not all entries could |
// | | be returned in the buffer size that is specified by PreferedMaximumLength. |
// +------------------------------------+----------------------------------------------------------------------------------+
// | 0x00000008 ERROR_NOT_ENOUGH_MEMORY | Not enough storage is available to process this command. |
// +------------------------------------+----------------------------------------------------------------------------------+
// | 0x0000084B NERR_BufTooSmall | The client request succeeded. More entries are available. The buffer size that |
// | | is specified by PreferedMaximumLength was too small to fit even a single entry. |
// +------------------------------------+----------------------------------------------------------------------------------+
FileEnum(context.Context, *FileEnumRequest) (*FileEnumResponse, error)
// The NetrFileGetInfo method MUST retrieve information about a particular open server
// resource or return an error code.
//
// Return Values: The method returns 0x00000000 (NERR_Success) to indicate success;
// otherwise, it returns a nonzero error code. The method can take any specific error
// code value, as specified in [MS-ERREF] section 2.2. The most common error codes are
// listed in the following table.
//
// +------------------------------------+----------------------------------------------------------+
// | RETURN | |
// | VALUE/CODE | DESCRIPTION |
// | | |
// +------------------------------------+----------------------------------------------------------+
// +------------------------------------+----------------------------------------------------------+
// | 0x00000000 NERR_Success | The client request succeeded. |
// +------------------------------------+----------------------------------------------------------+
// | 0x00000005 ERROR_ACCESS_DENIED | Access is denied. |
// +------------------------------------+----------------------------------------------------------+
// | 0x00000002 ERROR_FILE_NOT_FOUND | The system cannot find the file specified. |
// +------------------------------------+----------------------------------------------------------+
// | 0x0000007C ERROR_INVALID_LEVEL | The system call level is not correct. |
// +------------------------------------+----------------------------------------------------------+
// | 0x00000008 ERROR_NOT_ENOUGH_MEMORY | Not enough storage is available to process this command. |
// +------------------------------------+----------------------------------------------------------+
// | 0x0000084B NERR_BufTooSmall | The supplied buffer is too small. |
// +------------------------------------+----------------------------------------------------------+
FileGetInfo(context.Context, *FileGetInfoRequest) (*FileGetInfoResponse, error)
// The server receives the NetrFileClose method in an RPC_REQUEST packet. In response,
// the server MUST force an open resource instance (for example, file, device, or named
// pipe) on the server to close. This message can be used when an error prevents closure
// by any other means.
//
// Return Values: The method returns 0x00000000 (NERR_Success) to indicate success;
// otherwise, it returns a nonzero error code. The method can take any specific error
// code value, as specified in [MS-ERREF] section 2.2. The most common error codes are
// listed in the following table.
//
// +--------------------------------+-----------------------------------------------------------------+
// | RETURN | |
// | VALUE/CODE | DESCRIPTION |
// | | |
// +--------------------------------+-----------------------------------------------------------------+
// +--------------------------------+-----------------------------------------------------------------+
// | 0x00000000 NERR_Success | The client request succeeded. |
// +--------------------------------+-----------------------------------------------------------------+
// | 0x00000005 ERROR_ACCESS_DENIED | Access is denied. |
// +--------------------------------+-----------------------------------------------------------------+
// | 0x0000090A NERR_FileIdNotFound | There is no open file with the specified identification number. |
// +--------------------------------+-----------------------------------------------------------------+
//
// This message can be used when an error prevents closure by any other means.
//
// The FileId parameter specifies the file identifier of the Open in FileList to close.
// The value of the FileId parameter MUST correspond to a FileId that is returned in
// a previous NetrFileEnum message response by the server. The server MUST look up Open
// in the FileList where FileId matches Open.GlobalFileId. If no match is found, the
// server MUST return NERR_FileIdNotFound. If a match is found, the server MUST close
// the Open by invoking an underlying server event as specified in [MS-CIFS] section
// 3.3.4.13 or [MS-SMB2] section 3.3.4.17, providing FileId as the input parameter.
//
// If either CIFS or SMB2 servers return STATUS_SUCCESS, the server MUST return NERR_Success.
// Otherwise, the server MUST fail the call with a NERR_FileIdNotFound error code.
//
// The server SHOULD<49> enforce security measures to verify that the caller has the
// required permissions to execute this routine. If the caller does not have the required
// credentials, the server SHOULD<50> fail the call.
FileClose(context.Context, *FileCloseRequest) (*FileCloseResponse, error)
// The NetrSessionEnum method MUST return information about sessions that are established
// on a server or return an error code.
//
// Return Values: The method returns 0x00000000 (NERR_Success) to indicate success;
// otherwise, it returns a nonzero error code. The method can take any specific error
// code value, as specified in [MS-ERREF] section 2.2. The most common error codes are
// listed in the following table.
//
// +------------------------------------+----------------------------------------------------------------------------------+
// | RETURN | |
// | VALUE/CODE | DESCRIPTION |
// | | |
// +------------------------------------+----------------------------------------------------------------------------------+
// +------------------------------------+----------------------------------------------------------------------------------+
// | 0x00000000 NERR_Success | The client request succeeded. |
// +------------------------------------+----------------------------------------------------------------------------------+
// | 0x00000005 ERROR_ACCESS_DENIED | Access is denied. |
// +------------------------------------+----------------------------------------------------------------------------------+
// | 0x0000007C ERROR_INVALID_LEVEL | The system call level is not correct. |
// +------------------------------------+----------------------------------------------------------------------------------+
// | 0x00000057 ERROR_INVALID_PARAMETER | The parameter is incorrect. |
// +------------------------------------+----------------------------------------------------------------------------------+
// | 0x000000EA ERROR_MORE_DATA | The client request succeeded. More entries are available. Not all entries could |
// | | be returned in the buffer size that is specified by PreferedMaximumLength. |
// +------------------------------------+----------------------------------------------------------------------------------+
// | 0x00000008 ERROR_NOT_ENOUGH_MEMORY | Not enough storage is available to process this command. |
// +------------------------------------+----------------------------------------------------------------------------------+
// | 0x00000908 NERR_ClientNameNotFound | A session does not exist with the computer name. |
// +------------------------------------+----------------------------------------------------------------------------------+
// | 0x0000092F NERR_InvalidComputer | The computer name is not valid. |
// +------------------------------------+----------------------------------------------------------------------------------+
// | 0x000008AD NERR_UserNotFound | The user name could not be found. |
// +------------------------------------+----------------------------------------------------------------------------------+
SessionEnum(context.Context, *SessionEnumRequest) (*SessionEnumResponse, error)
// The NetrSessionDel method MUST end one or more network sessions between a server
// and a client.
//
// Return Values: This method returns 0x00000000 (NERR_Success) to indicate success;
// otherwise, it returns a nonzero error code. This method can take any specific error
// code value, as specified in [MS-ERREF] section 2.2. The most common error codes are
// listed in the following table.
//
// +------------------------------------+----------------------------------------------------------+
// | RETURN | |
// | VALUE/CODE | DESCRIPTION |
// | | |
// +------------------------------------+----------------------------------------------------------+
// +------------------------------------+----------------------------------------------------------+
// | 0x00000000 NERR_Success | The client request succeeded. |
// +------------------------------------+----------------------------------------------------------+
// | 0x00000005 ERROR_ACCESS_DENIED | Access is denied. |
// +------------------------------------+----------------------------------------------------------+
// | 0x00000057 ERROR_INVALID_PARAMETER | The parameter is incorrect. |
// +------------------------------------+----------------------------------------------------------+
// | 0x00000008 ERROR_NOT_ENOUGH_MEMORY | Not enough storage is available to process this command. |
// +------------------------------------+----------------------------------------------------------+
// | 0x00000908 NERR_ClientNameNotFound | A session does not exist with the computer name. |
// +------------------------------------+----------------------------------------------------------+
SessionDelete(context.Context, *SessionDeleteRequest) (*SessionDeleteResponse, error)
// The NetrShareAdd method shares a server resource.
//
// Return Values: The method returns 0x00000000 (NERR_Success) to indicate success;
// otherwise, it returns a nonzero error code. The method can take any specific error
// code value, as specified in [MS-ERREF] section 2.2. The most common error codes are
// listed in the following table.
//
// +------------------------------------+----------------------------------------------------------------------------------+
// | RETURN | |
// | VALUE/CODE | DESCRIPTION |
// | | |
// +------------------------------------+----------------------------------------------------------------------------------+
// +------------------------------------+----------------------------------------------------------------------------------+
// | 0x00000000 NERR_Success | The client request succeeded. |
// +------------------------------------+----------------------------------------------------------------------------------+
// | 0x00000005 ERROR_ACCESS_DENIED | Access is denied. |
// +------------------------------------+----------------------------------------------------------------------------------+
// | 0x0000007C ERROR_INVALID_LEVEL | The system call level is not correct. |
// +------------------------------------+----------------------------------------------------------------------------------+
// | 0x0000007B ERROR_INVALID_NAME | The file name, directory name, or volume label syntax is incorrect. |
// +------------------------------------+----------------------------------------------------------------------------------+
// | 0x00000057 ERROR_INVALID_PARAMETER | The client request failed because the specified parameter is invalid. For |
// | | details, see the description that follows for the ParmErr parameter. |
// +------------------------------------+----------------------------------------------------------------------------------+
// | 0x00000008 ERROR_NOT_ENOUGH_MEMORY | Not enough storage is available to process this command. |
// +------------------------------------+----------------------------------------------------------------------------------+
// | 0x00000846 NERR_DuplicateShare | The share name is already in use on this server. |
// +------------------------------------+----------------------------------------------------------------------------------+
// | 0x00000844 NERR_UnknownDevDir | The device or directory does not exist. |
// +------------------------------------+----------------------------------------------------------------------------------+
ShareAdd(context.Context, *ShareAddRequest) (*ShareAddResponse, error)
// The NetrShareEnum method retrieves information about each shared resource on a server.
//
// Return Values: The method returns 0x00000000 (NERR_Success) to indicate success;
// otherwise, it returns a nonzero error code. The method can take any specific error
// code value, as specified in [MS-ERREF] section 2.2. The most common error codes are
// listed in the following table.
//
// +--------------------------------+----------------------------------------------------------------------------------+
// | RETURN | |
// | VALUE/CODE | DESCRIPTION |
// | | |
// +--------------------------------+----------------------------------------------------------------------------------+
// +--------------------------------+----------------------------------------------------------------------------------+
// | 0x00000000 NERR_Success | The client request succeeded. |
// +--------------------------------+----------------------------------------------------------------------------------+
// | 0x000000EA ERROR_MORE_DATA | The client request succeeded. More entries are available. Not all entries could |
// | | be returned in the buffer size that is specified by PreferedMaximumLength. |
// +--------------------------------+----------------------------------------------------------------------------------+
// | 0x0000007C ERROR_INVALID_LEVEL | The system call level is not correct. |
// +--------------------------------+----------------------------------------------------------------------------------+
//
// If ServerName does not match any Transport.ServerName in TransportList with the SVTI2_SCOPED_NAME
// bit set in Transport.Flags, the server MUST reset ServerName as "*".
ShareEnum(context.Context, *ShareEnumRequest) (*ShareEnumResponse, error)
// The NetrShareGetInfo method retrieves information about a particular shared resource
// on the server from the ShareList.
//
// Return Values: The method returns 0x00000000 (NERR_Success) to indicate success;
// otherwise, it returns a nonzero error code. The method can take any specific error
// code value, as specified in [MS-ERREF] section 2.2. The most common error codes are
// listed in the following table.
//
// +------------------------------------+-----------------------------------------------------------------------+
// | RETURN | |
// | VALUE/CODE | DESCRIPTION |
// | | |
// +------------------------------------+-----------------------------------------------------------------------+
// +------------------------------------+-----------------------------------------------------------------------+
// | 0x00000000 NERR_Success | The client request succeeded. |
// +------------------------------------+-----------------------------------------------------------------------+
// | 0x00000005 ERROR_ACCESS_DENIED | Access is denied. |
// +------------------------------------+-----------------------------------------------------------------------+
// | 0x0000007C ERROR_INVALID_LEVEL | The system call level is not correct. |
// +------------------------------------+-----------------------------------------------------------------------+
// | 0x00000057 ERROR_INVALID_PARAMETER | The client request failed because the specified parameter is invalid. |
// +------------------------------------+-----------------------------------------------------------------------+
// | 0x00000008 ERROR_NOT_ENOUGH_MEMORY | Not enough storage is available to process this command. |
// +------------------------------------+-----------------------------------------------------------------------+
// | 0x0000084B NERR_BufTooSmall | The supplied buffer is too small. |
// +------------------------------------+-----------------------------------------------------------------------+
// | 0x00000906 NERR_NetNameNotFound | The share name does not exist. |
// +------------------------------------+-----------------------------------------------------------------------+
//
// If ServerName does not match any Transport.ServerName in TransportList with the SVTI2_SCOPED_NAME
// bit set in Transport.Flags, the server MUST reset ServerName as "*".
ShareGetInfo(context.Context, *ShareGetInfoRequest) (*ShareGetInfoResponse, error)
// The NetrShareSetInfo method sets the parameters of a shared resource in a ShareList.
//
// Return Values: The method returns 0x00000000 (NERR_Success) to indicate success;
// otherwise, it returns a nonzero error code. The method can take any specific error
// code value, as specified in [MS-ERREF] section 2.2. The most common error codes are
// listed in the following table.
//
// +-----------------------------------------+----------------------------------------------------------------------------------+
// | RETURN | |
// | VALUE/CODE | DESCRIPTION |
// | | |
// +-----------------------------------------+----------------------------------------------------------------------------------+
// +-----------------------------------------+----------------------------------------------------------------------------------+
// | 0x00000000 NERR_Success | The client request succeeded. |
// +-----------------------------------------+----------------------------------------------------------------------------------+
// | 0x00000005 ERROR_ACCESS_DENIED | Access is denied. |
// +-----------------------------------------+----------------------------------------------------------------------------------+
// | 0x00000057 ERROR_INVALID_PARAMETER | The client request failed because the specified parameter is invalid. For |
// | | details, see the description that follows for the ParmErr parameter. |
// +-----------------------------------------+----------------------------------------------------------------------------------+
// | 0x00000008 ERROR_NOT_ENOUGH_MEMORY | Not enough storage is available to process this command. |
// +-----------------------------------------+----------------------------------------------------------------------------------+
// | 0x00000906 NERR_NetNameNotFound | The share name does not exist. |
// +-----------------------------------------+----------------------------------------------------------------------------------+
// | 0x00000032 ERROR_NOT_SUPPORTED | The server does not support branch cache. <62> |
// +-----------------------------------------+----------------------------------------------------------------------------------+
// | 0x00000424 ERROR_SERVICE_DOES_NOT_EXIST | The branch cache component does not exist as an installed service. <63> |
// +-----------------------------------------+----------------------------------------------------------------------------------+
// | 0x0000007C ERROR_INVALID_LEVEL | The system call level is not correct. |
// +-----------------------------------------+----------------------------------------------------------------------------------+
ShareSetInfo(context.Context, *ShareSetInfoRequest) (*ShareSetInfoResponse, error)
// The NetrShareDel method deletes a share name from the ShareList, which disconnects
// all connections to the shared resource. If the share is sticky, all information about
// the share is also deleted from permanent storage.<67>
//
// Return Values: The method returns 0x00000000 (NERR_Success) to indicate success;
// otherwise, it returns a nonzero error code. The method can take any specific error
// code value, as specified in [MS-ERREF] section 2.2. The most common error codes are
// listed in the following table.
//
// +------------------------------------+-----------------------------------------------------------------------+
// | RETURN | |
// | VALUE/CODE | DESCRIPTION |
// | | |
// +------------------------------------+-----------------------------------------------------------------------+
// +------------------------------------+-----------------------------------------------------------------------+
// | 0x00000000 NERR_Success | The client request succeeded. |
// +------------------------------------+-----------------------------------------------------------------------+
// | 0x00000005 ERROR_ACCESS_DENIED | Access is denied. |
// +------------------------------------+-----------------------------------------------------------------------+
// | 0x00000057 ERROR_INVALID_PARAMETER | The client request failed because the specified parameter is invalid. |
// +------------------------------------+-----------------------------------------------------------------------+
// | 0x00000008 ERROR_NOT_ENOUGH_MEMORY | Not enough storage is available to process this command. |
// +------------------------------------+-----------------------------------------------------------------------+
// | 0x00000906 NERR_NetNameNotFound | The share name does not exist. |
// +------------------------------------+-----------------------------------------------------------------------+
//
// If ServerName does not match any Transport.ServerName in TransportList with the SVTI2_SCOPED_NAME
// bit set in Transport.Flags, the server MUST reset ServerName as "*".
ShareDelete(context.Context, *ShareDeleteRequest) (*ShareDeleteResponse, error)
// The NetrShareDelSticky method marks the share as nonpersistent by clearing the IsPersistent
// member of a Share in the ShareList.
//
// Return Values: The method returns 0x00000000 (NERR_Success) to indicate success;
// otherwise, it returns a nonzero error code. The method can take any specific error
// code value, as specified in [MS-ERREF] section 2.2.
//
// The primary use of this method is to delete a sticky share whose root directory has
// been deleted (thus preventing actual re-creation of the share) but whose entry still
// exists in permanent storage.<72> This method can also be used to remove the persistence
// of a share without deleting the current incarnation of the share.
//
// If ServerName does not match any Transport.ServerName in TransportList with the SVTI2_SCOPED_NAME
// bit set in Transport.Flags, the server MUST reset ServerName as "*".
ShareDeleteSticky(context.Context, *ShareDeleteStickyRequest) (*ShareDeleteStickyResponse, error)
// The NetrShareCheck method checks whether a server is sharing a device.
//
// Return Values: The method returns 0x00000000 (NERR_Success) to indicate success;
// otherwise, it returns a nonzero error code. The method can take any specific error
// code value, as specified in [MS-ERREF] section 2.2. The most common error codes are
// listed in the following table.
//
// +------------------------------------+----------------------------------------------------------+
// | RETURN | |
// | VALUE/CODE | DESCRIPTION |
// | | |
// +------------------------------------+----------------------------------------------------------+
// +------------------------------------+----------------------------------------------------------+
// | 0x00000000 NERR_Success | The client request succeeded. |
// +------------------------------------+----------------------------------------------------------+
// | 0x00000008 ERROR_NOT_ENOUGH_MEMORY | Not enough storage is available to process this command. |
// +------------------------------------+----------------------------------------------------------+
// | 0x00000907 NERR_DeviceNotShared | The device is not shared. |
// +------------------------------------+----------------------------------------------------------+
ShareCheck(context.Context, *ShareCheckRequest) (*ShareCheckResponse, error)
// The NetrServerGetInfo method retrieves current configuration information for CIFS
// and SMB Version 1.0 servers.
//
// Return Values: The method returns 0x00000000 (NERR_Success) to indicate success;
// otherwise, it returns a nonzero error code. The method can take any specific error
// code value, as specified in [MS-ERREF] section 2.2. The most common error codes are
// listed in the following table.
//
// +------------------------------------+-----------------------------------------------------------------------+
// | RETURN | |
// | VALUE/CODE | DESCRIPTION |
// | | |
// +------------------------------------+-----------------------------------------------------------------------+
// +------------------------------------+-----------------------------------------------------------------------+
// | 0x00000000 NERR_Success | The client request succeeded. |
// +------------------------------------+-----------------------------------------------------------------------+
// | 0x00000005 ERROR_ACCESS_DENIED | Access is denied. |
// +------------------------------------+-----------------------------------------------------------------------+
// | 0x0000007C ERROR_INVALID_LEVEL | The system call level is not correct. |
// +------------------------------------+-----------------------------------------------------------------------+
// | 0x00000057 ERROR_INVALID_PARAMETER | The client request failed because the specified parameter is invalid. |
// +------------------------------------+-----------------------------------------------------------------------+
// | 0x00000008 ERROR_NOT_ENOUGH_MEMORY | Not enough storage is available to process this command. |
// +------------------------------------+-----------------------------------------------------------------------+
GetInfo(context.Context, *GetInfoRequest) (*GetInfoResponse, error)
// The NetrServerSetInfo method sets server operating parameters for CIFS and SMB Version
// 1.0 file servers; it can set them individually or collectively. The information is
// stored in a way that allows it to remain in effect after the system is reinitialized.<81>
//
// Return Values: The method returns 0x00000000 (NERR_Success) to indicate success;
// otherwise, it returns a nonzero error code. The method can take any specific error
// code value, as specified in [MS-ERREF] section 2.2. The most common error codes are
// listed in the following table.
//
// +------------------------------------+----------------------------------------------------------------------------------+
// | RETURN | |
// | VALUE/CODE | DESCRIPTION |
// | | |
// +------------------------------------+----------------------------------------------------------------------------------+
// +------------------------------------+----------------------------------------------------------------------------------+
// | 0x00000000 NERR_Success | The client request succeeded. |
// +------------------------------------+----------------------------------------------------------------------------------+
// | 0x00000005 ERROR_ACCESS_DENIED | Access is denied. |
// +------------------------------------+----------------------------------------------------------------------------------+
// | 0x0000007C ERROR_INVALID_LEVEL | The system call level is not correct. |
// +------------------------------------+----------------------------------------------------------------------------------+
// | 0x00000057 ERROR_INVALID_PARAMETER | The client request failed because the specified parameter is invalid. For |
// | | details see the description that follows for the ParmErr parameter. |
// +------------------------------------+----------------------------------------------------------------------------------+
// | 0x00000008 ERROR_NOT_ENOUGH_MEMORY | Not enough storage is available to process this command. |
// +------------------------------------+----------------------------------------------------------------------------------+
SetInfo(context.Context, *SetInfoRequest) (*SetInfoResponse, error)
// The NetrServerDiskEnum method retrieves a list of disk drives on a server. The method
// returns an array of three-character strings (a drive letter, a colon, and a terminating
// null character).
//
// Return Values: The method returns 0x00000000 (NERR_Success) to indicate success;
// otherwise, it returns a nonzero error code. The method can take any specific error
// code value, as specified in [MS-ERREF] section 2.2. The most common error codes are
// listed in the following table.
//
// +------------------------------------+--------------------------------------------------------------------+
// | RETURN | |
// | VALUE/CODE | DESCRIPTION |
// | | |
// +------------------------------------+--------------------------------------------------------------------+
// +------------------------------------+--------------------------------------------------------------------+
// | 0x00000000 NERR_Success | The client request succeeded. |
// +------------------------------------+--------------------------------------------------------------------+
// | 0x0000007C ERROR_INVALID_LEVEL | The system call level is not correct. |
// +------------------------------------+--------------------------------------------------------------------+
// | 0x00000008 ERROR_NOT_ENOUGH_MEMORY | Not enough storage is available to process this command. |
// +------------------------------------+--------------------------------------------------------------------+
// | 0x00000005 ERROR_ACCESS_DENIED | The caller does not have the permissions to perform the operation. |
// +------------------------------------+--------------------------------------------------------------------+
DiskEnum(context.Context, *DiskEnumRequest) (*DiskEnumResponse, error)
// The NetrServerStatisticsGet method retrieves the operating statistics for a service.
//
// Return Values: The method returns 0x00000000 (NERR_Success) to indicate success;
// otherwise, it returns a nonzero error code. The method can take any specific error
// code value, as specified in [MS-ERREF] section 2.2.
StatisticsGet(context.Context, *StatisticsGetRequest) (*StatisticsGetResponse, error)
// The NetrServerTransportAdd method binds the server to the transport protocol.
//
// Return Values: The method returns 0x00000000 (NERR_Success) to indicate success;
// otherwise, it returns a nonzero error code. The method can take any specific error
// code value, as specified in [MS-ERREF] section 2.2. The most common error codes are
// listed in the following table.
//
// +------------------------------------+----------------------------------------------------------+
// | RETURN | |
// | VALUE/CODE | DESCRIPTION |
// | | |
// +------------------------------------+----------------------------------------------------------+
// +------------------------------------+----------------------------------------------------------+
// | 0x00000000 NERR_Success | The client request succeeded. |
// +------------------------------------+----------------------------------------------------------+
// | 0x00000005 ERROR_ACCESS_DENIED | Access is denied. |
// +------------------------------------+----------------------------------------------------------+
// | 0x00000034 ERROR_DUP_NAME | A duplicate name exists on the network. |
// +------------------------------------+----------------------------------------------------------+
// | 0x0000007C ERROR_INVALID_LEVEL | The system call level is not correct. |
// +------------------------------------+----------------------------------------------------------+
// | 0x00000057 ERROR_INVALID_PARAMETER | The parameter is incorrect. |
// +------------------------------------+----------------------------------------------------------+
// | 0x00000008 ERROR_NOT_ENOUGH_MEMORY | Not enough storage is available to process this command. |
// +------------------------------------+----------------------------------------------------------+
//
// The NetrServerTransportAdd message MUST be processed in the same way as the NetrServerTransportAddEx
// message, except that it MUST allow only level 0 (that is, SERVER_TRANSPORT_INFO_0).
// The NetrServerTransportAddEx message is specified in section 3.1.4.23.
//
// The server MAY<91> enforce security measures to verify that the caller has the required
// permissions to execute this call. If the server enforces these security measures
// and the caller does not have the required credentials, the server SHOULD<92> fail
// the call.
TransportAdd(context.Context, *TransportAddRequest) (*TransportAddResponse, error)
// The NetrServerTransportEnum method enumerates the information about transport protocols
// that the server manages in TransportList.
//
// Return Values: The method returns 0x00000000 (NERR_Success) to indicate success;
// otherwise, it returns a nonzero error code. The method can take any specific error
// code value, as specified in [MS-ERREF] section 2.2. The most common error codes are
// listed in the following table.
//
// +------------------------------------+----------------------------------------------------------------------------------+
// | RETURN | |
// | VALUE/CODE | DESCRIPTION |
// | | |
// +------------------------------------+----------------------------------------------------------------------------------+
// +------------------------------------+----------------------------------------------------------------------------------+
// | 0x00000000 NERR_Success | The client request succeeded. |
// +------------------------------------+----------------------------------------------------------------------------------+
// | 0x0000007C ERROR_INVALID_LEVEL | The system call level is not correct. |
// +------------------------------------+----------------------------------------------------------------------------------+
// | 0x000000EA ERROR_MORE_DATA | The client request succeeded. More entries are available. Not all entries could |
// | | be returned in the buffer size that is specified by PreferedMaximumLength. |
// +------------------------------------+----------------------------------------------------------------------------------+
// | 0x00000008 ERROR_NOT_ENOUGH_MEMORY | Not enough storage is available to process this command. |
// +------------------------------------+----------------------------------------------------------------------------------+
// | 0x0000084B NERR_BufTooSmall | The client request succeeded. More entries are available. The buffer size that |
// | | is specified by PreferedMaximumLength was too small to fit even a single entry. |
// +------------------------------------+----------------------------------------------------------------------------------+
TransportEnum(context.Context, *TransportEnumRequest) (*TransportEnumResponse, error)
// The NetrServerTransportDel method unbinds (or disconnects) the transport protocol
// from the server. If this method succeeds, the server can no longer communicate with
// clients by using the specified transport protocol (such as TCP or XNS).
//
// Return Values: The method returns 0x00000000 (NERR_Success) to indicate success;
// otherwise, it returns a nonzero error code. The method can take any specific error
// code value, as specified in [MS-ERREF] section 2.2. The most common error codes are
// listed in the following table.
//
// +------------------------------------+----------------------------------------------------------+
// | RETURN | |
// | VALUE/CODE | DESCRIPTION |
// | | |
// +------------------------------------+----------------------------------------------------------+
// +------------------------------------+----------------------------------------------------------+
// | 0x00000000 NERR_Success | The client request succeeded. |
// +------------------------------------+----------------------------------------------------------+
// | 0x00000005 ERROR_ACCESS_DENIED | Access is denied. |
// +------------------------------------+----------------------------------------------------------+
// | 0x00000057 ERROR_INVALID_PARAMETER | The parameter is incorrect. |
// +------------------------------------+----------------------------------------------------------+
// | 0x00000008 ERROR_NOT_ENOUGH_MEMORY | Not enough storage is available to process this command. |
// +------------------------------------+----------------------------------------------------------+
//
// The NetrServerTransportDel message MUST be processed in the same way as the NetrServerTransportDelEx
// message, except that it MUST allow only level 0 (that is, SERVER_TRANSPORT_INFO_0).
// The processing for this message is specified in section 3.1.4.26.
//
// The server MAY<97> enforce security measures to verify that the caller has the required
// permissions to execute this call. If the server enforces these security measures
// and the caller does not have the required credentials, the server SHOULD<98> fail
// the call.
TransportDelete(context.Context, *TransportDeleteRequest) (*TransportDeleteResponse, error)
// The NetrRemoteTOD method returns the time of day information on a server.
//
// Return Values: The method returns 0x00000000 (NERR_Success) to indicate success;
// otherwise, it returns a nonzero error code. The method can take any specific error
// code value, as specified in [MS-ERREF] section 2.2.
RemoteToD(context.Context, *RemoteToDRequest) (*RemoteToDResponse, error)
// Opnum29NotUsedOnWire operation.
// Opnum29NotUsedOnWire
// The NetprPathType method checks a path name to determine its type.
//
// Return Values: The method returns 0x00000000 (NERR_Success) to indicate success;
// otherwise, it returns a nonzero error code. The method can take any specific error
// code value, as specified in [MS-ERREF] section 2.2.
PathType(context.Context, *PathTypeRequest) (*PathTypeResponse, error)
// The NetprPathCanonicalize method converts a path name to the canonical format.
//
// Return Values: The method returns 0x00000000 (NERR_Success) to indicate success;
// otherwise, it returns a nonzero error code. The method can take any specific error
// code value, as specified in [MS-ERREF] section 2.2.
//
// If the Flags parameter is not equal to zero, the server SHOULD fail the call with
// an implementation-specific error code.<110>
PathCanonicalize(context.Context, *PathCanonicalizeRequest) (*PathCanonicalizeResponse, error)
// The NetprPathCompare method performs comparison of two paths.
//
// Return Values: Upon successful processing, the server MUST return 0 if both paths
// are the same, –1 if the first is less than the second, and 1 otherwise. If the
// method fails, it can return any specific error code value as specified in [MS-ERREF]
// section 2.2.
PathCompare(context.Context, *PathCompareRequest) (*PathCompareResponse, error)
// The NetprNameValidate method performs checks to ensure that the specified name is
// a valid name for the specified type.
//
// Return Values: The method returns 0x00000000 (NERR_Success) to indicate success;
// otherwise, it returns a nonzero error code. The method can take any specific error
// code value, as specified in [MS-ERREF] section 2.2.
//
// If the Flags parameter is not equal to zero, the server SHOULD fail the call with
// an implementation-specific error code.<119>
NameValidate(context.Context, *NameValidateRequest) (*NameValidateResponse, error)
// The NetprNameCanonicalize method converts a name to the canonical format for the
// specified type.
//
// Return Values: The method returns 0x00000000 (NERR_Success) to indicate success;
// otherwise, it returns a nonzero error code. The method can take any specific error
// code value, as specified in [MS-ERREF] section 2.2.
NameCanonicalize(context.Context, *NameCanonicalizeRequest) (*NameCanonicalizeResponse, error)
// The NetprNameCompare method does comparison of two names of a specific name type.
//
// Return Values: MUST return 0 if both paths are the same. Other values indicate that
// either the paths are different or an error occurred when the client request was processed.
NameCompare(context.Context, *NameCompareRequest) (*NameCompareResponse, error)
// The NetrShareEnumSticky method retrieves information about each sticky shared resource
// whose IsPersistent setting is set in a ShareList.
//
// Return Values: The method returns 0x00000000 (NERR_Success) to indicate success;
// otherwise, it returns a nonzero error code. The method can take any specific error
// code value, as specified in [MS-ERREF] section 2.2. The most common error codes are
// listed in the following table.
//
// +-----------------------------+----------------------------------------------------------------------------------+
// | RETURN | |
// | VALUE/CODE | DESCRIPTION |
// | | |
// +-----------------------------+----------------------------------------------------------------------------------+
// +-----------------------------+----------------------------------------------------------------------------------+
// | 0x00000000 NERR_Success | The client request succeeded. |
// +-----------------------------+----------------------------------------------------------------------------------+
// | 0x000000EA ERROR_MORE_DATA | The client request succeeded. More entries are available. Not all entries could |
// | | be returned in the buffer size that is specified by PreferedMaximumLength. |
// +-----------------------------+----------------------------------------------------------------------------------+
// | 0x0000084B NERR_BufTooSmall | The client request succeeded. More entries are available. The buffer size that |
// | | is specified by PreferedMaximumLength was too small to fit even a single entry. |
// +-----------------------------+----------------------------------------------------------------------------------+
ShareEnumSticky(context.Context, *ShareEnumStickyRequest) (*ShareEnumStickyResponse, error)
// The NetrShareDelStart method performs the initial phase of a two-phase share delete.
//
// Return Values: The method returns 0x00000000 (NERR_Success) to indicate success;
// otherwise, it returns a nonzero error code. The method can take any specific error
// code value, as specified in [MS-ERREF] section 2.2.
ShareDeleteStart(context.Context, *ShareDeleteStartRequest) (*ShareDeleteStartResponse, error)
// The NetrShareDelCommit method performs the final phase of a two-phase share delete.
//
// Return Values: The method returns 0x00000000 (NERR_Success) to indicate success.
// Otherwise, the method returns a nonzero error code unless the share being deleted
// is IPC$. If the share being deleted is IPC$, the return value is not meaningful.
// The method can take any specific error code value, as specified in [MS-ERREF] section
// 2.2.
//
// The NetrShareDelCommit message is the continuation of the NetrShareDelStart message
// and MUST cause the share to be actually deleted, which disconnects all connections
// to the share, or MUST return an error code.
//
// This method can be used to delete the IPC$ share as well as other shares. When the
// share is not IPC$, only a return value of 0 indicates success.
//
// This two-phase deletion MUST be used to delete IPC$, which is the share that is used
// for named pipes. Deleting IPC$ results in the closing of the pipe on which the RPC
// is being executed. Thus, the client never receives the response to the RPC. The two-phase
// delete offers a positive response in phase 1 and then an expected error in phase
// 2.
//
// ContextHandle MUST reference the share to be deleted in the NetrShareDelStart method.
// If a share is not found, the server MUST fail the call with an ERROR_INVALID_PARAMETER
// error code.
//
// If a share is found, but the IsMarkedForDeletion member of the Share is not set,
// the server MUST fail the call with an ERROR_INVALID_PARAMETER error code.
//
// Otherwise, the server MUST delete the share by invoking the underlying server event,
// as specified in [MS-CIFS] section 3.3.4.11and [MS-SMB2] section 3.3.4.15, providing
// tuple <ServerName, NetName> as input parameters.
//
// The server does not enforce any security measures when processing this call.
ShareDeleteCommit(context.Context, *ShareDeleteCommitRequest) (*ShareDeleteCommitResponse, error)
// The NetrpGetFileSecurity method returns to the caller a copy of the security descriptor
// that protects a file or directory.
//
// Return Values: The method returns 0x00000000 (NERR_Success) to indicate success;
// otherwise, it returns a nonzero error code. The method can take any specific error
// code value, as specified in [MS-ERREF] section 2.2.
GetFileSecurity(context.Context, *GetFileSecurityRequest) (*GetFileSecurityResponse, error)
// The NetrpSetFileSecurity method sets the security of a file or directory.
//
// Return Values: The method returns 0x00000000 (NERR_Success) to indicate success;
// otherwise, it returns a nonzero error code. The method can take any specific error
// code value, as specified in [MS-ERREF] section 2.2.
SetFileSecurity(context.Context, *SetFileSecurityRequest) (*SetFileSecurityResponse, error)
// The NetrServerTransportAddEx method binds the specified server to the transport protocol.
// This extended method allows the caller to specify information levels 1, 2, and 3
// beyond what the NetrServerTransportAdd method allows.
//
// Return Values: The method returns 0x00000000 (NERR_Success) to indicate success;
// otherwise, it returns a nonzero error code. The method can take any specific error
// code value, as specified in [MS-ERREF] section 2.2. The most common error codes are
// listed in the following table.
//
// +------------------------------------+----------------------------------------------------------+
// | RETURN | |
// | VALUE/CODE | DESCRIPTION |
// | | |
// +------------------------------------+----------------------------------------------------------+
// +------------------------------------+----------------------------------------------------------+
// | 0x00000000 NERR_Success | The client request succeeded. |
// +------------------------------------+----------------------------------------------------------+
// | 0x00000005 ERROR_ACCESS_DENIED | Access is denied. |
// +------------------------------------+----------------------------------------------------------+
// | 0x00000034 ERROR_DUP_NAME | A duplicate name exists on the network. |
// +------------------------------------+----------------------------------------------------------+
// | 0x0000007C ERROR_INVALID_LEVEL | The system call level is not correct. |
// +------------------------------------+----------------------------------------------------------+
// | 0x00000057 ERROR_INVALID_PARAMETER | The parameter is incorrect. |
// +------------------------------------+----------------------------------------------------------+
// | 0x00000008 ERROR_NOT_ENOUGH_MEMORY | Not enough storage is available to process this command. |
// +------------------------------------+----------------------------------------------------------+
//
// The server SHOULD<93> enforce security measures to verify that the caller has the
// required permissions to execute this call. If the caller does not have the required
// credentials, the server SHOULD<94> fail the call.
//
// The Level parameter determines the type of structure that the client has used to
// specify information about the new transport. The value MUST be 0, 1, 2, or 3. If
// the Level parameter is not equal to one of the valid values, the server MUST fail
// the call with an ERROR_INVALID_LEVEL error code.
//
// If the Level parameter is 0, the Buffer parameter points to a SERVER_TRANSPORT_INFO_0
// structure.
//
// If the Level parameter is 1, the Buffer parameter points to a SERVER_TRANSPORT_INFO_1
// structure.
//
// If the Level parameter is 2, the Buffer parameter points to a SERVER_TRANSPORT_INFO_2
// structure.
//
// If the Level parameter is 3, the Buffer parameter points to a SERVER_TRANSPORT_INFO_3
// structure.
TransportAddEx(context.Context, *TransportAddExRequest) (*TransportAddExResponse, error)
// Opnum42NotUsedOnWire operation.
// Opnum42NotUsedOnWire
// The NetrDfsGetVersion method checks whether the server is a DFS server and if so,
// returns the DFS version. An implementation MAY<127> choose to support this method.
//
// Return Values: The method returns 0x00000000 (NERR_Success) to indicate success;
// otherwise, it returns a nonzero error code. The method can take any specific error
// code value, as specified in [MS-ERREF] section 2.2.
GetVersion(context.Context, *GetVersionRequest) (*GetVersionResponse, error)
// The NetrDfsCreateLocalPartition method marks a share as being a DFS share. In addition,
// if the RelationInfo parameter is non-NULL, it creates DFS links, as specified in
// [MS-DFSC], for each of the entries in the RelationInfo parameter. An implementation
// MAY<132> choose to support this method.
//
// Return Values: The method returns 0x00000000 (NERR_Success) to indicate success;
// otherwise, it returns a nonzero error code. The method can take any specific error
// code value, as specified in [MS-ERREF] section 2.2.
CreateLocalPartition(context.Context, *CreateLocalPartitionRequest) (*CreateLocalPartitionResponse, error)
// The NetrDfsDeleteLocalPartition method deletes a DFS share (Prefix) on the server.
// An implementation MAY<138> choose to support this method.
//
// Return Values: The method returns 0x00000000 (NERR_Success) to indicate success;
// otherwise, it returns a nonzero error code. The method can take any specific error
// code value, as specified in [MS-ERREF] section 2.2.
DeleteLocalPartition(context.Context, *DeleteLocalPartitionRequest) (*DeleteLocalPartitionResponse, error)
// The NetrDfsSetLocalVolumeState method sets a local DFS share online or offline. An
// implementation MAY<142> choose to support this method.
//
// Return Values: The method returns 0x00000000 (NERR_Success) to indicate success;
// otherwise, it returns a nonzero error code. The method can take any specific error
// code value, as specified in [MS-ERREF] section 2.2.
SetLocalVolumeState(context.Context, *SetLocalVolumeStateRequest) (*SetLocalVolumeStateResponse, error)
// Opnum47NotUsedOnWire operation.
// Opnum47NotUsedOnWire
// The NetrDfsCreateExitPoint method creates a DFS link on the server. An implementation
// MAY<146> choose to support this method.
//
// Return Values: The method returns 0x00000000 (NERR_Success) to indicate success;
// otherwise, it returns a nonzero error code. The method can take any specific error
// code value, as specified in [MS-ERREF] section 2.2.
CreateExitPoint(context.Context, *CreateExitPointRequest) (*CreateExitPointResponse, error)
// The NetrDfsDeleteExitPoint method deletes a DFS link on the server. An implementation
// MAY<155> choose to support this method.
//
// Return Values: The method returns 0x00000000 (NERR_Success) to indicate success;
// otherwise, it returns a nonzero error code. The method can take any specific error
// code value, as specified in [MS-ERREF] section 2.2.
DeleteExitPoint(context.Context, *DeleteExitPointRequest) (*DeleteExitPointResponse, error)
// The NetrDfsModifyPrefix method changes the path that corresponds to a DFS link on
// the server. An implementation MAY<151> choose to support this method.
//
// Return Values: The method returns 0x00000000 (NERR_Success) to indicate success;
// otherwise, it returns a nonzero error code. The method can take any specific error
// code value, as specified in [MS-ERREF] section 2.2.
ModifyPrefix(context.Context, *ModifyPrefixRequest) (*ModifyPrefixResponse, error)
// The NetrDfsFixLocalVolume method provides knowledge of a new DFS share on the server.
// An implementation MAY<159> choose to support this method.
//
// Return Values: The method returns 0x00000000 (NERR_Success) to indicate success;
// otherwise, it returns a nonzero error code. The method can take any specific error
// code value, as specified in [MS-ERREF] section 2.2.
FixLocalVolume(context.Context, *FixLocalVolumeRequest) (*FixLocalVolumeResponse, error)
// The NetrDfsManagerReportSiteInfo method obtains a list of names that SHOULD<165>
// correspond to the Active Directory sites covered by the specified server. An implementation
// MAY<166> choose to support this method.
//
// Return Values: The method returns 0x00000000 (NERR_Success) to indicate success;
// otherwise, it returns a nonzero error code. The method can take any specific error
// code value, as specified in [MS-ERREF] section 2.2.
//
// The ppSiteInfo parameter is a pointer to a LPDFS_SITELIST_INFO member, which in turn
// points to the location of a DFS_SITELIST_INFO structure in which the information
// is returned. That structure has a cSites member that the server SHOULD set to the
// number of sites returned. The information about the sites themselves MUST be returned
// in the Site member, which is an array of DFS_SITENAME_INFO structures. The sites
// the server returns are implementation-specific.<167>
//
// The server MAY<168> enforce security measures to verify that the caller has the required
// permissions to execute this call. If the server enforces these security measures
// and the caller does not have the required credentials, the server SHOULD<169> fail
// the call.
ManagerReportSiteInfo(context.Context, *ManagerReportSiteInfoRequest) (*ManagerReportSiteInfoResponse, error)
// The server receives the NetrServerTransportDelEx method in an RPC_REQUEST packet.
// In response, the server unbinds (or disconnects) the transport protocol from the
// server. If this method succeeds, the server can no longer communicate with clients
// by using the specified transport protocol (such as TCP or XNS). This extended method
// allows level 1 beyond what the NetrServerTransportDel method allows.
//
// Return Values: The method returns 0x00000000 (NERR_Success) to indicate success;
// otherwise, it returns a nonzero error code. The method can take any specific error
// code value, as specified in [MS-ERREF] section 2.2.<99>
//
// The Level parameter determines the type of structure the client has used to specify
// information about the new transport. Valid values are 0 and 1. If the Level parameter
// is not equal to one of the valid values, the server MUST fail the call with an ERROR_INVALID_LEVEL
// error code.
//
// If the Level parameter is 0, the Buffer parameter points to a SERVER_TRANSPORT_INFO_0
// structure. If the Level parameter is 1, the Buffer parameter points to a SERVER_TRANSPORT_INFO_1
// structure.
TransportDeleteEx(context.Context, *TransportDeleteExRequest) (*TransportDeleteExResponse, error)
// The NetrServerAliasAdd method attaches an alias name to an existing server name and
// inserts Alias objects into AliasList, through which the shared resource can be accessed
// either with server name or alias name. An alias is used to identify which resources
// are visible to an SMB client based on the server name presented in each tree connect
// request.
//
// );
//
// Return Values: The method returns 0x00000000 (NERR_Success) to indicate success;
// otherwise, it returns a nonzero error code. The method can take any specific error
// code value, as specified in [MS-ERREF] section 2.2. The most common error codes are
// listed in the following table.
//
// +------------------------------------+-----------------------------------------------------------------------+
// | RETURN | |
// | VALUE/CODE | DESCRIPTION |
// | | |
// +------------------------------------+-----------------------------------------------------------------------+
// +------------------------------------+-----------------------------------------------------------------------+
// | 0x00000000 NERR_Success | The client request succeeded. |
// +------------------------------------+-----------------------------------------------------------------------+
// | 0x00000005 ERROR_ACCESS_DENIED | Access is denied. |
// +------------------------------------+-----------------------------------------------------------------------+
// | 0x00000057 ERROR_INVALID_PARAMETER | The client request failed because the specified parameter is invalid. |
// +------------------------------------+-----------------------------------------------------------------------+
// | 0x00000008 ERROR_NOT_ENOUGH_MEMORY | Not enough storage is available to process this command. |
// +------------------------------------+-----------------------------------------------------------------------+
// | 0x00000846 NERR_DuplicateShare | The alias already exists. |
// +------------------------------------+-----------------------------------------------------------------------+
// | 0x0000007C ERROR_INVALID_LEVEL | The system call level is not correct. |
// +------------------------------------+-----------------------------------------------------------------------+
AliasAdd(context.Context, *AliasAddRequest) (*AliasAddResponse, error)
// The NetrServerAliasEnum method retrieves alias information for a server based on
// specified alias name or server name.
//
// Return Values: The method returns 0x00000000 (NERR_Success) to indicate success;
// otherwise, it returns a nonzero error code. The method can take any specific error
// code value, as specified in [MS-ERREF] section 2.2. The most common error codes are
// listed in the following table.
//
// +------------------------------------+----------------------------------------------------------------------------------+
// | RETURN | |
// | VALUE/CODE | DESCRIPTION |
// | | |
// +------------------------------------+----------------------------------------------------------------------------------+
// +------------------------------------+----------------------------------------------------------------------------------+
// | 0x00000000 NERR_Success | The client request succeeded. |
// +------------------------------------+----------------------------------------------------------------------------------+
// | 0x00000005 ERROR_ACCESS_DENIED | Access is denied. |
// +------------------------------------+----------------------------------------------------------------------------------+
// | 0x00000057 ERROR_INVALID_PARAMETER | The client request failed because the specified parameter is invalid. |
// +------------------------------------+----------------------------------------------------------------------------------+
// | 0x00000008 ERROR_NOT_ENOUGH_MEMORY | Not enough storage is available to process this command. |
// +------------------------------------+----------------------------------------------------------------------------------+
// | 0x0000084B NERR_BufTooSmall | The allocated buffer is too small to hold single entry. |
// +------------------------------------+----------------------------------------------------------------------------------+
// | 0x0000007C ERROR_INVALID_LEVEL | The system call level is not correct. |
// +------------------------------------+----------------------------------------------------------------------------------+
// | 0x000000EA ERROR_MORE_DATA | The client request succeeded. More entries are available. Not all entries could |
// | | be returned in the buffer size that is specified by PreferedMaximumLength. |
// +------------------------------------+----------------------------------------------------------------------------------+
AliasEnum(context.Context, *AliasEnumRequest) (*AliasEnumResponse, error)
// The NetrServerAliasDel method deletes an alias name from a server alias list based
// on specified alias name.
//
// Return Values: The method returns 0x00000000 (NERR_Success) to indicate success;
// otherwise, it returns a nonzero error code. The method can take any specific error
// code value, as specified in [MS-ERREF] section 2.2. The most common error codes are
// listed in the following table.
//
// +------------------------------------+-----------------------------------------------------------------------+
// | RETURN | |
// | VALUE/CODE | DESCRIPTION |
// | | |
// +------------------------------------+-----------------------------------------------------------------------+
// +------------------------------------+-----------------------------------------------------------------------+
// | 0x00000000 NERR_Success | The client request succeeded. |
// +------------------------------------+-----------------------------------------------------------------------+
// | 0x00000005 ERROR_ACCESS_DENIED | Access is denied. |
// +------------------------------------+-----------------------------------------------------------------------+
// | 0x00000057 ERROR_INVALID_PARAMETER | The client request failed because the specified parameter is invalid. |
// +------------------------------------+-----------------------------------------------------------------------+
// | 0x00000008 ERROR_NOT_ENOUGH_MEMORY | Not enough storage is available to process this command. |
// +------------------------------------+-----------------------------------------------------------------------+
// | 0x00000906 NERR_NetNameNotFound | The alias does not exist. |
// +------------------------------------+-----------------------------------------------------------------------+
// | 0x0000007C ERROR_INVALID_LEVEL | The system call level is not correct. |
// +------------------------------------+-----------------------------------------------------------------------+
AliasDelete(context.Context, *AliasDeleteRequest) (*AliasDeleteResponse, error)
// The NetrShareDelEx method deletes a share from the ShareList, which disconnects all
// connections to the shared resource. If the share is sticky, all information about
// the share is also deleted from permanent storage.<176>
//
// Return Values: The method returns 0x00000000 (NERR_Success) to indicate success;
// otherwise, it returns a nonzero error code. The method can take any specific error
// code value, as specified in [MS-ERREF] section 2.2. The most common error codes are
// listed in the following table.
//
// +------------------------------------+-----------------------------------------------------------------------+
// | RETURN | |