@@ -97,59 +97,10 @@ struct preauth_integrity_info {
97
97
#define OFFSET_OF_NEG_CONTEXT 0xd0
98
98
#endif
99
99
100
- /* Flags */
101
- #define SMB2_SESSION_REQ_FLAG_BINDING 0x01
102
- #define SMB2_SESSION_REQ_FLAG_ENCRYPT_DATA 0x04
103
-
104
100
#define SMB2_SESSION_EXPIRED (0)
105
101
#define SMB2_SESSION_IN_PROGRESS BIT(0)
106
102
#define SMB2_SESSION_VALID BIT(1)
107
103
108
- /* Flags */
109
- #define SMB2_SESSION_REQ_FLAG_BINDING 0x01
110
- #define SMB2_SESSION_REQ_FLAG_ENCRYPT_DATA 0x04
111
-
112
- struct smb2_sess_setup_req {
113
- struct smb2_hdr hdr ;
114
- __le16 StructureSize ; /* Must be 25 */
115
- __u8 Flags ;
116
- __u8 SecurityMode ;
117
- __le32 Capabilities ;
118
- __le32 Channel ;
119
- __le16 SecurityBufferOffset ;
120
- __le16 SecurityBufferLength ;
121
- __le64 PreviousSessionId ;
122
- __u8 Buffer [1 ]; /* variable length GSS security buffer */
123
- } __packed ;
124
-
125
- /* Flags/Reserved for SMB3.1.1 */
126
- #define SMB2_SHAREFLAG_CLUSTER_RECONNECT 0x0001
127
-
128
- /* Currently defined SessionFlags */
129
- #define SMB2_SESSION_FLAG_IS_GUEST_LE cpu_to_le16(0x0001)
130
- #define SMB2_SESSION_FLAG_IS_NULL_LE cpu_to_le16(0x0002)
131
- #define SMB2_SESSION_FLAG_ENCRYPT_DATA_LE cpu_to_le16(0x0004)
132
- struct smb2_sess_setup_rsp {
133
- struct smb2_hdr hdr ;
134
- __le16 StructureSize ; /* Must be 9 */
135
- __le16 SessionFlags ;
136
- __le16 SecurityBufferOffset ;
137
- __le16 SecurityBufferLength ;
138
- __u8 Buffer [1 ]; /* variable length GSS security buffer */
139
- } __packed ;
140
-
141
- struct smb2_logoff_req {
142
- struct smb2_hdr hdr ;
143
- __le16 StructureSize ; /* Must be 4 */
144
- __le16 Reserved ;
145
- } __packed ;
146
-
147
- struct smb2_logoff_rsp {
148
- struct smb2_hdr hdr ;
149
- __le16 StructureSize ; /* Must be 4 */
150
- __le16 Reserved ;
151
- } __packed ;
152
-
153
104
#define ATTR_READONLY_LE cpu_to_le32(ATTR_READONLY)
154
105
#define ATTR_HIDDEN_LE cpu_to_le32(ATTR_HIDDEN)
155
106
#define ATTR_SYSTEM_LE cpu_to_le32(ATTR_SYSTEM)
@@ -448,114 +399,12 @@ struct create_lease_v2 {
448
399
__u8 Pad [4 ];
449
400
} __packed ;
450
401
451
- /* Currently defined values for close flags */
452
- #define SMB2_CLOSE_FLAG_POSTQUERY_ATTRIB cpu_to_le16(0x0001)
453
- struct smb2_close_req {
454
- struct smb2_hdr hdr ;
455
- __le16 StructureSize ; /* Must be 24 */
456
- __le16 Flags ;
457
- __le32 Reserved ;
458
- __le64 PersistentFileId ;
459
- __le64 VolatileFileId ;
460
- } __packed ;
461
-
462
- struct smb2_close_rsp {
463
- struct smb2_hdr hdr ;
464
- __le16 StructureSize ; /* 60 */
465
- __le16 Flags ;
466
- __le32 Reserved ;
467
- __le64 CreationTime ;
468
- __le64 LastAccessTime ;
469
- __le64 LastWriteTime ;
470
- __le64 ChangeTime ;
471
- __le64 AllocationSize ; /* Beginning of FILE_STANDARD_INFO equivalent */
472
- __le64 EndOfFile ;
473
- __le32 Attributes ;
474
- } __packed ;
475
-
476
- struct smb2_flush_req {
477
- struct smb2_hdr hdr ;
478
- __le16 StructureSize ; /* Must be 24 */
479
- __le16 Reserved1 ;
480
- __le32 Reserved2 ;
481
- __le64 PersistentFileId ;
482
- __le64 VolatileFileId ;
483
- } __packed ;
484
-
485
- struct smb2_flush_rsp {
486
- struct smb2_hdr hdr ;
487
- __le16 StructureSize ;
488
- __le16 Reserved ;
489
- } __packed ;
490
-
491
402
struct smb2_buffer_desc_v1 {
492
403
__le64 offset ;
493
404
__le32 token ;
494
405
__le32 length ;
495
406
} __packed ;
496
407
497
- #define SMB2_CHANNEL_NONE cpu_to_le32(0x00000000)
498
- #define SMB2_CHANNEL_RDMA_V1 cpu_to_le32(0x00000001)
499
- #define SMB2_CHANNEL_RDMA_V1_INVALIDATE cpu_to_le32(0x00000002)
500
-
501
- struct smb2_read_req {
502
- struct smb2_hdr hdr ;
503
- __le16 StructureSize ; /* Must be 49 */
504
- __u8 Padding ; /* offset from start of SMB2 header to place read */
505
- __u8 Reserved ;
506
- __le32 Length ;
507
- __le64 Offset ;
508
- __le64 PersistentFileId ;
509
- __le64 VolatileFileId ;
510
- __le32 MinimumCount ;
511
- __le32 Channel ; /* Reserved MBZ */
512
- __le32 RemainingBytes ;
513
- __le16 ReadChannelInfoOffset ; /* Reserved MBZ */
514
- __le16 ReadChannelInfoLength ; /* Reserved MBZ */
515
- __u8 Buffer [1 ];
516
- } __packed ;
517
-
518
- struct smb2_read_rsp {
519
- struct smb2_hdr hdr ;
520
- __le16 StructureSize ; /* Must be 17 */
521
- __u8 DataOffset ;
522
- __u8 Reserved ;
523
- __le32 DataLength ;
524
- __le32 DataRemaining ;
525
- __u32 Reserved2 ;
526
- __u8 Buffer [1 ];
527
- } __packed ;
528
-
529
- /* For write request Flags field below the following flag is defined: */
530
- #define SMB2_WRITEFLAG_WRITE_THROUGH 0x00000001
531
-
532
- struct smb2_write_req {
533
- struct smb2_hdr hdr ;
534
- __le16 StructureSize ; /* Must be 49 */
535
- __le16 DataOffset ; /* offset from start of SMB2 header to write data */
536
- __le32 Length ;
537
- __le64 Offset ;
538
- __le64 PersistentFileId ;
539
- __le64 VolatileFileId ;
540
- __le32 Channel ; /* Reserved MBZ */
541
- __le32 RemainingBytes ;
542
- __le16 WriteChannelInfoOffset ; /* Reserved MBZ */
543
- __le16 WriteChannelInfoLength ; /* Reserved MBZ */
544
- __le32 Flags ;
545
- __u8 Buffer [1 ];
546
- } __packed ;
547
-
548
- struct smb2_write_rsp {
549
- struct smb2_hdr hdr ;
550
- __le16 StructureSize ; /* Must be 17 */
551
- __u8 DataOffset ;
552
- __u8 Reserved ;
553
- __le32 DataLength ;
554
- __le32 DataRemaining ;
555
- __u32 Reserved2 ;
556
- __u8 Buffer [1 ];
557
- } __packed ;
558
-
559
408
#define SMB2_0_IOCTL_IS_FSCTL 0x00000001
560
409
561
410
struct duplicate_extents_to_file {
@@ -705,43 +554,6 @@ struct reparse_data_buffer {
705
554
__u8 DataBuffer []; /* Variable Length */
706
555
} __packed ;
707
556
708
- /* Completion Filter flags for Notify */
709
- #define FILE_NOTIFY_CHANGE_FILE_NAME 0x00000001
710
- #define FILE_NOTIFY_CHANGE_DIR_NAME 0x00000002
711
- #define FILE_NOTIFY_CHANGE_NAME 0x00000003
712
- #define FILE_NOTIFY_CHANGE_ATTRIBUTES 0x00000004
713
- #define FILE_NOTIFY_CHANGE_SIZE 0x00000008
714
- #define FILE_NOTIFY_CHANGE_LAST_WRITE 0x00000010
715
- #define FILE_NOTIFY_CHANGE_LAST_ACCESS 0x00000020
716
- #define FILE_NOTIFY_CHANGE_CREATION 0x00000040
717
- #define FILE_NOTIFY_CHANGE_EA 0x00000080
718
- #define FILE_NOTIFY_CHANGE_SECURITY 0x00000100
719
- #define FILE_NOTIFY_CHANGE_STREAM_NAME 0x00000200
720
- #define FILE_NOTIFY_CHANGE_STREAM_SIZE 0x00000400
721
- #define FILE_NOTIFY_CHANGE_STREAM_WRITE 0x00000800
722
-
723
- /* Flags */
724
- #define SMB2_WATCH_TREE 0x0001
725
-
726
- struct smb2_notify_req {
727
- struct smb2_hdr hdr ;
728
- __le16 StructureSize ; /* Must be 32 */
729
- __le16 Flags ;
730
- __le32 OutputBufferLength ;
731
- __le64 PersistentFileId ;
732
- __le64 VolatileFileId ;
733
- __u32 CompletionFileter ;
734
- __u32 Reserved ;
735
- } __packed ;
736
-
737
- struct smb2_notify_rsp {
738
- struct smb2_hdr hdr ;
739
- __le16 StructureSize ; /* Must be 9 */
740
- __le16 OutputBufferOffset ;
741
- __le32 OutputBufferLength ;
742
- __u8 Buffer [1 ];
743
- } __packed ;
744
-
745
557
/* SMB2 Notify Action Flags */
746
558
#define FILE_ACTION_ADDED 0x00000001
747
559
#define FILE_ACTION_REMOVED 0x00000002
0 commit comments