Export (0) Print
Expand All

2.2.6.1.2 Response

Trans2_Parameters

Trans2_Parameters
  {
  USHORT              FID;
  SMB_FILE_ATTRIBUTES FileAttributes;

  UTIME               CreationTime;
  ULONG               FileDataSize;
  USHORT              AccessMode;
  USHORT              ResourceType;
  SMB_NMPIPE_STATUS   NMPipeStatus;
  USHORT              ActionTaken;
  ULONG               Reserved;
  USHORT              ExtendedAttributeErrorOffset;
  ULONG               ExtendedAttributeLength;
  } 


0

1

2

3

4

5

6

7

8

9
1
0

1

2

3

4

5

6

7

8

9
2
0

1

2

3

4

5

6

7

8

9
3
0

1

FID

FileAttributes

CreationTime

FileDataSize

AccessMode

ResourceType

NMPipeStatus

ActionTaken

Reserved

ExtendedAttributeErrorOffset

ExtendedAttributeLength

...

FID (2 bytes): This field contains the FID of the opened file.

FileAttributes (2 bytes): The file attributes assigned to the file after the open or create has occurred.

CreationTime (4 bytes): A 32-bit integer time value to be assigned to the file as the time of creation if the file is to be created.

FileDataSize (4 bytes): The current size of the file in bytes.

AccessMode (2 bytes): A 16-bit field for encoding the granted access mode. This field is formatted in the same way as the equivalent field in the request.

ResourceType (2 bytes): The file type. This field MUST be interpreted as follows:

Name and value

Meaning

FileTypeDisk

0x0000

File or directory

FileTypeByteModePipe

0x0001

Byte mode named pipe

FileTypeMessageModePipe

0x0002

Message mode named pipe

FileTypePrinter

0x0003

Printer device

FileTypeUnknown

0xFFFF

Unknown file type

NMPipeStatus (2 bytes): A 16-bit field that contains the status of the named pipe if the resource type opened is a named pipe instance. This field is formatted as an SMB_NMPIPE_STATUS (section 2.2.1.3).

ActionTaken (2 bytes): A 16-bit field that shows the results of the open operation.

Name and bitmask

Values

Meaning

OpenResult

0x0003

0

Reserved.

 

1

The file existed and was opened.

 

2

The file did not exist and was therefore created.

 

3

The file existed and was truncated.

LockStatus

0x8000

0

No OpLock was requested, the OpLock could not be granted, or the server does not support OpLocks.

1

An OpLock was requested by the client and was granted by the server.

All other bits are reserved, SHOULD NOT be used by the client and MUST be ignored by the server.

Reserved (4 bytes): This field SHOULD be set to zero (0x00000000) and MUST be ignored by the server.

 

ExtendedAttributeErrorOffset (2 bytes): If an error was detected while applying the entries in the ExtendedAttributeList, this field contains the offset in bytes to the specific ExtendedAttributeList.FEAList entry in the request that caused the error.

ExtendedAttributeLength (4 bytes): The total size of the extended attributes for the opened file.

Trans2_Data

No data is sent by this message.

Error Codes

SMB error class

SMB error code

NT status code

POSIX equivalent

Description

ERRDOS

(0x01)

ERRbadpath

(0x0003)

STATUS_NO_SUCH_FILE

(0xC000000F)

ENOENT

The file path syntax is invalid.

ERRDOS

(0x01)

ERRnoaccess

(0x0005)

STATUS_ACCESS_DENIED

(0xC0000022)

EPERM

Access denied.

ERRDOS

(0x01)

ERRbadaccess

(0x000C)

STATUS_ACCESS_DENIED

(0xC0000022)

 

Invalid open mode.

ERRDOS

(0x01)

ERRbadshare

(0x0020)

STATUS_SHARING_VIOLATION

(0xC0000043)

ETXTBSY

Sharing violation.

ERRDOS

(0x01)

ERRgeneral

(0x001F)

STATUS_UNSUCCESSFUL

(0xC0000001)

 

The size of the extended attribute list is not correct. Check the EaErrorOffset field for the address of the EA at which the error was detected.

ERRDOS

(0x01)

ERRfilexists

(0x0050)

STATUS_OBJECT_NAME_COLLISION

(0xC0000035)

EEXIST

The file already exists.

ERRDOS

(0x01)

ERRinvalidparam

(0x0057)

STATUS_INVALID_PARAMETER

(0xC000000D)

 

One of the extended attributes had an invalid Flag bit value.

ERRDOS

(0x01)

ERRunknownlevel

(0x007C)

STATUS_OS2_INVALID_LEVEL

(0x007C0001)

 

The InformationLevel supplied is invalid.

ERRDOS

(0x01)

ERRbadealist

(0x00FF)

STATUS_OS2_EA_LIST_INCONSISTENT

(0x00FF0001)

STATUS_EA_LIST_INCONSISTENT

(0x80000014)

 

Inconsistent extended attribute list.

ERRSRV

(0x02)

ERRerror

(0x0001)

STATUS_INVALID_SMB

(0x00010002)

 

Invalid SMB. Not enough parameter bytes were sent.

ERRSRV

(0x02)

ERRinvtid

(0x0005)

STATUS_SMB_BAD_TID

(0x00050002)

 

The TID is no longer valid.

ERRSRV

(0x02)

ERRnomem

(0x0008)

STATUS_INSUFF_SERVER_RESOURCES

(0xC0000205)

ENOMEM

The server is out of resources.

ERRSRV

(0x02)

ERRbaduid

(0x005B)

STATUS_SMB_BAD_UID

(0x005B0002)

 

The UID supplied is not defined to the session.

 
Show:
© 2014 Microsoft