Coverage for /root/GitHubProjects/impacket/impacket/dcerpc/v5/srvs.py: 98%

# Coverage for /root/GitHubProjects/impacket/impacket/dcerpc/v5/srvs.py : 98%

## 1301 statements

Hot-keys on this page

r m x p toggle line displays

j k next/prev highlighted chunk

0 (zero) top of page

1 (one) first highlighted chunk

1# SECUREAUTH LABS. Copyright 2018 SecureAuth Corporation. All rights reserved.

2#

3# This software is provided under under a slightly modified version

4# of the Apache Software License. See the accompanying LICENSE file

5# for more information.

6#

7# Author: Alberto Solino (@agsolino)

8#

9# Description:

10# [MS-SRVS] Interface implementation

11#

12# Best way to learn how to use these calls is to grab the protocol standard

13# so you understand what the call does, and then read the test case located

14# at https://github.com/SecureAuthCorp/impacket/tree/master/tests/SMB_RPC

15#

16# Some calls have helper functions, which makes it even easier to use.

17# They are located at the end of this file.

18# Helper functions start with "h"<name of the call>.

19# There are test cases for them too.

20#

21 from __future__ import division

22 from __future__ import print_function

23 from impacket.dcerpc.v5.rpcrt import DCERPCException

24 from impacket.dcerpc.v5.ndr import NDRCALL, NDR, NDRSTRUCT, NDRUNION, NDRPOINTER, NDRUniConformantArray, \

25 NDRUniFixedArray, NDRBOOLEAN, NDRUniConformantVaryingArray, PNDRUniConformantArray

26 from impacket.dcerpc.v5.dtypes import NULL, DWORD, LPWSTR, LPBYTE, LMSTR, ULONG, GUID, LPLONG, WSTR, \

27 SECURITY_INFORMATION, WCHAR

28 from impacket import system_errors

29 from impacket.uuid import uuidtup_to_bin

30

31 MSRPC_UUID_SRVS = uuidtup_to_bin(('4B324FC8-1670-01D3-1278-5A47BF6EE188', '3.0'))

32

33 class DCERPCSessionError(DCERPCException):

34 def __init__(self, error_string=None, error_code=None, packet=None):

35 DCERPCException.__init__(self, error_string, error_code, packet)

36

37 def __str__( self ):

38 key = self.error_code

39 if key in system_errors.ERROR_MESSAGES: 39 ↛ 44line 39 didn't jump to line 44, because the condition on line 39 was never false

40 error_msg_short = system_errors.ERROR_MESSAGES[key][0]

41 error_msg_verbose = system_errors.ERROR_MESSAGES[key][1]

42 return 'SRVS SessionError: code: 0x%x - %s - %s' % (self.error_code, error_msg_short, error_msg_verbose)

43 else:

44 return 'SRVS SessionError: unknown error code: 0x%x' % self.error_code

45

46################################################################################

47# CONSTANTS

48################################################################################

49# 2.2.1.1 SRVSVC_HANDLE

50 SRVSVC_HANDLE = WCHAR

51

52 class PSRVSVC_HANDLE(NDRPOINTER):

53 referent = (

54 ('Data', SRVSVC_HANDLE),

55 )

56

57# 2.2.1.2 SHARE_DEL_HANDLE

58 class SHARE_DEL_HANDLE(NDRSTRUCT):

59 align = 1

60 structure = (

61 ('Data','20s=""'),

62 )

63

64# 2.2.1.3 PSHARE_DEL_HANDLE

65 class PSHARE_DEL_HANDLE(NDRPOINTER):

66 referent = (

67 ('Data', SHARE_DEL_HANDLE),

68 )

69

70# 2.2.2.2 MAX_PREFERRED_LENGTH

71 MAX_PREFERRED_LENGTH = -1

72

73# 2.2.2.3 Session User Flags

74 SESS_GUEST = 0x00000001

75 SESS_NOENCRYPTION = 0x00000002

76

77# 2.2.2.4 Share Types

78 STYPE_DISKTREE = 0x00000000

79 STYPE_PRINTQ = 0x00000001

80 STYPE_DEVICE = 0x00000002

81 STYPE_IPC = 0x00000003

82 STYPE_CLUSTER_FS = 0x02000000

83 STYPE_CLUSTER_SOFS = 0x04000000

84 STYPE_CLUSTER_DFS = 0x08000000

85

86 STYPE_SPECIAL = 0x80000000

87 STYPE_TEMPORARY = 0x40000000

88

89# AND with shi_type to extract the Share Type part

90 STYPE_MASK = 0x000000FF

91

92# 2.2.2.5 Client-Side Caching (CSC) States

93 CSC_CACHE_MANUAL_REINT = 0x00

94 CSC_CACHE_AUTO_REINT = 0x10

95 CSC_CACHE_VDO = 0x20

96 CSC_CACHE_NONE = 0x30

97

98# 2.2.2.6 Platform IDs

99 PLATFORM_ID_DOS = 300

100 PLATFORM_ID_OS2 = 400

101 PLATFORM_ID_NT = 500

102 PLATFORM_ID_OSF = 600

103 PLATFORM_ID_VMS = 700

104

105# 2.2.2.7 Software Type Flags

106 SV_TYPE_WORKSTATION = 0x00000001

107 SV_TYPE_SERVER = 0x00000002

108 SV_TYPE_SQLSERVER = 0x00000004

109 SV_TYPE_DOMAIN_CTRL = 0x00000008

110 SV_TYPE_DOMAIN_BAKCTRL = 0x00000010

111 SV_TYPE_TIME_SOURCE = 0x00000020

112 SV_TYPE_AFP = 0x00000040

113 SV_TYPE_NOVELL = 0x00000080

114 SV_TYPE_DOMAIN_MEMBER = 0x00000100

115 SV_TYPE_LOCAL_LIST_ONLY = 0x40000000

116 SV_TYPE_PRINTQ_SERVER = 0x00000200

117 SV_TYPE_DIALIN_SERVER = 0x00000400

118 SV_TYPE_XENIX_SERVER = 0x00000800

119 SV_TYPE_SERVER_MFPN = 0x00004000

120 SV_TYPE_NT = 0x00001000

121 SV_TYPE_WFW = 0x00002000

122 SV_TYPE_SERVER_NT = 0x00008000

123 SV_TYPE_POTENTIAL_BROWSER = 0x00010000

124 SV_TYPE_BACKUP_BROWSER = 0x00020000

125 SV_TYPE_MASTER_BROWSER = 0x00040000

126 SV_TYPE_DOMAIN_MASTER = 0x00080000

127 SV_TYPE_DOMAIN_ENUM = 0x80000000

128 SV_TYPE_WINDOWS = 0x00400000

129 SV_TYPE_ALL = 0xFFFFFFFF

130 SV_TYPE_TERMINALSERVER = 0x02000000

131 SV_TYPE_CLUSTER_NT = 0x10000000

132 SV_TYPE_CLUSTER_VS_NT = 0x04000000

133

134# 2.2.2.8 Name Types

135 NAMETYPE_USER = 1

136 NAMETYPE_PASSWORD = 2

137 NAMETYPE_GROUP = 3

138 NAMETYPE_COMPUTER = 4

139 NAMETYPE_EVENT = 5

140 NAMETYPE_DOMAIN = 6

141 NAMETYPE_SERVICE = 7

142 NAMETYPE_NET = 8

143 NAMETYPE_SHARE = 9

144 NAMETYPE_MESSAGE = 10

145 NAMETYPE_MESSAGEDEST = 11

146 NAMETYPE_SHAREPASSWORD = 12

147 NAMETYPE_WORKGROUP = 13

148

149# 2.2.2.9 Path Types

150 ITYPE_UNC_COMPNAME = 4144

151 ITYPE_UNC_WC = 4145

152 ITYPE_UNC = 4096

153 ITYPE_UNC_WC_PATH = 4097

154 ITYPE_UNC_SYS_SEM = 6400

155 ITYPE_UNC_SYS_SHMEM = 6656

156 ITYPE_UNC_SYS_MSLOT = 6144

157 ITYPE_UNC_SYS_PIPE = 6912

158 ITYPE_UNC_SYS_QUEUE = 7680

159 ITYPE_PATH_ABSND = 8194

160 ITYPE_PATH_ABSD = 8198

161 ITYPE_PATH_RELND = 8192

162 ITYPE_PATH_RELD = 8196

163 ITYPE_PATH_ABSND_WC = 8195

164 ITYPE_PATH_ABSD_WC = 8199

165 ITYPE_PATH_RELND_WC = 8193

166 ITYPE_PATH_RELD_WC = 8197

167 ITYPE_PATH_SYS_SEM = 10498

168 ITYPE_PATH_SYS_SHMEM = 10754

169 ITYPE_PATH_SYS_MSLOT = 10242

170 ITYPE_PATH_SYS_PIPE = 11010

171 ITYPE_PATH_SYS_COMM = 11266

172 ITYPE_PATH_SYS_PRINT = 11522

173 ITYPE_PATH_SYS_QUEUE = 11778

174 ITYPE_PATH_SYS_SEM_M = 43266

175 ITYPE_PATH_SYS_SHMEM_M = 43522

176 ITYPE_PATH_SYS_MSLOT_M = 43010

177 ITYPE_PATH_SYS_PIPE_M = 43778

178 ITYPE_PATH_SYS_COMM_M = 44034

179 ITYPE_PATH_SYS_PRINT_M = 44290

180 ITYPE_PATH_SYS_QUEUE_M = 44546

181 ITYPE_DEVICE_DISK = 16384

182 ITYPE_DEVICE_LPT = 16400

183 ITYPE_DEVICE_COM = 16416

184 ITYPE_DEVICE_CON = 16448

185 ITYPE_DEVICE_NUL = 16464

186

187# 2.2.2.11 SHARE_INFO Parameter Error Codes

188

189 SHARE_NETNAME_PARMNUM = 1

190 SHARE_TYPE_PARMNUM = 3

191 SHARE_REMARK_PARMNUM = 4

192 SHARE_PERMISSIONS_PARMNUM = 5

193 SHARE_MAX_USES_PARMNUM = 6

194 SHARE_CURRENT_USES_PARMNUM = 7

195 SHARE_PATH_PARMNUM = 8

196 SHARE_PASSWD_PARMNUM = 9

197 SHARE_FILE_SD_PARMNUM = 501

198

199# 2.2.2.12 SERVER_INFO Parameter Error Codes

200 SV_PLATFORM_ID_PARMNUM = 101

201 SV_NAME_PARMNUM = 102

202 SV_VERSION_MAJOR_PARMNUM = 103

203 SV_VERSION_MINOR_PARMNUM = 104

204 SV_TYPE_PARMNUM = 105

205 SV_COMMENT_PARMNUM = 5

206 SV_USERS_PARMNUM = 107

207 SV_DISC_PARMNUM = 10

208 SV_HIDDEN_PARMNUM = 16

209 SV_ANNOUNCE_PARMNUM = 17

210 SV_ANNDELTA_PARMNUM = 18

211 SV_USERPATH_PARMNUM = 112

212 SV_SESSOPENS_PARMNUM = 501

213 SV_SESSVCS_PARMNUM = 502

214 SV_OPENSEARCH_PARMNUM = 503

215 SV_SIZREQBUF_PARMNUM = 504

216 SV_INITWORKITEMS_PARMNUM = 505

217 SV_MAXWORKITEMS_PARMNUM = 506

218 SV_RAWWORKITEMS_PARMNUM = 507

219 SV_IRPSTACKSIZE_PARMNUM = 508

220 SV_MAXRAWBUFLEN_PARMNUM = 509

221 SV_SESSUSERS_PARMNUM = 510

222 SV_SESSCONNS_PARMNUM = 511

223 SV_MAXNONPAGEDMEMORYUSAGE_PARMNUM = 512

224 SV_MAXPAGEDMEMORYUSAGE_PARMNUM = 513

225 SV_ENABLESOFTCOMPAT_PARMNUM = 514

226 SV_ENABLEFORCEDLOGOFF_PARMNUM = 515

227 SV_TIMESOURCE_PARMNUM = 516

228 SV_ACCEPTDOWNLEVELAPIS_PARMNUM = 517

229 SV_LMANNOUNCE_PARMNUM = 518

230 SV_DOMAIN_PARMNUM = 519

231 SV_MAXCOPYREADLEN_PARMNUM = 520

232 SV_MAXCOPYWRITELEN_PARMNUM = 521

233 SV_MINKEEPSEARCH_PARMNUM = 522

234 SV_MAXKEEPSEARCH_PARMNUM = 523

235 SV_MINKEEPCOMPLSEARCH_PARMNUM = 524

236 SV_MAXKEEPCOMPLSEARCH_PARMNUM = 525

237 SV_THREADCOUNTADD_PARMNUM = 526

238 SV_NUMBLOCKTHREADS_PARMNUM = 527

239 SV_SCAVTIMEOUT_PARMNUM = 528

240 SV_MINRCVQUEUE_PARMNUM = 529

241 SV_MINFREEWORKITEMS_PARMNUM = 530

242 SV_XACTMEMSIZE_PARMNUM = 531

243 SV_THREADPRIORITY_PARMNUM = 532

244 SV_MAXMPXCT_PARMNUM = 533

245 SV_OPLOCKBREAKWAIT_PARMNUM = 534

246 SV_OPLOCKBREAKRESPONSEWAIT_PARMNUM = 535

247 SV_ENABLEOPLOCKS_PARMNUM = 536

248 SV_ENABLEOPLOCKFORCECLOSE_PARMNUM = 537

249 SV_ENABLEFCBOPENS_PARMNUM = 538

250 SV_ENABLERAW_PARMNUM = 539

251 SV_ENABLESHAREDNETDRIVES_PARMNUM = 540

252 SV_MINFREECONNECTIONS_PARMNUM = 541

253 SV_MAXFREECONNECTIONS_PARMNUM = 542

254 SV_INITSESSTABLE_PARMNUM = 543

255 SV_INITCONNTABLE_PARMNUM = 544

256 SV_INITFILETABLE_PARMNUM = 545

257 SV_INITSEARCHTABLE_PARMNUM = 546

258 SV_ALERTSCHEDULE_PARMNUM = 547

259 SV_ERRORTHRESHOLD_PARMNUM = 548

260 SV_NETWORKERRORTHRESHOLD_PARMNUM = 549

261 SV_DISKSPACETHRESHOLD_PARMNUM = 550

262 SV_MAXLINKDELAY_PARMNUM = 552

263 SV_MINLINKTHROUGHPUT_PARMNUM = 553

264 SV_LINKINFOVALIDTIME_PARMNUM = 554

265 SV_SCAVQOSINFOUPDATETIME_PARMNUM = 555

266 SV_MAXWORKITEMIDLETIME_PARMNUM = 556

267

268# 2.2.2.13 DFS Entry Flags

269 PKT_ENTRY_TYPE_CAIRO = 0x0001

270 PKT_ENTRY_TYPE_MACHINE = 0x0002

271 PKT_ENTRY_TYPE_NONCAIRO = 0x0004

272 PKT_ENTRY_TYPE_LEAFONLY = 0x0008

273 PKT_ENTRY_TYPE_OUTSIDE_MY_DOM = 0x0010

274 PKT_ENTRY_TYPE_INSITE_ONLY = 0x0020

275 PKT_ENTRY_TYPE_REFERRAL_SVC = 0x0080

276 PKT_ENTRY_TYPE_PERMANENT = 0x0100

277 PKT_ENTRY_TYPE_LOCAL = 0x0400

278 PKT_ENTRY_TYPE_LOCAL_XPOINT = 0x0800

279 PKT_ENTRY_TYPE_MACH_SHARE = 0x1000

280 PKT_ENTRY_TYPE_OFFLINE = 0x2000

281

282# 2.2.4.7 FILE_INFO_3

283# fi3_permissions

284 PERM_FILE_READ = 0x00000001

285 PERM_FILE_WRITE = 0x00000002

286 PERM_FILE_CREATE = 0x00000004

287 ACCESS_EXEC = 0x00000008

288 ACCESS_DELETE = 0x00000010

289 ACCESS_ATRIB = 0x00000020

290 ACCESS_PERM = 0x00000040

291

292# 2.2.4.29 SHARE_INFO_1005

293# shi1005_flags

294 SHI1005_FLAGS_DFS = 0x00000001

295 SHI1005_FLAGS_DFS_ROOT = 0x00000002

296 CSC_MASK = 0x00000030

297 SHI1005_FLAGS_RESTRICT_EXCLUSIVE_OPENS = 0x00000100

298 SHI1005_FLAGS_FORCE_SHARED_DELETE = 0x00000200

299 SHI1005_FLAGS_ALLOW_NAMESPACE_CACHING = 0x00000400

300 SHI1005_FLAGS_ACCESS_BASED_DIRECTORY_ENUM = 0x00000800

301 SHI1005_FLAGS_FORCE_LEVELII_OPLOCK = 0x00001000

302 SHI1005_FLAGS_ENABLE_HASH = 0x00002000

303 SHI1005_FLAGS_ENABLE_CA = 0x00004000

304 SHI1005_FLAGS_ENCRYPT_DATA = 0x00008000

305

306# 2.2.4.43 SERVER_INFO_103

307# sv103_capabilities

308 SRV_SUPPORT_HASH_GENERATION = 0x0001

309 SRV_HASH_GENERATION_ACTIVE = 0x0002

310

311# 2.2.4.96 SERVER_TRANSPORT_INFO_3

312# svti3_flags

313 SVTI2_REMAP_PIPE_NAMES = 0x00000002

314 SVTI2_SCOPED_NAME = 0x00000004

315

316# 2.2.4.109 DFS_SITENAME_INFO

317# SiteFlags

318 DFS_SITE_PRIMARY = 0x00000001

319

320# 3.1.4.42 NetrDfsFixLocalVolume (Opnum 51)

321# ServiceType

322 DFS_SERVICE_TYPE_MASTER = 0x00000001

323 DFS_SERVICE_TYPE_READONLY = 0x00000002

324 DFS_SERVICE_TYPE_LOCAL = 0x00000004

325 DFS_SERVICE_TYPE_REFERRAL = 0x00000008

326 DFS_SERVICE_TYPE_ACTIVE = 0x000000010

327 DFS_SERVICE_TYPE_DOWN_LEVEL = 0x000000020

328 DFS_SERVICE_TYPE_COSTLIER = 0x000000040

329 DFS_SERVICE_TYPE_OFFLINE = 0x000000080

330

331# CreateDisposition

332 FILE_SUPERSEDE = 0x00000000

333 FILE_OPEN = 0x00000001

334 FILE_CREATE = 0x00000002

335

336################################################################################

337# STRUCTURES

338################################################################################

339# 2.2.4.1 CONNECTION_INFO_0

340 class CONNECTION_INFO_0(NDRSTRUCT):

341 structure = (

342 ('coni0_id', DWORD),

343 )

344

345 class CONNECTION_INFO_0_ARRAY(NDRUniConformantArray):

346 item = CONNECTION_INFO_0

347

348 class LPCONNECTION_INFO_0_ARRAY(NDRPOINTER):

349 referent = (

350 ('Data', CONNECTION_INFO_0_ARRAY),

351 )

352

353# 2.2.4.2 CONNECTION_INFO_1

354 class CONNECTION_INFO_1(NDRSTRUCT):

355 structure = (

356 ('coni1_id', DWORD),

357 ('coni1_type', DWORD),

358 ('coni1_num_opens', DWORD),

359 ('coni1_num_users', DWORD),

360 ('coni1_time', DWORD),

361 ('coni1_username', LPWSTR),

362 ('coni1_netname', LPWSTR),

363 )

364

365 class CONNECTION_INFO_1_ARRAY(NDRUniConformantArray):

366 item = CONNECTION_INFO_1

367

368 class LPCONNECTION_INFO_1_ARRAY(NDRPOINTER):

369 referent = (

370 ('Data', CONNECTION_INFO_1_ARRAY),

371 )

372

373# 2.2.4.3 CONNECT_INFO_0_CONTAINER

374 class CONNECT_INFO_0_CONTAINER(NDRSTRUCT):

375 structure = (

376 ('EntriesRead', DWORD),

377 ('Buffer', LPCONNECTION_INFO_0_ARRAY),

378 )

379

380 class LPCONNECT_INFO_0_CONTAINER(NDRPOINTER):

381 referent = (

382 ('Data', CONNECT_INFO_0_CONTAINER),

383 )

384

385# 2.2.4.4 CONNECT_INFO_1_CONTAINER

386 class CONNECT_INFO_1_CONTAINER(NDRSTRUCT):

387 structure = (

388 ('EntriesRead', DWORD),

389 ('Buffer', LPCONNECTION_INFO_1_ARRAY),

390 )

391

392 class LPCONNECT_INFO_1_CONTAINER(NDRPOINTER):

393 referent = (

394 ('Data', CONNECT_INFO_1_CONTAINER),

395 )

396

397# 2.2.3.1 CONNECT_ENUM_UNION

398 class CONNECT_ENUM_UNION(NDRUNION):

399 commonHdr = (

400 ('tag', DWORD),

401 )

402

403 union = {

404 0: ('Level0', LPCONNECT_INFO_0_CONTAINER),

405 1: ('Level1', LPCONNECT_INFO_1_CONTAINER),

406 }

407

408# 2.2.4.5 CONNECT_ENUM_STRUCT

409 class CONNECT_ENUM_STRUCT(NDRSTRUCT):

410 structure = (

411 ('Level', DWORD),

412 ('ConnectInfo', CONNECT_ENUM_UNION),

413 )

414

415# 2.2.4.6 FILE_INFO_2

416 class FILE_INFO_2(NDRSTRUCT):

417 structure = (

418 ('fi2_id', DWORD),

419 )

420

421 class LPFILE_INFO_2(NDRPOINTER):

422 referent = (

423 ('Data', FILE_INFO_2),

424 )

425

426 class FILE_INFO_2_ARRAY(NDRUniConformantArray):

427 item = FILE_INFO_2

428

429 class LPFILE_INFO_2_ARRAY(NDRPOINTER):

430 referent = (

431 ('Data', FILE_INFO_2_ARRAY),

432 )

433

434# 2.2.4.7 FILE_INFO_3

435 class FILE_INFO_3(NDRSTRUCT):

436 structure = (

437 ('fi3_id', DWORD),

438 ('fi3_permissions', DWORD),

439 ('fi3_num_locks', DWORD),

440 ('fi3_path_name', LPWSTR),

441 ('fi3_username', LPWSTR),

442 )

443

444 class LPFILE_INFO_3(NDRPOINTER):

445 referent = (

446 ('Data', FILE_INFO_3),

447 )

448

449 class FILE_INFO_3_ARRAY(NDRUniConformantArray):

450 item = FILE_INFO_3

451

452 class LPFILE_INFO_3_ARRAY(NDRPOINTER):

453 referent = (

454 ('Data', FILE_INFO_3_ARRAY),

455 )

456

457# 2.2.4.8 FILE_INFO_2_CONTAINER

458 class FILE_INFO_2_CONTAINER(NDRSTRUCT):

459 structure = (

460 ('EntriesRead', DWORD),

461 ('Buffer', LPFILE_INFO_2_ARRAY),

462 )

463

464 class LPFILE_INFO_2_CONTAINER(NDRPOINTER):

465 referent = (

466 ('Data', FILE_INFO_2_CONTAINER),

467 )

468

469# 2.2.4.9 FILE_INFO_3_CONTAINER

470 class FILE_INFO_3_CONTAINER(NDRSTRUCT):

471 structure = (

472 ('EntriesRead', DWORD),

473 ('Buffer', LPFILE_INFO_3_ARRAY),

474 )

475

476 class LPFILE_INFO_3_CONTAINER(NDRPOINTER):

477 referent = (

478 ('Data', FILE_INFO_3_CONTAINER),

479 )

480

481# 2.2.3.2 FILE_ENUM_UNION

482 class FILE_ENUM_UNION(NDRUNION):

483 commonHdr = (

484 ('tag', DWORD),

485 )

486

487 union = {

488 2: ('Level2', LPFILE_INFO_2_CONTAINER),

489 3: ('Level3', LPFILE_INFO_3_CONTAINER),

490 }

491

492# 2.2.4.10 FILE_ENUM_STRUCT

493 class FILE_ENUM_STRUCT(NDRSTRUCT):

494 structure = (

495 ('Level', DWORD),

496 ('FileInfo', FILE_ENUM_UNION),

497 )

498

499# 2.2.4.11 SESSION_INFO_0

500 class SESSION_INFO_0(NDRSTRUCT):

501 structure = (

502 ('sesi0_cname', LPWSTR),

503 )

504

505 class LPSESSION_INFO_0(NDRPOINTER):

506 referent = (

507 ('Data', SESSION_INFO_0),

508 )

509

510 class SESSION_INFO_0_ARRAY(NDRUniConformantArray):

511 item = SESSION_INFO_0

512

513 class LPSESSION_INFO_0_ARRAY(NDRPOINTER):

514 referent = (

515 ('Data', SESSION_INFO_0_ARRAY),

516 )

517

518# 2.2.4.12 SESSION_INFO_1

519 class SESSION_INFO_1(NDRSTRUCT):

520 structure = (

521 ('sesi1_cname', LPWSTR),

522 ('sesi1_username', LPWSTR),

523 ('sesi1_num_opens', DWORD),

524 ('sesi1_time', DWORD),

525 ('sesi1_idle_time', DWORD),

526 ('sesi1_user_flags', DWORD),

527 )

528

529 class LPSESSION_INFO_1(NDRPOINTER):

530 referent = (

531 ('Data', SESSION_INFO_1),

532 )

533

534 class SESSION_INFO_1_ARRAY(NDRUniConformantArray):

535 item = SESSION_INFO_1

536

537 class LPSESSION_INFO_1_ARRAY(NDRPOINTER):

538 referent = (

539 ('Data', SESSION_INFO_1_ARRAY),

540 )

541

542# 2.2.4.13 SESSION_INFO_2

543 class SESSION_INFO_2(NDRSTRUCT):

544 structure = (

545 ('sesi2_cname', LPWSTR),

546 ('sesi2_username', LPWSTR),

547 ('sesi2_num_opens', DWORD),

548 ('sesi2_time', DWORD),

549 ('sesi2_idle_time', DWORD),

550 ('sesi2_user_flags', DWORD),

551 ('sesi2_cltype_name', LPWSTR),

552 )

553

554 class LPSESSION_INFO_2(NDRPOINTER):

555 referent = (

556 ('Data', SESSION_INFO_2),

557 )

558

559 class SESSION_INFO_2_ARRAY(NDRUniConformantArray):

560 item = SESSION_INFO_2

561

562 class LPSESSION_INFO_2_ARRAY(NDRPOINTER):

563 referent = (

564 ('Data', SESSION_INFO_2_ARRAY),

565 )

566

567# 2.2.4.14 SESSION_INFO_10

568 class SESSION_INFO_10(NDRSTRUCT):

569 structure = (

570 ('sesi10_cname', LPWSTR),

571 ('sesi10_username', LPWSTR),

572 ('sesi10_time', DWORD),

573 ('sesi10_idle_time', DWORD),

574 )

575

576 class LPSESSION_INFO_10(NDRPOINTER):

577 referent = (

578 ('Data', SESSION_INFO_10),

579 )

580

581 class SESSION_INFO_10_ARRAY(NDRUniConformantArray):

582 item = SESSION_INFO_10

583

584 class LPSESSION_INFO_10_ARRAY(NDRPOINTER):

585 referent = (

586 ('Data', SESSION_INFO_10_ARRAY),

587 )

588

589# 2.2.4.15 SESSION_INFO_502

590 class SESSION_INFO_502(NDRSTRUCT):

591 structure = (

592 ('sesi502_cname', LPWSTR),

593 ('sesi502_username', LPWSTR),

594 ('sesi502_num_opens', DWORD),

595 ('sesi502_time', DWORD),

596 ('sesi502_idle_time', DWORD),

597 ('sesi502_user_flags', DWORD),

598 ('sesi502_cltype_name', LPWSTR),

599 ('sesi502_transport', LPWSTR),

600 )

601

602 class LPSESSION_INFO_502(NDRPOINTER):

603 referent = (

604 ('Data', SESSION_INFO_502),

605 )

606

607 class SESSION_INFO_502_ARRAY(NDRUniConformantArray):

608 item = SESSION_INFO_502

609

610 class LPSESSION_INFO_502_ARRAY(NDRPOINTER):

611 referent = (

612 ('Data', SESSION_INFO_502_ARRAY),

613 )

614

615# 2.2.4.16 SESSION_INFO_0_CONTAINER

616 class SESSION_INFO_0_CONTAINER(NDRSTRUCT):

617 structure = (

618 ('EntriesRead', DWORD),

619 ('Buffer', LPSESSION_INFO_0_ARRAY),

620 )

621

622 class LPSESSION_INFO_0_CONTAINER(NDRPOINTER):

623 referent = (

624 ('Data', SESSION_INFO_0_CONTAINER),

625 )

626

627# 2.2.4.17 SESSION_INFO_1_CONTAINER

628 class SESSION_INFO_1_CONTAINER(NDRSTRUCT):

629 structure = (

630 ('EntriesRead', DWORD),

631 ('Buffer', LPSESSION_INFO_1_ARRAY),

632 )

633

634 class LPSESSION_INFO_1_CONTAINER(NDRPOINTER):

635 referent = (

636 ('Data', SESSION_INFO_1_CONTAINER),

637 )

638

639# 2.2.4.18 SESSION_INFO_2_CONTAINER

640 class SESSION_INFO_2_CONTAINER(NDRSTRUCT):

641 structure = (

642 ('EntriesRead', DWORD),

643 ('Buffer', LPSESSION_INFO_2_ARRAY),

644 )

645

646 class LPSESSION_INFO_2_CONTAINER(NDRPOINTER):

647 referent = (

648 ('Data', SESSION_INFO_2_CONTAINER),

649 )

650

651# 2.2.4.19 SESSION_INFO_10_CONTAINER

652 class SESSION_INFO_10_CONTAINER(NDRSTRUCT):

653 structure = (

654 ('EntriesRead', DWORD),

655 ('Buffer', LPSESSION_INFO_10_ARRAY),

656 )

657

658 class LPSESSION_INFO_10_CONTAINER(NDRPOINTER):

659 referent = (

660 ('Data', SESSION_INFO_10_CONTAINER),

661 )

662

663# 2.2.4.20 SESSION_INFO_502_CONTAINER

664 class SESSION_INFO_502_CONTAINER(NDRSTRUCT):

665 structure = (

666 ('EntriesRead', DWORD),

667 ('Buffer', LPSESSION_INFO_502_ARRAY),

668 )

669

670 class LPSESSION_INFO_502_CONTAINER(NDRPOINTER):

671 referent = (

672 ('Data', SESSION_INFO_502_CONTAINER),

673 )

674

675# 2.2.3.4 SESSION_ENUM_UNION

676 class SESSION_ENUM_UNION(NDRUNION):

677 commonHdr = (

678 ('tag', DWORD),

679 )

680

681 union = {

682 0: ('Level0', LPSESSION_INFO_0_CONTAINER),

683 1: ('Level1', LPSESSION_INFO_1_CONTAINER),

684 2: ('Level2', LPSESSION_INFO_2_CONTAINER),

685 10: ('Level10', LPSESSION_INFO_10_CONTAINER),

686 502: ('Level502', LPSESSION_INFO_502_CONTAINER),

687 }

688

689# 2.2.4.21 SESSION_ENUM_STRUCT

690 class SESSION_ENUM_STRUCT(NDRSTRUCT):

691 structure = (

692 ('Level', DWORD),

693 ('SessionInfo', SESSION_ENUM_UNION),

694 )

695

696# 2.2.4.22 SHARE_INFO_0

697 class SHARE_INFO_0(NDRSTRUCT):

698 structure = (

699 ('shi0_netname', LPWSTR),

700 )

701

702 class LPSHARE_INFO_0(NDRPOINTER):

703 referent = (

704 ('Data', SHARE_INFO_0),

705 )

706

707 class SHARE_INFO_0_ARRAY(NDRUniConformantArray):

708 item = SHARE_INFO_0

709

710 class LPSHARE_INFO_0_ARRAY(NDRPOINTER):

711 referent = (

712 ('Data', SHARE_INFO_0_ARRAY),

713 )

714

715# 2.2.4.23 SHARE_INFO_1

716 class SHARE_INFO_1(NDRSTRUCT):

717 structure = (

718 ('shi1_netname', LPWSTR),

719 ('shi1_type', DWORD),

720 ('shi1_remark', LPWSTR),

721 )

722

723 class LPSHARE_INFO_1(NDRPOINTER):

724 referent = (

725 ('Data', SHARE_INFO_1),

726 )

727

728 class SHARE_INFO_1_ARRAY(NDRUniConformantArray):

729 item = SHARE_INFO_1

730

731 class LPSHARE_INFO_1_ARRAY(NDRPOINTER):

732 referent = (

733 ('Data', SHARE_INFO_1_ARRAY),

734 )

735

736# 2.2.4.24 SHARE_INFO_2

737 class SHARE_INFO_2(NDRSTRUCT):

738 structure = (

739 ('shi2_netname', LPWSTR),

740 ('shi2_type', DWORD),

741 ('shi2_remark', LPWSTR),

742 ('shi2_permissions', DWORD),

743 ('shi2_max_uses', DWORD),

744 ('shi2_current_uses', DWORD),

745 ('shi2_path', LPWSTR),

746 ('shi2_passwd', LPWSTR),

747 )

748

749 class LPSHARE_INFO_2(NDRPOINTER):

750 referent = (

751 ('Data', SHARE_INFO_2),

752 )

753

754 class SHARE_INFO_2_ARRAY(NDRUniConformantArray):

755 item = SHARE_INFO_2

756

757 class LPSHARE_INFO_2_ARRAY(NDRPOINTER):

758 referent = (

759 ('Data', SHARE_INFO_2_ARRAY),

760 )

761

762# 2.2.4.25 SHARE_INFO_501

763 class SHARE_INFO_501(NDRSTRUCT):

764 structure = (

765 ('shi501_netname', LPWSTR),

766 ('shi501_type', DWORD),

767 ('shi501_remark', LPWSTR),

768 ('shi501_flags', DWORD),

769 )

770

771 class LPSHARE_INFO_501(NDRPOINTER):

772 referent = (

773 ('Data', SHARE_INFO_501),

774 )

775

776 class SHARE_INFO_501_ARRAY(NDRUniConformantArray):

777 item = SHARE_INFO_501

778

779 class LPSHARE_INFO_501_ARRAY(NDRPOINTER):

780 referent = (

781 ('Data', SHARE_INFO_501_ARRAY),

782 )

783

784# 2.2.4.26 SHARE_INFO_502_I

785 class SHARE_INFO_502(NDRSTRUCT):

786 structure = (

787 ('shi502_netname', LPWSTR),

788 ('shi502_type', DWORD),

789 ('shi502_remark', LPWSTR),

790 ('shi502_permissions', DWORD),

791 ('shi502_max_uses', DWORD),

792 ('shi502_current_uses', DWORD),

793 ('shi502_path', LPWSTR),

794 ('shi502_passwd', LPWSTR),

795 ('shi502_reserved', DWORD),

796 ('shi502_security_descriptor', LPBYTE),

797 )

798

799 class LPSHARE_INFO_502(NDRPOINTER):

800 referent = (

801 ('Data', SHARE_INFO_502),

802 )

803

804 class SHARE_INFO_502_ARRAY(NDRUniConformantArray):

805 item = SHARE_INFO_502

806

807 class LPSHARE_INFO_502_ARRAY(NDRPOINTER):

808 referent = (

809 ('Data', SHARE_INFO_502_ARRAY),

810 )

811

812# 2.2.4.27 SHARE_INFO_503_I

813 class SHARE_INFO_503(NDRSTRUCT):

814 structure = (

815 ('shi503_netname', LPWSTR),

816 ('shi503_type', DWORD),

817 ('shi503_remark', LPWSTR),

818 ('shi503_permissions', DWORD),

819 ('shi503_max_uses', DWORD),

820 ('shi503_current_uses', DWORD),

821 ('shi503_path', LPWSTR),

822 ('shi503_passwd', LPWSTR),

823 ('shi503_servername', LPWSTR),

824 ('shi503_reserved', DWORD),

825 ('shi503_security_descriptor', LPBYTE),

826 )

827

828 class LPSHARE_INFO_503(NDRPOINTER):

829 referent = (

830 ('Data', SHARE_INFO_503),

831 )

832

833 class SHARE_INFO_503_ARRAY(NDRUniConformantArray):

834 item = SHARE_INFO_503

835

836 class LPSHARE_INFO_503_ARRAY(NDRPOINTER):

837 referent = (

838 ('Data', SHARE_INFO_503_ARRAY),

839 )

840

841# 2.2.4.28 SHARE_INFO_1004

842 class SHARE_INFO_1004(NDRSTRUCT):

843 structure = (

844 ('shi1004_remark', LPWSTR),

845 )

846

847 class LPSHARE_INFO_1004(NDRPOINTER):

848 referent = (

849 ('Data', SHARE_INFO_1004),

850 )

851

852 class SHARE_INFO_1004_ARRAY(NDRUniConformantArray):

853 item = SHARE_INFO_1004

854

855 class LPSHARE_INFO_1004_ARRAY(NDRPOINTER):

856 referent = (

857 ('Data', SHARE_INFO_1004_ARRAY),

858 )

859

860# 2.2.4.29 SHARE_INFO_1005

861 class SHARE_INFO_1005(NDRSTRUCT):

862 structure = (

863 ('shi1005_flags', DWORD),

864 )

865

866 class LPSHARE_INFO_1005(NDRPOINTER):

867 referent = (

868 ('Data', SHARE_INFO_1005),

869 )

870

871 class SHARE_INFO_1005_ARRAY(NDRUniConformantArray):

872 item = SHARE_INFO_1004

873

874 class LPSHARE_INFO_1005_ARRAY(NDRPOINTER):

875 referent = (

876 ('Data', SHARE_INFO_1005_ARRAY),

877 )

878

879# 2.2.4.30 SHARE_INFO_1006

880 class SHARE_INFO_1006(NDRSTRUCT):

881 structure = (

882 ('shi1006_max_uses', DWORD),

883 )

884

885 class LPSHARE_INFO_1006(NDRPOINTER):

886 referent = (

887 ('Data', SHARE_INFO_1006),

888 )

889

890 class SHARE_INFO_1006_ARRAY(NDRUniConformantArray):

891 item = SHARE_INFO_1006

892

893 class LPSHARE_INFO_1006_ARRAY(NDRPOINTER):

894 referent = (

895 ('Data', SHARE_INFO_1006_ARRAY),

896 )

897

898# 2.2.4.31 SHARE_INFO_1501_I

899 class SHARE_INFO_1501(NDRSTRUCT):

900 structure = (

901 ('shi1501_reserved', DWORD),

902 ('shi1501_security_descriptor', NDRUniConformantArray),

903 )

904

905 class LPSHARE_INFO_1501(NDRPOINTER):

906 referent = (

907 ('Data', SHARE_INFO_1501),

908 )

909

910 class SHARE_INFO_1501_ARRAY(NDRUniConformantArray):

911 item = SHARE_INFO_1501

912

913 class LPSHARE_INFO_1501_ARRAY(NDRPOINTER):

914 referent = (

915 ('Data', SHARE_INFO_1501_ARRAY),

916 )

917

918# 2.2.4.32 SHARE_INFO_0_CONTAINER

919 class SHARE_INFO_0_CONTAINER(NDRSTRUCT):

920 structure = (

921 ('EntriesRead', DWORD),

922 ('Buffer', LPSHARE_INFO_0_ARRAY),

923 )

924

925 class LPSHARE_INFO_0_CONTAINER(NDRPOINTER):

926 referent = (

927 ('Data', SHARE_INFO_0_CONTAINER),

928 )

929

930# 2.2.4.33 SHARE_INFO_1_CONTAINER

931 class SHARE_INFO_1_CONTAINER(NDRSTRUCT):

932 structure = (

933 ('EntriesRead', DWORD),

934 ('Buffer', LPSHARE_INFO_1_ARRAY),

935 )

936

937 class LPSHARE_INFO_1_CONTAINER(NDRPOINTER):

938 referent = (

939 ('Data', SHARE_INFO_1_CONTAINER),

940 )

941

942# 2.2.4.34 SHARE_INFO_2_CONTAINER

943 class SHARE_INFO_2_CONTAINER(NDRSTRUCT):

944 structure = (

945 ('EntriesRead', DWORD),

946 ('Buffer', LPSHARE_INFO_2_ARRAY),

947 )

948

949 class LPSHARE_INFO_2_CONTAINER(NDRPOINTER):

950 referent = (

951 ('Data', SHARE_INFO_2_CONTAINER),

952 )

953

954# 2.2.4.35 SHARE_INFO_501_CONTAINER

955 class SHARE_INFO_501_CONTAINER(NDRSTRUCT):

956 structure = (

957 ('EntriesRead', DWORD),

958 ('Buffer', LPSHARE_INFO_501_ARRAY),

959 )

960

961 class LPSHARE_INFO_501_CONTAINER(NDRPOINTER):

962 referent = (

963 ('Data', SHARE_INFO_501_CONTAINER),

964 )

965

966# 2.2.4.36 SHARE_INFO_502_CONTAINER

967 class SHARE_INFO_502_CONTAINER(NDRSTRUCT):

968 structure = (

969 ('EntriesRead', DWORD),

970 ('Buffer', LPSHARE_INFO_502_ARRAY),

971 )

972

973 class LPSHARE_INFO_502_CONTAINER(NDRPOINTER):

974 referent = (

975 ('Data', SHARE_INFO_502_CONTAINER),

976 )

977

978# 2.2.4.37 SHARE_INFO_503_CONTAINER

979 class SHARE_INFO_503_CONTAINER(NDRSTRUCT):

980 structure = (

981 ('EntriesRead', DWORD),

982 ('Buffer', LPSHARE_INFO_503_ARRAY),

983 )

984

985 class LPSHARE_INFO_503_CONTAINER(NDRPOINTER):

986 referent = (

987 ('Data', SHARE_INFO_503_CONTAINER),

988 )

989

990# 2.2.3.5 SHARE_ENUM_UNION

991 class SHARE_ENUM_UNION(NDRUNION):

992 commonHdr = (

993 ('tag', DWORD),

994 )

995

996 union = {

997 0: ('Level0', LPSHARE_INFO_0_CONTAINER),

998 1: ('Level1', LPSHARE_INFO_1_CONTAINER),

999 2: ('Level2', LPSHARE_INFO_2_CONTAINER),

1000 501: ('Level501', LPSHARE_INFO_501_CONTAINER),

1001 502: ('Level502', LPSHARE_INFO_502_CONTAINER),

1002 503: ('Level503', LPSHARE_INFO_503_CONTAINER),

1003 }

1004

1005# 2.2.4.38 SHARE_ENUM_STRUCT

1006 class SHARE_ENUM_STRUCT(NDRSTRUCT):

1007 structure = (

1008 ('Level', DWORD),

1009 ('ShareInfo', SHARE_ENUM_UNION),

1010 )

1011

1012# 2.2.4.39 STAT_SERVER_0

1013 class STAT_SERVER_0(NDRSTRUCT):

1014 structure = (

1015 ('sts0_start', DWORD),

1016 ('sts0_fopens', DWORD),

1017 ('sts0_devopens', DWORD),

1018 ('sts0_jobsqueued', DWORD),

1019 ('sts0_sopens', DWORD),

1020 ('sts0_stimedout', DWORD),

1021 ('sts0_serrorout', DWORD),

1022 ('sts0_pwerrors', DWORD),

1023 ('sts0_permerrors', DWORD),

1024 ('sts0_syserrors', DWORD),

1025 ('sts0_bytessent_low', DWORD),

1026 ('sts0_bytessent_high', DWORD),

1027 ('sts0_bytesrcvd_low', DWORD),

1028 ('sts0_bytesrcvd_high', DWORD),

1029 ('sts0_avresponse', DWORD),

1030 ('sts0_reqbufneed', DWORD),

1031 ('sts0_bigbufneed', DWORD),

1032 )

1033

1034 class LPSTAT_SERVER_0(NDRPOINTER):

1035 referent = (

1036 ('Data', STAT_SERVER_0),

1037 )

1038

1039# 2.2.4.40 SERVER_INFO_100

1040 class SERVER_INFO_100(NDRSTRUCT):

1041 structure = (

1042 ('sv100_platform_id', DWORD),

1043 ('sv100_name', LPWSTR),

1044 )

1045

1046 class LPSERVER_INFO_100(NDRPOINTER):

1047 referent = (

1048 ('Data', SERVER_INFO_100),

1049 )

1050

1051# 2.2.4.41 SERVER_INFO_101

1052 class SERVER_INFO_101(NDRSTRUCT):

1053 structure = (

1054 ('sv101_platform_id', DWORD),

1055 ('sv101_name', LPWSTR),

1056 ('sv101_version_major', DWORD),

1057 ('sv101_version_minor', DWORD),

1058 ('sv101_type', DWORD),

1059 ('sv101_comment', LPWSTR),

1060 )

1061

1062 class LPSERVER_INFO_101(NDRPOINTER):

1063 referent = (

1064 ('Data', SERVER_INFO_101),

1065 )

1066

1067# 2.2.4.42 SERVER_INFO_102

1068 class SERVER_INFO_102(NDRSTRUCT):

1069 structure = (

1070 ('sv102_platform_id', DWORD),

1071 ('sv102_name', LPWSTR),

1072 ('sv102_version_major', DWORD),

1073 ('sv102_version_minor', DWORD),

1074 ('sv102_type', DWORD),

1075 ('sv102_comment', LPWSTR),

1076 ('sv102_users', DWORD),

1077 ('sv102_disc', DWORD),

1078 ('sv102_hidden', DWORD),

1079 ('sv102_announce', DWORD),

1080 ('sv102_anndelta', DWORD),

1081 ('sv102_licenses', DWORD),

1082 ('sv102_userpath', LPWSTR),

1083 )

1084

1085 class LPSERVER_INFO_102(NDRPOINTER):

1086 referent = (

1087 ('Data', SERVER_INFO_102),

1088 )

1089

1090# 2.2.4.43 SERVER_INFO_103

1091 class SERVER_INFO_103(NDRSTRUCT):

1092 structure = (

1093 ('sv103_platform_id', DWORD),

1094 ('sv103_name', LPWSTR),

1095 ('sv103_version_major', DWORD),

1096 ('sv103_version_minor', DWORD),

1097 ('sv103_type', DWORD),

1098 ('sv103_comment', LPWSTR),

1099 ('sv103_users', DWORD),

1100 ('sv103_disc', DWORD),

1101 ('sv103_hidden', DWORD),

1102 ('sv103_announce', DWORD),

1103 ('sv103_anndelta', DWORD),

1104 ('sv103_licenses', DWORD),

1105 ('sv103_userpath', LPWSTR),

1106 ('sv103_capabilities', DWORD),

1107 )

1108

1109 class LPSERVER_INFO_103(NDRPOINTER):

1110 referent = (

1111 ('Data', SERVER_INFO_103),

1112 )

1113

1114# 2.2.4.44 SERVER_INFO_502

1115 class SERVER_INFO_502(NDRSTRUCT):

1116 structure = (

1117 ('sv502_sessopens', DWORD),

1118 ('sv502_sessvcs', DWORD),

1119 ('sv502_opensearch', DWORD),

1120 ('sv502_sizreqbuf', DWORD),

1121 ('sv502_initworkitems', DWORD),

1122 ('sv502_maxworkitems', DWORD),

1123 ('sv502_rawworkitems', DWORD),

1124 ('sv502_irpstacksize', DWORD),

1125 ('sv502_maxrawbuflen', DWORD),

1126 ('sv502_sessusers', DWORD),

1127 ('sv502_sessconns', DWORD),

1128 ('sv502_maxpagedmemoryusage', DWORD),

1129 ('sv502_maxnonpagedmemoryusage', DWORD),

1130 ('sv502_enablesoftcompat', DWORD),

1131 ('sv502_enableforcedlogoff', DWORD),

1132 ('sv502_timesource', DWORD),

1133 ('sv502_acceptdownlevelapis', DWORD),

1134 ('sv502_lmannounce', DWORD),

1135 )

1136

1137 class LPSERVER_INFO_502(NDRPOINTER):

1138 referent = (

1139 ('Data', SERVER_INFO_502),

1140 )

1141

1142# 2.2.4.45 SERVER_INFO_503

1143 class SERVER_INFO_503(NDRSTRUCT):

1144 structure = (

1145 ('sv503_sessopens', DWORD),

1146 ('sv503_sessvcs', DWORD),

1147 ('sv503_opensearch', DWORD),

1148 ('sv503_sizreqbuf', DWORD),

1149 ('sv503_initworkitems', DWORD),

1150 ('sv503_maxworkitems', DWORD),

1151 ('sv503_rawworkitems', DWORD),

1152 ('sv503_irpstacksize', DWORD),

1153 ('sv503_maxrawbuflen', DWORD),

1154 ('sv503_sessusers', DWORD),

1155 ('sv503_sessconns', DWORD),

1156 ('sv503_maxpagedmemoryusage', DWORD),

1157 ('sv503_maxnonpagedmemoryusage', DWORD),

1158 ('sv503_enablesoftcompat', DWORD),

1159 ('sv503_enableforcedlogoff', DWORD),

1160 ('sv503_timesource', DWORD),

1161 ('sv503_acceptdownlevelapis', DWORD),

1162 ('sv503_lmannounce', DWORD),

1163 ('sv503_domain', LPWSTR),

1164 ('sv503_maxcopyreadlen', DWORD),

1165 ('sv503_maxcopywritelen', DWORD),

1166 ('sv503_minkeepsearch', DWORD),

1167 ('sv503_maxkeepsearch', DWORD),

1168 ('sv503_minkeepcomplsearch', DWORD),

1169 ('sv503_maxkeepcomplsearch', DWORD),

1170 ('sv503_threadcountadd', DWORD),

1171 ('sv503_numblockthreads', DWORD),

1172 ('sv503_scavtimeout', DWORD),

1173 ('sv503_minrcvqueue', DWORD),

1174 ('sv503_minfreeworkitems', DWORD),

1175 ('sv503_xactmemsize', DWORD),

1176 ('sv503_threadpriority', DWORD),

1177 ('sv503_maxmpxct', DWORD),

1178 ('sv503_oplockbreakwait', DWORD),

1179 ('sv503_oplockbreakresponsewait', DWORD),

1180 ('sv503_enableoplocks', DWORD),

1181 ('sv503_enableoplockforceclose', DWORD),

1182 ('sv503_enablefcbopens', DWORD),

1183 ('sv503_enableraw', DWORD),

1184 ('sv503_enablesharednetdrives', DWORD),

1185 ('sv503_minfreeconnections', DWORD),

1186 ('sv503_maxfreeconnections', DWORD),

1187 )

1188

1189 class LPSERVER_INFO_503(NDRPOINTER):

1190 referent = (

1191 ('Data', SERVER_INFO_503),

1192 )

1193

1194# 2.2.4.46 SERVER_INFO_599

1195 class SERVER_INFO_599(NDRSTRUCT):

1196 structure = (

1197 ('sv599_sessopens', DWORD),

1198 ('sv599_sessvcs', DWORD),

1199 ('sv599_opensearch', DWORD),

1200 ('sv599_sizreqbuf', DWORD),

1201 ('sv599_initworkitems', DWORD),

1202 ('sv599_maxworkitems', DWORD),

1203 ('sv599_rawworkitems', DWORD),

1204 ('sv599_irpstacksize', DWORD),

1205 ('sv599_maxrawbuflen', DWORD),

1206 ('sv599_sessusers', DWORD),

1207 ('sv599_sessconns', DWORD),

1208 ('sv599_maxpagedmemoryusage', DWORD),

1209 ('sv599_maxnonpagedmemoryusage', DWORD),

1210 ('sv599_enablesoftcompat', DWORD),

1211 ('sv599_enableforcedlogoff', DWORD),

1212 ('sv599_timesource', DWORD),

1213 ('sv599_acceptdownlevelapis', DWORD),

1214 ('sv599_lmannounce', DWORD),

1215 ('sv599_domain', LPWSTR),

1216 ('sv599_maxcopyreadlen', DWORD),

1217 ('sv599_maxcopywritelen', DWORD),

1218 ('sv599_minkeepsearch', DWORD),

1219 ('sv599_maxkeepsearch', DWORD),

1220 ('sv599_minkeepcomplsearch', DWORD),

1221 ('sv599_maxkeepcomplsearch', DWORD),

1222 ('sv599_threadcountadd', DWORD),

1223 ('sv599_numblockthreads', DWORD),

1224 ('sv599_scavtimeout', DWORD),

1225 ('sv599_minrcvqueue', DWORD),

1226 ('sv599_minfreeworkitems', DWORD),

1227 ('sv599_xactmemsize', DWORD),

1228 ('sv599_threadpriority', DWORD),

1229 ('sv599_maxmpxct', DWORD),

1230 ('sv599_oplockbreakwait', DWORD),

1231 ('sv599_oplockbreakresponsewait', DWORD),

1232 ('sv599_enableoplocks', DWORD),

1233 ('sv599_enableoplockforceclose', DWORD),

1234 ('sv599_enablefcbopens', DWORD),

1235 ('sv599_enableraw', DWORD),

1236 ('sv599_enablesharednetdrives', DWORD),

1237 ('sv599_minfreeconnections', DWORD),

1238 ('sv599_maxfreeconnections', DWORD),

1239 ('sv599_initsesstable', DWORD),

1240 ('sv599_initconntable', DWORD),

1241 ('sv599_initfiletable', DWORD),

1242 ('sv599_initsearchtable', DWORD),

1243 ('sv599_alertschedule', DWORD),

1244 ('sv599_errorthreshold', DWORD),

1245 ('sv599_networkerrorthreshold', DWORD),

1246 ('sv599_diskspacethreshold', DWORD),

1247 ('sv599_reserved', DWORD),

1248 ('sv599_maxlinkdelay', DWORD),

1249 ('sv599_minlinkthroughput', DWORD),

1250 ('sv599_linkinfovalidtime', DWORD),

1251 ('sv599_scavqosinfoupdatetime', DWORD),

1252 ('sv599_maxworkitemidletime', DWORD),

1253 )

1254

1255 class LPSERVER_INFO_599(NDRPOINTER):

1256 referent = (

1257 ('Data', SERVER_INFO_599),

1258 )

1259

1260# 2.2.4.47 SERVER_INFO_1005

1261 class SERVER_INFO_1005(NDRSTRUCT):

1262 structure = (

1263 ('sv1005_comment', LPWSTR),

1264 )

1265

1266 class LPSERVER_INFO_1005(NDRPOINTER):

1267 referent = (

1268 ('Data', SERVER_INFO_1005),

1269 )

1270

1271# 2.2.4.48 SERVER_INFO_1107

1272 class SERVER_INFO_1107(NDRSTRUCT):

1273 structure = (

1274 ('sv1107_users', DWORD),

1275 )

1276

1277 class LPSERVER_INFO_1107(NDRPOINTER):

1278 referent = (

1279 ('Data', SERVER_INFO_1107),

1280 )

1281

1282# 2.2.4.49 SERVER_INFO_1010

1283 class SERVER_INFO_1010(NDRSTRUCT):

1284 structure = (

1285 ('sv1010_disc', DWORD),

1286 )

1287

1288 class LPSERVER_INFO_1010(NDRPOINTER):

1289 referent = (

1290 ('Data', SERVER_INFO_1010),

1291 )

1292

1293# 2.2.4.50 SERVER_INFO_1016

1294 class SERVER_INFO_1016(NDRSTRUCT):

1295 structure = (

1296 ('sv1016_hidden', DWORD),

1297 )

1298

1299 class LPSERVER_INFO_1016(NDRPOINTER):

1300 referent = (

1301 ('Data', SERVER_INFO_1016),

1302 )

1303

1304# 2.2.4.51 SERVER_INFO_1017

1305 class SERVER_INFO_1017(NDRSTRUCT):

1306 structure = (

1307 ('sv1017_announce', DWORD),

1308 )

1309

1310 class LPSERVER_INFO_1017(NDRPOINTER):

1311 referent = (

1312 ('Data', SERVER_INFO_1017),

1313 )

1314

1315# 2.2.4.52 SERVER_INFO_1018

1316 class SERVER_INFO_1018(NDRSTRUCT):

1317 structure = (

1318 ('sv1018_anndelta', DWORD),

1319 )

1320

1321 class LPSERVER_INFO_1018(NDRPOINTER):

1322 referent = (

1323 ('Data', SERVER_INFO_1018),

1324 )

1325

1326# 2.2.4.53 SERVER_INFO_1501

1327 class SERVER_INFO_1501(NDRSTRUCT):

1328 structure = (

1329 ('sv1501_sessopens', DWORD),

1330 )

1331

1332 class LPSERVER_INFO_1501(NDRPOINTER):

1333 referent = (

1334 ('Data', SERVER_INFO_1501),

1335 )

1336

1337# 2.2.4.54 SERVER_INFO_1502

1338 class SERVER_INFO_1502(NDRSTRUCT):

1339 structure = (

1340 ('sv1502_sessvcs', DWORD),

1341 )

1342

1343 class LPSERVER_INFO_1502(NDRPOINTER):

1344 referent = (

1345 ('Data', SERVER_INFO_1502),

1346 )

1347

1348# 2.2.4.55 SERVER_INFO_1503

1349 class SERVER_INFO_1503(NDRSTRUCT):

1350 structure = (

1351 ('sv1503_opensearch', DWORD),

1352 )

1353

1354 class LPSERVER_INFO_1503(NDRPOINTER):

1355 referent = (

1356 ('Data', SERVER_INFO_1503),

1357 )

1358

1359# 2.2.4.56 SERVER_INFO_1506

1360 class SERVER_INFO_1506(NDRSTRUCT):

1361 structure = (

1362 ('sv1506_maxworkitems', DWORD),

1363 )

1364

1365 class LPSERVER_INFO_1506(NDRPOINTER):

1366 referent = (

1367 ('Data', SERVER_INFO_1506),

1368 )

1369

1370# 2.2.4.57 SERVER_INFO_1510

1371 class SERVER_INFO_1510(NDRSTRUCT):

1372 structure = (

1373 ('sv1510_sessusers', DWORD),

1374 )

1375

1376 class LPSERVER_INFO_1510(NDRPOINTER):

1377 referent = (

1378 ('Data', SERVER_INFO_1510),

1379 )

1380

1381# 2.2.4.58 SERVER_INFO_1511

1382 class SERVER_INFO_1511(NDRSTRUCT):

1383 structure = (

1384 ('sv1511_sessconns', DWORD),

1385 )

1386

1387 class LPSERVER_INFO_1511(NDRPOINTER):

1388 referent = (

1389 ('Data', SERVER_INFO_1511),

1390 )

1391

1392# 2.2.4.59 SERVER_INFO_1512

1393 class SERVER_INFO_1512(NDRSTRUCT):

1394 structure = (

1395 ('sv1512_maxnonpagedmemoryusage', DWORD),

1396 )

1397

1398 class LPSERVER_INFO_1512(NDRPOINTER):

1399 referent = (

1400 ('Data', SERVER_INFO_1512),

1401 )

1402

1403# 2.2.4.60 SERVER_INFO_1513

1404 class SERVER_INFO_1513(NDRSTRUCT):

1405 structure = (

1406 ('sv1513_maxpagedmemoryusage', DWORD),

1407 )

1408

1409 class LPSERVER_INFO_1513(NDRPOINTER):

1410 referent = (

1411 ('Data', SERVER_INFO_1513),

1412 )

1413

1414# 2.2.4.61 SERVER_INFO_1514

1415 class SERVER_INFO_1514(NDRSTRUCT):

1416 structure = (

1417 ('sv1514_enablesoftcompat', DWORD),

1418 )

1419

1420 class LPSERVER_INFO_1514(NDRPOINTER):

1421 referent = (

1422 ('Data', SERVER_INFO_1514),

1423 )

1424

1425# 2.2.4.62 SERVER_INFO_1515

1426 class SERVER_INFO_1515(NDRSTRUCT):

1427 structure = (

1428 ('sv1515_enableforcedlogoff', DWORD),

1429 )

1430

1431 class LPSERVER_INFO_1515(NDRPOINTER):

1432 referent = (

1433 ('Data', SERVER_INFO_1515),

1434 )

1435

1436# 2.2.4.63 SERVER_INFO_1516

1437 class SERVER_INFO_1516(NDRSTRUCT):

1438 structure = (

1439 ('sv1516_timesource', DWORD),

1440 )

1441

1442 class LPSERVER_INFO_1516(NDRPOINTER):

1443 referent = (

1444 ('Data', SERVER_INFO_1516),

1445 )

1446

1447# 2.2.4.64 SERVER_INFO_1518

1448 class SERVER_INFO_1518(NDRSTRUCT):

1449 structure = (

1450 ('sv1518_lmannounce', DWORD),

1451 )

1452

1453 class LPSERVER_INFO_1518(NDRPOINTER):

1454 referent = (

1455 ('Data', SERVER_INFO_1518),

1456 )

1457

1458# 2.2.4.65 SERVER_INFO_1523

1459 class SERVER_INFO_1523(NDRSTRUCT):

1460 structure = (

1461 ('sv1523_maxkeepsearch', DWORD),

1462 )

1463

1464 class LPSERVER_INFO_1523(NDRPOINTER):

1465 referent = (

1466 ('Data', SERVER_INFO_1523),

1467 )

1468

1469# 2.2.4.66 SERVER_INFO_1528

1470 class SERVER_INFO_1528(NDRSTRUCT):

1471 structure = (

1472 ('sv1528_scavtimeout', DWORD),

1473 )

1474

1475 class LPSERVER_INFO_1528(NDRPOINTER):

1476 referent = (

1477 ('Data', SERVER_INFO_1528),

1478 )

1479

1480# 2.2.4.67 SERVER_INFO_1529

1481 class SERVER_INFO_1529(NDRSTRUCT):

1482 structure = (

1483 ('sv1529_minrcvqueue', DWORD),

1484 )

1485

1486 class LPSERVER_INFO_1529(NDRPOINTER):

1487 referent = (

1488 ('Data', SERVER_INFO_1529),

1489 )

1490

1491# 2.2.4.68 SERVER_INFO_1530

1492 class SERVER_INFO_1530(NDRSTRUCT):

1493 structure = (

1494 ('sv1530_minfreeworkitems', DWORD),

1495 )

1496

1497 class LPSERVER_INFO_1530(NDRPOINTER):

1498 referent = (

1499 ('Data', SERVER_INFO_1530),

1500 )

1501

1502# 2.2.4.69 SERVER_INFO_1533

1503 class SERVER_INFO_1533(NDRSTRUCT):

1504 structure = (

1505 ('sv1533_maxmpxct', DWORD),

1506 )

1507

1508 class LPSERVER_INFO_1533(NDRPOINTER):

1509 referent = (

1510 ('Data', SERVER_INFO_1533),

1511 )

1512

1513# 2.2.4.70 SERVER_INFO_1534

1514 class SERVER_INFO_1534(NDRSTRUCT):

1515 structure = (

1516 ('sv1534_oplockbreakwait', DWORD),

1517 )

1518

1519 class LPSERVER_INFO_1534(NDRPOINTER):

1520 referent = (

1521 ('Data', SERVER_INFO_1534),

1522 )

1523

1524# 2.2.4.71 SERVER_INFO_1535

1525 class SERVER_INFO_1535(NDRSTRUCT):

1526 structure = (

1527 ('sv1535_oplockbreakresponsewait', DWORD),

1528 )

1529

1530 class LPSERVER_INFO_1535(NDRPOINTER):

1531 referent = (

1532 ('Data', SERVER_INFO_1535),

1533 )

1534

1535# 2.2.4.72 SERVER_INFO_1536

1536 class SERVER_INFO_1536(NDRSTRUCT):

1537 structure = (

1538 ('sv1536_enableoplocks', DWORD),

1539 )

1540

1541 class LPSERVER_INFO_1536(NDRPOINTER):

1542 referent = (

1543 ('Data', SERVER_INFO_1536),

1544 )

1545

1546# 2.2.4.73 SERVER_INFO_1538

1547 class SERVER_INFO_1538(NDRSTRUCT):

1548 structure = (

1549 ('sv1538_enablefcbopens', DWORD),

1550 )

1551

1552 class LPSERVER_INFO_1538(NDRPOINTER):

1553 referent = (

1554 ('Data', SERVER_INFO_1538),

1555 )

1556

1557# 2.2.4.74 SERVER_INFO_1539

1558 class SERVER_INFO_1539(NDRSTRUCT):

1559 structure = (

1560 ('sv1539_enableraw', DWORD),

1561 )

1562

1563 class LPSERVER_INFO_1539(NDRPOINTER):

1564 referent = (

1565 ('Data', SERVER_INFO_1539),

1566 )

1567

1568# 2.2.4.75 SERVER_INFO_1540

1569 class SERVER_INFO_1540(NDRSTRUCT):

1570 structure = (

1571 ('sv1540_enablesharednetdrives', DWORD),

1572 )

1573

1574 class LPSERVER_INFO_1540(NDRPOINTER):

1575 referent = (

1576 ('Data', SERVER_INFO_1540),

1577 )

1578

1579# 2.2.4.76 SERVER_INFO_1541

1580 class SERVER_INFO_1541(NDRSTRUCT):

1581 structure = (

1582 ('sv1541_minfreeconnections', DWORD),

1583 )

1584

1585 class LPSERVER_INFO_1541(NDRPOINTER):

1586 referent = (

1587 ('Data', SERVER_INFO_1541),

1588 )

1589

1590# 2.2.4.77 SERVER_INFO_1542

1591 class SERVER_INFO_1542(NDRSTRUCT):

1592 structure = (

1593 ('sv1542_maxfreeconnections', DWORD),

1594 )

1595

1596 class LPSERVER_INFO_1542(NDRPOINTER):

1597 referent = (

1598 ('Data', SERVER_INFO_1542),

1599 )

1600

1601# 2.2.4.78 SERVER_INFO_1543

1602 class SERVER_INFO_1543(NDRSTRUCT):

1603 structure = (

1604 ('sv1543_initsesstable', DWORD),

1605 )

1606

1607 class LPSERVER_INFO_1543(NDRPOINTER):

1608 referent = (

1609 ('Data', SERVER_INFO_1543),

1610 )

1611

1612# 2.2.4.79 SERVER_INFO_1544

1613 class SERVER_INFO_1544(NDRSTRUCT):

1614 structure = (

1615 ('sv1544_initconntable', DWORD),

1616 )

1617

1618 class LPSERVER_INFO_1544(NDRPOINTER):

1619 referent = (

1620 ('Data', SERVER_INFO_1544),

1621 )

1622

1623# 2.2.4.80 SERVER_INFO_1545

1624 class SERVER_INFO_1545(NDRSTRUCT):

1625 structure = (

1626 ('sv1545_initfiletable', DWORD),

1627 )

1628

1629 class LPSERVER_INFO_1545(NDRPOINTER):

1630 referent = (

1631 ('Data', SERVER_INFO_1545),

1632 )

1633

1634# 2.2.4.81 SERVER_INFO_1546

1635 class SERVER_INFO_1546(NDRSTRUCT):

1636 structure = (

1637 ('sv1546_initsearchtable', DWORD),

1638 )

1639

1640 class LPSERVER_INFO_1546(NDRPOINTER):

1641 referent = (

1642 ('Data', SERVER_INFO_1546),

1643 )

1644

1645# 2.2.4.82 SERVER_INFO_1547

1646 class SERVER_INFO_1547(NDRSTRUCT):

1647 structure = (

1648 ('sv1547_alertschedule', DWORD),

1649 )

1650

1651 class LPSERVER_INFO_1547(NDRPOINTER):

1652 referent = (

1653 ('Data', SERVER_INFO_1547),

1654 )

1655

1656# 2.2.4.83 SERVER_INFO_1548

1657 class SERVER_INFO_1548(NDRSTRUCT):

1658 structure = (

1659 ('sv1548_errorthreshold', DWORD),

1660 )

1661

1662 class LPSERVER_INFO_1548(NDRPOINTER):

1663 referent = (

1664 ('Data', SERVER_INFO_1548),

1665 )

1666

1667# 2.2.4.84 SERVER_INFO_1549

1668 class SERVER_INFO_1549(NDRSTRUCT):

1669 structure = (

1670 ('sv1549_networkerrorthreshold', DWORD),

1671 )

1672

1673 class LPSERVER_INFO_1549(NDRPOINTER):

1674 referent = (

1675 ('Data', SERVER_INFO_1549),

1676 )

1677

1678# 2.2.4.85 SERVER_INFO_1550

1679 class SERVER_INFO_1550(NDRSTRUCT):

1680 structure = (

1681 ('sv1550_diskspacethreshold', DWORD),

1682 )

1683

1684 class LPSERVER_INFO_1550(NDRPOINTER):

1685 referent = (

1686 ('Data', SERVER_INFO_1550),

1687 )

1688

1689# 2.2.4.86 SERVER_INFO_1552

1690 class SERVER_INFO_1552(NDRSTRUCT):

1691 structure = (

1692 ('sv1552_maxlinkdelay', DWORD),

1693 )

1694

1695 class LPSERVER_INFO_1552(NDRPOINTER):

1696 referent = (

1697 ('Data', SERVER_INFO_1552),

1698 )

1699

1700# 2.2.4.87 SERVER_INFO_1553

1701 class SERVER_INFO_1553(NDRSTRUCT):

1702 structure = (

1703 ('sv1553_minlinkthroughput', DWORD),

1704 )

1705

1706 class LPSERVER_INFO_1553(NDRPOINTER):

1707 referent = (

1708 ('Data', SERVER_INFO_1553),

1709 )

1710

1711# 2.2.4.88 SERVER_INFO_1554

1712 class SERVER_INFO_1554(NDRSTRUCT):

1713 structure = (

1714 ('sv1554_linkinfovalidtime', DWORD),

1715 )

1716

1717 class LPSERVER_INFO_1554(NDRPOINTER):

1718 referent = (

1719 ('Data', SERVER_INFO_1554),

1720 )

1721

1722# 2.2.4.89 SERVER_INFO_1555

1723 class SERVER_INFO_1555(NDRSTRUCT):

1724 structure = (

1725 ('sv1555_scavqosinfoupdatetime', DWORD),

1726 )

1727

1728 class LPSERVER_INFO_1555(NDRPOINTER):

1729 referent = (

1730 ('Data', SERVER_INFO_1555),

1731 )

1732

1733# 2.2.4.90 SERVER_INFO_1556

1734 class SERVER_INFO_1556(NDRSTRUCT):

1735 structure = (

1736 ('sv1556_maxworkitemidletime', DWORD),

1737 )

1738

1739 class LPSERVER_INFO_1556(NDRPOINTER):

1740 referent = (

1741 ('Data', SERVER_INFO_1556),

1742 )

1743

1744# 2.2.4.91 DISK_INFO

1745 class WCHAR_ARRAY(NDRSTRUCT):

1746 commonHdr = (

1747 ('Offset','<L=0'),

1748 ('ActualCount','<L=len(Data)//2'),

1749 )

1750 commonHdr64 = (

1751 ('Offset','<Q=0'),

1752 ('ActualCount','<Q=len(Data)//2'),

1753 )

1754 structure = (

1755 ('Data',':'),

1756 )

1757

1758 def dump(self, msg = None, indent = 0):

1759 if msg is None: 1759 ↛ 1760line 1759 didn't jump to line 1760, because the condition on line 1759 was never true

1760 msg = self.__class__.__name__

1761 if msg != '': 1761 ↛ 1764line 1761 didn't jump to line 1764, because the condition on line 1761 was never false

1762 print("%s" % msg, end=' ')

1763 # Here just print the data

1764 print(" %r" % (self['Data']), end=' ')

1765

1766 def __setitem__(self, key, value):

1767 if key == 'Data':

1768 try:

1769 self.fields[key] = value.encode('utf-16le')

1770 except UnicodeDecodeError:

1771 import sys

1772 self.fields[key] = value.decode(sys.getfilesystemencoding()).encode('utf-16le')

1773 self.fields['ActualCount'] = None

1774 self.data = None # force recompute

1775 else:

1776 return NDR.__setitem__(self, key, value)

1777

1778 def __getitem__(self, key):

1779 if key == 'Data':

1780 return self.fields[key].decode('utf-16le')

1781 else:

1782 return NDR.__getitem__(self,key)

1783

1784 def getDataLen(self, data, offset=0):

1785 return self["ActualCount"]*2

1786

1787

1788 class DISK_INFO(NDRSTRUCT):

1789 structure = (

1790 ('Disk', WCHAR_ARRAY),

1791 )

1792

1793 class LPDISK_INFO(NDRPOINTER):

1794 referent = (

1795 ('Data', DISK_INFO),

1796 )

1797

1798 class DISK_INFO_ARRAY(NDRUniConformantVaryingArray):

1799 item = DISK_INFO

1800

1801 class LPDISK_INFO_ARRAY(NDRPOINTER):

1802 referent = (

1803 ('Data', DISK_INFO_ARRAY),

1804 )

1805

1806# 2.2.4.92 DISK_ENUM_CONTAINER

1807 class DISK_ENUM_CONTAINER(NDRSTRUCT):

1808 structure = (

1809 ('EntriesRead', DWORD),

1810 ('Buffer', LPDISK_INFO_ARRAY),

1811 )

1812

1813 class LPDISK_ENUM_CONTAINER(NDRPOINTER):

1814 referent = (

1815 ('Data', DISK_ENUM_CONTAINER),

1816 )

1817

1818# 2.2.4.93 SERVER_TRANSPORT_INFO_0

1819 class SERVER_TRANSPORT_INFO_0(NDRSTRUCT):

1820 structure = (

1821 ('svti0_numberofvcs', DWORD),

1822 ('svti0_transportname', LPWSTR),

1823 ('svti0_transportaddress', PNDRUniConformantArray),

1824 ('svti0_transportaddresslength', DWORD),

1825 ('svti0_networkaddress', LPWSTR),

1826 )

1827

1828 class LPSERVER_TRANSPORT_INFO_0(NDRPOINTER):

1829 referent = (

1830 ('Data', SERVER_TRANSPORT_INFO_0),

1831 )

1832

1833 class SERVER_TRANSPORT_INFO_0_ARRAY(NDRUniConformantArray):

1834 item = SERVER_TRANSPORT_INFO_0

1835

1836 class LPSERVER_TRANSPORT_INFO_0_ARRAY(NDRPOINTER):

1837 referent = (

1838 ('Data', SERVER_TRANSPORT_INFO_0_ARRAY),

1839 )

1840

1841# 2.2.4.94 SERVER_TRANSPORT_INFO_1

1842 class SERVER_TRANSPORT_INFO_1(NDRSTRUCT):

1843 structure = (

1844 ('svti1_numberofvcs', DWORD),

1845 ('svti1_transportname', LPWSTR),

1846 ('svti1_transportaddress', PNDRUniConformantArray),

1847 ('svti1_transportaddresslength', DWORD),

1848 ('svti1_networkaddress', LPWSTR),

1849 ('svti1_domain', LPWSTR),

1850 )

1851

1852 class LPSERVER_TRANSPORT_INFO_1(NDRPOINTER):

1853 referent = (

1854 ('Data', SERVER_TRANSPORT_INFO_1),

1855 )

1856

1857 class SERVER_TRANSPORT_INFO_1_ARRAY(NDRUniConformantArray):

1858 item = SERVER_TRANSPORT_INFO_1

1859

1860 class LPSERVER_TRANSPORT_INFO_1_ARRAY(NDRPOINTER):

1861 referent = (

1862 ('Data', SERVER_TRANSPORT_INFO_1_ARRAY),

1863 )

1864

1865# 2.2.4.95 SERVER_TRANSPORT_INFO_2

1866 class SERVER_TRANSPORT_INFO_2(NDRSTRUCT):

1867 structure = (

1868 ('svti2_numberofvcs', DWORD),

1869 ('svti2_transportname', LPWSTR),

1870 ('svti2_transportaddress', PNDRUniConformantArray),

1871 ('svti2_transportaddresslength', DWORD),

1872 ('svti2_networkaddress', LPWSTR),

1873 ('svti2_domain', LPWSTR),

1874 ('svti2_flags', DWORD),

1875 )

1876

1877 class LPSERVER_TRANSPORT_INFO_2(NDRPOINTER):

1878 referent = (

1879 ('Data', SERVER_TRANSPORT_INFO_2),

1880 )

1881

1882 class SERVER_TRANSPORT_INFO_2_ARRAY(NDRUniConformantArray):

1883 item = SERVER_TRANSPORT_INFO_2

1884

1885 class LPSERVER_TRANSPORT_INFO_2_ARRAY(NDRPOINTER):

1886 referent = (

1887 ('Data', SERVER_TRANSPORT_INFO_2_ARRAY),

1888 )

1889

1890# 2.2.4.96 SERVER_TRANSPORT_INFO_3

1891 class PASSWORD_ARRAY(NDRUniFixedArray):

1892 def getDataLen(self, data, offset=0):

1893 return 256

1894

1895 class SERVER_TRANSPORT_INFO_3(NDRSTRUCT):

1896 structure = (

1897 ('svti3_numberofvcs', DWORD),

1898 ('svti3_transportname', LPWSTR),

1899 ('svti3_transportaddress', PNDRUniConformantArray),

1900 ('svti3_transportaddresslength', DWORD),

1901 ('svti3_networkaddress', LPWSTR),

1902 ('svti3_domain', LPWSTR),

1903 ('svti3_flags', DWORD),

1904 ('svti3_passwordlength', DWORD),

1905 ('svti3_password', PASSWORD_ARRAY),

1906 )

1907

1908 class LPSERVER_TRANSPORT_INFO_3(NDRPOINTER):

1909 referent = (

1910 ('Data', SERVER_TRANSPORT_INFO_3),

1911 )

1912

1913 class SERVER_TRANSPORT_INFO_3_ARRAY(NDRUniConformantArray):

1914 item = SERVER_TRANSPORT_INFO_3

1915

1916 class LPSERVER_TRANSPORT_INFO_3_ARRAY(NDRPOINTER):

1917 referent = (

1918 ('Data', SERVER_TRANSPORT_INFO_3_ARRAY),

1919 )

1920

1921# 2.2.4.97 SERVER_XPORT_INFO_0_CONTAINER

1922 class SERVER_XPORT_INFO_0_CONTAINER(NDRSTRUCT):

1923 structure = (

1924 ('EntriesRead', DWORD),

1925 ('Buffer', LPSERVER_TRANSPORT_INFO_0_ARRAY),

1926 )

1927

1928 class LPSERVER_XPORT_INFO_0_CONTAINER(NDRPOINTER):

1929 referent = (

1930 ('Data', SERVER_XPORT_INFO_0_CONTAINER),

1931 )

1932

1933# 2.2.4.98 SERVER_XPORT_INFO_1_CONTAINER

1934 class SERVER_XPORT_INFO_1_CONTAINER(NDRSTRUCT):

1935 structure = (

1936 ('EntriesRead', DWORD),

1937 ('Buffer', LPSERVER_TRANSPORT_INFO_1_ARRAY),

1938 )

1939

1940 class LPSERVER_XPORT_INFO_1_CONTAINER(NDRPOINTER):

1941 referent = (

1942 ('Data', SERVER_XPORT_INFO_1_CONTAINER),

1943 )

1944

1945# 2.2.4.99 SERVER_XPORT_INFO_2_CONTAINER

1946 class SERVER_XPORT_INFO_2_CONTAINER(NDRSTRUCT):

1947 structure = (

1948 ('EntriesRead', DWORD),

1949 ('Buffer', LPSERVER_TRANSPORT_INFO_2_ARRAY),

1950 )

1951

1952 class LPSERVER_XPORT_INFO_2_CONTAINER(NDRPOINTER):

1953 referent = (

1954 ('Data', SERVER_XPORT_INFO_2_CONTAINER),

1955 )

1956

1957# 2.2.4.100 SERVER_XPORT_INFO_3_CONTAINER

1958 class SERVER_XPORT_INFO_3_CONTAINER(NDRSTRUCT):

1959 structure = (

1960 ('EntriesRead', DWORD),

1961 ('Buffer', LPSERVER_TRANSPORT_INFO_3_ARRAY),

1962 )

1963

1964 class LPSERVER_XPORT_INFO_3_CONTAINER(NDRPOINTER):

1965 referent = (

1966 ('Data', SERVER_XPORT_INFO_3_CONTAINER),

1967 )

1968

1969# 2.2.3.8 SERVER_XPORT_ENUM_UNION

1970 class SERVER_XPORT_ENUM_UNION(NDRUNION):

1971 commonHdr = (

1972 ('tag', DWORD),

1973 )

1974

1975 union = {

1976 0: ('Level0', LPSERVER_XPORT_INFO_0_CONTAINER),

1977 1: ('Level1', LPSERVER_XPORT_INFO_1_CONTAINER),

1978 2: ('Level2', LPSERVER_XPORT_INFO_2_CONTAINER),

1979 3: ('Level3', LPSERVER_XPORT_INFO_3_CONTAINER),

1980 }

1981

1982# 2.2.4.101 SERVER_XPORT_ENUM_STRUCT

1983 class SERVER_XPORT_ENUM_STRUCT(NDRSTRUCT):

1984 structure = (

1985 ('Level', DWORD),

1986 ('XportInfo', SERVER_XPORT_ENUM_UNION),

1987 )

1988

1989# 2.2.4.102 SERVER_ALIAS_INFO_0

1990 class SERVER_ALIAS_INFO_0(NDRSTRUCT):

1991 structure = (

1992 ('srvai0_alias', LMSTR),

1993 ('srvai0_target', LMSTR),

1994 ('srvai0_default', NDRBOOLEAN),

1995 ('srvai0_reserved', ULONG),

1996 )

1997

1998 class LPSERVER_ALIAS_INFO_0(NDRPOINTER):

1999 referent = (

2000 ('Data', SERVER_ALIAS_INFO_0),

2001 )

2002

2003 class SERVER_ALIAS_INFO_0_ARRAY(NDRUniConformantArray):

2004 item = SERVER_ALIAS_INFO_0

2005

2006 class LPSERVER_ALIAS_INFO_0_ARRAY(NDRPOINTER):

2007 referent = (

2008 ('Data', SERVER_ALIAS_INFO_0_ARRAY),

2009 )

2010

2011# 2.2.4.103 SERVER_ALIAS_INFO_0_CONTAINER

2012 class SERVER_ALIAS_INFO_0_CONTAINER(NDRSTRUCT):

2013 structure = (

2014 ('EntriesRead', DWORD),

2015 ('Buffer', LPSERVER_ALIAS_INFO_0_ARRAY),

2016 )

2017

2018 class LPSERVER_ALIAS_INFO_0_CONTAINER(NDRPOINTER):

2019 referent = (

2020 ('Data', SERVER_ALIAS_INFO_0_CONTAINER),

2021 )

2022

2023# 2.2.4.104 SERVER_ALIAS_ENUM_STRUCT

2024 class SERVER_ALIAS_ENUM_UNION(NDRUNION):

2025 commonHdr = (

2026 ('tag', DWORD),

2027 )

2028

2029 union = {

2030 0: ('Level0', LPSERVER_ALIAS_INFO_0_CONTAINER),

2031 }

2032

2033 class SERVER_ALIAS_ENUM_STRUCT(NDRSTRUCT):

2034 structure = (

2035 ('Level', DWORD),

2036 ('ServerAliasInfo', SERVER_ALIAS_ENUM_UNION),

2037 )

2038

2039# 2.2.4.105 TIME_OF_DAY_INFO

2040 class TIME_OF_DAY_INFO(NDRSTRUCT):

2041 structure = (

2042 ('tod_elapsedt', DWORD),

2043 ('tod_msecs', DWORD),

2044 ('tod_hours', DWORD),

2045 ('tod_mins', DWORD),

2046 ('tod_secs', DWORD),

2047 ('tod_hunds', DWORD),

2048 ('tod_timezone', DWORD),

2049 ('tod_tinterval', DWORD),

2050 ('tod_day', DWORD),

2051 ('tod_month', DWORD),

2052 ('tod_year', DWORD),

2053 ('tod_weekday', DWORD),

2054 )

2055

2056 class LPTIME_OF_DAY_INFO(NDRPOINTER):

2057 referent = (

2058 ('Data', TIME_OF_DAY_INFO),

2059 )

2060

2061# 2.2.4.106 ADT_SECURITY_DESCRIPTOR

2062 class ADT_SECURITY_DESCRIPTOR(NDRSTRUCT):

2063 structure = (

2064 ('Length', DWORD),

2065 ('Buffer', PNDRUniConformantArray),

2066 )

2067

2068 class PADT_SECURITY_DESCRIPTOR(NDRPOINTER):

2069 referent = (

2070 ('Data', ADT_SECURITY_DESCRIPTOR),

2071 )

2072

2073# 2.2.4.107 NET_DFS_ENTRY_ID

2074 class NET_DFS_ENTRY_ID(NDRSTRUCT):

2075 structure = (

2076 ('Uid', GUID),

2077 ('Prefix', LPWSTR),

2078 )

2079

2080 class NET_DFS_ENTRY_ID_ARRAY(NDRUniConformantArray):

2081 item = NET_DFS_ENTRY_ID

2082

2083 class LPNET_DFS_ENTRY_ID_ARRAY(NDRPOINTER):

2084 referent = (

2085 ('Data', NET_DFS_ENTRY_ID_ARRAY),

2086 )

2087

2088# 2.2.4.108 NET_DFS_ENTRY_ID_CONTAINER

2089 class NET_DFS_ENTRY_ID_CONTAINER(NDRSTRUCT):

2090 structure = (

2091 ('Count', DWORD),

2092 ('Buffer', LPNET_DFS_ENTRY_ID_ARRAY),

2093 )

2094

2095# 2.2.4.109 DFS_SITENAME_INFO

2096 class DFS_SITENAME_INFO(NDRSTRUCT):

2097 structure = (

2098 ('SiteFlags', DWORD),

2099 ('SiteName', LPWSTR),

2100 )

2101

2102# 2.2.4.110 DFS_SITELIST_INFO

2103 class DFS_SITENAME_INFO_ARRAY(NDRUniConformantArray):

2104 item = DFS_SITENAME_INFO

2105

2106 class DFS_SITELIST_INFO(NDRSTRUCT):

2107 structure = (

2108 ('cSites', DWORD),

2109 ('Site', DFS_SITENAME_INFO_ARRAY),

2110 )

2111

2112 class LPDFS_SITELIST_INFO(NDRPOINTER):

2113 referent = (

2114 ('Data', DFS_SITELIST_INFO),

2115 )

2116

2117# 2.2.3 Unions

2118# 2.2.3.3 FILE_INFO

2119 class FILE_INFO(NDRUNION):

2120 commonHdr = (

2121 ('tag', DWORD),

2122 )

2123

2124 union = {

2125 2: ('FileInfo2', LPFILE_INFO_2),

2126 3: ('FileInfo3', LPFILE_INFO_3),

2127 }

2128

2129# 2.2.3.6 SHARE_INFO

2130 class SHARE_INFO(NDRUNION):

2131 commonHdr = (

2132 ('tag', DWORD),

2133 )

2134

2135 union = {

2136 0: ('ShareInfo0', LPSHARE_INFO_0),

2137 1: ('ShareInfo1', LPSHARE_INFO_1),

2138 2: ('ShareInfo2', LPSHARE_INFO_2),

2139 502: ('ShareInfo502', LPSHARE_INFO_502),

2140 1004: ('ShareInfo1004', LPSHARE_INFO_1004),

2141 1006: ('ShareInfo1006', LPSHARE_INFO_1006),

2142 1501: ('ShareInfo1501', LPSHARE_INFO_1501),

2143 1005: ('ShareInfo1005', LPSHARE_INFO_1005),

2144 501: ('ShareInfo501', LPSHARE_INFO_501),

2145 503: ('ShareInfo503', LPSHARE_INFO_503),

2146 }

2147

2148# 2.2.3.7 SERVER_INFO

2149 class SERVER_INFO(NDRUNION):

2150 commonHdr = (

2151 ('tag', DWORD),

2152 )

2153

2154 union = {

2155 100: ('ServerInfo100', LPSERVER_INFO_100),

2156 101: ('ServerInfo101', LPSERVER_INFO_101),

2157 102: ('ServerInfo102', LPSERVER_INFO_102),

2158 103: ('ServerInfo103', LPSERVER_INFO_103),

2159 502: ('ServerInfo502', LPSERVER_INFO_502),

2160 503: ('ServerInfo503', LPSERVER_INFO_503),

2161 599: ('ServerInfo599', LPSERVER_INFO_599),

2162 1005: ('ServerInfo1005', LPSERVER_INFO_1005),

2163 1107: ('ServerInfo1107', LPSERVER_INFO_1107),

2164 1010: ('ServerInfo1010', LPSERVER_INFO_1010),

2165 1016: ('ServerInfo1016', LPSERVER_INFO_1016),

2166 1017: ('ServerInfo1017', LPSERVER_INFO_1017),

2167 1018: ('ServerInfo1018', LPSERVER_INFO_1018),

2168 1501: ('ServerInfo1501', LPSERVER_INFO_1501),

2169 1502: ('ServerInfo1502', LPSERVER_INFO_1502),

2170 1503: ('ServerInfo1503', LPSERVER_INFO_1503),

2171 1506: ('ServerInfo1506', LPSERVER_INFO_1506),

2172 1510: ('ServerInfo1510', LPSERVER_INFO_1510),

2173 1511: ('ServerInfo1511', LPSERVER_INFO_1511),

2174 1512: ('ServerInfo1512', LPSERVER_INFO_1512),

2175 1513: ('ServerInfo1513', LPSERVER_INFO_1513),

2176 1514: ('ServerInfo1514', LPSERVER_INFO_1514),

2177 1515: ('ServerInfo1515', LPSERVER_INFO_1515),

2178 1516: ('ServerInfo1516', LPSERVER_INFO_1516),

2179 1518: ('ServerInfo1518', LPSERVER_INFO_1518),

2180 1523: ('ServerInfo1523', LPSERVER_INFO_1523),

2181 1528: ('ServerInfo1528', LPSERVER_INFO_1528),

2182 1529: ('ServerInfo1529', LPSERVER_INFO_1529),

2183 1530: ('ServerInfo1530', LPSERVER_INFO_1530),

2184 1533: ('ServerInfo1533', LPSERVER_INFO_1533),

2185 1534: ('ServerInfo1534', LPSERVER_INFO_1534),

2186 1535: ('ServerInfo1535', LPSERVER_INFO_1535),

2187 1536: ('ServerInfo1536', LPSERVER_INFO_1536),

2188 1538: ('ServerInfo1538', LPSERVER_INFO_1538),

2189 1539: ('ServerInfo1539', LPSERVER_INFO_1539),

2190 1540: ('ServerInfo1540', LPSERVER_INFO_1540),

2191 1541: ('ServerInfo1541', LPSERVER_INFO_1541),

2192 1542: ('ServerInfo1542', LPSERVER_INFO_1542),

2193 1543: ('ServerInfo1543', LPSERVER_INFO_1543),

2194 1544: ('ServerInfo1544', LPSERVER_INFO_1544),

2195 1545: ('ServerInfo1545', LPSERVER_INFO_1545),

2196 1546: ('ServerInfo1546', LPSERVER_INFO_1546),

2197 1547: ('ServerInfo1547', LPSERVER_INFO_1547),

2198 1548: ('ServerInfo1548', LPSERVER_INFO_1548),

2199 1549: ('ServerInfo1549', LPSERVER_INFO_1549),

2200 1550: ('ServerInfo1550', LPSERVER_INFO_1550),

2201 1552: ('ServerInfo1552', LPSERVER_INFO_1552),

2202 1553: ('ServerInfo1553', LPSERVER_INFO_1553),

2203 1554: ('ServerInfo1554', LPSERVER_INFO_1554),

2204 1555: ('ServerInfo1555', LPSERVER_INFO_1555),

2205 1556: ('ServerInfo1556', LPSERVER_INFO_1556),

2206 }

2207

2208# 2.2.3.9 TRANSPORT_INFO

2209 class TRANSPORT_INFO(NDRUNION):

2210 commonHdr = (

2211 ('tag', DWORD),

2212 )

2213

2214 union = {

2215 0: ('Transport0', SERVER_TRANSPORT_INFO_0),

2216 1: ('Transport1', SERVER_TRANSPORT_INFO_1),

2217 2: ('Transport2', SERVER_TRANSPORT_INFO_2),

2218 3: ('Transport3', SERVER_TRANSPORT_INFO_3),

2219 }

2220

2221# 2.2.3.10 SERVER_ALIAS_INFO

2222 class SERVER_ALIAS_INFO(NDRUNION):

2223 commonHdr = (

2224 ('tag', DWORD),

2225 )

2226

2227 union = {

2228 0: ('ServerAliasInfo0', LPSERVER_ALIAS_INFO_0),

2229 }

2230

2231

2232################################################################################

2233# RPC CALLS

2234################################################################################

2235# 3.1.4.1 NetrConnectionEnum (Opnum 8)

2236 class NetrConnectionEnum(NDRCALL):

2237 opnum = 8

2238 structure = (

2239 ('ServerName', PSRVSVC_HANDLE),

2240 ('Qualifier', LPWSTR),

2241 ('InfoStruct', CONNECT_ENUM_STRUCT),

2242 ('PreferedMaximumLength', DWORD),

2243 ('ResumeHandle', LPLONG),

2244 )

2245

2246 class NetrConnectionEnumResponse(NDRCALL):

2247 structure = (

2248 ('InfoStruct',CONNECT_ENUM_STRUCT),

2249 ('TotalEntries',DWORD),

2250 ('ResumeHandle',LPLONG),

2251 ('ErrorCode',ULONG),

2252 )

2253

2254# 3.1.4.2 NetrFileEnum (Opnum 9)

2255 class NetrFileEnum(NDRCALL):

2256 opnum = 9

2257 structure = (

2258 ('ServerName', PSRVSVC_HANDLE),

2259 ('BasePath', LPWSTR),

2260 ('UserName', LPWSTR),

2261 ('InfoStruct', FILE_ENUM_STRUCT),

2262 ('PreferedMaximumLength', DWORD),

2263 ('ResumeHandle', LPLONG),

2264 )

2265

2266 class NetrFileEnumResponse(NDRCALL):

2267 structure = (

2268 ('InfoStruct',FILE_ENUM_STRUCT),

2269 ('TotalEntries',DWORD),

2270 ('ResumeHandle',LPLONG),

2271 ('ErrorCode',ULONG),

2272 )

2273

2274# 3.1.4.3 NetrFileGetInfo (Opnum 10)

2275 class NetrFileGetInfo(NDRCALL):

2276 opnum = 10

2277 structure = (

2278 ('ServerName', PSRVSVC_HANDLE),

2279 ('FileId', DWORD),

2280 ('Level', DWORD),

2281 )

2282

2283 class NetrFileGetInfoResponse(NDRCALL):

2284 structure = (

2285 ('InfoStruct',FILE_INFO),

2286 ('ErrorCode',ULONG),

2287 )

2288

2289# 3.1.4.4 NetrFileClose (Opnum 11)

2290 class NetrFileClose(NDRCALL):

2291 opnum = 11

2292 structure = (

2293 ('ServerName', PSRVSVC_HANDLE),

2294 ('FileId', DWORD),

2295 )

2296

2297 class NetrFileCloseResponse(NDRCALL):

2298 structure = (

2299 ('ErrorCode',ULONG),

2300 )

2301

2302# 3.1.4.5 NetrSessionEnum (Opnum 12)

2303 class NetrSessionEnum(NDRCALL):

2304 opnum = 12

2305 structure = (

2306 ('ServerName', PSRVSVC_HANDLE),

2307 ('ClientName', LPWSTR),

2308 ('UserName', LPWSTR),

2309 ('InfoStruct', SESSION_ENUM_STRUCT),

2310 ('PreferedMaximumLength', DWORD),

2311 ('ResumeHandle', LPLONG),

2312 )

2313

2314 class NetrSessionEnumResponse(NDRCALL):

2315 structure = (

2316 ('InfoStruct',SESSION_ENUM_STRUCT),

2317 ('TotalEntries',DWORD),

2318 ('ResumeHandle',LPLONG),

2319 ('ErrorCode',ULONG),

2320 )

2321

2322# 3.1.4.6 NetrSessionDel (Opnum 13)

2323 class NetrSessionDel(NDRCALL):

2324 opnum = 13

2325 structure = (

2326 ('ServerName', PSRVSVC_HANDLE),

2327 ('ClientName', LPWSTR),

2328 ('UserName', LPWSTR),

2329 )

2330

2331 class NetrSessionDelResponse(NDRCALL):

2332 structure = (

2333 ('ErrorCode',ULONG),

2334 )

2335

2336# 3.1.4.7 NetrShareAdd (Opnum 14)

2337 class NetrShareAdd(NDRCALL):

2338 opnum = 14

2339 structure = (

2340 ('ServerName', PSRVSVC_HANDLE),

2341 ('Level', DWORD),

2342 ('InfoStruct', SHARE_INFO),

2343 ('ParmErr', LPLONG),

2344 )

2345

2346 class NetrShareAddResponse(NDRCALL):

2347 structure = (

2348 ('ParmErr', LPLONG),

2349 ('ErrorCode',ULONG),

2350 )

2351

2352# 3.1.4.8 NetrShareEnum (Opnum 15)

2353 class NetrShareEnum(NDRCALL):

2354 opnum = 15

2355 structure = (

2356 ('ServerName', PSRVSVC_HANDLE),

2357 ('InfoStruct', SHARE_ENUM_STRUCT),

2358 ('PreferedMaximumLength', DWORD),

2359 ('ResumeHandle', LPLONG),

2360 )

2361

2362 class NetrShareEnumResponse(NDRCALL):

2363 structure = (

2364 ('InfoStruct', SHARE_ENUM_STRUCT),

2365 ('TotalEntries',DWORD),

2366 ('ResumeHandle',LPLONG),

2367 ('ErrorCode',ULONG),

2368 )

2369

2370# 3.1.4.9 NetrShareEnumSticky (Opnum 36)

2371 class NetrShareEnumSticky(NDRCALL):

2372 opnum = 36

2373 structure = (

2374 ('ServerName', PSRVSVC_HANDLE),

2375 ('InfoStruct', SHARE_ENUM_STRUCT),

2376 ('PreferedMaximumLength', DWORD),

2377 ('ResumeHandle', LPLONG),

2378 )

2379

2380 class NetrShareEnumStickyResponse(NDRCALL):

2381 structure = (

2382 ('InfoStruct', SHARE_ENUM_STRUCT),

2383 ('TotalEntries',DWORD),

2384 ('ResumeHandle',LPLONG),

2385 ('ErrorCode',ULONG),

2386 )

2387

2388# 3.1.4.10 NetrShareGetInfo (Opnum 16)

2389 class NetrShareGetInfo(NDRCALL):

2390 opnum = 16

2391 structure = (

2392 ('ServerName', PSRVSVC_HANDLE),

2393 ('NetName', WSTR),

2394 ('Level', DWORD),

2395 )

2396

2397 class NetrShareGetInfoResponse(NDRCALL):

2398 structure = (

2399 ('InfoStruct', SHARE_INFO),

2400 ('ErrorCode',ULONG),

2401 )

2402

2403# 3.1.4.11 NetrShareSetInfo (Opnum 17)

2404 class NetrShareSetInfo(NDRCALL):

2405 opnum = 17

2406 structure = (

2407 ('ServerName', PSRVSVC_HANDLE),

2408 ('NetName', WSTR),

2409 ('Level', DWORD),

2410 ('ShareInfo', SHARE_INFO),

2411 ('ParmErr', LPLONG),

2412 )

2413

2414 class NetrShareSetInfoResponse(NDRCALL):

2415 structure = (

2416 ('ParmErr', LPLONG),

2417 ('ErrorCode',ULONG),

2418 )

2419

2420# 3.1.4.12 NetrShareDel (Opnum 18)

2421 class NetrShareDel(NDRCALL):

2422 opnum = 18

2423 structure = (

2424 ('ServerName', PSRVSVC_HANDLE),

2425 ('NetName', WSTR),

2426 ('Reserved', DWORD),

2427 )

2428

2429 class NetrShareDelResponse(NDRCALL):

2430 structure = (

2431 ('ErrorCode',ULONG),

2432 )

2433

2434# 3.1.4.13 NetrShareDelSticky (Opnum 19)

2435 class NetrShareDelSticky(NDRCALL):

2436 opnum = 19

2437 structure = (

2438 ('ServerName', PSRVSVC_HANDLE),

2439 ('NetName', WSTR),

2440 ('Reserved', DWORD),

2441 )

2442

2443 class NetrShareDelStickyResponse(NDRCALL):

2444 structure = (

2445 ('ErrorCode',ULONG),

2446 )

2447

2448# 3.1.4.14 NetrShareDelStart (Opnum 37)

2449 class NetrShareDelStart(NDRCALL):

2450 opnum = 37

2451 structure = (

2452 ('ServerName', PSRVSVC_HANDLE),

2453 ('NetName', WSTR),

2454 ('Reserved', DWORD),

2455 )

2456

2457 class NetrShareDelStartResponse(NDRCALL):

2458 structure = (

2459 ('ContextHandle',SHARE_DEL_HANDLE),

2460 ('ErrorCode',ULONG),

2461 )

2462

2463# 3.1.4.15 NetrShareDelCommit (Opnum 38)

2464 class NetrShareDelCommit(NDRCALL):

2465 opnum = 38

2466 structure = (

2467 ('ContextHandle',SHARE_DEL_HANDLE),

2468 )

2469

2470 class NetrShareDelCommitResponse(NDRCALL):

2471 structure = (

2472 ('ErrorCode',ULONG),

2473 )

2474

2475# 3.1.4.16 NetrShareCheck (Opnum 20)

2476 class NetrShareCheck(NDRCALL):

2477 opnum = 20

2478 structure = (

2479 ('ServerName', PSRVSVC_HANDLE),

2480 ('Device', WSTR),

2481 )

2482

2483 class NetrShareCheckResponse(NDRCALL):

2484 structure = (

2485 ('Type',DWORD),

2486 ('ErrorCode',ULONG),

2487 )

2488

2489# 3.1.4.17 NetrServerGetInfo (Opnum 21)

2490 class NetrServerGetInfo(NDRCALL):

2491 opnum = 21

2492 structure = (

2493 ('ServerName', PSRVSVC_HANDLE),

2494 ('Level', DWORD),

2495 )

2496

2497 class NetrServerGetInfoResponse(NDRCALL):

2498 structure = (

2499 ('InfoStruct', SERVER_INFO),

2500 ('ErrorCode',ULONG),

2501 )

2502

2503# 3.1.4.18 NetrServerSetInfo (Opnum 22)

2504 class NetrServerSetInfo(NDRCALL):

2505 opnum = 22

2506 structure = (

2507 ('ServerName', PSRVSVC_HANDLE),

2508 ('Level', DWORD),

2509 ('InfoStruct', SERVER_INFO),

2510 )

2511

2512 class NetrServerSetInfoResponse(NDRCALL):

2513 structure = (

2514 ('ParmErr', LPLONG),

2515 ('ErrorCode',ULONG),

2516 )

2517

2518# 3.1.4.19 NetrServerDiskEnum (Opnum 23)

2519 class NetrServerDiskEnum(NDRCALL):

2520 opnum = 23

2521 structure = (

2522 ('ServerName', PSRVSVC_HANDLE),

2523 ('Level', DWORD),

2524 ('DiskInfoStruct', DISK_ENUM_CONTAINER),

2525 ('PreferedMaximumLength', DWORD),

2526 ('ResumeHandle', LPLONG),

2527 )

2528

2529 class NetrServerDiskEnumResponse(NDRCALL):

2530 structure = (

2531 ('DiskInfoStruct', DISK_ENUM_CONTAINER),

2532 ('TotalEntries', DWORD),

2533 ('ResumeHandle', LPLONG),

2534 ('ErrorCode',ULONG),

2535 )

2536

2537# 3.1.4.20 NetrServerStatisticsGet (Opnum 24)

2538 class NetrServerStatisticsGet(NDRCALL):

2539 opnum = 24

2540 structure = (

2541 ('ServerName', PSRVSVC_HANDLE),

2542 ('Service', LPWSTR),

2543 ('Level', DWORD),

2544 ('Options', DWORD),

2545 )

2546

2547 class NetrServerStatisticsGetResponse(NDRCALL):

2548 structure = (

2549 ('InfoStruct', LPSTAT_SERVER_0),

2550 ('ErrorCode',ULONG),

2551 )

2552

2553# 3.1.4.21 NetrRemoteTOD (Opnum 28)

2554 class NetrRemoteTOD(NDRCALL):

2555 opnum = 28

2556 structure = (

2557 ('ServerName', PSRVSVC_HANDLE),

2558 )

2559

2560 class NetrRemoteTODResponse(NDRCALL):

2561 structure = (

2562 ('BufferPtr', LPTIME_OF_DAY_INFO),

2563 ('ErrorCode',ULONG),

2564 )

2565

2566# 3.1.4.22 NetrServerTransportAdd (Opnum 25)

2567 class NetrServerTransportAdd(NDRCALL):

2568 opnum = 25

2569 structure = (

2570 ('ServerName', PSRVSVC_HANDLE),

2571 ('Level', DWORD),

2572 ('Buffer', SERVER_TRANSPORT_INFO_0),

2573 )

2574

2575 class NetrServerTransportAddResponse(NDRCALL):

2576 structure = (

2577 ('ErrorCode',ULONG),

2578 )

2579

2580# 3.1.4.23 NetrServerTransportAddEx (Opnum 41)

2581 class NetrServerTransportAddEx(NDRCALL):

2582 opnum = 41

2583 structure = (

2584 ('ServerName', PSRVSVC_HANDLE),

2585 ('Level', DWORD),

2586 ('Buffer', TRANSPORT_INFO),

2587 )

2588

2589 class NetrServerTransportAddExResponse(NDRCALL):

2590 structure = (

2591 ('ErrorCode',ULONG),

2592 )

2593

2594# 3.1.4.24 NetrServerTransportEnum (Opnum 26)

2595 class NetrServerTransportEnum(NDRCALL):

2596 opnum = 26

2597 structure = (

2598 ('ServerName', PSRVSVC_HANDLE),

2599 ('InfoStruct', SERVER_XPORT_ENUM_STRUCT),

2600 ('PreferedMaximumLength', DWORD),

2601 ('ResumeHandle', LPLONG),

2602 )

2603

2604 class NetrServerTransportEnumResponse(NDRCALL):

2605 structure = (

2606 ('InfoStruct', SERVER_XPORT_ENUM_STRUCT),

2607 ('TotalEntries', DWORD),

2608 ('ResumeHandle', LPLONG),

2609 ('ErrorCode',ULONG),

2610 )

2611

2612# 3.1.4.25 NetrServerTransportDel (Opnum 27)

2613 class NetrServerTransportDel(NDRCALL):

2614 opnum = 27

2615 structure = (

2616 ('ServerName', PSRVSVC_HANDLE),

2617 ('Level', DWORD),

2618 ('Buffer', SERVER_TRANSPORT_INFO_0),

2619 )

2620

2621 class NetrServerTransportDelResponse(NDRCALL):

2622 structure = (

2623 ('ErrorCode',ULONG),

2624 )

2625

2626# 3.1.4.26 NetrServerTransportDelEx (Opnum 53)

2627 class NetrServerTransportDelEx(NDRCALL):

2628 opnum = 53

2629 structure = (

2630 ('ServerName', PSRVSVC_HANDLE),

2631 ('Level', DWORD),

2632 ('Buffer', TRANSPORT_INFO),

2633 )

2634

2635 class NetrServerTransportDelExResponse(NDRCALL):

2636 structure = (

2637 ('ErrorCode',ULONG),

2638 )

2639

2640# 3.1.4.27 NetrpGetFileSecurity (Opnum 39)

2641 class NetrpGetFileSecurity(NDRCALL):

2642 opnum = 39

2643 structure = (

2644 ('ServerName', PSRVSVC_HANDLE),

2645 ('ShareName', LPWSTR),

2646 ('lpFileName', WSTR),

2647 ('RequestedInformation', SECURITY_INFORMATION),

2648 )

2649

2650 class NetrpGetFileSecurityResponse(NDRCALL):

2651 structure = (

2652 ('SecurityDescriptor', PADT_SECURITY_DESCRIPTOR),

2653 ('ErrorCode',ULONG),

2654 )

2655

2656# 3.1.4.28 NetrpSetFileSecurity (Opnum 40)

2657 class NetrpSetFileSecurity(NDRCALL):

2658 opnum = 40

2659 structure = (

2660 ('ServerName', PSRVSVC_HANDLE),

2661 ('ShareName', LPWSTR),

2662 ('lpFileName', WSTR),

2663 ('SecurityInformation', SECURITY_INFORMATION),

2664 ('SecurityDescriptor', ADT_SECURITY_DESCRIPTOR),

2665 )

2666

2667 class NetrpSetFileSecurityResponse(NDRCALL):

2668 structure = (

2669 ('ErrorCode',ULONG),

2670 )

2671

2672# 3.1.4.29 NetprPathType (Opnum 30)

2673 class NetprPathType(NDRCALL):

2674 opnum = 30

2675 structure = (

2676 ('ServerName', PSRVSVC_HANDLE),

2677 ('PathName', WSTR),

2678 ('Flags', DWORD),

2679 )

2680

2681 class NetprPathTypeResponse(NDRCALL):

2682 structure = (

2683 ('PathType', DWORD),

2684 ('ErrorCode',ULONG),

2685 )

2686

2687# 3.1.4.30 NetprPathCanonicalize (Opnum 31)

2688 class NetprPathCanonicalize(NDRCALL):

2689 opnum = 31

2690 structure = (

2691 ('ServerName', PSRVSVC_HANDLE),

2692 ('PathName', WSTR),

2693 ('OutbufLen', DWORD),

2694 ('Prefix', WSTR),

2695 ('PathType', DWORD),

2696 ('Flags', DWORD),

2697 )

2698

2699 class NetprPathCanonicalizeResponse(NDRCALL):

2700 structure = (

2701 ('Outbuf', NDRUniConformantArray),

2702 ('PathType', DWORD),

2703 ('ErrorCode',ULONG),

2704 )

2705

2706# 3.1.4.31 NetprPathCompare (Opnum 32)

2707 class NetprPathCompare(NDRCALL):

2708 opnum = 32

2709 structure = (

2710 ('ServerName', PSRVSVC_HANDLE),

2711 ('PathName1', WSTR),

2712 ('PathName2', WSTR),

2713 ('PathType', DWORD),

2714 ('Flags', DWORD),

2715 )

2716

2717 class NetprPathCompareResponse(NDRCALL):

2718 structure = (

2719 ('ErrorCode',ULONG),

2720 )

2721

2722# 3.1.4.32 NetprNameValidate (Opnum 33)

2723 class NetprNameValidate(NDRCALL):

2724 opnum = 33

2725 structure = (

2726 ('ServerName', PSRVSVC_HANDLE),

2727 ('Name', WSTR),

2728 ('NameType', DWORD),

2729 ('Flags', DWORD),

2730 )

2731

2732 class NetprNameValidateResponse(NDRCALL):

2733 structure = (

2734 ('ErrorCode',ULONG),

2735 )

2736

2737# 3.1.4.33 NetprNameCanonicalize (Opnum 34)

2738 class NetprNameCanonicalize(NDRCALL):

2739 opnum = 34

2740 structure = (

2741 ('ServerName', PSRVSVC_HANDLE),

2742 ('Name', WSTR),

2743 ('OutbufLen', DWORD),

2744 ('NameType', DWORD),

2745 ('Flags', DWORD),

2746 )

2747

2748 class NetprNameCanonicalizeResponse(NDRCALL):

2749 structure = (

2750 ('Outbuf', NDRUniConformantArray),

2751 ('NameType', DWORD),

2752 ('ErrorCode',ULONG),

2753 )

2754

2755# 3.1.4.34 NetprNameCompare (Opnum 35)

2756 class NetprNameCompare(NDRCALL):

2757 opnum = 35

2758 structure = (

2759 ('ServerName', PSRVSVC_HANDLE),

2760 ('Name1', WSTR),

2761 ('Name2', WSTR),

2762 ('NameType', DWORD),

2763 ('Flags', DWORD),

2764 )

2765

2766 class NetprNameCompareResponse(NDRCALL):

2767 structure = (

2768 ('ErrorCode',ULONG),

2769 )

2770

2771# 3.1.4.35 NetrDfsGetVersion (Opnum 43)

2772 class NetrDfsGetVersion(NDRCALL):

2773 opnum = 43

2774 structure = (

2775 ('ServerName', PSRVSVC_HANDLE),

2776 )

2777

2778 class NetrDfsGetVersionResponse(NDRCALL):

2779 structure = (

2780 ('Version', DWORD),

2781 ('ErrorCode',ULONG),

2782 )

2783

2784# 3.1.4.36 NetrDfsCreateLocalPartition (Opnum 44)

2785 class NetrDfsCreateLocalPartition(NDRCALL):

2786 opnum = 44

2787 structure = (

2788 ('ServerName', PSRVSVC_HANDLE),

2789 ('ShareName', WSTR),

2790 ('EntryUid', GUID),

2791 ('EntryPrefix', WSTR),

2792 ('ShortName', WSTR),

2793 ('RelationInfo', NET_DFS_ENTRY_ID_CONTAINER),

2794 ('Force', DWORD),

2795 )

2796

2797 class NetrDfsCreateLocalPartitionResponse(NDRCALL):

2798 structure = (

2799 ('ErrorCode',ULONG),

2800 )

2801

2802# 3.1.4.37 NetrDfsDeleteLocalPartition (Opnum 45)

2803 class NetrDfsDeleteLocalPartition(NDRCALL):

2804 opnum = 45

2805 structure = (

2806 ('ServerName', PSRVSVC_HANDLE),

2807 ('Uid', GUID),

2808 ('Prefix', WSTR),

2809 )

2810

2811 class NetrDfsDeleteLocalPartitionResponse(NDRCALL):

2812 structure = (

2813 ('ErrorCode',ULONG),

2814 )

2815

2816# 3.1.4.38 NetrDfsSetLocalVolumeState (Opnum 46)

2817 class NetrDfsSetLocalVolumeState(NDRCALL):

2818 opnum = 46

2819 structure = (

2820 ('ServerName', PSRVSVC_HANDLE),

2821 ('Uid', GUID),

2822 ('Prefix', WSTR),

2823 ('State', DWORD),

2824 )

2825

2826 class NetrDfsSetLocalVolumeStateResponse(NDRCALL):

2827 structure = (

2828 ('ErrorCode',ULONG),

2829 )

2830

2831# 3.1.4.39 NetrDfsCreateExitPoint (Opnum 48)

2832 class NetrDfsCreateExitPoint(NDRCALL):

2833 opnum = 48

2834 structure = (

2835 ('ServerName', PSRVSVC_HANDLE),

2836 ('Uid', GUID),

2837 ('Prefix', WSTR),

2838 ('Type', DWORD),

2839 ('ShortPrefixLen', DWORD),

2840 )

2841

2842 class NetrDfsCreateExitPointResponse(NDRCALL):

2843 structure = (

2844 ('ShortPrefix',WCHAR_ARRAY),

2845 ('ErrorCode',ULONG),

2846 )

2847

2848# 3.1.4.40 NetrDfsModifyPrefix (Opnum 50)

2849 class NetrDfsModifyPrefix(NDRCALL):

2850 opnum = 50

2851 structure = (

2852 ('ServerName', PSRVSVC_HANDLE),

2853 ('Uid', GUID),

2854 ('Prefix', WSTR),

2855 )

2856

2857 class NetrDfsModifyPrefixResponse(NDRCALL):

2858 structure = (

2859 ('ErrorCode',ULONG),

2860 )

2861

2862# 3.1.4.41 NetrDfsDeleteExitPoint (Opnum 49)

2863 class NetrDfsDeleteExitPoint(NDRCALL):

2864 opnum = 49

2865 structure = (

2866 ('ServerName', PSRVSVC_HANDLE),

2867 ('Uid', GUID),

2868 ('Prefix', WSTR),

2869 ('Type', DWORD),

2870 )

2871

2872 class NetrDfsDeleteExitPointResponse(NDRCALL):

2873 structure = (

2874 ('ErrorCode',ULONG),

2875 )

2876

2877# 3.1.4.42 NetrDfsFixLocalVolume (Opnum 51)

2878 class NetrDfsFixLocalVolume(NDRCALL):

2879 opnum = 51

2880 structure = (

2881 ('ServerName', PSRVSVC_HANDLE),

2882 ('VolumeName', WSTR),

2883 ('EntryType', DWORD),

2884 ('ServiceType', DWORD),

2885 ('StgId', WSTR),

2886 ('EntryUid', GUID),

2887 ('EntryPrefix', WSTR),

2888 ('RelationInfo', NET_DFS_ENTRY_ID_CONTAINER),

2889 ('CreateDisposition', DWORD),

2890 )

2891

2892 class NetrDfsFixLocalVolumeResponse(NDRCALL):

2893 structure = (

2894 ('ErrorCode',ULONG),

2895 )

2896

2897# 3.1.4.43 NetrDfsManagerReportSiteInfo (Opnum 52)

2898 class NetrDfsManagerReportSiteInfo(NDRCALL):

2899 opnum = 52

2900 structure = (

2901 ('ServerName', PSRVSVC_HANDLE),

2902 ('ppSiteInfo', LPDFS_SITELIST_INFO),

2903 )

2904

2905 class NetrDfsManagerReportSiteInfoResponse(NDRCALL):

2906 structure = (

2907 ('ppSiteInfo', LPDFS_SITELIST_INFO),

2908 ('ErrorCode',ULONG),

2909 )

2910

2911# 3.1.4.44 NetrServerAliasAdd (Opnum 54)

2912 class NetrServerAliasAdd(NDRCALL):

2913 opnum = 54

2914 structure = (

2915 ('ServerName', PSRVSVC_HANDLE),

2916 ('Level', DWORD),

2917 ('InfoStruct', SERVER_ALIAS_INFO),

2918 )

2919

2920 class NetrServerAliasAddResponse(NDRCALL):

2921 structure = (

2922 ('ErrorCode',ULONG),

2923 )

2924

2925# 3.1.4.45 NetrServerAliasEnum (Opnum 55)

2926 class NetrServerAliasEnum(NDRCALL):

2927 opnum = 55

2928 structure = (

2929 ('ServerName', PSRVSVC_HANDLE),

2930 ('InfoStruct', SERVER_ALIAS_ENUM_STRUCT),

2931 ('PreferedMaximumLength', DWORD),

2932 ('ResumeHandle', LPLONG),

2933 )

2934

2935 class NetrServerAliasEnumResponse(NDRCALL):

2936 structure = (

2937 ('InfoStruct',SERVER_ALIAS_ENUM_STRUCT),

2938 ('TotalEntries',DWORD),

2939 ('ResumeHandle',LPLONG),

2940 ('ErrorCode',ULONG),

2941 )

2942

2943# 3.1.4.46 NetrServerAliasDel (Opnum 56)

2944 class NetrServerAliasDel(NDRCALL):

2945 opnum = 56

2946 structure = (

2947 ('ServerName', PSRVSVC_HANDLE),

2948 ('Level', DWORD),

2949 ('InfoStruct', SERVER_ALIAS_INFO),

2950 )

2951

2952 class NetrServerAliasDelResponse(NDRCALL):

2953 structure = (

2954 ('ErrorCode',ULONG),

2955 )

2956

2957# 3.1.4.47 NetrShareDelEx (Opnum 57)

2958 class NetrShareDelEx(NDRCALL):

2959 opnum = 57

2960 structure = (

2961 ('ServerName', PSRVSVC_HANDLE),

2962 ('Level', DWORD),

2963 ('ShareInfo', SHARE_INFO),

2964 )

2965

2966 class NetrShareDelExResponse(NDRCALL):

2967 structure = (

2968 ('ErrorCode',ULONG),

2969 )

2970

2971################################################################################

2972# OPNUMs and their corresponding structures

2973################################################################################

2974 OPNUMS = {

2975 8 : (NetrConnectionEnum, NetrConnectionEnumResponse),

2976 9 : (NetrFileEnum, NetrFileEnumResponse),

2977 10 : (NetrFileGetInfo, NetrFileGetInfoResponse),

2978 11 : (NetrFileClose, NetrFileCloseResponse),

2979 12 : (NetrSessionEnum, NetrSessionEnumResponse),

2980 13 : (NetrSessionDel, NetrSessionDelResponse),

2981 14 : (NetrShareAdd, NetrShareAddResponse),

2982 15 : (NetrShareEnum, NetrShareEnumResponse),

2983 16 : (NetrShareGetInfo, NetrShareGetInfoResponse),

2984 17 : (NetrShareSetInfo, NetrShareSetInfoResponse),

2985 18 : (NetrShareDel, NetrShareDelResponse),

2986 19 : (NetrShareDelSticky, NetrShareDelStickyResponse),

2987 20 : (NetrShareCheck, NetrShareCheckResponse),

2988 21 : (NetrServerGetInfo, NetrServerGetInfoResponse),

2989 22 : (NetrServerSetInfo, NetrServerSetInfoResponse),

2990 23 : (NetrServerDiskEnum, NetrServerDiskEnumResponse),

2991 24 : (NetrServerStatisticsGet, NetrServerStatisticsGetResponse),

2992 25 : (NetrServerTransportAdd, NetrServerTransportAddResponse),

2993 26 : (NetrServerTransportEnum, NetrServerTransportEnumResponse),

2994 27 : (NetrServerTransportDel, NetrServerTransportDelResponse),

2995 28 : (NetrRemoteTOD, NetrRemoteTODResponse),

2996 30 : (NetprPathType, NetprPathTypeResponse),

2997 31 : (NetprPathCanonicalize, NetprPathCanonicalizeResponse),

2998 32 : (NetprPathCompare, NetprPathCompareResponse),

2999 33 : (NetprNameValidate, NetprNameValidateResponse),

3000 34 : (NetprNameCanonicalize, NetprNameCanonicalizeResponse),

3001 35 : (NetprNameCompare, NetprNameCompareResponse),

3002 36 : (NetrShareEnumSticky, NetrShareEnumStickyResponse),

3003 37 : (NetrShareDelStart, NetrShareDelStartResponse),

3004 38 : (NetrShareDelCommit, NetrShareDelCommitResponse),

3005 39 : (NetrpGetFileSecurity, NetrpGetFileSecurityResponse),

3006 40 : (NetrpSetFileSecurity, NetrpSetFileSecurityResponse),

3007 41 : (NetrServerTransportAddEx, NetrServerTransportAddExResponse),

3008 43 : (NetrDfsGetVersion, NetrDfsGetVersionResponse),

3009 44 : (NetrDfsCreateLocalPartition, NetrDfsCreateLocalPartitionResponse),

3010 45 : (NetrDfsDeleteLocalPartition, NetrDfsDeleteLocalPartitionResponse),

3011 46 : (NetrDfsSetLocalVolumeState, NetrDfsSetLocalVolumeStateResponse),

3012 48 : (NetrDfsCreateExitPoint, NetrDfsCreateExitPointResponse),

3013 49 : (NetrDfsDeleteExitPoint, NetrDfsDeleteExitPointResponse),

3014 50 : (NetrDfsModifyPrefix, NetrDfsModifyPrefixResponse),

3015 51 : (NetrDfsFixLocalVolume, NetrDfsFixLocalVolumeResponse),

3016 52 : (NetrDfsManagerReportSiteInfo, NetrDfsManagerReportSiteInfoResponse),

3017 53 : (NetrServerTransportDelEx, NetrServerTransportDelExResponse),

3018 54 : (NetrServerAliasAdd, NetrServerAliasAddResponse),

3019 55 : (NetrServerAliasEnum, NetrServerAliasEnumResponse),

3020 56 : (NetrServerAliasDel, NetrServerAliasDelResponse),

3021 57 : (NetrShareDelEx, NetrShareDelExResponse),

3022}

3023

3024################################################################################

3025# HELPER FUNCTIONS

3026################################################################################

3027 def hNetrConnectionEnum(dce, qualifier, level, resumeHandle = 0, preferedMaximumLength = 0xffffffff):

3028 request = NetrConnectionEnum()

3029 request['ServerName'] = NULL

3030 request['Qualifier'] = qualifier

3031 request['InfoStruct']['Level'] = level

3032 request['InfoStruct']['ConnectInfo']['tag'] = level

3033 request['PreferedMaximumLength'] = preferedMaximumLength

3034 request['ResumeHandle'] = resumeHandle

3035 return dce.request(request)

3036

3037 def hNetrFileEnum(dce, basePath, userName, level, resumeHandle = 0, preferedMaximumLength = 0xffffffff):

3038 request = NetrFileEnum()

3039 request['ServerName'] = NULL

3040 request['BasePath'] = basePath

3041 request['UserName'] = userName

3042 request['InfoStruct']['Level'] = level

3043 request['InfoStruct']['FileInfo']['tag'] = level

3044 request['PreferedMaximumLength'] = preferedMaximumLength

3045 request['ResumeHandle'] = resumeHandle

3046 return dce.request(request)

3047

3048 def hNetrFileGetInfo(dce, fileId, level):

3049 request = NetrFileGetInfo()

3050 request['ServerName'] = NULL

3051 request['FileId'] = fileId

3052 request['Level'] = level

3053 return dce.request(request)

3054

3055 def hNetrFileClose(dce, fileId):

3056 request = NetrFileClose()

3057 request['ServerName'] = NULL

3058 request['FileId'] = fileId

3059 return dce.request(request)

3060

3061 def hNetrSessionEnum(dce, clientName, userName, level, resumeHandle = 0, preferedMaximumLength = 0xffffffff):

3062 request = NetrSessionEnum()

3063 request['ServerName'] = NULL

3064 request['ClientName'] = clientName

3065 request['UserName'] = userName

3066 request['InfoStruct']['Level'] = level

3067 request['InfoStruct']['SessionInfo']['tag'] = level

3068 request['InfoStruct']['SessionInfo']['Level%d'%level]['Buffer'] = NULL

3069 request['PreferedMaximumLength'] = preferedMaximumLength

3070 request['ResumeHandle'] = resumeHandle

3071

3072 return dce.request(request)

3073

3074 def hNetrSessionDel(dce, clientName, userName):

3075 request = NetrSessionDel()

3076 request['ServerName'] = NULL

3077 request['ClientName'] = clientName

3078 request['UserName'] = userName

3079 return dce.request(request)

3080

3081 def hNetrShareAdd(dce, level, infoStruct):

3082 request = NetrShareAdd()

3083 request['ServerName'] = NULL

3084 request['Level'] = level

3085 request['InfoStruct']['tag'] = level

3086 request['InfoStruct']['ShareInfo%d'%level] = infoStruct

3087 return dce.request(request)

3088

3089 def hNetrShareDel(dce, netName):

3090 request = NetrShareDel()

3091 request['ServerName'] = NULL

3092 request['NetName'] = netName

3093 return dce.request(request)

3094

3095 def hNetrShareEnum(dce, level, resumeHandle = 0, preferedMaximumLength = 0xffffffff):

3096 request = NetrShareEnum()

3097 request['ServerName'] = '\x00'

3098 request['PreferedMaximumLength'] = preferedMaximumLength

3099 request['ResumeHandle'] = resumeHandle

3100 request['InfoStruct']['Level'] = level

3101 request['InfoStruct']['ShareInfo']['tag'] = level

3102 request['InfoStruct']['ShareInfo']['Level%d'%level]['Buffer'] = NULL

3103

3104 return dce.request(request)

3105

3106 def hNetrShareEnumSticky(dce, level, resumeHandle = 0, preferedMaximumLength = 0xffffffff):

3107 request = NetrShareEnumSticky()

3108 request['ServerName'] = NULL

3109 request['PreferedMaximumLength'] = preferedMaximumLength

3110 request['ResumeHandle'] = resumeHandle

3111 request['InfoStruct']['Level'] = level

3112 request['InfoStruct']['ShareInfo']['tag'] = level

3113 request['InfoStruct']['ShareInfo']['Level%d'%level]['Buffer'] = NULL

3114

3115 return dce.request(request)

3116

3117 def hNetrShareGetInfo(dce, netName, level):

3118 request = NetrShareGetInfo()

3119 request['ServerName'] = NULL

3120 request['NetName'] = netName

3121 request['Level'] = level

3122 return dce.request(request)

3123

3124 def hNetrShareSetInfo(dce, netName, level, shareInfo):

3125 request = NetrShareSetInfo()

3126 request['ServerName'] = NULL

3127 request['NetName'] = netName

3128 request['Level'] = level

3129 request['ShareInfo']['tag'] = level

3130 request['ShareInfo']['ShareInfo%d'%level] = shareInfo

3131

3132 return dce.request(request)

3133

3134 def hNetrShareDelSticky(dce, netName):

3135 request = NetrShareDelSticky()

3136 request['ServerName'] = NULL

3137 request['NetName'] = netName

3138 return dce.request(request)

3139

3140# Sacala la h a estos 2, y tira todos los test cases juntos

3141 def hNetrShareDelStart(dce, netName):

3142 request = NetrShareDelStart()

3143 request['ServerName'] = NULL

3144 request['NetName'] = netName

3145 return dce.request(request)

3146

3147 def hNetrShareDelCommit(dce, contextHandle):

3148 request = NetrShareDelCommit()

3149 request['ContextHandle'] = contextHandle

3150 return dce.request(request)

3151

3152 def hNetrShareCheck(dce, device):

3153 request = NetrShareCheck()

3154 request['ServerName'] = NULL

3155 request['Device'] = device

3156 return dce.request(request)

3157

3158 def hNetrServerGetInfo(dce, level):

3159 request = NetrServerGetInfo()

3160 request['ServerName'] = NULL

3161 request['Level'] = level

3162 return dce.request(request)

3163

3164 def hNetrServerDiskEnum(dce, level, resumeHandle = 0, preferedMaximumLength = 0xffffffff):

3165 request = NetrServerDiskEnum()

3166 request['ServerName'] = NULL

3167 request['PreferedMaximumLength'] = preferedMaximumLength

3168 request['ResumeHandle'] = resumeHandle

3169 request['Level'] = level

3170 request['DiskInfoStruct']['Buffer'] = NULL

3171 return dce.request(request)

3172

3173 def hNetrServerStatisticsGet(dce, service, level, options):

3174 request = NetrServerStatisticsGet()

3175 request['ServerName'] = NULL

3176 request['Service'] = service

3177 request['Level'] = level

3178 request['Options'] = options

3179 return dce.request(request)

3180

3181 def hNetrRemoteTOD(dce):

3182 request = NetrRemoteTOD()

3183 request['ServerName'] = NULL

3184 return dce.request(request)

3185

3186 def hNetrServerTransportEnum(dce, level, resumeHandle = 0, preferedMaximumLength = 0xffffffff):

3187 request = NetrServerTransportEnum()

3188 request['ServerName'] = NULL

3189 request['PreferedMaximumLength'] = preferedMaximumLength

3190 request['ResumeHandle'] = resumeHandle

3191 request['InfoStruct']['Level'] = level

3192 request['InfoStruct']['XportInfo']['tag'] = level

3193 request['InfoStruct']['XportInfo']['Level%d' % level]['Buffer'] = NULL

3194 return dce.request(request)

3195

3196 def hNetrpGetFileSecurity(dce, shareName, lpFileName, requestedInformation):

3197 request = NetrpGetFileSecurity()

3198 request['ServerName'] = NULL

3199 request['ShareName'] = shareName

3200 request['lpFileName'] = lpFileName

3201 request['RequestedInformation'] = requestedInformation

3202 retVal = dce.request(request)

3203 return b''.join(retVal['SecurityDescriptor']['Buffer'])

3204

3205 def hNetrpSetFileSecurity(dce, shareName, lpFileName, securityInformation, securityDescriptor):

3206 request = NetrpSetFileSecurity()

3207 request['ServerName'] = NULL

3208 request['ShareName'] = shareName

3209 request['lpFileName'] = lpFileName

3210 request['SecurityInformation'] = securityInformation

3211 request['SecurityDescriptor']['Length'] = len(securityDescriptor)

3212 request['SecurityDescriptor']['Buffer'] = list(securityDescriptor)

3213 return dce.request(request)

3214

3215 def hNetprPathType(dce, pathName, flags):

3216 request = NetprPathType()

3217 request['ServerName'] = NULL

3218 request['PathName'] = pathName

3219 request['Flags'] = flags

3220 return dce.request(request)

3221

3222 def hNetprPathCanonicalize(dce, pathName, prefix, outbufLen=50, pathType=0, flags=0):

3223 request = NetprPathCanonicalize()

3224 request['ServerName'] = NULL

3225 request['PathName'] = pathName

3226 request['OutbufLen'] = outbufLen

3227 request['Prefix'] = prefix

3228 request['PathType'] = pathType

3229 request['Flags'] = flags

3230 return dce.request(request)

3231

3232 def hNetprPathCompare(dce, pathName1, pathName2, pathType=0, flags=0):

3233 request = NetprPathCompare()

3234 request['ServerName'] = NULL

3235 request['PathName1'] = pathName1

3236 request['PathName2'] = pathName2

3237 request['PathType'] = pathType

3238 request['Flags'] = flags

3239 return dce.request(request)

3240

3241 def hNetprNameValidate(dce, name, nameType, flags=0):

3242 request = NetprNameValidate()

3243 request['ServerName'] = NULL

3244 request['Name'] = name

3245 request['NameType'] = nameType

3246 request['Flags'] = flags

3247 return dce.request(request)

3248

3249 def hNetprNameCanonicalize(dce, name, outbufLen=50, nameType=0, flags=0):

3250 request = NetprNameCanonicalize()

3251 request['ServerName'] = NULL

3252 request['Name'] = name

3253 request['OutbufLen'] = outbufLen

3254 request['NameType'] = nameType

3255 request['Flags'] = flags

3256 return dce.request(request)

3257

3258 def hNetprNameCompare(dce, name1, name2, nameType=0, flags=0):

3259 request = NetprNameCompare()

3260 request['ServerName'] = NULL

3261 request['Name1'] = name1

3262 request['Name2'] = name2

3263 request['NameType'] = nameType

3264 request['Flags'] = flags

3265 return dce.request(request)

3266

3267 def hNetrDfsGetVersion(dce):

3268 request = NetrDfsGetVersion()

3269 request['ServerName'] = NULL

3270 return dce.request(request)

3271

3272 def hNetrServerAliasAdd(dce, level, aliasInfo):

3273 request = NetrServerAliasAdd()

3274 request['ServerName'] = NULL

3275 request['Level'] = level

3276 request['InfoStruct']['tag'] = level

3277 request['InfoStruct']['ServerAliasInfo%d'%level] = aliasInfo

3278 return dce.request(request)

3279

3280 def hNetrServerAliasDel(dce, level, aliasInfo):

3281 request = NetrServerAliasDel()

3282 request['ServerName'] = NULL

3283 request['Level'] = level

3284 request['InfoStruct']['tag'] = level

3285 request['InfoStruct']['ServerAliasInfo%d'%level] = aliasInfo

3286 return dce.request(request)

3287

3288 def hNetrServerAliasEnum(dce, level, resumeHandle = 0, preferedMaximumLength = 0xffffffff):

3289 request = NetrServerAliasEnum()

3290 request['ServerName'] = NULL

3291 request['InfoStruct']['Level'] = level

3292 request['InfoStruct']['ServerAliasInfo']['tag'] = level

3293 request['InfoStruct']['ServerAliasInfo']['Level%d' % level]['Buffer'] = NULL

3294 request['PreferedMaximumLength'] = preferedMaximumLength

3295 request['ResumeHandle'] = resumeHandle

3296 return dce.request(request)