00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef _TRANS2_H_
00026 #define _TRANS2_H_
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056 #define l1_fdateCreation 0
00057 #define l1_fdateLastAccess 4
00058 #define l1_fdateLastWrite 8
00059 #define l1_cbFile 12
00060 #define l1_cbFileAlloc 16
00061 #define l1_attrFile 20
00062 #define l1_cchName 22
00063 #define l1_achName 23
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086 #define l2_fdateCreation 0
00087 #define l2_fdateLastAccess 4
00088 #define l2_fdateLastWrite 8
00089 #define l2_cbFile 12
00090 #define l2_cbFileAlloc 16
00091 #define l2_attrFile 20
00092 #define l2_cbList 22
00093 #define l2_cchName 26
00094 #define l2_achName 27
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119 #define l260_achName 94
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161
00162
00163
00164
00165
00166
00167
00168
00169
00170
00171
00172
00173
00174
00175
00176
00177
00178
00179 #define l1_idFileSystem 0
00180 #define l1_cSectorUnit 4
00181 #define l1_cUnit 8
00182 #define l1_cUnitAvail 12
00183 #define l1_cbSector 16
00184
00185
00186
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198 #define SMB_INFO_STANDARD 1
00199 #define SMB_INFO_SET_EA 2
00200 #define SMB_INFO_QUERY_EA_SIZE 2
00201 #define SMB_INFO_QUERY_EAS_FROM_LIST 3
00202 #define SMB_INFO_QUERY_ALL_EAS 4
00203 #define SMB_INFO_IS_NAME_VALID 6
00204 #define SMB_INFO_STANDARD_LONG 11
00205 #define SMB_QUERY_EA_SIZE_LONG 12
00206 #define SMB_QUERY_FS_LABEL_INFO 0x101
00207 #define SMB_QUERY_FS_VOLUME_INFO 0x102
00208 #define SMB_QUERY_FS_SIZE_INFO 0x103
00209 #define SMB_QUERY_FS_DEVICE_INFO 0x104
00210 #define SMB_QUERY_FS_ATTRIBUTE_INFO 0x105
00211 #if 0
00212 #define SMB_QUERY_FS_QUOTA_INFO
00213 #endif
00214
00215 #define l2_vol_fdateCreation 0
00216 #define l2_vol_cch 4
00217 #define l2_vol_szVolLabel 5
00218
00219
00220 #define SMB_QUERY_FILE_BASIC_INFO 0x101
00221 #define SMB_QUERY_FILE_STANDARD_INFO 0x102
00222 #define SMB_QUERY_FILE_EA_INFO 0x103
00223 #define SMB_QUERY_FILE_NAME_INFO 0x104
00224 #define SMB_QUERY_FILE_ALLOCATION_INFO 0x105
00225 #define SMB_QUERY_FILE_END_OF_FILEINFO 0x106
00226 #define SMB_QUERY_FILE_ALL_INFO 0x107
00227 #define SMB_QUERY_FILE_ALT_NAME_INFO 0x108
00228 #define SMB_QUERY_FILE_STREAM_INFO 0x109
00229 #define SMB_QUERY_COMPRESSION_INFO 0x10b
00230
00231 #define SMB_FIND_INFO_STANDARD 1
00232 #define SMB_FIND_EA_SIZE 2
00233 #define SMB_FIND_EA_LIST 3
00234 #define SMB_FIND_FILE_DIRECTORY_INFO 0x101
00235 #define SMB_FIND_FILE_FULL_DIRECTORY_INFO 0x102
00236 #define SMB_FIND_FILE_NAMES_INFO 0x103
00237 #define SMB_FIND_FILE_BOTH_DIRECTORY_INFO 0x104
00238 #define SMB_FIND_ID_FULL_DIRECTORY_INFO 0x105
00239 #define SMB_FIND_ID_BOTH_DIRECTORY_INFO 0x106
00240
00241 #define SMB_SET_FILE_BASIC_INFO 0x101
00242 #define SMB_SET_FILE_DISPOSITION_INFO 0x102
00243 #define SMB_SET_FILE_ALLOCATION_INFO 0x103
00244 #define SMB_SET_FILE_END_OF_FILE_INFO 0x104
00245
00246
00247 #define SMB_INFO_ALLOCATION 1
00248 #define SMB_INFO_VOLUME 2
00249
00250
00251
00252
00253
00254
00255
00256
00257
00258
00259 #define MIN_MAC_INFO_LEVEL 0x300
00260 #define MAX_MAC_INFO_LEVEL 0x3FF
00261
00262 #define SMB_MAC_QUERY_FS_INFO 0x301
00263
00264 #define DIRLEN_GUESS (45+MAX(l1_achName,l2_achName))
00265
00266
00267
00268
00269
00270
00271 #define DEVICETYPE_CD_ROM 0x2
00272 #define DEVICETYPE_CD_ROM_FILE_SYSTEM 0x3
00273 #define DEVICETYPE_DISK 0x7
00274 #define DEVICETYPE_DISK_FILE_SYSTEM 0x8
00275 #define DEVICETYPE_FILE_SYSTEM 0x9
00276
00277
00278 #define TYPE_REMOVABLE_MEDIA 0x1
00279 #define TYPE_READ_ONLY_DEVICE 0x2
00280 #define TYPE_FLOPPY 0x4
00281 #define TYPE_WORM 0x8
00282 #define TYPE_REMOTE 0x10
00283 #define TYPE_MOUNTED 0x20
00284 #define TYPE_VIRTUAL 0x40
00285
00286
00287
00288 #define SMB_FILE_DIRECTORY_INFORMATION 1001
00289 #define SMB_FILE_FULL_DIRECTORY_INFORMATION 1002
00290 #define SMB_FILE_BOTH_DIRECTORY_INFORMATION 1003
00291 #define SMB_FILE_BASIC_INFORMATION 1004
00292 #define SMB_FILE_STANDARD_INFORMATION 1005
00293 #define SMB_FILE_INTERNAL_INFORMATION 1006
00294 #define SMB_FILE_EA_INFORMATION 1007
00295 #define SMB_FILE_ACCESS_INFORMATION 1008
00296 #define SMB_FILE_NAME_INFORMATION 1009
00297 #define SMB_FILE_RENAME_INFORMATION 1010
00298 #define SMB_FILE_LINK_INFORMATION 1011
00299 #define SMB_FILE_NAMES_INFORMATION 1012
00300 #define SMB_FILE_DISPOSITION_INFORMATION 1013
00301 #define SMB_FILE_POSITION_INFORMATION 1014
00302 #define SMB_FILE_FULL_EA_INFORMATION 1015
00303 #define SMB_FILE_MODE_INFORMATION 1016
00304 #define SMB_FILE_ALIGNMENT_INFORMATION 1017
00305 #define SMB_FILE_ALL_INFORMATION 1018
00306 #define SMB_FILE_ALLOCATION_INFORMATION 1019
00307 #define SMB_FILE_END_OF_FILE_INFORMATION 1020
00308 #define SMB_FILE_ALTERNATE_NAME_INFORMATION 1021
00309 #define SMB_FILE_STREAM_INFORMATION 1022
00310 #define SMB_FILE_PIPE_INFORMATION 1023
00311 #define SMB_FILE_PIPE_LOCAL_INFORMATION 1024
00312 #define SMB_FILE_PIPE_REMOTE_INFORMATION 1025
00313 #define SMB_FILE_MAILSLOT_QUERY_INFORMATION 1026
00314 #define SMB_FILE_MAILSLOT_SET_INFORMATION 1027
00315 #define SMB_FILE_COMPRESSION_INFORMATION 1028
00316 #define SMB_FILE_OBJECTID_INFORMATION 1029
00317 #define SMB_FILE_COMPLETION_INFORMATION 1030
00318 #define SMB_FILE_MOVE_CLUSTER_INFORMATION 1031
00319 #define SMB_FILE_QUOTA_INFORMATION 1032
00320 #define SMB_FILE_REPARSEPOINT_INFORMATION 1033
00321 #define SMB_FILE_NETWORK_OPEN_INFORMATION 1034
00322 #define SMB_FILE_ATTRIBUTE_TAG_INFORMATION 1035
00323 #define SMB_FILE_TRACKING_INFORMATION 1036
00324 #define SMB_FILE_MAXIMUM_INFORMATION 1037
00325
00326
00327
00328 #define SMB_FS_VOLUME_INFORMATION 1001
00329 #define SMB_FS_LABEL_INFORMATION 1002
00330 #define SMB_FS_SIZE_INFORMATION 1003
00331 #define SMB_FS_DEVICE_INFORMATION 1004
00332 #define SMB_FS_ATTRIBUTE_INFORMATION 1005
00333 #define SMB_FS_QUOTA_INFORMATION 1006
00334 #define SMB_FS_FULL_SIZE_INFORMATION 1007
00335 #define SMB_FS_OBJECTID_INFORMATION 1008
00336
00337
00338 #define FLAG_TRANS2_FIND_CLOSE 0x1
00339 #define FLAG_TRANS2_FIND_CLOSE_IF_END 0x2
00340 #define FLAG_TRANS2_FIND_REQUIRE_RESUME 0x4
00341 #define FLAG_TRANS2_FIND_CONTINUE 0x8
00342 #define FLAG_TRANS2_FIND_BACKUP_INTENT 0x10
00343
00344
00345
00346
00347
00348
00349
00350 #define MIN_UNIX_INFO_LEVEL 0x200
00351 #define MAX_UNIX_INFO_LEVEL 0x2FF
00352
00353 #define INFO_LEVEL_IS_UNIX(level) (((level) >= MIN_UNIX_INFO_LEVEL) && ((level) <= MAX_UNIX_INFO_LEVEL))
00354
00355 #define SMB_QUERY_FILE_UNIX_BASIC 0x200
00356 #define SMB_SET_FILE_UNIX_BASIC 0x200
00357 #define SMB_SET_FILE_UNIX_INFO2 0x20B
00358
00359 #define SMB_MODE_NO_CHANGE 0xFFFFFFFF
00360
00361 #define SMB_UID_NO_CHANGE 0xFFFFFFFF
00362 #define SMB_GID_NO_CHANGE 0xFFFFFFFF
00363
00364 #define SMB_SIZE_NO_CHANGE_LO 0xFFFFFFFF
00365 #define SMB_SIZE_NO_CHANGE_HI 0xFFFFFFFF
00366
00367 #define SMB_TIME_NO_CHANGE_LO 0xFFFFFFFF
00368 #define SMB_TIME_NO_CHANGE_HI 0xFFFFFFFF
00369
00370
00371
00372
00373
00374
00375
00376
00377
00378
00379
00380
00381
00382
00383
00384
00385
00386
00387
00388
00389
00390
00391
00392
00393
00394
00395
00396
00397
00398
00399
00400 #define SMB_FILE_UNIX_BASIC_SIZE 100
00401
00402
00403
00404 #define UNIX_TYPE_FILE 0
00405 #define UNIX_TYPE_DIR 1
00406 #define UNIX_TYPE_SYMLINK 2
00407 #define UNIX_TYPE_CHARDEV 3
00408 #define UNIX_TYPE_BLKDEV 4
00409 #define UNIX_TYPE_FIFO 5
00410 #define UNIX_TYPE_SOCKET 6
00411 #define UNIX_TYPE_UNKNOWN 0xFFFFFFFF
00412
00413
00414
00415
00416
00417
00418
00419
00420 #define UNIX_X_OTH 0000001
00421 #define UNIX_W_OTH 0000002
00422 #define UNIX_R_OTH 0000004
00423 #define UNIX_X_GRP 0000010
00424 #define UNIX_W_GRP 0000020
00425 #define UNIX_R_GRP 0000040
00426 #define UNIX_X_USR 0000100
00427 #define UNIX_W_USR 0000200
00428 #define UNIX_R_USR 0000400
00429 #define UNIX_STICKY 0001000
00430 #define UNIX_SET_GID 0002000
00431 #define UNIX_SET_UID 0004000
00432
00433
00434 #define UNIX_OTH_MASK 0000007
00435 #define UNIX_GRP_MASK 0000070
00436 #define UNIX_USR_MASK 0000700
00437 #define UNIX_PERM_MASK 0000777
00438 #define UNIX_EXTRA_MASK 0007000
00439 #define UNIX_ALL_MASK 0007777
00440
00441
00442
00443
00444 #define EXT_SECURE_DELETE 0x00000001
00445 #define EXT_ENABLE_UNDELETE 0x00000002
00446 #define EXT_SYNCHRONOUS 0x00000004
00447 #define EXT_IMMUTABLE 0x00000008
00448 #define EXT_OPEN_APPEND_ONLY 0x00000010
00449 #define EXT_DO_NOT_BACKUP 0x00000020
00450 #define EXT_NO_UPDATE_ATIME 0x00000040
00451 #define EXT_HIDDEN 0x00000080
00452
00453 #define SMB_QUERY_FILE_UNIX_LINK 0x201
00454 #define SMB_SET_FILE_UNIX_LINK 0x201
00455 #define SMB_SET_FILE_UNIX_HLINK 0x203
00456
00457 #define SMB_QUERY_XATTR 0x205
00458 #define SMB_QUERY_ATTR_FLAGS 0x206
00459 #define SMB_SET_ATTR_FLAGS 0x206
00460 #define SMB_QUERY_POSIX_PERMISSION 0x207
00461
00462 #define SMB_QUERY_POSIX_LOCK 0x208
00463
00464 #define SMB_SET_POSIX_LOCK 0x208
00465
00466
00467 #define SMB_POSIX_PATH_OPEN 0x209
00468 #define SMB_POSIX_PATH_UNLINK 0x20A
00469
00470 #define SMB_QUERY_FILE_UNIX_INFO2 0x20B
00471 #define SMB_SET_FILE_UNIX_INFO2 0x20B
00472
00473
00474
00475
00476
00477
00478
00479
00480
00481
00482
00483
00484
00485
00486
00487
00488
00489
00490
00491
00492
00493
00494
00495
00496
00497
00498 #define SMB_FIND_FILE_UNIX 0x202
00499 #define SMB_FIND_FILE_UNIX_INFO2 0x20B
00500
00501 #define SMB_FILE_UNIX_INFO2_SIZE 116
00502
00503
00504
00505
00506
00507
00508
00509 #define SMB_QUERY_CIFS_UNIX_INFO 0x200
00510 #define SMB_SET_CIFS_UNIX_INFO 0x200
00511
00512
00513
00514
00515
00516
00517
00518
00519
00520 #define CIFS_UNIX_MAJOR_VERSION 1
00521 #define CIFS_UNIX_MINOR_VERSION 0
00522
00523 #define CIFS_UNIX_FCNTL_LOCKS_CAP 0x1
00524 #define CIFS_UNIX_POSIX_ACLS_CAP 0x2
00525 #define CIFS_UNIX_XATTTR_CAP 0x4
00526
00527
00528 #define CIFS_UNIX_EXTATTR_CAP 0x8
00529
00530 #define CIFS_UNIX_POSIX_PATHNAMES_CAP 0x10
00531 #define CIFS_UNIX_POSIX_PATH_OPERATIONS_CAP 0x20
00532
00533
00534 #define SMB_QUERY_POSIX_FS_INFO 0x201
00535
00536
00537
00538
00539
00540
00541
00542
00543
00544
00545
00546
00547
00548
00549
00550
00551
00552
00553
00554
00555
00556
00557
00558
00559
00560
00561
00562
00563
00564
00565
00566
00567
00568
00569
00570
00571
00572
00573
00574
00575
00576
00577
00578
00579
00580
00581
00582
00583
00584
00585
00586
00587
00588
00589
00590
00591
00592
00593
00594
00595
00596
00597
00598
00599
00600
00601
00602
00603
00604
00605
00606
00607
00608
00609 #define SMB_QUERY_POSIX_WHOAMI 0x202
00610
00611 enum smb_whoami_flags {
00612 SMB_WHOAMI_GUEST = 0x1
00613 };
00614
00615
00616
00617
00618
00619 #define SMB_WHOAMI_MASK 0x00000001
00620
00621
00622
00623
00624
00625
00626
00627
00628
00629
00630
00631
00632
00633
00634
00635
00636
00637
00638
00639
00640
00641 #define SMB_QUERY_POSIX_ACL 0x204
00642 #define SMB_SET_POSIX_ACL 0x204
00643
00644
00645 #define SMB_POSIX_ACL_VERSION 1
00646
00647
00648 #define SMB_POSIX_ACL_USER_OBJ 0x01
00649 #define SMB_POSIX_ACL_USER 0x02
00650 #define SMB_POSIX_ACL_GROUP_OBJ 0x04
00651 #define SMB_POSIX_ACL_GROUP 0x08
00652 #define SMB_POSIX_ACL_MASK 0x10
00653 #define SMB_POSIX_ACL_OTHER 0x20
00654
00655
00656 #define SMB_POSIX_ACL_READ 0x04
00657 #define SMB_POSIX_ACL_WRITE 0x02
00658 #define SMB_POSIX_ACL_EXECUTE 0x01
00659
00660 #define SMB_POSIX_ACL_HEADER_SIZE 6
00661 #define SMB_POSIX_ACL_ENTRY_SIZE 10
00662
00663 #define SMB_POSIX_IGNORE_ACE_ENTRIES 0xFFFF
00664
00665
00666
00667
00668
00669
00670
00671
00672
00673
00674 #define POSIX_LOCK_TYPE_OFFSET 0
00675 #define POSIX_LOCK_FLAGS_OFFSET 2
00676 #define POSIX_LOCK_PID_OFFSET 4
00677 #define POSIX_LOCK_START_OFFSET 8
00678 #define POSIX_LOCK_LEN_OFFSET 16
00679 #define POSIX_LOCK_DATA_SIZE 24
00680
00681 #define POSIX_LOCK_FLAG_NOWAIT 0
00682 #define POSIX_LOCK_FLAG_WAIT 1
00683
00684 #define POSIX_LOCK_TYPE_READ 0
00685 #define POSIX_LOCK_TYPE_WRITE 1
00686 #define POSIX_LOCK_TYPE_UNLOCK 2
00687
00688
00689 #define SMB_O_RDONLY 0x1
00690 #define SMB_O_WRONLY 0x2
00691 #define SMB_O_RDWR 0x4
00692
00693 #define SMB_ACCMODE 0x7
00694
00695 #define SMB_O_CREAT 0x10
00696 #define SMB_O_EXCL 0x20
00697 #define SMB_O_TRUNC 0x40
00698 #define SMB_O_APPEND 0x80
00699 #define SMB_O_SYNC 0x100
00700 #define SMB_O_DIRECTORY 0x200
00701 #define SMB_O_NOFOLLOW 0x400
00702 #define SMB_O_DIRECT 0x800
00703
00704
00705
00706
00707
00708
00709
00710
00711
00712
00713
00714 #define SMB_NO_INFO_LEVEL_RETURNED 0xFFFF
00715
00716
00717
00718
00719
00720
00721
00722
00723
00724
00725
00726
00727
00728
00729
00730 #define SMB_POSIX_UNLINK_FILE_TARGET 0
00731 #define SMB_POSIX_UNLINK_DIRECTORY_TARGET 1
00732
00733 #endif