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# Impacket - Collection of Python classes for working with network protocols.

2#

3# SECUREAUTH LABS. Copyright (C) 2020 SecureAuth Corporation. All rights reserved.

4#

5# This software is provided under a slightly modified version

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

7# for more information.

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# Author:

22# Alberto Solino (@agsolino)

23#

24 from __future__ import division

25 from __future__ import print_function

26 from impacket.dcerpc.v5.rpcrt import DCERPCException

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

28 NDRUniFixedArray, NDRBOOLEAN, NDRUniConformantVaryingArray, PNDRUniConformantArray

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

30 SECURITY_INFORMATION, WCHAR

31 from impacket import system_errors

32 from impacket.uuid import uuidtup_to_bin

33

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

35

36 class DCERPCSessionError(DCERPCException):

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

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

39

40 def __str__( self ):

41 key = self.error_code

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

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

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

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

46 else:

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

48

49################################################################################

50# CONSTANTS

51################################################################################

52# 2.2.1.1 SRVSVC_HANDLE

53 SRVSVC_HANDLE = WCHAR

54

55 class PSRVSVC_HANDLE(NDRPOINTER):

56 referent = (

57 ('Data', SRVSVC_HANDLE),

58 )

59

60# 2.2.1.2 SHARE_DEL_HANDLE

61 class SHARE_DEL_HANDLE(NDRSTRUCT):

62 align = 1

63 structure = (

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

65 )

66

67# 2.2.1.3 PSHARE_DEL_HANDLE

68 class PSHARE_DEL_HANDLE(NDRPOINTER):

69 referent = (

70 ('Data', SHARE_DEL_HANDLE),

71 )

72

73# 2.2.2.2 MAX_PREFERRED_LENGTH

74 MAX_PREFERRED_LENGTH = -1

75

76# 2.2.2.3 Session User Flags

77 SESS_GUEST = 0x00000001

78 SESS_NOENCRYPTION = 0x00000002

79

80# 2.2.2.4 Share Types

81 STYPE_DISKTREE = 0x00000000

82 STYPE_PRINTQ = 0x00000001

83 STYPE_DEVICE = 0x00000002

84 STYPE_IPC = 0x00000003

85 STYPE_CLUSTER_FS = 0x02000000

86 STYPE_CLUSTER_SOFS = 0x04000000

87 STYPE_CLUSTER_DFS = 0x08000000

88

89 STYPE_SPECIAL = 0x80000000

90 STYPE_TEMPORARY = 0x40000000

91

92# AND with shi_type to extract the Share Type part

93 STYPE_MASK = 0x000000FF

94

95# 2.2.2.5 Client-Side Caching (CSC) States

96 CSC_CACHE_MANUAL_REINT = 0x00

97 CSC_CACHE_AUTO_REINT = 0x10

98 CSC_CACHE_VDO = 0x20

99 CSC_CACHE_NONE = 0x30

100

101# 2.2.2.6 Platform IDs

102 PLATFORM_ID_DOS = 300

103 PLATFORM_ID_OS2 = 400

104 PLATFORM_ID_NT = 500

105 PLATFORM_ID_OSF = 600

106 PLATFORM_ID_VMS = 700

107

108# 2.2.2.7 Software Type Flags

109 SV_TYPE_WORKSTATION = 0x00000001

110 SV_TYPE_SERVER = 0x00000002

111 SV_TYPE_SQLSERVER = 0x00000004

112 SV_TYPE_DOMAIN_CTRL = 0x00000008

113 SV_TYPE_DOMAIN_BAKCTRL = 0x00000010

114 SV_TYPE_TIME_SOURCE = 0x00000020

115 SV_TYPE_AFP = 0x00000040

116 SV_TYPE_NOVELL = 0x00000080

117 SV_TYPE_DOMAIN_MEMBER = 0x00000100

118 SV_TYPE_LOCAL_LIST_ONLY = 0x40000000

119 SV_TYPE_PRINTQ_SERVER = 0x00000200

120 SV_TYPE_DIALIN_SERVER = 0x00000400

121 SV_TYPE_XENIX_SERVER = 0x00000800

122 SV_TYPE_SERVER_MFPN = 0x00004000

123 SV_TYPE_NT = 0x00001000

124 SV_TYPE_WFW = 0x00002000

125 SV_TYPE_SERVER_NT = 0x00008000

126 SV_TYPE_POTENTIAL_BROWSER = 0x00010000

127 SV_TYPE_BACKUP_BROWSER = 0x00020000

128 SV_TYPE_MASTER_BROWSER = 0x00040000

129 SV_TYPE_DOMAIN_MASTER = 0x00080000

130 SV_TYPE_DOMAIN_ENUM = 0x80000000

131 SV_TYPE_WINDOWS = 0x00400000

132 SV_TYPE_ALL = 0xFFFFFFFF

133 SV_TYPE_TERMINALSERVER = 0x02000000

134 SV_TYPE_CLUSTER_NT = 0x10000000

135 SV_TYPE_CLUSTER_VS_NT = 0x04000000

136

137# 2.2.2.8 Name Types

138 NAMETYPE_USER = 1

139 NAMETYPE_PASSWORD = 2

140 NAMETYPE_GROUP = 3

141 NAMETYPE_COMPUTER = 4

142 NAMETYPE_EVENT = 5

143 NAMETYPE_DOMAIN = 6

144 NAMETYPE_SERVICE = 7

145 NAMETYPE_NET = 8

146 NAMETYPE_SHARE = 9

147 NAMETYPE_MESSAGE = 10

148 NAMETYPE_MESSAGEDEST = 11

149 NAMETYPE_SHAREPASSWORD = 12

150 NAMETYPE_WORKGROUP = 13

151

152# 2.2.2.9 Path Types

153 ITYPE_UNC_COMPNAME = 4144

154 ITYPE_UNC_WC = 4145

155 ITYPE_UNC = 4096

156 ITYPE_UNC_WC_PATH = 4097

157 ITYPE_UNC_SYS_SEM = 6400

158 ITYPE_UNC_SYS_SHMEM = 6656

159 ITYPE_UNC_SYS_MSLOT = 6144

160 ITYPE_UNC_SYS_PIPE = 6912

161 ITYPE_UNC_SYS_QUEUE = 7680

162 ITYPE_PATH_ABSND = 8194

163 ITYPE_PATH_ABSD = 8198

164 ITYPE_PATH_RELND = 8192

165 ITYPE_PATH_RELD = 8196

166 ITYPE_PATH_ABSND_WC = 8195

167 ITYPE_PATH_ABSD_WC = 8199

168 ITYPE_PATH_RELND_WC = 8193

169 ITYPE_PATH_RELD_WC = 8197

170 ITYPE_PATH_SYS_SEM = 10498

171 ITYPE_PATH_SYS_SHMEM = 10754

172 ITYPE_PATH_SYS_MSLOT = 10242

173 ITYPE_PATH_SYS_PIPE = 11010

174 ITYPE_PATH_SYS_COMM = 11266

175 ITYPE_PATH_SYS_PRINT = 11522

176 ITYPE_PATH_SYS_QUEUE = 11778

177 ITYPE_PATH_SYS_SEM_M = 43266

178 ITYPE_PATH_SYS_SHMEM_M = 43522

179 ITYPE_PATH_SYS_MSLOT_M = 43010

180 ITYPE_PATH_SYS_PIPE_M = 43778

181 ITYPE_PATH_SYS_COMM_M = 44034

182 ITYPE_PATH_SYS_PRINT_M = 44290

183 ITYPE_PATH_SYS_QUEUE_M = 44546

184 ITYPE_DEVICE_DISK = 16384

185 ITYPE_DEVICE_LPT = 16400

186 ITYPE_DEVICE_COM = 16416

187 ITYPE_DEVICE_CON = 16448

188 ITYPE_DEVICE_NUL = 16464

189

190# 2.2.2.11 SHARE_INFO Parameter Error Codes

191

192 SHARE_NETNAME_PARMNUM = 1

193 SHARE_TYPE_PARMNUM = 3

194 SHARE_REMARK_PARMNUM = 4

195 SHARE_PERMISSIONS_PARMNUM = 5

196 SHARE_MAX_USES_PARMNUM = 6

197 SHARE_CURRENT_USES_PARMNUM = 7

198 SHARE_PATH_PARMNUM = 8

199 SHARE_PASSWD_PARMNUM = 9

200 SHARE_FILE_SD_PARMNUM = 501

201

202# 2.2.2.12 SERVER_INFO Parameter Error Codes

203 SV_PLATFORM_ID_PARMNUM = 101

204 SV_NAME_PARMNUM = 102

205 SV_VERSION_MAJOR_PARMNUM = 103

206 SV_VERSION_MINOR_PARMNUM = 104

207 SV_TYPE_PARMNUM = 105

208 SV_COMMENT_PARMNUM = 5

209 SV_USERS_PARMNUM = 107

210 SV_DISC_PARMNUM = 10

211 SV_HIDDEN_PARMNUM = 16

212 SV_ANNOUNCE_PARMNUM = 17

213 SV_ANNDELTA_PARMNUM = 18

214 SV_USERPATH_PARMNUM = 112

215 SV_SESSOPENS_PARMNUM = 501

216 SV_SESSVCS_PARMNUM = 502

217 SV_OPENSEARCH_PARMNUM = 503

218 SV_SIZREQBUF_PARMNUM = 504

219 SV_INITWORKITEMS_PARMNUM = 505

220 SV_MAXWORKITEMS_PARMNUM = 506

221 SV_RAWWORKITEMS_PARMNUM = 507

222 SV_IRPSTACKSIZE_PARMNUM = 508

223 SV_MAXRAWBUFLEN_PARMNUM = 509

224 SV_SESSUSERS_PARMNUM = 510

225 SV_SESSCONNS_PARMNUM = 511

226 SV_MAXNONPAGEDMEMORYUSAGE_PARMNUM = 512

227 SV_MAXPAGEDMEMORYUSAGE_PARMNUM = 513

228 SV_ENABLESOFTCOMPAT_PARMNUM = 514

229 SV_ENABLEFORCEDLOGOFF_PARMNUM = 515

230 SV_TIMESOURCE_PARMNUM = 516

231 SV_ACCEPTDOWNLEVELAPIS_PARMNUM = 517

232 SV_LMANNOUNCE_PARMNUM = 518

233 SV_DOMAIN_PARMNUM = 519

234 SV_MAXCOPYREADLEN_PARMNUM = 520

235 SV_MAXCOPYWRITELEN_PARMNUM = 521

236 SV_MINKEEPSEARCH_PARMNUM = 522

237 SV_MAXKEEPSEARCH_PARMNUM = 523

238 SV_MINKEEPCOMPLSEARCH_PARMNUM = 524

239 SV_MAXKEEPCOMPLSEARCH_PARMNUM = 525

240 SV_THREADCOUNTADD_PARMNUM = 526

241 SV_NUMBLOCKTHREADS_PARMNUM = 527

242 SV_SCAVTIMEOUT_PARMNUM = 528

243 SV_MINRCVQUEUE_PARMNUM = 529

244 SV_MINFREEWORKITEMS_PARMNUM = 530

245 SV_XACTMEMSIZE_PARMNUM = 531

246 SV_THREADPRIORITY_PARMNUM = 532

247 SV_MAXMPXCT_PARMNUM = 533

248 SV_OPLOCKBREAKWAIT_PARMNUM = 534

249 SV_OPLOCKBREAKRESPONSEWAIT_PARMNUM = 535

250 SV_ENABLEOPLOCKS_PARMNUM = 536

251 SV_ENABLEOPLOCKFORCECLOSE_PARMNUM = 537

252 SV_ENABLEFCBOPENS_PARMNUM = 538

253 SV_ENABLERAW_PARMNUM = 539

254 SV_ENABLESHAREDNETDRIVES_PARMNUM = 540

255 SV_MINFREECONNECTIONS_PARMNUM = 541

256 SV_MAXFREECONNECTIONS_PARMNUM = 542

257 SV_INITSESSTABLE_PARMNUM = 543

258 SV_INITCONNTABLE_PARMNUM = 544

259 SV_INITFILETABLE_PARMNUM = 545

260 SV_INITSEARCHTABLE_PARMNUM = 546

261 SV_ALERTSCHEDULE_PARMNUM = 547

262 SV_ERRORTHRESHOLD_PARMNUM = 548

263 SV_NETWORKERRORTHRESHOLD_PARMNUM = 549

264 SV_DISKSPACETHRESHOLD_PARMNUM = 550

265 SV_MAXLINKDELAY_PARMNUM = 552

266 SV_MINLINKTHROUGHPUT_PARMNUM = 553

267 SV_LINKINFOVALIDTIME_PARMNUM = 554

268 SV_SCAVQOSINFOUPDATETIME_PARMNUM = 555

269 SV_MAXWORKITEMIDLETIME_PARMNUM = 556

270

271# 2.2.2.13 DFS Entry Flags

272 PKT_ENTRY_TYPE_CAIRO = 0x0001

273 PKT_ENTRY_TYPE_MACHINE = 0x0002

274 PKT_ENTRY_TYPE_NONCAIRO = 0x0004

275 PKT_ENTRY_TYPE_LEAFONLY = 0x0008

276 PKT_ENTRY_TYPE_OUTSIDE_MY_DOM = 0x0010

277 PKT_ENTRY_TYPE_INSITE_ONLY = 0x0020

278 PKT_ENTRY_TYPE_REFERRAL_SVC = 0x0080

279 PKT_ENTRY_TYPE_PERMANENT = 0x0100

280 PKT_ENTRY_TYPE_LOCAL = 0x0400

281 PKT_ENTRY_TYPE_LOCAL_XPOINT = 0x0800

282 PKT_ENTRY_TYPE_MACH_SHARE = 0x1000

283 PKT_ENTRY_TYPE_OFFLINE = 0x2000

284

285# 2.2.4.7 FILE_INFO_3

286# fi3_permissions

287 PERM_FILE_READ = 0x00000001

288 PERM_FILE_WRITE = 0x00000002

289 PERM_FILE_CREATE = 0x00000004

290 ACCESS_EXEC = 0x00000008

291 ACCESS_DELETE = 0x00000010

292 ACCESS_ATRIB = 0x00000020

293 ACCESS_PERM = 0x00000040

294

295# 2.2.4.29 SHARE_INFO_1005

296# shi1005_flags

297 SHI1005_FLAGS_DFS = 0x00000001

298 SHI1005_FLAGS_DFS_ROOT = 0x00000002

299 CSC_MASK = 0x00000030

300 SHI1005_FLAGS_RESTRICT_EXCLUSIVE_OPENS = 0x00000100

301 SHI1005_FLAGS_FORCE_SHARED_DELETE = 0x00000200

302 SHI1005_FLAGS_ALLOW_NAMESPACE_CACHING = 0x00000400

303 SHI1005_FLAGS_ACCESS_BASED_DIRECTORY_ENUM = 0x00000800

304 SHI1005_FLAGS_FORCE_LEVELII_OPLOCK = 0x00001000

305 SHI1005_FLAGS_ENABLE_HASH = 0x00002000

306 SHI1005_FLAGS_ENABLE_CA = 0x00004000

307 SHI1005_FLAGS_ENCRYPT_DATA = 0x00008000

308

309# 2.2.4.43 SERVER_INFO_103

310# sv103_capabilities

311 SRV_SUPPORT_HASH_GENERATION = 0x0001

312 SRV_HASH_GENERATION_ACTIVE = 0x0002

313

314# 2.2.4.96 SERVER_TRANSPORT_INFO_3

315# svti3_flags

316 SVTI2_REMAP_PIPE_NAMES = 0x00000002

317 SVTI2_SCOPED_NAME = 0x00000004

318

319# 2.2.4.109 DFS_SITENAME_INFO

320# SiteFlags

321 DFS_SITE_PRIMARY = 0x00000001

322

323# 3.1.4.42 NetrDfsFixLocalVolume (Opnum 51)

324# ServiceType

325 DFS_SERVICE_TYPE_MASTER = 0x00000001

326 DFS_SERVICE_TYPE_READONLY = 0x00000002

327 DFS_SERVICE_TYPE_LOCAL = 0x00000004

328 DFS_SERVICE_TYPE_REFERRAL = 0x00000008

329 DFS_SERVICE_TYPE_ACTIVE = 0x000000010

330 DFS_SERVICE_TYPE_DOWN_LEVEL = 0x000000020

331 DFS_SERVICE_TYPE_COSTLIER = 0x000000040

332 DFS_SERVICE_TYPE_OFFLINE = 0x000000080

333

334# CreateDisposition

335 FILE_SUPERSEDE = 0x00000000

336 FILE_OPEN = 0x00000001

337 FILE_CREATE = 0x00000002

338

339################################################################################

340# STRUCTURES

341################################################################################

342# 2.2.4.1 CONNECTION_INFO_0

343 class CONNECTION_INFO_0(NDRSTRUCT):

344 structure = (

345 ('coni0_id', DWORD),

346 )

347

348 class CONNECTION_INFO_0_ARRAY(NDRUniConformantArray):

349 item = CONNECTION_INFO_0

350

351 class LPCONNECTION_INFO_0_ARRAY(NDRPOINTER):

352 referent = (

353 ('Data', CONNECTION_INFO_0_ARRAY),

354 )

355

356# 2.2.4.2 CONNECTION_INFO_1

357 class CONNECTION_INFO_1(NDRSTRUCT):

358 structure = (

359 ('coni1_id', DWORD),

360 ('coni1_type', DWORD),

361 ('coni1_num_opens', DWORD),

362 ('coni1_num_users', DWORD),

363 ('coni1_time', DWORD),

364 ('coni1_username', LPWSTR),

365 ('coni1_netname', LPWSTR),

366 )

367

368 class CONNECTION_INFO_1_ARRAY(NDRUniConformantArray):

369 item = CONNECTION_INFO_1

370

371 class LPCONNECTION_INFO_1_ARRAY(NDRPOINTER):

372 referent = (

373 ('Data', CONNECTION_INFO_1_ARRAY),

374 )

375

376# 2.2.4.3 CONNECT_INFO_0_CONTAINER

377 class CONNECT_INFO_0_CONTAINER(NDRSTRUCT):

378 structure = (

379 ('EntriesRead', DWORD),

380 ('Buffer', LPCONNECTION_INFO_0_ARRAY),

381 )

382

383 class LPCONNECT_INFO_0_CONTAINER(NDRPOINTER):

384 referent = (

385 ('Data', CONNECT_INFO_0_CONTAINER),

386 )

387

388# 2.2.4.4 CONNECT_INFO_1_CONTAINER

389 class CONNECT_INFO_1_CONTAINER(NDRSTRUCT):

390 structure = (

391 ('EntriesRead', DWORD),

392 ('Buffer', LPCONNECTION_INFO_1_ARRAY),

393 )

394

395 class LPCONNECT_INFO_1_CONTAINER(NDRPOINTER):

396 referent = (

397 ('Data', CONNECT_INFO_1_CONTAINER),

398 )

399

400# 2.2.3.1 CONNECT_ENUM_UNION

401 class CONNECT_ENUM_UNION(NDRUNION):

402 commonHdr = (

403 ('tag', DWORD),

404 )

405

406 union = {

407 0: ('Level0', LPCONNECT_INFO_0_CONTAINER),

408 1: ('Level1', LPCONNECT_INFO_1_CONTAINER),

409 }

410

411# 2.2.4.5 CONNECT_ENUM_STRUCT

412 class CONNECT_ENUM_STRUCT(NDRSTRUCT):

413 structure = (

414 ('Level', DWORD),

415 ('ConnectInfo', CONNECT_ENUM_UNION),

416 )

417

418# 2.2.4.6 FILE_INFO_2

419 class FILE_INFO_2(NDRSTRUCT):

420 structure = (

421 ('fi2_id', DWORD),

422 )

423

424 class LPFILE_INFO_2(NDRPOINTER):

425 referent = (

426 ('Data', FILE_INFO_2),

427 )

428

429 class FILE_INFO_2_ARRAY(NDRUniConformantArray):

430 item = FILE_INFO_2

431

432 class LPFILE_INFO_2_ARRAY(NDRPOINTER):

433 referent = (

434 ('Data', FILE_INFO_2_ARRAY),

435 )

436

437# 2.2.4.7 FILE_INFO_3

438 class FILE_INFO_3(NDRSTRUCT):

439 structure = (

440 ('fi3_id', DWORD),

441 ('fi3_permissions', DWORD),

442 ('fi3_num_locks', DWORD),

443 ('fi3_path_name', LPWSTR),

444 ('fi3_username', LPWSTR),

445 )

446

447 class LPFILE_INFO_3(NDRPOINTER):

448 referent = (

449 ('Data', FILE_INFO_3),

450 )

451

452 class FILE_INFO_3_ARRAY(NDRUniConformantArray):

453 item = FILE_INFO_3

454

455 class LPFILE_INFO_3_ARRAY(NDRPOINTER):

456 referent = (

457 ('Data', FILE_INFO_3_ARRAY),

458 )

459

460# 2.2.4.8 FILE_INFO_2_CONTAINER

461 class FILE_INFO_2_CONTAINER(NDRSTRUCT):

462 structure = (

463 ('EntriesRead', DWORD),

464 ('Buffer', LPFILE_INFO_2_ARRAY),

465 )

466

467 class LPFILE_INFO_2_CONTAINER(NDRPOINTER):

468 referent = (

469 ('Data', FILE_INFO_2_CONTAINER),

470 )

471

472# 2.2.4.9 FILE_INFO_3_CONTAINER

473 class FILE_INFO_3_CONTAINER(NDRSTRUCT):

474 structure = (

475 ('EntriesRead', DWORD),

476 ('Buffer', LPFILE_INFO_3_ARRAY),

477 )

478

479 class LPFILE_INFO_3_CONTAINER(NDRPOINTER):

480 referent = (

481 ('Data', FILE_INFO_3_CONTAINER),

482 )

483

484# 2.2.3.2 FILE_ENUM_UNION

485 class FILE_ENUM_UNION(NDRUNION):

486 commonHdr = (

487 ('tag', DWORD),

488 )

489

490 union = {

491 2: ('Level2', LPFILE_INFO_2_CONTAINER),

492 3: ('Level3', LPFILE_INFO_3_CONTAINER),

493 }

494

495# 2.2.4.10 FILE_ENUM_STRUCT

496 class FILE_ENUM_STRUCT(NDRSTRUCT):

497 structure = (

498 ('Level', DWORD),

499 ('FileInfo', FILE_ENUM_UNION),

500 )

501

502# 2.2.4.11 SESSION_INFO_0

503 class SESSION_INFO_0(NDRSTRUCT):

504 structure = (

505 ('sesi0_cname', LPWSTR),

506 )

507

508 class LPSESSION_INFO_0(NDRPOINTER):

509 referent = (

510 ('Data', SESSION_INFO_0),

511 )

512

513 class SESSION_INFO_0_ARRAY(NDRUniConformantArray):

514 item = SESSION_INFO_0

515

516 class LPSESSION_INFO_0_ARRAY(NDRPOINTER):

517 referent = (

518 ('Data', SESSION_INFO_0_ARRAY),

519 )

520

521# 2.2.4.12 SESSION_INFO_1

522 class SESSION_INFO_1(NDRSTRUCT):

523 structure = (

524 ('sesi1_cname', LPWSTR),

525 ('sesi1_username', LPWSTR),

526 ('sesi1_num_opens', DWORD),

527 ('sesi1_time', DWORD),

528 ('sesi1_idle_time', DWORD),

529 ('sesi1_user_flags', DWORD),

530 )

531

532 class LPSESSION_INFO_1(NDRPOINTER):

533 referent = (

534 ('Data', SESSION_INFO_1),

535 )

536

537 class SESSION_INFO_1_ARRAY(NDRUniConformantArray):

538 item = SESSION_INFO_1

539

540 class LPSESSION_INFO_1_ARRAY(NDRPOINTER):

541 referent = (

542 ('Data', SESSION_INFO_1_ARRAY),

543 )

544

545# 2.2.4.13 SESSION_INFO_2

546 class SESSION_INFO_2(NDRSTRUCT):

547 structure = (

548 ('sesi2_cname', LPWSTR),

549 ('sesi2_username', LPWSTR),

550 ('sesi2_num_opens', DWORD),

551 ('sesi2_time', DWORD),

552 ('sesi2_idle_time', DWORD),

553 ('sesi2_user_flags', DWORD),

554 ('sesi2_cltype_name', LPWSTR),

555 )

556

557 class LPSESSION_INFO_2(NDRPOINTER):

558 referent = (

559 ('Data', SESSION_INFO_2),

560 )

561

562 class SESSION_INFO_2_ARRAY(NDRUniConformantArray):

563 item = SESSION_INFO_2

564

565 class LPSESSION_INFO_2_ARRAY(NDRPOINTER):

566 referent = (

567 ('Data', SESSION_INFO_2_ARRAY),

568 )

569

570# 2.2.4.14 SESSION_INFO_10

571 class SESSION_INFO_10(NDRSTRUCT):

572 structure = (

573 ('sesi10_cname', LPWSTR),

574 ('sesi10_username', LPWSTR),

575 ('sesi10_time', DWORD),

576 ('sesi10_idle_time', DWORD),

577 )

578

579 class LPSESSION_INFO_10(NDRPOINTER):

580 referent = (

581 ('Data', SESSION_INFO_10),

582 )

583

584 class SESSION_INFO_10_ARRAY(NDRUniConformantArray):

585 item = SESSION_INFO_10

586

587 class LPSESSION_INFO_10_ARRAY(NDRPOINTER):

588 referent = (

589 ('Data', SESSION_INFO_10_ARRAY),

590 )

591

592# 2.2.4.15 SESSION_INFO_502

593 class SESSION_INFO_502(NDRSTRUCT):

594 structure = (

595 ('sesi502_cname', LPWSTR),

596 ('sesi502_username', LPWSTR),

597 ('sesi502_num_opens', DWORD),

598 ('sesi502_time', DWORD),

599 ('sesi502_idle_time', DWORD),

600 ('sesi502_user_flags', DWORD),

601 ('sesi502_cltype_name', LPWSTR),

602 ('sesi502_transport', LPWSTR),

603 )

604

605 class LPSESSION_INFO_502(NDRPOINTER):

606 referent = (

607 ('Data', SESSION_INFO_502),

608 )

609

610 class SESSION_INFO_502_ARRAY(NDRUniConformantArray):

611 item = SESSION_INFO_502

612

613 class LPSESSION_INFO_502_ARRAY(NDRPOINTER):

614 referent = (

615 ('Data', SESSION_INFO_502_ARRAY),

616 )

617

618# 2.2.4.16 SESSION_INFO_0_CONTAINER

619 class SESSION_INFO_0_CONTAINER(NDRSTRUCT):

620 structure = (

621 ('EntriesRead', DWORD),

622 ('Buffer', LPSESSION_INFO_0_ARRAY),

623 )

624

625 class LPSESSION_INFO_0_CONTAINER(NDRPOINTER):

626 referent = (

627 ('Data', SESSION_INFO_0_CONTAINER),

628 )

629

630# 2.2.4.17 SESSION_INFO_1_CONTAINER

631 class SESSION_INFO_1_CONTAINER(NDRSTRUCT):

632 structure = (

633 ('EntriesRead', DWORD),

634 ('Buffer', LPSESSION_INFO_1_ARRAY),

635 )

636

637 class LPSESSION_INFO_1_CONTAINER(NDRPOINTER):

638 referent = (

639 ('Data', SESSION_INFO_1_CONTAINER),

640 )

641

642# 2.2.4.18 SESSION_INFO_2_CONTAINER

643 class SESSION_INFO_2_CONTAINER(NDRSTRUCT):

644 structure = (

645 ('EntriesRead', DWORD),

646 ('Buffer', LPSESSION_INFO_2_ARRAY),

647 )

648

649 class LPSESSION_INFO_2_CONTAINER(NDRPOINTER):

650 referent = (

651 ('Data', SESSION_INFO_2_CONTAINER),

652 )

653

654# 2.2.4.19 SESSION_INFO_10_CONTAINER

655 class SESSION_INFO_10_CONTAINER(NDRSTRUCT):

656 structure = (

657 ('EntriesRead', DWORD),

658 ('Buffer', LPSESSION_INFO_10_ARRAY),

659 )

660

661 class LPSESSION_INFO_10_CONTAINER(NDRPOINTER):

662 referent = (

663 ('Data', SESSION_INFO_10_CONTAINER),

664 )

665

666# 2.2.4.20 SESSION_INFO_502_CONTAINER

667 class SESSION_INFO_502_CONTAINER(NDRSTRUCT):

668 structure = (

669 ('EntriesRead', DWORD),

670 ('Buffer', LPSESSION_INFO_502_ARRAY),

671 )

672

673 class LPSESSION_INFO_502_CONTAINER(NDRPOINTER):

674 referent = (

675 ('Data', SESSION_INFO_502_CONTAINER),

676 )

677

678# 2.2.3.4 SESSION_ENUM_UNION

679 class SESSION_ENUM_UNION(NDRUNION):

680 commonHdr = (

681 ('tag', DWORD),

682 )

683

684 union = {

685 0: ('Level0', LPSESSION_INFO_0_CONTAINER),

686 1: ('Level1', LPSESSION_INFO_1_CONTAINER),

687 2: ('Level2', LPSESSION_INFO_2_CONTAINER),

688 10: ('Level10', LPSESSION_INFO_10_CONTAINER),

689 502: ('Level502', LPSESSION_INFO_502_CONTAINER),

690 }

691

692# 2.2.4.21 SESSION_ENUM_STRUCT

693 class SESSION_ENUM_STRUCT(NDRSTRUCT):

694 structure = (

695 ('Level', DWORD),

696 ('SessionInfo', SESSION_ENUM_UNION),

697 )

698

699# 2.2.4.22 SHARE_INFO_0

700 class SHARE_INFO_0(NDRSTRUCT):

701 structure = (

702 ('shi0_netname', LPWSTR),

703 )

704

705 class LPSHARE_INFO_0(NDRPOINTER):

706 referent = (

707 ('Data', SHARE_INFO_0),

708 )

709

710 class SHARE_INFO_0_ARRAY(NDRUniConformantArray):

711 item = SHARE_INFO_0

712

713 class LPSHARE_INFO_0_ARRAY(NDRPOINTER):

714 referent = (

715 ('Data', SHARE_INFO_0_ARRAY),

716 )

717

718# 2.2.4.23 SHARE_INFO_1

719 class SHARE_INFO_1(NDRSTRUCT):

720 structure = (

721 ('shi1_netname', LPWSTR),

722 ('shi1_type', DWORD),

723 ('shi1_remark', LPWSTR),

724 )

725

726 class LPSHARE_INFO_1(NDRPOINTER):

727 referent = (

728 ('Data', SHARE_INFO_1),

729 )

730

731 class SHARE_INFO_1_ARRAY(NDRUniConformantArray):

732 item = SHARE_INFO_1

733

734 class LPSHARE_INFO_1_ARRAY(NDRPOINTER):

735 referent = (

736 ('Data', SHARE_INFO_1_ARRAY),

737 )

738

739# 2.2.4.24 SHARE_INFO_2

740 class SHARE_INFO_2(NDRSTRUCT):

741 structure = (

742 ('shi2_netname', LPWSTR),

743 ('shi2_type', DWORD),

744 ('shi2_remark', LPWSTR),

745 ('shi2_permissions', DWORD),

746 ('shi2_max_uses', DWORD),

747 ('shi2_current_uses', DWORD),

748 ('shi2_path', LPWSTR),

749 ('shi2_passwd', LPWSTR),

750 )

751

752 class LPSHARE_INFO_2(NDRPOINTER):

753 referent = (

754 ('Data', SHARE_INFO_2),

755 )

756

757 class SHARE_INFO_2_ARRAY(NDRUniConformantArray):

758 item = SHARE_INFO_2

759

760 class LPSHARE_INFO_2_ARRAY(NDRPOINTER):

761 referent = (

762 ('Data', SHARE_INFO_2_ARRAY),

763 )

764

765# 2.2.4.25 SHARE_INFO_501

766 class SHARE_INFO_501(NDRSTRUCT):

767 structure = (

768 ('shi501_netname', LPWSTR),

769 ('shi501_type', DWORD),

770 ('shi501_remark', LPWSTR),

771 ('shi501_flags', DWORD),

772 )

773

774 class LPSHARE_INFO_501(NDRPOINTER):

775 referent = (

776 ('Data', SHARE_INFO_501),

777 )

778

779 class SHARE_INFO_501_ARRAY(NDRUniConformantArray):

780 item = SHARE_INFO_501

781

782 class LPSHARE_INFO_501_ARRAY(NDRPOINTER):

783 referent = (

784 ('Data', SHARE_INFO_501_ARRAY),

785 )

786

787# 2.2.4.26 SHARE_INFO_502_I

788 class SHARE_INFO_502(NDRSTRUCT):

789 structure = (

790 ('shi502_netname', LPWSTR),

791 ('shi502_type', DWORD),

792 ('shi502_remark', LPWSTR),

793 ('shi502_permissions', DWORD),

794 ('shi502_max_uses', DWORD),

795 ('shi502_current_uses', DWORD),

796 ('shi502_path', LPWSTR),

797 ('shi502_passwd', LPWSTR),

798 ('shi502_reserved', DWORD),

799 ('shi502_security_descriptor', LPBYTE),

800 )

801

802 class LPSHARE_INFO_502(NDRPOINTER):

803 referent = (

804 ('Data', SHARE_INFO_502),

805 )

806

807 class SHARE_INFO_502_ARRAY(NDRUniConformantArray):

808 item = SHARE_INFO_502

809

810 class LPSHARE_INFO_502_ARRAY(NDRPOINTER):

811 referent = (

812 ('Data', SHARE_INFO_502_ARRAY),

813 )

814

815# 2.2.4.27 SHARE_INFO_503_I

816 class SHARE_INFO_503(NDRSTRUCT):

817 structure = (

818 ('shi503_netname', LPWSTR),

819 ('shi503_type', DWORD),

820 ('shi503_remark', LPWSTR),

821 ('shi503_permissions', DWORD),

822 ('shi503_max_uses', DWORD),

823 ('shi503_current_uses', DWORD),

824 ('shi503_path', LPWSTR),

825 ('shi503_passwd', LPWSTR),

826 ('shi503_servername', LPWSTR),

827 ('shi503_reserved', DWORD),

828 ('shi503_security_descriptor', LPBYTE),

829 )

830

831 class LPSHARE_INFO_503(NDRPOINTER):

832 referent = (

833 ('Data', SHARE_INFO_503),

834 )

835

836 class SHARE_INFO_503_ARRAY(NDRUniConformantArray):

837 item = SHARE_INFO_503

838

839 class LPSHARE_INFO_503_ARRAY(NDRPOINTER):

840 referent = (

841 ('Data', SHARE_INFO_503_ARRAY),

842 )

843

844# 2.2.4.28 SHARE_INFO_1004

845 class SHARE_INFO_1004(NDRSTRUCT):

846 structure = (

847 ('shi1004_remark', LPWSTR),

848 )

849

850 class LPSHARE_INFO_1004(NDRPOINTER):

851 referent = (

852 ('Data', SHARE_INFO_1004),

853 )

854

855 class SHARE_INFO_1004_ARRAY(NDRUniConformantArray):

856 item = SHARE_INFO_1004

857

858 class LPSHARE_INFO_1004_ARRAY(NDRPOINTER):

859 referent = (

860 ('Data', SHARE_INFO_1004_ARRAY),

861 )

862

863# 2.2.4.29 SHARE_INFO_1005

864 class SHARE_INFO_1005(NDRSTRUCT):

865 structure = (

866 ('shi1005_flags', DWORD),

867 )

868

869 class LPSHARE_INFO_1005(NDRPOINTER):

870 referent = (

871 ('Data', SHARE_INFO_1005),

872 )

873

874 class SHARE_INFO_1005_ARRAY(NDRUniConformantArray):

875 item = SHARE_INFO_1004

876

877 class LPSHARE_INFO_1005_ARRAY(NDRPOINTER):

878 referent = (

879 ('Data', SHARE_INFO_1005_ARRAY),

880 )

881

882# 2.2.4.30 SHARE_INFO_1006

883 class SHARE_INFO_1006(NDRSTRUCT):

884 structure = (

885 ('shi1006_max_uses', DWORD),

886 )

887

888 class LPSHARE_INFO_1006(NDRPOINTER):

889 referent = (

890 ('Data', SHARE_INFO_1006),

891 )

892

893 class SHARE_INFO_1006_ARRAY(NDRUniConformantArray):

894 item = SHARE_INFO_1006

895

896 class LPSHARE_INFO_1006_ARRAY(NDRPOINTER):

897 referent = (

898 ('Data', SHARE_INFO_1006_ARRAY),

899 )

900

901# 2.2.4.31 SHARE_INFO_1501_I

902 class SHARE_INFO_1501(NDRSTRUCT):

903 structure = (

904 ('shi1501_reserved', DWORD),

905 ('shi1501_security_descriptor', NDRUniConformantArray),

906 )

907

908 class LPSHARE_INFO_1501(NDRPOINTER):

909 referent = (

910 ('Data', SHARE_INFO_1501),

911 )

912

913 class SHARE_INFO_1501_ARRAY(NDRUniConformantArray):

914 item = SHARE_INFO_1501

915

916 class LPSHARE_INFO_1501_ARRAY(NDRPOINTER):

917 referent = (

918 ('Data', SHARE_INFO_1501_ARRAY),

919 )

920

921# 2.2.4.32 SHARE_INFO_0_CONTAINER

922 class SHARE_INFO_0_CONTAINER(NDRSTRUCT):

923 structure = (

924 ('EntriesRead', DWORD),

925 ('Buffer', LPSHARE_INFO_0_ARRAY),

926 )

927

928 class LPSHARE_INFO_0_CONTAINER(NDRPOINTER):

929 referent = (

930 ('Data', SHARE_INFO_0_CONTAINER),

931 )

932

933# 2.2.4.33 SHARE_INFO_1_CONTAINER

934 class SHARE_INFO_1_CONTAINER(NDRSTRUCT):

935 structure = (

936 ('EntriesRead', DWORD),

937 ('Buffer', LPSHARE_INFO_1_ARRAY),

938 )

939

940 class LPSHARE_INFO_1_CONTAINER(NDRPOINTER):

941 referent = (

942 ('Data', SHARE_INFO_1_CONTAINER),

943 )

944

945# 2.2.4.34 SHARE_INFO_2_CONTAINER

946 class SHARE_INFO_2_CONTAINER(NDRSTRUCT):

947 structure = (

948 ('EntriesRead', DWORD),

949 ('Buffer', LPSHARE_INFO_2_ARRAY),

950 )

951

952 class LPSHARE_INFO_2_CONTAINER(NDRPOINTER):

953 referent = (

954 ('Data', SHARE_INFO_2_CONTAINER),

955 )

956

957# 2.2.4.35 SHARE_INFO_501_CONTAINER

958 class SHARE_INFO_501_CONTAINER(NDRSTRUCT):

959 structure = (

960 ('EntriesRead', DWORD),

961 ('Buffer', LPSHARE_INFO_501_ARRAY),

962 )

963

964 class LPSHARE_INFO_501_CONTAINER(NDRPOINTER):

965 referent = (

966 ('Data', SHARE_INFO_501_CONTAINER),

967 )

968

969# 2.2.4.36 SHARE_INFO_502_CONTAINER

970 class SHARE_INFO_502_CONTAINER(NDRSTRUCT):

971 structure = (

972 ('EntriesRead', DWORD),

973 ('Buffer', LPSHARE_INFO_502_ARRAY),

974 )

975

976 class LPSHARE_INFO_502_CONTAINER(NDRPOINTER):

977 referent = (

978 ('Data', SHARE_INFO_502_CONTAINER),

979 )

980

981# 2.2.4.37 SHARE_INFO_503_CONTAINER

982 class SHARE_INFO_503_CONTAINER(NDRSTRUCT):

983 structure = (

984 ('EntriesRead', DWORD),

985 ('Buffer', LPSHARE_INFO_503_ARRAY),

986 )

987

988 class LPSHARE_INFO_503_CONTAINER(NDRPOINTER):

989 referent = (

990 ('Data', SHARE_INFO_503_CONTAINER),

991 )

992

993# 2.2.3.5 SHARE_ENUM_UNION

994 class SHARE_ENUM_UNION(NDRUNION):

995 commonHdr = (

996 ('tag', DWORD),

997 )

998

999 union = {

1000 0: ('Level0', LPSHARE_INFO_0_CONTAINER),

1001 1: ('Level1', LPSHARE_INFO_1_CONTAINER),

1002 2: ('Level2', LPSHARE_INFO_2_CONTAINER),

1003 501: ('Level501', LPSHARE_INFO_501_CONTAINER),

1004 502: ('Level502', LPSHARE_INFO_502_CONTAINER),

1005 503: ('Level503', LPSHARE_INFO_503_CONTAINER),

1006 }

1007

1008# 2.2.4.38 SHARE_ENUM_STRUCT

1009 class SHARE_ENUM_STRUCT(NDRSTRUCT):

1010 structure = (

1011 ('Level', DWORD),

1012 ('ShareInfo', SHARE_ENUM_UNION),

1013 )

1014

1015# 2.2.4.39 STAT_SERVER_0

1016 class STAT_SERVER_0(NDRSTRUCT):

1017 structure = (

1018 ('sts0_start', DWORD),

1019 ('sts0_fopens', DWORD),

1020 ('sts0_devopens', DWORD),

1021 ('sts0_jobsqueued', DWORD),

1022 ('sts0_sopens', DWORD),

1023 ('sts0_stimedout', DWORD),

1024 ('sts0_serrorout', DWORD),

1025 ('sts0_pwerrors', DWORD),

1026 ('sts0_permerrors', DWORD),

1027 ('sts0_syserrors', DWORD),

1028 ('sts0_bytessent_low', DWORD),

1029 ('sts0_bytessent_high', DWORD),

1030 ('sts0_bytesrcvd_low', DWORD),

1031 ('sts0_bytesrcvd_high', DWORD),

1032 ('sts0_avresponse', DWORD),

1033 ('sts0_reqbufneed', DWORD),

1034 ('sts0_bigbufneed', DWORD),

1035 )

1036

1037 class LPSTAT_SERVER_0(NDRPOINTER):

1038 referent = (

1039 ('Data', STAT_SERVER_0),

1040 )

1041

1042# 2.2.4.40 SERVER_INFO_100

1043 class SERVER_INFO_100(NDRSTRUCT):

1044 structure = (

1045 ('sv100_platform_id', DWORD),

1046 ('sv100_name', LPWSTR),

1047 )

1048

1049 class LPSERVER_INFO_100(NDRPOINTER):

1050 referent = (

1051 ('Data', SERVER_INFO_100),

1052 )

1053

1054# 2.2.4.41 SERVER_INFO_101

1055 class SERVER_INFO_101(NDRSTRUCT):

1056 structure = (

1057 ('sv101_platform_id', DWORD),

1058 ('sv101_name', LPWSTR),

1059 ('sv101_version_major', DWORD),

1060 ('sv101_version_minor', DWORD),

1061 ('sv101_type', DWORD),

1062 ('sv101_comment', LPWSTR),

1063 )

1064

1065 class LPSERVER_INFO_101(NDRPOINTER):

1066 referent = (

1067 ('Data', SERVER_INFO_101),

1068 )

1069

1070# 2.2.4.42 SERVER_INFO_102

1071 class SERVER_INFO_102(NDRSTRUCT):

1072 structure = (

1073 ('sv102_platform_id', DWORD),

1074 ('sv102_name', LPWSTR),

1075 ('sv102_version_major', DWORD),

1076 ('sv102_version_minor', DWORD),

1077 ('sv102_type', DWORD),

1078 ('sv102_comment', LPWSTR),

1079 ('sv102_users', DWORD),

1080 ('sv102_disc', DWORD),

1081 ('sv102_hidden', DWORD),

1082 ('sv102_announce', DWORD),

1083 ('sv102_anndelta', DWORD),

1084 ('sv102_licenses', DWORD),

1085 ('sv102_userpath', LPWSTR),

1086 )

1087

1088 class LPSERVER_INFO_102(NDRPOINTER):

1089 referent = (

1090 ('Data', SERVER_INFO_102),

1091 )

1092

1093# 2.2.4.43 SERVER_INFO_103

1094 class SERVER_INFO_103(NDRSTRUCT):

1095 structure = (

1096 ('sv103_platform_id', DWORD),

1097 ('sv103_name', LPWSTR),

1098 ('sv103_version_major', DWORD),

1099 ('sv103_version_minor', DWORD),

1100 ('sv103_type', DWORD),

1101 ('sv103_comment', LPWSTR),

1102 ('sv103_users', DWORD),

1103 ('sv103_disc', DWORD),

1104 ('sv103_hidden', DWORD),

1105 ('sv103_announce', DWORD),

1106 ('sv103_anndelta', DWORD),

1107 ('sv103_licenses', DWORD),

1108 ('sv103_userpath', LPWSTR),

1109 ('sv103_capabilities', DWORD),

1110 )

1111

1112 class LPSERVER_INFO_103(NDRPOINTER):

1113 referent = (

1114 ('Data', SERVER_INFO_103),

1115 )

1116

1117# 2.2.4.44 SERVER_INFO_502

1118 class SERVER_INFO_502(NDRSTRUCT):

1119 structure = (

1120 ('sv502_sessopens', DWORD),

1121 ('sv502_sessvcs', DWORD),

1122 ('sv502_opensearch', DWORD),

1123 ('sv502_sizreqbuf', DWORD),

1124 ('sv502_initworkitems', DWORD),

1125 ('sv502_maxworkitems', DWORD),

1126 ('sv502_rawworkitems', DWORD),

1127 ('sv502_irpstacksize', DWORD),

1128 ('sv502_maxrawbuflen', DWORD),

1129 ('sv502_sessusers', DWORD),

1130 ('sv502_sessconns', DWORD),

1131 ('sv502_maxpagedmemoryusage', DWORD),

1132 ('sv502_maxnonpagedmemoryusage', DWORD),

1133 ('sv502_enablesoftcompat', DWORD),

1134 ('sv502_enableforcedlogoff', DWORD),

1135 ('sv502_timesource', DWORD),

1136 ('sv502_acceptdownlevelapis', DWORD),

1137 ('sv502_lmannounce', DWORD),

1138 )

1139

1140 class LPSERVER_INFO_502(NDRPOINTER):

1141 referent = (

1142 ('Data', SERVER_INFO_502),

1143 )

1144

1145# 2.2.4.45 SERVER_INFO_503

1146 class SERVER_INFO_503(NDRSTRUCT):

1147 structure = (

1148 ('sv503_sessopens', DWORD),

1149 ('sv503_sessvcs', DWORD),

1150 ('sv503_opensearch', DWORD),

1151 ('sv503_sizreqbuf', DWORD),

1152 ('sv503_initworkitems', DWORD),

1153 ('sv503_maxworkitems', DWORD),

1154 ('sv503_rawworkitems', DWORD),

1155 ('sv503_irpstacksize', DWORD),

1156 ('sv503_maxrawbuflen', DWORD),

1157 ('sv503_sessusers', DWORD),

1158 ('sv503_sessconns', DWORD),

1159 ('sv503_maxpagedmemoryusage', DWORD),

1160 ('sv503_maxnonpagedmemoryusage', DWORD),

1161 ('sv503_enablesoftcompat', DWORD),

1162 ('sv503_enableforcedlogoff', DWORD),

1163 ('sv503_timesource', DWORD),

1164 ('sv503_acceptdownlevelapis', DWORD),

1165 ('sv503_lmannounce', DWORD),

1166 ('sv503_domain', LPWSTR),

1167 ('sv503_maxcopyreadlen', DWORD),

1168 ('sv503_maxcopywritelen', DWORD),

1169 ('sv503_minkeepsearch', DWORD),

1170 ('sv503_maxkeepsearch', DWORD),

1171 ('sv503_minkeepcomplsearch', DWORD),

1172 ('sv503_maxkeepcomplsearch', DWORD),

1173 ('sv503_threadcountadd', DWORD),

1174 ('sv503_numblockthreads', DWORD),

1175 ('sv503_scavtimeout', DWORD),

1176 ('sv503_minrcvqueue', DWORD),

1177 ('sv503_minfreeworkitems', DWORD),

1178 ('sv503_xactmemsize', DWORD),

1179 ('sv503_threadpriority', DWORD),

1180 ('sv503_maxmpxct', DWORD),

1181 ('sv503_oplockbreakwait', DWORD),

1182 ('sv503_oplockbreakresponsewait', DWORD),

1183 ('sv503_enableoplocks', DWORD),

1184 ('sv503_enableoplockforceclose', DWORD),

1185 ('sv503_enablefcbopens', DWORD),

1186 ('sv503_enableraw', DWORD),

1187 ('sv503_enablesharednetdrives', DWORD),

1188 ('sv503_minfreeconnections', DWORD),

1189 ('sv503_maxfreeconnections', DWORD),

1190 )

1191

1192 class LPSERVER_INFO_503(NDRPOINTER):

1193 referent = (

1194 ('Data', SERVER_INFO_503),

1195 )

1196

1197# 2.2.4.46 SERVER_INFO_599

1198 class SERVER_INFO_599(NDRSTRUCT):

1199 structure = (

1200 ('sv599_sessopens', DWORD),

1201 ('sv599_sessvcs', DWORD),

1202 ('sv599_opensearch', DWORD),

1203 ('sv599_sizreqbuf', DWORD),

1204 ('sv599_initworkitems', DWORD),

1205 ('sv599_maxworkitems', DWORD),

1206 ('sv599_rawworkitems', DWORD),

1207 ('sv599_irpstacksize', DWORD),

1208 ('sv599_maxrawbuflen', DWORD),

1209 ('sv599_sessusers', DWORD),

1210 ('sv599_sessconns', DWORD),

1211 ('sv599_maxpagedmemoryusage', DWORD),

1212 ('sv599_maxnonpagedmemoryusage', DWORD),

1213 ('sv599_enablesoftcompat', DWORD),

1214 ('sv599_enableforcedlogoff', DWORD),

1215 ('sv599_timesource', DWORD),

1216 ('sv599_acceptdownlevelapis', DWORD),

1217 ('sv599_lmannounce', DWORD),

1218 ('sv599_domain', LPWSTR),

1219 ('sv599_maxcopyreadlen', DWORD),

1220 ('sv599_maxcopywritelen', DWORD),

1221 ('sv599_minkeepsearch', DWORD),

1222 ('sv599_maxkeepsearch', DWORD),

1223 ('sv599_minkeepcomplsearch', DWORD),

1224 ('sv599_maxkeepcomplsearch', DWORD),

1225 ('sv599_threadcountadd', DWORD),

1226 ('sv599_numblockthreads', DWORD),

1227 ('sv599_scavtimeout', DWORD),

1228 ('sv599_minrcvqueue', DWORD),

1229 ('sv599_minfreeworkitems', DWORD),

1230 ('sv599_xactmemsize', DWORD),

1231 ('sv599_threadpriority', DWORD),

1232 ('sv599_maxmpxct', DWORD),

1233 ('sv599_oplockbreakwait', DWORD),

1234 ('sv599_oplockbreakresponsewait', DWORD),

1235 ('sv599_enableoplocks', DWORD),

1236 ('sv599_enableoplockforceclose', DWORD),

1237 ('sv599_enablefcbopens', DWORD),

1238 ('sv599_enableraw', DWORD),

1239 ('sv599_enablesharednetdrives', DWORD),

1240 ('sv599_minfreeconnections', DWORD),

1241 ('sv599_maxfreeconnections', DWORD),

1242 ('sv599_initsesstable', DWORD),

1243 ('sv599_initconntable', DWORD),

1244 ('sv599_initfiletable', DWORD),

1245 ('sv599_initsearchtable', DWORD),

1246 ('sv599_alertschedule', DWORD),

1247 ('sv599_errorthreshold', DWORD),

1248 ('sv599_networkerrorthreshold', DWORD),

1249 ('sv599_diskspacethreshold', DWORD),

1250 ('sv599_reserved', DWORD),

1251 ('sv599_maxlinkdelay', DWORD),

1252 ('sv599_minlinkthroughput', DWORD),

1253 ('sv599_linkinfovalidtime', DWORD),

1254 ('sv599_scavqosinfoupdatetime', DWORD),

1255 ('sv599_maxworkitemidletime', DWORD),

1256 )

1257

1258 class LPSERVER_INFO_599(NDRPOINTER):

1259 referent = (

1260 ('Data', SERVER_INFO_599),

1261 )

1262

1263# 2.2.4.47 SERVER_INFO_1005

1264 class SERVER_INFO_1005(NDRSTRUCT):

1265 structure = (

1266 ('sv1005_comment', LPWSTR),

1267 )

1268

1269 class LPSERVER_INFO_1005(NDRPOINTER):

1270 referent = (

1271 ('Data', SERVER_INFO_1005),

1272 )

1273

1274# 2.2.4.48 SERVER_INFO_1107

1275 class SERVER_INFO_1107(NDRSTRUCT):

1276 structure = (

1277 ('sv1107_users', DWORD),

1278 )

1279

1280 class LPSERVER_INFO_1107(NDRPOINTER):

1281 referent = (

1282 ('Data', SERVER_INFO_1107),

1283 )

1284

1285# 2.2.4.49 SERVER_INFO_1010

1286 class SERVER_INFO_1010(NDRSTRUCT):

1287 structure = (

1288 ('sv1010_disc', DWORD),

1289 )

1290

1291 class LPSERVER_INFO_1010(NDRPOINTER):

1292 referent = (

1293 ('Data', SERVER_INFO_1010),

1294 )

1295

1296# 2.2.4.50 SERVER_INFO_1016

1297 class SERVER_INFO_1016(NDRSTRUCT):

1298 structure = (

1299 ('sv1016_hidden', DWORD),

1300 )

1301

1302 class LPSERVER_INFO_1016(NDRPOINTER):

1303 referent = (

1304 ('Data', SERVER_INFO_1016),

1305 )

1306

1307# 2.2.4.51 SERVER_INFO_1017

1308 class SERVER_INFO_1017(NDRSTRUCT):

1309 structure = (

1310 ('sv1017_announce', DWORD),

1311 )

1312

1313 class LPSERVER_INFO_1017(NDRPOINTER):

1314 referent = (

1315 ('Data', SERVER_INFO_1017),

1316 )

1317

1318# 2.2.4.52 SERVER_INFO_1018

1319 class SERVER_INFO_1018(NDRSTRUCT):

1320 structure = (

1321 ('sv1018_anndelta', DWORD),

1322 )

1323

1324 class LPSERVER_INFO_1018(NDRPOINTER):

1325 referent = (

1326 ('Data', SERVER_INFO_1018),

1327 )

1328

1329# 2.2.4.53 SERVER_INFO_1501

1330 class SERVER_INFO_1501(NDRSTRUCT):

1331 structure = (

1332 ('sv1501_sessopens', DWORD),

1333 )

1334

1335 class LPSERVER_INFO_1501(NDRPOINTER):

1336 referent = (

1337 ('Data', SERVER_INFO_1501),

1338 )

1339

1340# 2.2.4.54 SERVER_INFO_1502

1341 class SERVER_INFO_1502(NDRSTRUCT):

1342 structure = (

1343 ('sv1502_sessvcs', DWORD),

1344 )

1345

1346 class LPSERVER_INFO_1502(NDRPOINTER):

1347 referent = (

1348 ('Data', SERVER_INFO_1502),

1349 )

1350

1351# 2.2.4.55 SERVER_INFO_1503

1352 class SERVER_INFO_1503(NDRSTRUCT):

1353 structure = (

1354 ('sv1503_opensearch', DWORD),

1355 )

1356

1357 class LPSERVER_INFO_1503(NDRPOINTER):

1358 referent = (

1359 ('Data', SERVER_INFO_1503),

1360 )

1361

1362# 2.2.4.56 SERVER_INFO_1506

1363 class SERVER_INFO_1506(NDRSTRUCT):

1364 structure = (

1365 ('sv1506_maxworkitems', DWORD),

1366 )

1367

1368 class LPSERVER_INFO_1506(NDRPOINTER):

1369 referent = (

1370 ('Data', SERVER_INFO_1506),

1371 )

1372

1373# 2.2.4.57 SERVER_INFO_1510

1374 class SERVER_INFO_1510(NDRSTRUCT):

1375 structure = (

1376 ('sv1510_sessusers', DWORD),

1377 )

1378

1379 class LPSERVER_INFO_1510(NDRPOINTER):

1380 referent = (

1381 ('Data', SERVER_INFO_1510),

1382 )

1383

1384# 2.2.4.58 SERVER_INFO_1511

1385 class SERVER_INFO_1511(NDRSTRUCT):

1386 structure = (

1387 ('sv1511_sessconns', DWORD),

1388 )

1389

1390 class LPSERVER_INFO_1511(NDRPOINTER):

1391 referent = (

1392 ('Data', SERVER_INFO_1511),

1393 )

1394

1395# 2.2.4.59 SERVER_INFO_1512

1396 class SERVER_INFO_1512(NDRSTRUCT):

1397 structure = (

1398 ('sv1512_maxnonpagedmemoryusage', DWORD),

1399 )

1400

1401 class LPSERVER_INFO_1512(NDRPOINTER):

1402 referent = (

1403 ('Data', SERVER_INFO_1512),

1404 )

1405

1406# 2.2.4.60 SERVER_INFO_1513

1407 class SERVER_INFO_1513(NDRSTRUCT):

1408 structure = (

1409 ('sv1513_maxpagedmemoryusage', DWORD),

1410 )

1411

1412 class LPSERVER_INFO_1513(NDRPOINTER):

1413 referent = (

1414 ('Data', SERVER_INFO_1513),

1415 )

1416

1417# 2.2.4.61 SERVER_INFO_1514

1418 class SERVER_INFO_1514(NDRSTRUCT):

1419 structure = (

1420 ('sv1514_enablesoftcompat', DWORD),

1421 )

1422

1423 class LPSERVER_INFO_1514(NDRPOINTER):

1424 referent = (

1425 ('Data', SERVER_INFO_1514),

1426 )

1427

1428# 2.2.4.62 SERVER_INFO_1515

1429 class SERVER_INFO_1515(NDRSTRUCT):

1430 structure = (

1431 ('sv1515_enableforcedlogoff', DWORD),

1432 )

1433

1434 class LPSERVER_INFO_1515(NDRPOINTER):

1435 referent = (

1436 ('Data', SERVER_INFO_1515),

1437 )

1438

1439# 2.2.4.63 SERVER_INFO_1516

1440 class SERVER_INFO_1516(NDRSTRUCT):

1441 structure = (

1442 ('sv1516_timesource', DWORD),

1443 )

1444

1445 class LPSERVER_INFO_1516(NDRPOINTER):

1446 referent = (

1447 ('Data', SERVER_INFO_1516),

1448 )

1449

1450# 2.2.4.64 SERVER_INFO_1518

1451 class SERVER_INFO_1518(NDRSTRUCT):

1452 structure = (

1453 ('sv1518_lmannounce', DWORD),

1454 )

1455

1456 class LPSERVER_INFO_1518(NDRPOINTER):

1457 referent = (

1458 ('Data', SERVER_INFO_1518),

1459 )

1460

1461# 2.2.4.65 SERVER_INFO_1523

1462 class SERVER_INFO_1523(NDRSTRUCT):

1463 structure = (

1464 ('sv1523_maxkeepsearch', DWORD),

1465 )

1466

1467 class LPSERVER_INFO_1523(NDRPOINTER):

1468 referent = (

1469 ('Data', SERVER_INFO_1523),

1470 )

1471

1472# 2.2.4.66 SERVER_INFO_1528

1473 class SERVER_INFO_1528(NDRSTRUCT):

1474 structure = (

1475 ('sv1528_scavtimeout', DWORD),

1476 )

1477

1478 class LPSERVER_INFO_1528(NDRPOINTER):

1479 referent = (

1480 ('Data', SERVER_INFO_1528),

1481 )

1482

1483# 2.2.4.67 SERVER_INFO_1529

1484 class SERVER_INFO_1529(NDRSTRUCT):

1485 structure = (

1486 ('sv1529_minrcvqueue', DWORD),

1487 )

1488

1489 class LPSERVER_INFO_1529(NDRPOINTER):

1490 referent = (

1491 ('Data', SERVER_INFO_1529),

1492 )

1493

1494# 2.2.4.68 SERVER_INFO_1530

1495 class SERVER_INFO_1530(NDRSTRUCT):

1496 structure = (

1497 ('sv1530_minfreeworkitems', DWORD),

1498 )

1499

1500 class LPSERVER_INFO_1530(NDRPOINTER):

1501 referent = (

1502 ('Data', SERVER_INFO_1530),

1503 )

1504

1505# 2.2.4.69 SERVER_INFO_1533

1506 class SERVER_INFO_1533(NDRSTRUCT):

1507 structure = (

1508 ('sv1533_maxmpxct', DWORD),

1509 )

1510

1511 class LPSERVER_INFO_1533(NDRPOINTER):

1512 referent = (

1513 ('Data', SERVER_INFO_1533),

1514 )

1515

1516# 2.2.4.70 SERVER_INFO_1534

1517 class SERVER_INFO_1534(NDRSTRUCT):

1518 structure = (

1519 ('sv1534_oplockbreakwait', DWORD),

1520 )

1521

1522 class LPSERVER_INFO_1534(NDRPOINTER):

1523 referent = (

1524 ('Data', SERVER_INFO_1534),

1525 )

1526

1527# 2.2.4.71 SERVER_INFO_1535

1528 class SERVER_INFO_1535(NDRSTRUCT):

1529 structure = (

1530 ('sv1535_oplockbreakresponsewait', DWORD),

1531 )

1532

1533 class LPSERVER_INFO_1535(NDRPOINTER):

1534 referent = (

1535 ('Data', SERVER_INFO_1535),

1536 )

1537

1538# 2.2.4.72 SERVER_INFO_1536

1539 class SERVER_INFO_1536(NDRSTRUCT):

1540 structure = (

1541 ('sv1536_enableoplocks', DWORD),

1542 )

1543

1544 class LPSERVER_INFO_1536(NDRPOINTER):

1545 referent = (

1546 ('Data', SERVER_INFO_1536),

1547 )

1548

1549# 2.2.4.73 SERVER_INFO_1538

1550 class SERVER_INFO_1538(NDRSTRUCT):

1551 structure = (

1552 ('sv1538_enablefcbopens', DWORD),

1553 )

1554

1555 class LPSERVER_INFO_1538(NDRPOINTER):

1556 referent = (

1557 ('Data', SERVER_INFO_1538),

1558 )

1559

1560# 2.2.4.74 SERVER_INFO_1539

1561 class SERVER_INFO_1539(NDRSTRUCT):

1562 structure = (

1563 ('sv1539_enableraw', DWORD),

1564 )

1565

1566 class LPSERVER_INFO_1539(NDRPOINTER):

1567 referent = (

1568 ('Data', SERVER_INFO_1539),

1569 )

1570

1571# 2.2.4.75 SERVER_INFO_1540

1572 class SERVER_INFO_1540(NDRSTRUCT):

1573 structure = (

1574 ('sv1540_enablesharednetdrives', DWORD),

1575 )

1576

1577 class LPSERVER_INFO_1540(NDRPOINTER):

1578 referent = (

1579 ('Data', SERVER_INFO_1540),

1580 )

1581

1582# 2.2.4.76 SERVER_INFO_1541

1583 class SERVER_INFO_1541(NDRSTRUCT):

1584 structure = (

1585 ('sv1541_minfreeconnections', DWORD),

1586 )

1587

1588 class LPSERVER_INFO_1541(NDRPOINTER):

1589 referent = (

1590 ('Data', SERVER_INFO_1541),

1591 )

1592

1593# 2.2.4.77 SERVER_INFO_1542

1594 class SERVER_INFO_1542(NDRSTRUCT):

1595 structure = (

1596 ('sv1542_maxfreeconnections', DWORD),

1597 )

1598

1599 class LPSERVER_INFO_1542(NDRPOINTER):

1600 referent = (

1601 ('Data', SERVER_INFO_1542),

1602 )

1603

1604# 2.2.4.78 SERVER_INFO_1543

1605 class SERVER_INFO_1543(NDRSTRUCT):

1606 structure = (

1607 ('sv1543_initsesstable', DWORD),

1608 )

1609

1610 class LPSERVER_INFO_1543(NDRPOINTER):

1611 referent = (

1612 ('Data', SERVER_INFO_1543),

1613 )

1614

1615# 2.2.4.79 SERVER_INFO_1544

1616 class SERVER_INFO_1544(NDRSTRUCT):

1617 structure = (

1618 ('sv1544_initconntable', DWORD),

1619 )

1620

1621 class LPSERVER_INFO_1544(NDRPOINTER):

1622 referent = (

1623 ('Data', SERVER_INFO_1544),

1624 )

1625

1626# 2.2.4.80 SERVER_INFO_1545

1627 class SERVER_INFO_1545(NDRSTRUCT):

1628 structure = (

1629 ('sv1545_initfiletable', DWORD),

1630 )

1631

1632 class LPSERVER_INFO_1545(NDRPOINTER):

1633 referent = (

1634 ('Data', SERVER_INFO_1545),

1635 )

1636

1637# 2.2.4.81 SERVER_INFO_1546

1638 class SERVER_INFO_1546(NDRSTRUCT):

1639 structure = (

1640 ('sv1546_initsearchtable', DWORD),

1641 )

1642

1643 class LPSERVER_INFO_1546(NDRPOINTER):

1644 referent = (

1645 ('Data', SERVER_INFO_1546),

1646 )

1647

1648# 2.2.4.82 SERVER_INFO_1547

1649 class SERVER_INFO_1547(NDRSTRUCT):

1650 structure = (

1651 ('sv1547_alertschedule', DWORD),

1652 )

1653

1654 class LPSERVER_INFO_1547(NDRPOINTER):

1655 referent = (

1656 ('Data', SERVER_INFO_1547),

1657 )

1658

1659# 2.2.4.83 SERVER_INFO_1548

1660 class SERVER_INFO_1548(NDRSTRUCT):

1661 structure = (

1662 ('sv1548_errorthreshold', DWORD),

1663 )

1664

1665 class LPSERVER_INFO_1548(NDRPOINTER):

1666 referent = (

1667 ('Data', SERVER_INFO_1548),

1668 )

1669

1670# 2.2.4.84 SERVER_INFO_1549

1671 class SERVER_INFO_1549(NDRSTRUCT):

1672 structure = (

1673 ('sv1549_networkerrorthreshold', DWORD),

1674 )

1675

1676 class LPSERVER_INFO_1549(NDRPOINTER):

1677 referent = (

1678 ('Data', SERVER_INFO_1549),

1679 )

1680

1681# 2.2.4.85 SERVER_INFO_1550

1682 class SERVER_INFO_1550(NDRSTRUCT):

1683 structure = (

1684 ('sv1550_diskspacethreshold', DWORD),

1685 )

1686

1687 class LPSERVER_INFO_1550(NDRPOINTER):

1688 referent = (

1689 ('Data', SERVER_INFO_1550),

1690 )

1691

1692# 2.2.4.86 SERVER_INFO_1552

1693 class SERVER_INFO_1552(NDRSTRUCT):

1694 structure = (

1695 ('sv1552_maxlinkdelay', DWORD),

1696 )

1697

1698 class LPSERVER_INFO_1552(NDRPOINTER):

1699 referent = (

1700 ('Data', SERVER_INFO_1552),

1701 )

1702

1703# 2.2.4.87 SERVER_INFO_1553

1704 class SERVER_INFO_1553(NDRSTRUCT):

1705 structure = (

1706 ('sv1553_minlinkthroughput', DWORD),

1707 )

1708

1709 class LPSERVER_INFO_1553(NDRPOINTER):

1710 referent = (

1711 ('Data', SERVER_INFO_1553),

1712 )

1713

1714# 2.2.4.88 SERVER_INFO_1554

1715 class SERVER_INFO_1554(NDRSTRUCT):

1716 structure = (

1717 ('sv1554_linkinfovalidtime', DWORD),

1718 )

1719

1720 class LPSERVER_INFO_1554(NDRPOINTER):

1721 referent = (

1722 ('Data', SERVER_INFO_1554),

1723 )

1724

1725# 2.2.4.89 SERVER_INFO_1555

1726 class SERVER_INFO_1555(NDRSTRUCT):

1727 structure = (

1728 ('sv1555_scavqosinfoupdatetime', DWORD),

1729 )

1730

1731 class LPSERVER_INFO_1555(NDRPOINTER):

1732 referent = (

1733 ('Data', SERVER_INFO_1555),

1734 )

1735

1736# 2.2.4.90 SERVER_INFO_1556

1737 class SERVER_INFO_1556(NDRSTRUCT):

1738 structure = (

1739 ('sv1556_maxworkitemidletime', DWORD),

1740 )

1741

1742 class LPSERVER_INFO_1556(NDRPOINTER):

1743 referent = (

1744 ('Data', SERVER_INFO_1556),

1745 )

1746

1747# 2.2.4.91 DISK_INFO

1748 class WCHAR_ARRAY(NDRSTRUCT):

1749 commonHdr = (

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

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

1752 )

1753 commonHdr64 = (

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

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

1756 )

1757 structure = (

1758 ('Data',':'),

1759 )

1760

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

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

1763 msg = self.__class__.__name__

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

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

1766 # Here just print the data

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

1768

1769 def __setitem__(self, key, value):

1770 if key == 'Data':

1771 try:

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

1773 except UnicodeDecodeError:

1774 import sys

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

1776 self.fields['ActualCount'] = None

1777 self.data = None # force recompute

1778 else:

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

1780

1781 def __getitem__(self, key):

1782 if key == 'Data':

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

1784 else:

1785 return NDR.__getitem__(self,key)

1786

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

1788 return self["ActualCount"]*2

1789

1790

1791 class DISK_INFO(NDRSTRUCT):

1792 structure = (

1793 ('Disk', WCHAR_ARRAY),

1794 )

1795

1796 class LPDISK_INFO(NDRPOINTER):

1797 referent = (

1798 ('Data', DISK_INFO),

1799 )

1800

1801 class DISK_INFO_ARRAY(NDRUniConformantVaryingArray):

1802 item = DISK_INFO

1803

1804 class LPDISK_INFO_ARRAY(NDRPOINTER):

1805 referent = (

1806 ('Data', DISK_INFO_ARRAY),

1807 )

1808

1809# 2.2.4.92 DISK_ENUM_CONTAINER

1810 class DISK_ENUM_CONTAINER(NDRSTRUCT):

1811 structure = (

1812 ('EntriesRead', DWORD),

1813 ('Buffer', LPDISK_INFO_ARRAY),

1814 )

1815

1816 class LPDISK_ENUM_CONTAINER(NDRPOINTER):

1817 referent = (

1818 ('Data', DISK_ENUM_CONTAINER),

1819 )

1820

1821# 2.2.4.93 SERVER_TRANSPORT_INFO_0

1822 class SERVER_TRANSPORT_INFO_0(NDRSTRUCT):

1823 structure = (

1824 ('svti0_numberofvcs', DWORD),

1825 ('svti0_transportname', LPWSTR),

1826 ('svti0_transportaddress', PNDRUniConformantArray),

1827 ('svti0_transportaddresslength', DWORD),

1828 ('svti0_networkaddress', LPWSTR),

1829 )

1830

1831 class LPSERVER_TRANSPORT_INFO_0(NDRPOINTER):

1832 referent = (

1833 ('Data', SERVER_TRANSPORT_INFO_0),

1834 )

1835

1836 class SERVER_TRANSPORT_INFO_0_ARRAY(NDRUniConformantArray):

1837 item = SERVER_TRANSPORT_INFO_0

1838

1839 class LPSERVER_TRANSPORT_INFO_0_ARRAY(NDRPOINTER):

1840 referent = (

1841 ('Data', SERVER_TRANSPORT_INFO_0_ARRAY),

1842 )

1843

1844# 2.2.4.94 SERVER_TRANSPORT_INFO_1

1845 class SERVER_TRANSPORT_INFO_1(NDRSTRUCT):

1846 structure = (

1847 ('svti1_numberofvcs', DWORD),

1848 ('svti1_transportname', LPWSTR),

1849 ('svti1_transportaddress', PNDRUniConformantArray),

1850 ('svti1_transportaddresslength', DWORD),

1851 ('svti1_networkaddress', LPWSTR),

1852 ('svti1_domain', LPWSTR),

1853 )

1854

1855 class LPSERVER_TRANSPORT_INFO_1(NDRPOINTER):

1856 referent = (

1857 ('Data', SERVER_TRANSPORT_INFO_1),

1858 )

1859

1860 class SERVER_TRANSPORT_INFO_1_ARRAY(NDRUniConformantArray):

1861 item = SERVER_TRANSPORT_INFO_1

1862

1863 class LPSERVER_TRANSPORT_INFO_1_ARRAY(NDRPOINTER):

1864 referent = (

1865 ('Data', SERVER_TRANSPORT_INFO_1_ARRAY),

1866 )

1867

1868# 2.2.4.95 SERVER_TRANSPORT_INFO_2

1869 class SERVER_TRANSPORT_INFO_2(NDRSTRUCT):

1870 structure = (

1871 ('svti2_numberofvcs', DWORD),

1872 ('svti2_transportname', LPWSTR),

1873 ('svti2_transportaddress', PNDRUniConformantArray),

1874 ('svti2_transportaddresslength', DWORD),

1875 ('svti2_networkaddress', LPWSTR),

1876 ('svti2_domain', LPWSTR),

1877 ('svti2_flags', DWORD),

1878 )

1879

1880 class LPSERVER_TRANSPORT_INFO_2(NDRPOINTER):

1881 referent = (

1882 ('Data', SERVER_TRANSPORT_INFO_2),

1883 )

1884

1885 class SERVER_TRANSPORT_INFO_2_ARRAY(NDRUniConformantArray):

1886 item = SERVER_TRANSPORT_INFO_2

1887

1888 class LPSERVER_TRANSPORT_INFO_2_ARRAY(NDRPOINTER):

1889 referent = (

1890 ('Data', SERVER_TRANSPORT_INFO_2_ARRAY),

1891 )

1892

1893# 2.2.4.96 SERVER_TRANSPORT_INFO_3

1894 class PASSWORD_ARRAY(NDRUniFixedArray):

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

1896 return 256

1897

1898 class SERVER_TRANSPORT_INFO_3(NDRSTRUCT):

1899 structure = (

1900 ('svti3_numberofvcs', DWORD),

1901 ('svti3_transportname', LPWSTR),

1902 ('svti3_transportaddress', PNDRUniConformantArray),

1903 ('svti3_transportaddresslength', DWORD),

1904 ('svti3_networkaddress', LPWSTR),

1905 ('svti3_domain', LPWSTR),

1906 ('svti3_flags', DWORD),

1907 ('svti3_passwordlength', DWORD),

1908 ('svti3_password', PASSWORD_ARRAY),

1909 )

1910

1911 class LPSERVER_TRANSPORT_INFO_3(NDRPOINTER):

1912 referent = (

1913 ('Data', SERVER_TRANSPORT_INFO_3),

1914 )

1915

1916 class SERVER_TRANSPORT_INFO_3_ARRAY(NDRUniConformantArray):

1917 item = SERVER_TRANSPORT_INFO_3

1918

1919 class LPSERVER_TRANSPORT_INFO_3_ARRAY(NDRPOINTER):

1920 referent = (

1921 ('Data', SERVER_TRANSPORT_INFO_3_ARRAY),

1922 )

1923

1924# 2.2.4.97 SERVER_XPORT_INFO_0_CONTAINER

1925 class SERVER_XPORT_INFO_0_CONTAINER(NDRSTRUCT):

1926 structure = (

1927 ('EntriesRead', DWORD),

1928 ('Buffer', LPSERVER_TRANSPORT_INFO_0_ARRAY),

1929 )

1930

1931 class LPSERVER_XPORT_INFO_0_CONTAINER(NDRPOINTER):

1932 referent = (

1933 ('Data', SERVER_XPORT_INFO_0_CONTAINER),

1934 )

1935

1936# 2.2.4.98 SERVER_XPORT_INFO_1_CONTAINER

1937 class SERVER_XPORT_INFO_1_CONTAINER(NDRSTRUCT):

1938 structure = (

1939 ('EntriesRead', DWORD),

1940 ('Buffer', LPSERVER_TRANSPORT_INFO_1_ARRAY),

1941 )

1942

1943 class LPSERVER_XPORT_INFO_1_CONTAINER(NDRPOINTER):

1944 referent = (

1945 ('Data', SERVER_XPORT_INFO_1_CONTAINER),

1946 )

1947

1948# 2.2.4.99 SERVER_XPORT_INFO_2_CONTAINER

1949 class SERVER_XPORT_INFO_2_CONTAINER(NDRSTRUCT):

1950 structure = (

1951 ('EntriesRead', DWORD),

1952 ('Buffer', LPSERVER_TRANSPORT_INFO_2_ARRAY),

1953 )

1954

1955 class LPSERVER_XPORT_INFO_2_CONTAINER(NDRPOINTER):

1956 referent = (

1957 ('Data', SERVER_XPORT_INFO_2_CONTAINER),

1958 )

1959

1960# 2.2.4.100 SERVER_XPORT_INFO_3_CONTAINER

1961 class SERVER_XPORT_INFO_3_CONTAINER(NDRSTRUCT):

1962 structure = (

1963 ('EntriesRead', DWORD),

1964 ('Buffer', LPSERVER_TRANSPORT_INFO_3_ARRAY),

1965 )

1966

1967 class LPSERVER_XPORT_INFO_3_CONTAINER(NDRPOINTER):

1968 referent = (

1969 ('Data', SERVER_XPORT_INFO_3_CONTAINER),

1970 )

1971

1972# 2.2.3.8 SERVER_XPORT_ENUM_UNION

1973 class SERVER_XPORT_ENUM_UNION(NDRUNION):

1974 commonHdr = (

1975 ('tag', DWORD),

1976 )

1977

1978 union = {

1979 0: ('Level0', LPSERVER_XPORT_INFO_0_CONTAINER),

1980 1: ('Level1', LPSERVER_XPORT_INFO_1_CONTAINER),

1981 2: ('Level2', LPSERVER_XPORT_INFO_2_CONTAINER),

1982 3: ('Level3', LPSERVER_XPORT_INFO_3_CONTAINER),

1983 }

1984

1985# 2.2.4.101 SERVER_XPORT_ENUM_STRUCT

1986 class SERVER_XPORT_ENUM_STRUCT(NDRSTRUCT):

1987 structure = (

1988 ('Level', DWORD),

1989 ('XportInfo', SERVER_XPORT_ENUM_UNION),

1990 )

1991

1992# 2.2.4.102 SERVER_ALIAS_INFO_0

1993 class SERVER_ALIAS_INFO_0(NDRSTRUCT):

1994 structure = (

1995 ('srvai0_alias', LMSTR),

1996 ('srvai0_target', LMSTR),

1997 ('srvai0_default', NDRBOOLEAN),

1998 ('srvai0_reserved', ULONG),

1999 )

2000

2001 class LPSERVER_ALIAS_INFO_0(NDRPOINTER):

2002 referent = (

2003 ('Data', SERVER_ALIAS_INFO_0),

2004 )

2005

2006 class SERVER_ALIAS_INFO_0_ARRAY(NDRUniConformantArray):

2007 item = SERVER_ALIAS_INFO_0

2008

2009 class LPSERVER_ALIAS_INFO_0_ARRAY(NDRPOINTER):

2010 referent = (

2011 ('Data', SERVER_ALIAS_INFO_0_ARRAY),

2012 )

2013

2014# 2.2.4.103 SERVER_ALIAS_INFO_0_CONTAINER

2015 class SERVER_ALIAS_INFO_0_CONTAINER(NDRSTRUCT):

2016 structure = (

2017 ('EntriesRead', DWORD),

2018 ('Buffer', LPSERVER_ALIAS_INFO_0_ARRAY),

2019 )

2020

2021 class LPSERVER_ALIAS_INFO_0_CONTAINER(NDRPOINTER):

2022 referent = (

2023 ('Data', SERVER_ALIAS_INFO_0_CONTAINER),

2024 )

2025

2026# 2.2.4.104 SERVER_ALIAS_ENUM_STRUCT

2027 class SERVER_ALIAS_ENUM_UNION(NDRUNION):

2028 commonHdr = (

2029 ('tag', DWORD),

2030 )

2031

2032 union = {

2033 0: ('Level0', LPSERVER_ALIAS_INFO_0_CONTAINER),

2034 }

2035

2036 class SERVER_ALIAS_ENUM_STRUCT(NDRSTRUCT):

2037 structure = (

2038 ('Level', DWORD),

2039 ('ServerAliasInfo', SERVER_ALIAS_ENUM_UNION),

2040 )

2041

2042# 2.2.4.105 TIME_OF_DAY_INFO

2043 class TIME_OF_DAY_INFO(NDRSTRUCT):

2044 structure = (

2045 ('tod_elapsedt', DWORD),

2046 ('tod_msecs', DWORD),

2047 ('tod_hours', DWORD),

2048 ('tod_mins', DWORD),

2049 ('tod_secs', DWORD),

2050 ('tod_hunds', DWORD),

2051 ('tod_timezone', DWORD),

2052 ('tod_tinterval', DWORD),

2053 ('tod_day', DWORD),

2054 ('tod_month', DWORD),

2055 ('tod_year', DWORD),

2056 ('tod_weekday', DWORD),

2057 )

2058

2059 class LPTIME_OF_DAY_INFO(NDRPOINTER):

2060 referent = (

2061 ('Data', TIME_OF_DAY_INFO),

2062 )

2063

2064# 2.2.4.106 ADT_SECURITY_DESCRIPTOR

2065 class ADT_SECURITY_DESCRIPTOR(NDRSTRUCT):

2066 structure = (

2067 ('Length', DWORD),

2068 ('Buffer', PNDRUniConformantArray),

2069 )

2070

2071 class PADT_SECURITY_DESCRIPTOR(NDRPOINTER):

2072 referent = (

2073 ('Data', ADT_SECURITY_DESCRIPTOR),

2074 )

2075

2076# 2.2.4.107 NET_DFS_ENTRY_ID

2077 class NET_DFS_ENTRY_ID(NDRSTRUCT):

2078 structure = (

2079 ('Uid', GUID),

2080 ('Prefix', LPWSTR),

2081 )

2082

2083 class NET_DFS_ENTRY_ID_ARRAY(NDRUniConformantArray):

2084 item = NET_DFS_ENTRY_ID

2085

2086 class LPNET_DFS_ENTRY_ID_ARRAY(NDRPOINTER):

2087 referent = (

2088 ('Data', NET_DFS_ENTRY_ID_ARRAY),

2089 )

2090

2091# 2.2.4.108 NET_DFS_ENTRY_ID_CONTAINER

2092 class NET_DFS_ENTRY_ID_CONTAINER(NDRSTRUCT):

2093 structure = (

2094 ('Count', DWORD),

2095 ('Buffer', LPNET_DFS_ENTRY_ID_ARRAY),

2096 )

2097

2098# 2.2.4.109 DFS_SITENAME_INFO

2099 class DFS_SITENAME_INFO(NDRSTRUCT):

2100 structure = (

2101 ('SiteFlags', DWORD),

2102 ('SiteName', LPWSTR),

2103 )

2104

2105# 2.2.4.110 DFS_SITELIST_INFO

2106 class DFS_SITENAME_INFO_ARRAY(NDRUniConformantArray):

2107 item = DFS_SITENAME_INFO

2108

2109 class DFS_SITELIST_INFO(NDRSTRUCT):

2110 structure = (

2111 ('cSites', DWORD),

2112 ('Site', DFS_SITENAME_INFO_ARRAY),

2113 )

2114

2115 class LPDFS_SITELIST_INFO(NDRPOINTER):

2116 referent = (

2117 ('Data', DFS_SITELIST_INFO),

2118 )

2119

2120# 2.2.3 Unions

2121# 2.2.3.3 FILE_INFO

2122 class FILE_INFO(NDRUNION):

2123 commonHdr = (

2124 ('tag', DWORD),

2125 )

2126

2127 union = {

2128 2: ('FileInfo2', LPFILE_INFO_2),

2129 3: ('FileInfo3', LPFILE_INFO_3),

2130 }

2131

2132# 2.2.3.6 SHARE_INFO

2133 class SHARE_INFO(NDRUNION):

2134 commonHdr = (

2135 ('tag', DWORD),

2136 )

2137

2138 union = {

2139 0: ('ShareInfo0', LPSHARE_INFO_0),

2140 1: ('ShareInfo1', LPSHARE_INFO_1),

2141 2: ('ShareInfo2', LPSHARE_INFO_2),

2142 502: ('ShareInfo502', LPSHARE_INFO_502),

2143 1004: ('ShareInfo1004', LPSHARE_INFO_1004),

2144 1006: ('ShareInfo1006', LPSHARE_INFO_1006),

2145 1501: ('ShareInfo1501', LPSHARE_INFO_1501),

2146 1005: ('ShareInfo1005', LPSHARE_INFO_1005),

2147 501: ('ShareInfo501', LPSHARE_INFO_501),

2148 503: ('ShareInfo503', LPSHARE_INFO_503),

2149 }

2150

2151# 2.2.3.7 SERVER_INFO

2152 class SERVER_INFO(NDRUNION):

2153 commonHdr = (

2154 ('tag', DWORD),

2155 )

2156

2157 union = {

2158 100: ('ServerInfo100', LPSERVER_INFO_100),

2159 101: ('ServerInfo101', LPSERVER_INFO_101),

2160 102: ('ServerInfo102', LPSERVER_INFO_102),

2161 103: ('ServerInfo103', LPSERVER_INFO_103),

2162 502: ('ServerInfo502', LPSERVER_INFO_502),

2163 503: ('ServerInfo503', LPSERVER_INFO_503),

2164 599: ('ServerInfo599', LPSERVER_INFO_599),

2165 1005: ('ServerInfo1005', LPSERVER_INFO_1005),

2166 1107: ('ServerInfo1107', LPSERVER_INFO_1107),

2167 1010: ('ServerInfo1010', LPSERVER_INFO_1010),

2168 1016: ('ServerInfo1016', LPSERVER_INFO_1016),

2169 1017: ('ServerInfo1017', LPSERVER_INFO_1017),

2170 1018: ('ServerInfo1018', LPSERVER_INFO_1018),

2171 1501: ('ServerInfo1501', LPSERVER_INFO_1501),

2172 1502: ('ServerInfo1502', LPSERVER_INFO_1502),

2173 1503: ('ServerInfo1503', LPSERVER_INFO_1503),

2174 1506: ('ServerInfo1506', LPSERVER_INFO_1506),

2175 1510: ('ServerInfo1510', LPSERVER_INFO_1510),

2176 1511: ('ServerInfo1511', LPSERVER_INFO_1511),

2177 1512: ('ServerInfo1512', LPSERVER_INFO_1512),

2178 1513: ('ServerInfo1513', LPSERVER_INFO_1513),

2179 1514: ('ServerInfo1514', LPSERVER_INFO_1514),

2180 1515: ('ServerInfo1515', LPSERVER_INFO_1515),

2181 1516: ('ServerInfo1516', LPSERVER_INFO_1516),

2182 1518: ('ServerInfo1518', LPSERVER_INFO_1518),

2183 1523: ('ServerInfo1523', LPSERVER_INFO_1523),

2184 1528: ('ServerInfo1528', LPSERVER_INFO_1528),

2185 1529: ('ServerInfo1529', LPSERVER_INFO_1529),

2186 1530: ('ServerInfo1530', LPSERVER_INFO_1530),

2187 1533: ('ServerInfo1533', LPSERVER_INFO_1533),

2188 1534: ('ServerInfo1534', LPSERVER_INFO_1534),

2189 1535: ('ServerInfo1535', LPSERVER_INFO_1535),

2190 1536: ('ServerInfo1536', LPSERVER_INFO_1536),

2191 1538: ('ServerInfo1538', LPSERVER_INFO_1538),

2192 1539: ('ServerInfo1539', LPSERVER_INFO_1539),

2193 1540: ('ServerInfo1540', LPSERVER_INFO_1540),

2194 1541: ('ServerInfo1541', LPSERVER_INFO_1541),

2195 1542: ('ServerInfo1542', LPSERVER_INFO_1542),

2196 1543: ('ServerInfo1543', LPSERVER_INFO_1543),

2197 1544: ('ServerInfo1544', LPSERVER_INFO_1544),

2198 1545: ('ServerInfo1545', LPSERVER_INFO_1545),

2199 1546: ('ServerInfo1546', LPSERVER_INFO_1546),

2200 1547: ('ServerInfo1547', LPSERVER_INFO_1547),

2201 1548: ('ServerInfo1548', LPSERVER_INFO_1548),

2202 1549: ('ServerInfo1549', LPSERVER_INFO_1549),

2203 1550: ('ServerInfo1550', LPSERVER_INFO_1550),

2204 1552: ('ServerInfo1552', LPSERVER_INFO_1552),

2205 1553: ('ServerInfo1553', LPSERVER_INFO_1553),

2206 1554: ('ServerInfo1554', LPSERVER_INFO_1554),

2207 1555: ('ServerInfo1555', LPSERVER_INFO_1555),

2208 1556: ('ServerInfo1556', LPSERVER_INFO_1556),

2209 }

2210

2211# 2.2.3.9 TRANSPORT_INFO

2212 class TRANSPORT_INFO(NDRUNION):

2213 commonHdr = (

2214 ('tag', DWORD),

2215 )

2216

2217 union = {

2218 0: ('Transport0', SERVER_TRANSPORT_INFO_0),

2219 1: ('Transport1', SERVER_TRANSPORT_INFO_1),

2220 2: ('Transport2', SERVER_TRANSPORT_INFO_2),

2221 3: ('Transport3', SERVER_TRANSPORT_INFO_3),

2222 }

2223

2224# 2.2.3.10 SERVER_ALIAS_INFO

2225 class SERVER_ALIAS_INFO(NDRUNION):

2226 commonHdr = (

2227 ('tag', DWORD),

2228 )

2229

2230 union = {

2231 0: ('ServerAliasInfo0', LPSERVER_ALIAS_INFO_0),

2232 }

2233

2234

2235################################################################################

2236# RPC CALLS

2237################################################################################

2238# 3.1.4.1 NetrConnectionEnum (Opnum 8)

2239 class NetrConnectionEnum(NDRCALL):

2240 opnum = 8

2241 structure = (

2242 ('ServerName', PSRVSVC_HANDLE),

2243 ('Qualifier', LPWSTR),

2244 ('InfoStruct', CONNECT_ENUM_STRUCT),

2245 ('PreferedMaximumLength', DWORD),

2246 ('ResumeHandle', LPLONG),

2247 )

2248

2249 class NetrConnectionEnumResponse(NDRCALL):

2250 structure = (

2251 ('InfoStruct',CONNECT_ENUM_STRUCT),

2252 ('TotalEntries',DWORD),

2253 ('ResumeHandle',LPLONG),

2254 ('ErrorCode',ULONG),

2255 )

2256

2257# 3.1.4.2 NetrFileEnum (Opnum 9)

2258 class NetrFileEnum(NDRCALL):

2259 opnum = 9

2260 structure = (

2261 ('ServerName', PSRVSVC_HANDLE),

2262 ('BasePath', LPWSTR),

2263 ('UserName', LPWSTR),

2264 ('InfoStruct', FILE_ENUM_STRUCT),

2265 ('PreferedMaximumLength', DWORD),

2266 ('ResumeHandle', LPLONG),

2267 )

2268

2269 class NetrFileEnumResponse(NDRCALL):

2270 structure = (

2271 ('InfoStruct',FILE_ENUM_STRUCT),

2272 ('TotalEntries',DWORD),

2273 ('ResumeHandle',LPLONG),

2274 ('ErrorCode',ULONG),

2275 )

2276

2277# 3.1.4.3 NetrFileGetInfo (Opnum 10)

2278 class NetrFileGetInfo(NDRCALL):

2279 opnum = 10

2280 structure = (

2281 ('ServerName', PSRVSVC_HANDLE),

2282 ('FileId', DWORD),

2283 ('Level', DWORD),

2284 )

2285

2286 class NetrFileGetInfoResponse(NDRCALL):

2287 structure = (

2288 ('InfoStruct',FILE_INFO),

2289 ('ErrorCode',ULONG),

2290 )

2291

2292# 3.1.4.4 NetrFileClose (Opnum 11)

2293 class NetrFileClose(NDRCALL):

2294 opnum = 11

2295 structure = (

2296 ('ServerName', PSRVSVC_HANDLE),

2297 ('FileId', DWORD),

2298 )

2299

2300 class NetrFileCloseResponse(NDRCALL):

2301 structure = (

2302 ('ErrorCode',ULONG),

2303 )

2304

2305# 3.1.4.5 NetrSessionEnum (Opnum 12)

2306 class NetrSessionEnum(NDRCALL):

2307 opnum = 12

2308 structure = (

2309 ('ServerName', PSRVSVC_HANDLE),

2310 ('ClientName', LPWSTR),

2311 ('UserName', LPWSTR),

2312 ('InfoStruct', SESSION_ENUM_STRUCT),

2313 ('PreferedMaximumLength', DWORD),

2314 ('ResumeHandle', LPLONG),

2315 )

2316

2317 class NetrSessionEnumResponse(NDRCALL):

2318 structure = (

2319 ('InfoStruct',SESSION_ENUM_STRUCT),

2320 ('TotalEntries',DWORD),

2321 ('ResumeHandle',LPLONG),

2322 ('ErrorCode',ULONG),

2323 )

2324

2325# 3.1.4.6 NetrSessionDel (Opnum 13)

2326 class NetrSessionDel(NDRCALL):

2327 opnum = 13

2328 structure = (

2329 ('ServerName', PSRVSVC_HANDLE),

2330 ('ClientName', LPWSTR),

2331 ('UserName', LPWSTR),

2332 )

2333

2334 class NetrSessionDelResponse(NDRCALL):

2335 structure = (

2336 ('ErrorCode',ULONG),

2337 )

2338

2339# 3.1.4.7 NetrShareAdd (Opnum 14)

2340 class NetrShareAdd(NDRCALL):

2341 opnum = 14

2342 structure = (

2343 ('ServerName', PSRVSVC_HANDLE),

2344 ('Level', DWORD),

2345 ('InfoStruct', SHARE_INFO),

2346 ('ParmErr', LPLONG),

2347 )

2348

2349 class NetrShareAddResponse(NDRCALL):

2350 structure = (

2351 ('ParmErr', LPLONG),

2352 ('ErrorCode',ULONG),

2353 )

2354

2355# 3.1.4.8 NetrShareEnum (Opnum 15)

2356 class NetrShareEnum(NDRCALL):

2357 opnum = 15

2358 structure = (

2359 ('ServerName', PSRVSVC_HANDLE),

2360 ('InfoStruct', SHARE_ENUM_STRUCT),

2361 ('PreferedMaximumLength', DWORD),

2362 ('ResumeHandle', LPLONG),

2363 )

2364

2365 class NetrShareEnumResponse(NDRCALL):

2366 structure = (

2367 ('InfoStruct', SHARE_ENUM_STRUCT),

2368 ('TotalEntries',DWORD),

2369 ('ResumeHandle',LPLONG),

2370 ('ErrorCode',ULONG),

2371 )

2372

2373# 3.1.4.9 NetrShareEnumSticky (Opnum 36)

2374 class NetrShareEnumSticky(NDRCALL):

2375 opnum = 36

2376 structure = (

2377 ('ServerName', PSRVSVC_HANDLE),

2378 ('InfoStruct', SHARE_ENUM_STRUCT),

2379 ('PreferedMaximumLength', DWORD),

2380 ('ResumeHandle', LPLONG),

2381 )

2382

2383 class NetrShareEnumStickyResponse(NDRCALL):

2384 structure = (

2385 ('InfoStruct', SHARE_ENUM_STRUCT),

2386 ('TotalEntries',DWORD),

2387 ('ResumeHandle',LPLONG),

2388 ('ErrorCode',ULONG),

2389 )

2390

2391# 3.1.4.10 NetrShareGetInfo (Opnum 16)

2392 class NetrShareGetInfo(NDRCALL):

2393 opnum = 16

2394 structure = (

2395 ('ServerName', PSRVSVC_HANDLE),

2396 ('NetName', WSTR),

2397 ('Level', DWORD),

2398 )

2399

2400 class NetrShareGetInfoResponse(NDRCALL):

2401 structure = (

2402 ('InfoStruct', SHARE_INFO),

2403 ('ErrorCode',ULONG),

2404 )

2405

2406# 3.1.4.11 NetrShareSetInfo (Opnum 17)

2407 class NetrShareSetInfo(NDRCALL):

2408 opnum = 17

2409 structure = (

2410 ('ServerName', PSRVSVC_HANDLE),

2411 ('NetName', WSTR),

2412 ('Level', DWORD),

2413 ('ShareInfo', SHARE_INFO),

2414 ('ParmErr', LPLONG),

2415 )

2416

2417 class NetrShareSetInfoResponse(NDRCALL):

2418 structure = (

2419 ('ParmErr', LPLONG),

2420 ('ErrorCode',ULONG),

2421 )

2422

2423# 3.1.4.12 NetrShareDel (Opnum 18)

2424 class NetrShareDel(NDRCALL):

2425 opnum = 18

2426 structure = (

2427 ('ServerName', PSRVSVC_HANDLE),

2428 ('NetName', WSTR),

2429 ('Reserved', DWORD),

2430 )

2431

2432 class NetrShareDelResponse(NDRCALL):

2433 structure = (

2434 ('ErrorCode',ULONG),

2435 )

2436

2437# 3.1.4.13 NetrShareDelSticky (Opnum 19)

2438 class NetrShareDelSticky(NDRCALL):

2439 opnum = 19

2440 structure = (

2441 ('ServerName', PSRVSVC_HANDLE),

2442 ('NetName', WSTR),

2443 ('Reserved', DWORD),

2444 )

2445

2446 class NetrShareDelStickyResponse(NDRCALL):

2447 structure = (

2448 ('ErrorCode',ULONG),

2449 )

2450

2451# 3.1.4.14 NetrShareDelStart (Opnum 37)

2452 class NetrShareDelStart(NDRCALL):

2453 opnum = 37

2454 structure = (

2455 ('ServerName', PSRVSVC_HANDLE),

2456 ('NetName', WSTR),

2457 ('Reserved', DWORD),

2458 )

2459

2460 class NetrShareDelStartResponse(NDRCALL):

2461 structure = (

2462 ('ContextHandle',SHARE_DEL_HANDLE),

2463 ('ErrorCode',ULONG),

2464 )

2465

2466# 3.1.4.15 NetrShareDelCommit (Opnum 38)

2467 class NetrShareDelCommit(NDRCALL):

2468 opnum = 38

2469 structure = (

2470 ('ContextHandle',SHARE_DEL_HANDLE),

2471 )

2472

2473 class NetrShareDelCommitResponse(NDRCALL):

2474 structure = (

2475 ('ErrorCode',ULONG),

2476 )

2477

2478# 3.1.4.16 NetrShareCheck (Opnum 20)

2479 class NetrShareCheck(NDRCALL):

2480 opnum = 20

2481 structure = (

2482 ('ServerName', PSRVSVC_HANDLE),

2483 ('Device', WSTR),

2484 )

2485

2486 class NetrShareCheckResponse(NDRCALL):

2487 structure = (

2488 ('Type',DWORD),

2489 ('ErrorCode',ULONG),

2490 )

2491

2492# 3.1.4.17 NetrServerGetInfo (Opnum 21)

2493 class NetrServerGetInfo(NDRCALL):

2494 opnum = 21

2495 structure = (

2496 ('ServerName', PSRVSVC_HANDLE),

2497 ('Level', DWORD),

2498 )

2499

2500 class NetrServerGetInfoResponse(NDRCALL):

2501 structure = (

2502 ('InfoStruct', SERVER_INFO),

2503 ('ErrorCode',ULONG),

2504 )

2505

2506# 3.1.4.18 NetrServerSetInfo (Opnum 22)

2507 class NetrServerSetInfo(NDRCALL):

2508 opnum = 22

2509 structure = (

2510 ('ServerName', PSRVSVC_HANDLE),

2511 ('Level', DWORD),

2512 ('InfoStruct', SERVER_INFO),

2513 )

2514

2515 class NetrServerSetInfoResponse(NDRCALL):

2516 structure = (

2517 ('ParmErr', LPLONG),

2518 ('ErrorCode',ULONG),

2519 )

2520

2521# 3.1.4.19 NetrServerDiskEnum (Opnum 23)

2522 class NetrServerDiskEnum(NDRCALL):

2523 opnum = 23

2524 structure = (

2525 ('ServerName', PSRVSVC_HANDLE),

2526 ('Level', DWORD),

2527 ('DiskInfoStruct', DISK_ENUM_CONTAINER),

2528 ('PreferedMaximumLength', DWORD),

2529 ('ResumeHandle', LPLONG),

2530 )

2531

2532 class NetrServerDiskEnumResponse(NDRCALL):

2533 structure = (

2534 ('DiskInfoStruct', DISK_ENUM_CONTAINER),

2535 ('TotalEntries', DWORD),

2536 ('ResumeHandle', LPLONG),

2537 ('ErrorCode',ULONG),

2538 )

2539

2540# 3.1.4.20 NetrServerStatisticsGet (Opnum 24)

2541 class NetrServerStatisticsGet(NDRCALL):

2542 opnum = 24

2543 structure = (

2544 ('ServerName', PSRVSVC_HANDLE),

2545 ('Service', LPWSTR),

2546 ('Level', DWORD),

2547 ('Options', DWORD),

2548 )

2549

2550 class NetrServerStatisticsGetResponse(NDRCALL):

2551 structure = (

2552 ('InfoStruct', LPSTAT_SERVER_0),

2553 ('ErrorCode',ULONG),

2554 )

2555

2556# 3.1.4.21 NetrRemoteTOD (Opnum 28)

2557 class NetrRemoteTOD(NDRCALL):

2558 opnum = 28

2559 structure = (

2560 ('ServerName', PSRVSVC_HANDLE),

2561 )

2562

2563 class NetrRemoteTODResponse(NDRCALL):

2564 structure = (

2565 ('BufferPtr', LPTIME_OF_DAY_INFO),

2566 ('ErrorCode',ULONG),

2567 )

2568

2569# 3.1.4.22 NetrServerTransportAdd (Opnum 25)

2570 class NetrServerTransportAdd(NDRCALL):

2571 opnum = 25

2572 structure = (

2573 ('ServerName', PSRVSVC_HANDLE),

2574 ('Level', DWORD),

2575 ('Buffer', SERVER_TRANSPORT_INFO_0),

2576 )

2577

2578 class NetrServerTransportAddResponse(NDRCALL):

2579 structure = (

2580 ('ErrorCode',ULONG),

2581 )

2582

2583# 3.1.4.23 NetrServerTransportAddEx (Opnum 41)

2584 class NetrServerTransportAddEx(NDRCALL):

2585 opnum = 41

2586 structure = (

2587 ('ServerName', PSRVSVC_HANDLE),

2588 ('Level', DWORD),

2589 ('Buffer', TRANSPORT_INFO),

2590 )

2591

2592 class NetrServerTransportAddExResponse(NDRCALL):

2593 structure = (

2594 ('ErrorCode',ULONG),

2595 )

2596

2597# 3.1.4.24 NetrServerTransportEnum (Opnum 26)

2598 class NetrServerTransportEnum(NDRCALL):

2599 opnum = 26

2600 structure = (

2601 ('ServerName', PSRVSVC_HANDLE),

2602 ('InfoStruct', SERVER_XPORT_ENUM_STRUCT),

2603 ('PreferedMaximumLength', DWORD),

2604 ('ResumeHandle', LPLONG),

2605 )

2606

2607 class NetrServerTransportEnumResponse(NDRCALL):

2608 structure = (

2609 ('InfoStruct', SERVER_XPORT_ENUM_STRUCT),

2610 ('TotalEntries', DWORD),

2611 ('ResumeHandle', LPLONG),

2612 ('ErrorCode',ULONG),

2613 )

2614

2615# 3.1.4.25 NetrServerTransportDel (Opnum 27)

2616 class NetrServerTransportDel(NDRCALL):

2617 opnum = 27

2618 structure = (

2619 ('ServerName', PSRVSVC_HANDLE),

2620 ('Level', DWORD),

2621 ('Buffer', SERVER_TRANSPORT_INFO_0),

2622 )

2623

2624 class NetrServerTransportDelResponse(NDRCALL):

2625 structure = (

2626 ('ErrorCode',ULONG),

2627 )

2628

2629# 3.1.4.26 NetrServerTransportDelEx (Opnum 53)

2630 class NetrServerTransportDelEx(NDRCALL):

2631 opnum = 53

2632 structure = (

2633 ('ServerName', PSRVSVC_HANDLE),

2634 ('Level', DWORD),

2635 ('Buffer', TRANSPORT_INFO),

2636 )

2637

2638 class NetrServerTransportDelExResponse(NDRCALL):

2639 structure = (

2640 ('ErrorCode',ULONG),

2641 )

2642

2643# 3.1.4.27 NetrpGetFileSecurity (Opnum 39)

2644 class NetrpGetFileSecurity(NDRCALL):

2645 opnum = 39

2646 structure = (

2647 ('ServerName', PSRVSVC_HANDLE),

2648 ('ShareName', LPWSTR),

2649 ('lpFileName', WSTR),

2650 ('RequestedInformation', SECURITY_INFORMATION),

2651 )

2652

2653 class NetrpGetFileSecurityResponse(NDRCALL):

2654 structure = (

2655 ('SecurityDescriptor', PADT_SECURITY_DESCRIPTOR),

2656 ('ErrorCode',ULONG),

2657 )

2658

2659# 3.1.4.28 NetrpSetFileSecurity (Opnum 40)

2660 class NetrpSetFileSecurity(NDRCALL):

2661 opnum = 40

2662 structure = (

2663 ('ServerName', PSRVSVC_HANDLE),

2664 ('ShareName', LPWSTR),

2665 ('lpFileName', WSTR),

2666 ('SecurityInformation', SECURITY_INFORMATION),

2667 ('SecurityDescriptor', ADT_SECURITY_DESCRIPTOR),

2668 )

2669

2670 class NetrpSetFileSecurityResponse(NDRCALL):

2671 structure = (

2672 ('ErrorCode',ULONG),

2673 )

2674

2675# 3.1.4.29 NetprPathType (Opnum 30)

2676 class NetprPathType(NDRCALL):

2677 opnum = 30

2678 structure = (

2679 ('ServerName', PSRVSVC_HANDLE),

2680 ('PathName', WSTR),

2681 ('Flags', DWORD),

2682 )

2683

2684 class NetprPathTypeResponse(NDRCALL):

2685 structure = (

2686 ('PathType', DWORD),

2687 ('ErrorCode',ULONG),

2688 )

2689

2690# 3.1.4.30 NetprPathCanonicalize (Opnum 31)

2691 class NetprPathCanonicalize(NDRCALL):

2692 opnum = 31

2693 structure = (

2694 ('ServerName', PSRVSVC_HANDLE),

2695 ('PathName', WSTR),

2696 ('OutbufLen', DWORD),

2697 ('Prefix', WSTR),

2698 ('PathType', DWORD),

2699 ('Flags', DWORD),

2700 )

2701

2702 class NetprPathCanonicalizeResponse(NDRCALL):

2703 structure = (

2704 ('Outbuf', NDRUniConformantArray),

2705 ('PathType', DWORD),

2706 ('ErrorCode',ULONG),

2707 )

2708

2709# 3.1.4.31 NetprPathCompare (Opnum 32)

2710 class NetprPathCompare(NDRCALL):

2711 opnum = 32

2712 structure = (

2713 ('ServerName', PSRVSVC_HANDLE),

2714 ('PathName1', WSTR),

2715 ('PathName2', WSTR),

2716 ('PathType', DWORD),

2717 ('Flags', DWORD),

2718 )

2719

2720 class NetprPathCompareResponse(NDRCALL):

2721 structure = (

2722 ('ErrorCode',ULONG),

2723 )

2724

2725# 3.1.4.32 NetprNameValidate (Opnum 33)

2726 class NetprNameValidate(NDRCALL):

2727 opnum = 33

2728 structure = (

2729 ('ServerName', PSRVSVC_HANDLE),

2730 ('Name', WSTR),

2731 ('NameType', DWORD),

2732 ('Flags', DWORD),

2733 )

2734

2735 class NetprNameValidateResponse(NDRCALL):

2736 structure = (

2737 ('ErrorCode',ULONG),

2738 )

2739

2740# 3.1.4.33 NetprNameCanonicalize (Opnum 34)

2741 class NetprNameCanonicalize(NDRCALL):

2742 opnum = 34

2743 structure = (

2744 ('ServerName', PSRVSVC_HANDLE),

2745 ('Name', WSTR),

2746 ('OutbufLen', DWORD),

2747 ('NameType', DWORD),

2748 ('Flags', DWORD),

2749 )

2750

2751 class NetprNameCanonicalizeResponse(NDRCALL):

2752 structure = (

2753 ('Outbuf', NDRUniConformantArray),

2754 ('NameType', DWORD),

2755 ('ErrorCode',ULONG),

2756 )

2757

2758# 3.1.4.34 NetprNameCompare (Opnum 35)

2759 class NetprNameCompare(NDRCALL):

2760 opnum = 35

2761 structure = (

2762 ('ServerName', PSRVSVC_HANDLE),

2763 ('Name1', WSTR),

2764 ('Name2', WSTR),

2765 ('NameType', DWORD),

2766 ('Flags', DWORD),

2767 )

2768

2769 class NetprNameCompareResponse(NDRCALL):

2770 structure = (

2771 ('ErrorCode',ULONG),

2772 )

2773

2774# 3.1.4.35 NetrDfsGetVersion (Opnum 43)

2775 class NetrDfsGetVersion(NDRCALL):

2776 opnum = 43

2777 structure = (

2778 ('ServerName', PSRVSVC_HANDLE),

2779 )

2780

2781 class NetrDfsGetVersionResponse(NDRCALL):

2782 structure = (

2783 ('Version', DWORD),

2784 ('ErrorCode',ULONG),

2785 )

2786

2787# 3.1.4.36 NetrDfsCreateLocalPartition (Opnum 44)

2788 class NetrDfsCreateLocalPartition(NDRCALL):

2789 opnum = 44

2790 structure = (

2791 ('ServerName', PSRVSVC_HANDLE),

2792 ('ShareName', WSTR),

2793 ('EntryUid', GUID),

2794 ('EntryPrefix', WSTR),

2795 ('ShortName', WSTR),

2796 ('RelationInfo', NET_DFS_ENTRY_ID_CONTAINER),

2797 ('Force', DWORD),

2798 )

2799

2800 class NetrDfsCreateLocalPartitionResponse(NDRCALL):

2801 structure = (

2802 ('ErrorCode',ULONG),

2803 )

2804

2805# 3.1.4.37 NetrDfsDeleteLocalPartition (Opnum 45)

2806 class NetrDfsDeleteLocalPartition(NDRCALL):

2807 opnum = 45

2808 structure = (

2809 ('ServerName', PSRVSVC_HANDLE),

2810 ('Uid', GUID),

2811 ('Prefix', WSTR),

2812 )

2813

2814 class NetrDfsDeleteLocalPartitionResponse(NDRCALL):

2815 structure = (

2816 ('ErrorCode',ULONG),

2817 )

2818

2819# 3.1.4.38 NetrDfsSetLocalVolumeState (Opnum 46)

2820 class NetrDfsSetLocalVolumeState(NDRCALL):

2821 opnum = 46

2822 structure = (

2823 ('ServerName', PSRVSVC_HANDLE),

2824 ('Uid', GUID),

2825 ('Prefix', WSTR),

2826 ('State', DWORD),

2827 )

2828

2829 class NetrDfsSetLocalVolumeStateResponse(NDRCALL):

2830 structure = (

2831 ('ErrorCode',ULONG),

2832 )

2833

2834# 3.1.4.39 NetrDfsCreateExitPoint (Opnum 48)

2835 class NetrDfsCreateExitPoint(NDRCALL):

2836 opnum = 48

2837 structure = (

2838 ('ServerName', PSRVSVC_HANDLE),

2839 ('Uid', GUID),

2840 ('Prefix', WSTR),

2841 ('Type', DWORD),

2842 ('ShortPrefixLen', DWORD),

2843 )

2844

2845 class NetrDfsCreateExitPointResponse(NDRCALL):

2846 structure = (

2847 ('ShortPrefix',WCHAR_ARRAY),

2848 ('ErrorCode',ULONG),

2849 )

2850

2851# 3.1.4.40 NetrDfsModifyPrefix (Opnum 50)

2852 class NetrDfsModifyPrefix(NDRCALL):

2853 opnum = 50

2854 structure = (

2855 ('ServerName', PSRVSVC_HANDLE),

2856 ('Uid', GUID),

2857 ('Prefix', WSTR),

2858 )

2859

2860 class NetrDfsModifyPrefixResponse(NDRCALL):

2861 structure = (

2862 ('ErrorCode',ULONG),

2863 )

2864

2865# 3.1.4.41 NetrDfsDeleteExitPoint (Opnum 49)

2866 class NetrDfsDeleteExitPoint(NDRCALL):

2867 opnum = 49

2868 structure = (

2869 ('ServerName', PSRVSVC_HANDLE),

2870 ('Uid', GUID),

2871 ('Prefix', WSTR),

2872 ('Type', DWORD),

2873 )

2874

2875 class NetrDfsDeleteExitPointResponse(NDRCALL):

2876 structure = (

2877 ('ErrorCode',ULONG),

2878 )

2879

2880# 3.1.4.42 NetrDfsFixLocalVolume (Opnum 51)

2881 class NetrDfsFixLocalVolume(NDRCALL):

2882 opnum = 51

2883 structure = (

2884 ('ServerName', PSRVSVC_HANDLE),

2885 ('VolumeName', WSTR),

2886 ('EntryType', DWORD),

2887 ('ServiceType', DWORD),

2888 ('StgId', WSTR),

2889 ('EntryUid', GUID),

2890 ('EntryPrefix', WSTR),

2891 ('RelationInfo', NET_DFS_ENTRY_ID_CONTAINER),

2892 ('CreateDisposition', DWORD),

2893 )

2894

2895 class NetrDfsFixLocalVolumeResponse(NDRCALL):

2896 structure = (

2897 ('ErrorCode',ULONG),

2898 )

2899

2900# 3.1.4.43 NetrDfsManagerReportSiteInfo (Opnum 52)

2901 class NetrDfsManagerReportSiteInfo(NDRCALL):

2902 opnum = 52

2903 structure = (

2904 ('ServerName', PSRVSVC_HANDLE),

2905 ('ppSiteInfo', LPDFS_SITELIST_INFO),

2906 )

2907

2908 class NetrDfsManagerReportSiteInfoResponse(NDRCALL):

2909 structure = (

2910 ('ppSiteInfo', LPDFS_SITELIST_INFO),

2911 ('ErrorCode',ULONG),

2912 )

2913

2914# 3.1.4.44 NetrServerAliasAdd (Opnum 54)

2915 class NetrServerAliasAdd(NDRCALL):

2916 opnum = 54

2917 structure = (

2918 ('ServerName', PSRVSVC_HANDLE),

2919 ('Level', DWORD),

2920 ('InfoStruct', SERVER_ALIAS_INFO),

2921 )

2922

2923 class NetrServerAliasAddResponse(NDRCALL):

2924 structure = (

2925 ('ErrorCode',ULONG),

2926 )

2927

2928# 3.1.4.45 NetrServerAliasEnum (Opnum 55)

2929 class NetrServerAliasEnum(NDRCALL):

2930 opnum = 55

2931 structure = (

2932 ('ServerName', PSRVSVC_HANDLE),

2933 ('InfoStruct', SERVER_ALIAS_ENUM_STRUCT),

2934 ('PreferedMaximumLength', DWORD),

2935 ('ResumeHandle', LPLONG),

2936 )

2937

2938 class NetrServerAliasEnumResponse(NDRCALL):

2939 structure = (

2940 ('InfoStruct',SERVER_ALIAS_ENUM_STRUCT),

2941 ('TotalEntries',DWORD),

2942 ('ResumeHandle',LPLONG),

2943 ('ErrorCode',ULONG),

2944 )

2945

2946# 3.1.4.46 NetrServerAliasDel (Opnum 56)

2947 class NetrServerAliasDel(NDRCALL):

2948 opnum = 56

2949 structure = (

2950 ('ServerName', PSRVSVC_HANDLE),

2951 ('Level', DWORD),

2952 ('InfoStruct', SERVER_ALIAS_INFO),

2953 )

2954

2955 class NetrServerAliasDelResponse(NDRCALL):

2956 structure = (

2957 ('ErrorCode',ULONG),

2958 )

2959

2960# 3.1.4.47 NetrShareDelEx (Opnum 57)

2961 class NetrShareDelEx(NDRCALL):

2962 opnum = 57

2963 structure = (

2964 ('ServerName', PSRVSVC_HANDLE),

2965 ('Level', DWORD),

2966 ('ShareInfo', SHARE_INFO),

2967 )

2968

2969 class NetrShareDelExResponse(NDRCALL):

2970 structure = (

2971 ('ErrorCode',ULONG),

2972 )

2973

2974################################################################################

2975# OPNUMs and their corresponding structures

2976################################################################################

2977 OPNUMS = {

2978 8 : (NetrConnectionEnum, NetrConnectionEnumResponse),

2979 9 : (NetrFileEnum, NetrFileEnumResponse),

2980 10 : (NetrFileGetInfo, NetrFileGetInfoResponse),

2981 11 : (NetrFileClose, NetrFileCloseResponse),

2982 12 : (NetrSessionEnum, NetrSessionEnumResponse),

2983 13 : (NetrSessionDel, NetrSessionDelResponse),

2984 14 : (NetrShareAdd, NetrShareAddResponse),

2985 15 : (NetrShareEnum, NetrShareEnumResponse),

2986 16 : (NetrShareGetInfo, NetrShareGetInfoResponse),

2987 17 : (NetrShareSetInfo, NetrShareSetInfoResponse),

2988 18 : (NetrShareDel, NetrShareDelResponse),

2989 19 : (NetrShareDelSticky, NetrShareDelStickyResponse),

2990 20 : (NetrShareCheck, NetrShareCheckResponse),

2991 21 : (NetrServerGetInfo, NetrServerGetInfoResponse),

2992 22 : (NetrServerSetInfo, NetrServerSetInfoResponse),

2993 23 : (NetrServerDiskEnum, NetrServerDiskEnumResponse),

2994 24 : (NetrServerStatisticsGet, NetrServerStatisticsGetResponse),

2995 25 : (NetrServerTransportAdd, NetrServerTransportAddResponse),

2996 26 : (NetrServerTransportEnum, NetrServerTransportEnumResponse),

2997 27 : (NetrServerTransportDel, NetrServerTransportDelResponse),

2998 28 : (NetrRemoteTOD, NetrRemoteTODResponse),

2999 30 : (NetprPathType, NetprPathTypeResponse),

3000 31 : (NetprPathCanonicalize, NetprPathCanonicalizeResponse),

3001 32 : (NetprPathCompare, NetprPathCompareResponse),

3002 33 : (NetprNameValidate, NetprNameValidateResponse),

3003 34 : (NetprNameCanonicalize, NetprNameCanonicalizeResponse),

3004 35 : (NetprNameCompare, NetprNameCompareResponse),

3005 36 : (NetrShareEnumSticky, NetrShareEnumStickyResponse),

3006 37 : (NetrShareDelStart, NetrShareDelStartResponse),

3007 38 : (NetrShareDelCommit, NetrShareDelCommitResponse),

3008 39 : (NetrpGetFileSecurity, NetrpGetFileSecurityResponse),

3009 40 : (NetrpSetFileSecurity, NetrpSetFileSecurityResponse),

3010 41 : (NetrServerTransportAddEx, NetrServerTransportAddExResponse),

3011 43 : (NetrDfsGetVersion, NetrDfsGetVersionResponse),

3012 44 : (NetrDfsCreateLocalPartition, NetrDfsCreateLocalPartitionResponse),

3013 45 : (NetrDfsDeleteLocalPartition, NetrDfsDeleteLocalPartitionResponse),

3014 46 : (NetrDfsSetLocalVolumeState, NetrDfsSetLocalVolumeStateResponse),

3015 48 : (NetrDfsCreateExitPoint, NetrDfsCreateExitPointResponse),

3016 49 : (NetrDfsDeleteExitPoint, NetrDfsDeleteExitPointResponse),

3017 50 : (NetrDfsModifyPrefix, NetrDfsModifyPrefixResponse),

3018 51 : (NetrDfsFixLocalVolume, NetrDfsFixLocalVolumeResponse),

3019 52 : (NetrDfsManagerReportSiteInfo, NetrDfsManagerReportSiteInfoResponse),

3020 53 : (NetrServerTransportDelEx, NetrServerTransportDelExResponse),

3021 54 : (NetrServerAliasAdd, NetrServerAliasAddResponse),

3022 55 : (NetrServerAliasEnum, NetrServerAliasEnumResponse),

3023 56 : (NetrServerAliasDel, NetrServerAliasDelResponse),

3024 57 : (NetrShareDelEx, NetrShareDelExResponse),

3025}

3026

3027################################################################################

3028# HELPER FUNCTIONS

3029################################################################################

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

3031 request = NetrConnectionEnum()

3032 request['ServerName'] = NULL

3033 request['Qualifier'] = qualifier

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

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

3036 request['PreferedMaximumLength'] = preferedMaximumLength

3037 request['ResumeHandle'] = resumeHandle

3038 return dce.request(request)

3039

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

3041 request = NetrFileEnum()

3042 request['ServerName'] = NULL

3043 request['BasePath'] = basePath

3044 request['UserName'] = userName

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

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

3047 request['PreferedMaximumLength'] = preferedMaximumLength

3048 request['ResumeHandle'] = resumeHandle

3049 return dce.request(request)

3050

3051 def hNetrFileGetInfo(dce, fileId, level):

3052 request = NetrFileGetInfo()

3053 request['ServerName'] = NULL

3054 request['FileId'] = fileId

3055 request['Level'] = level

3056 return dce.request(request)

3057

3058 def hNetrFileClose(dce, fileId):

3059 request = NetrFileClose()

3060 request['ServerName'] = NULL

3061 request['FileId'] = fileId

3062 return dce.request(request)

3063

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

3065 request = NetrSessionEnum()

3066 request['ServerName'] = NULL

3067 request['ClientName'] = clientName

3068 request['UserName'] = userName

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

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

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

3072 request['PreferedMaximumLength'] = preferedMaximumLength

3073 request['ResumeHandle'] = resumeHandle

3074

3075 return dce.request(request)

3076

3077 def hNetrSessionDel(dce, clientName, userName):

3078 request = NetrSessionDel()

3079 request['ServerName'] = NULL

3080 request['ClientName'] = clientName

3081 request['UserName'] = userName

3082 return dce.request(request)

3083

3084 def hNetrShareAdd(dce, level, infoStruct):

3085 request = NetrShareAdd()

3086 request['ServerName'] = NULL

3087 request['Level'] = level

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

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

3090 return dce.request(request)

3091

3092 def hNetrShareDel(dce, netName):

3093 request = NetrShareDel()

3094 request['ServerName'] = NULL

3095 request['NetName'] = netName

3096 return dce.request(request)

3097

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

3099 request = NetrShareEnum()

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

3101 request['PreferedMaximumLength'] = preferedMaximumLength

3102 request['ResumeHandle'] = resumeHandle

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

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

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

3106

3107 return dce.request(request)

3108

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

3110 request = NetrShareEnumSticky()

3111 request['ServerName'] = NULL

3112 request['PreferedMaximumLength'] = preferedMaximumLength

3113 request['ResumeHandle'] = resumeHandle

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

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

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

3117

3118 return dce.request(request)

3119

3120 def hNetrShareGetInfo(dce, netName, level):

3121 request = NetrShareGetInfo()

3122 request['ServerName'] = NULL

3123 request['NetName'] = netName

3124 request['Level'] = level

3125 return dce.request(request)

3126

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

3128 request = NetrShareSetInfo()

3129 request['ServerName'] = NULL

3130 request['NetName'] = netName

3131 request['Level'] = level

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

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

3134

3135 return dce.request(request)

3136

3137 def hNetrShareDelSticky(dce, netName):

3138 request = NetrShareDelSticky()

3139 request['ServerName'] = NULL

3140 request['NetName'] = netName

3141 return dce.request(request)

3142

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

3144 def hNetrShareDelStart(dce, netName):

3145 request = NetrShareDelStart()

3146 request['ServerName'] = NULL

3147 request['NetName'] = netName

3148 return dce.request(request)

3149

3150 def hNetrShareDelCommit(dce, contextHandle):

3151 request = NetrShareDelCommit()

3152 request['ContextHandle'] = contextHandle

3153 return dce.request(request)

3154

3155 def hNetrShareCheck(dce, device):

3156 request = NetrShareCheck()

3157 request['ServerName'] = NULL

3158 request['Device'] = device

3159 return dce.request(request)

3160

3161 def hNetrServerGetInfo(dce, level):

3162 request = NetrServerGetInfo()

3163 request['ServerName'] = NULL

3164 request['Level'] = level

3165 return dce.request(request)

3166

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

3168 request = NetrServerDiskEnum()

3169 request['ServerName'] = NULL

3170 request['PreferedMaximumLength'] = preferedMaximumLength

3171 request['ResumeHandle'] = resumeHandle

3172 request['Level'] = level

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

3174 return dce.request(request)

3175

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

3177 request = NetrServerStatisticsGet()

3178 request['ServerName'] = NULL

3179 request['Service'] = service

3180 request['Level'] = level

3181 request['Options'] = options

3182 return dce.request(request)

3183

3184 def hNetrRemoteTOD(dce):

3185 request = NetrRemoteTOD()

3186 request['ServerName'] = NULL

3187 return dce.request(request)

3188

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

3190 request = NetrServerTransportEnum()

3191 request['ServerName'] = NULL

3192 request['PreferedMaximumLength'] = preferedMaximumLength

3193 request['ResumeHandle'] = resumeHandle

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

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

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

3197 return dce.request(request)

3198

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

3200 request = NetrpGetFileSecurity()

3201 request['ServerName'] = NULL

3202 request['ShareName'] = shareName

3203 request['lpFileName'] = lpFileName

3204 request['RequestedInformation'] = requestedInformation

3205 retVal = dce.request(request)

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

3207

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

3209 request = NetrpSetFileSecurity()

3210 request['ServerName'] = NULL

3211 request['ShareName'] = shareName

3212 request['lpFileName'] = lpFileName

3213 request['SecurityInformation'] = securityInformation

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

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

3216 return dce.request(request)

3217

3218 def hNetprPathType(dce, pathName, flags):

3219 request = NetprPathType()

3220 request['ServerName'] = NULL

3221 request['PathName'] = pathName

3222 request['Flags'] = flags

3223 return dce.request(request)

3224

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

3226 request = NetprPathCanonicalize()

3227 request['ServerName'] = NULL

3228 request['PathName'] = pathName

3229 request['OutbufLen'] = outbufLen

3230 request['Prefix'] = prefix

3231 request['PathType'] = pathType

3232 request['Flags'] = flags

3233 return dce.request(request)

3234

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

3236 request = NetprPathCompare()

3237 request['ServerName'] = NULL

3238 request['PathName1'] = pathName1

3239 request['PathName2'] = pathName2

3240 request['PathType'] = pathType

3241 request['Flags'] = flags

3242 return dce.request(request)

3243

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

3245 request = NetprNameValidate()

3246 request['ServerName'] = NULL

3247 request['Name'] = name

3248 request['NameType'] = nameType

3249 request['Flags'] = flags

3250 return dce.request(request)

3251

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

3253 request = NetprNameCanonicalize()

3254 request['ServerName'] = NULL

3255 request['Name'] = name

3256 request['OutbufLen'] = outbufLen

3257 request['NameType'] = nameType

3258 request['Flags'] = flags

3259 return dce.request(request)

3260

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

3262 request = NetprNameCompare()

3263 request['ServerName'] = NULL

3264 request['Name1'] = name1

3265 request['Name2'] = name2

3266 request['NameType'] = nameType

3267 request['Flags'] = flags

3268 return dce.request(request)

3269

3270 def hNetrDfsGetVersion(dce):

3271 request = NetrDfsGetVersion()

3272 request['ServerName'] = NULL

3273 return dce.request(request)

3274

3275 def hNetrServerAliasAdd(dce, level, aliasInfo):

3276 request = NetrServerAliasAdd()

3277 request['ServerName'] = NULL

3278 request['Level'] = level

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

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

3281 return dce.request(request)

3282

3283 def hNetrServerAliasDel(dce, level, aliasInfo):

3284 request = NetrServerAliasDel()

3285 request['ServerName'] = NULL

3286 request['Level'] = level

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

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

3289 return dce.request(request)

3290

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

3292 request = NetrServerAliasEnum()

3293 request['ServerName'] = NULL

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

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

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

3297 request['PreferedMaximumLength'] = preferedMaximumLength

3298 request['ResumeHandle'] = resumeHandle

3299 return dce.request(request)