Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 44 for StructureSize (0.2 sec)

  1. src/main/java/jcifs/internal/smb2/nego/Smb2NegotiateResponse.java

            }
    
            final int structureSize = SMBUtil.readInt2(buffer, bufferIndex);
            if (structureSize != 65) {
                throw new SMBProtocolDecodingException("Structure size is not 65, got: " + structureSize);
            }
    
            this.securityMode = SMBUtil.readInt2(buffer, bufferIndex + 2);
            // Validate security mode flags
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 24K bytes
    - Viewed (0)
  2. src/main/java/jcifs/internal/smb2/lock/Smb2LeaseBreakAcknowledgment.java

            return size8(Smb2Constants.SMB2_HEADER_LENGTH + STRUCTURE_SIZE);
        }
    
        @Override
        protected int writeBytesWireFormat(byte[] dst, int dstIndex) {
            int start = dstIndex;
    
            // StructureSize (2 bytes) - must be 36
            SMBUtil.writeInt2(STRUCTURE_SIZE, dst, dstIndex);
            dstIndex += 2;
    
            // Reserved (2 bytes)
            SMBUtil.writeInt2(0, dst, dstIndex);
            dstIndex += 2;
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 23 02:21:31 UTC 2025
    - 4.2K bytes
    - Viewed (0)
  3. src/test/java/jcifs/internal/smb2/io/Smb2ReadResponseTest.java

        @ValueSource(ints = { 0, 1, 8, 10, 16, 18, 100, 65535 })
        void testReadBytesWireFormatInvalidStructureSize(int structureSize) {
            // Given
            byte[] buffer = new byte[256];
            int bufferIndex = 0;
    
            // Write invalid structure size
            SMBUtil.writeInt2(structureSize, buffer, bufferIndex);
    
            // When & Then
            SMBProtocolDecodingException exception =
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 22.1K bytes
    - Viewed (0)
  4. src/main/java/jcifs/internal/smb2/ServerMessageBlock2.java

            final int start = bufferIndex;
            final int structureSize = SMBUtil.readInt2(buffer, bufferIndex);
            if (structureSize != 9) {
                throw new SMBProtocolDecodingException("Error structureSize should be 9");
            }
            this.errorContextCount = buffer[bufferIndex + 2];
            bufferIndex += 4;
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 24K bytes
    - Viewed (0)
  5. src/main/java/jcifs/internal/smb2/create/Smb2CreateResponse.java

        @Override
        protected int readBytesWireFormat(final byte[] buffer, int bufferIndex) throws SMBProtocolDecodingException {
            final int start = bufferIndex;
            final int structureSize = SMBUtil.readInt2(buffer, bufferIndex);
    
            if (structureSize != 89) {
                throw new SMBProtocolDecodingException("Structure size is not 89");
            }
    
            this.oplockLevel = buffer[bufferIndex + 2];
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 24 00:49:49 UTC 2025
    - 15.4K bytes
    - Viewed (0)
  6. src/main/java/jcifs/internal/util/SMBUtil.java

         * SMB2 protocol header template with magic number 0xFE 'SMB'
         */
        public static final byte[] SMB2_HEADER = { (byte) 0xFE, (byte) 'S', (byte) 'M', (byte) 'B', // ProtocolId
                (byte) 64, (byte) 0x00, // StructureSize (LE)
                (byte) 0x00, (byte) 0x00, // CreditCharge (reserved 2.0.2)
                (byte) 0x00, (byte) 0x00, // ChannelSequence
                (byte) 0x00, (byte) 0x00, // Reserved
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 8K bytes
    - Viewed (0)
  7. src/test/java/jcifs/internal/smb2/info/Smb2QueryDirectoryResponseTest.java

                            "Should throw SMBProtocolDecodingException for invalid structure size");
    
            assertEquals("Expected structureSize = 9", exception.getMessage());
        }
    
        @ParameterizedTest
        @ValueSource(ints = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 100, 255, 256, 65535 })
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 23.5K bytes
    - Viewed (0)
  8. src/test/java/jcifs/internal/smb2/notify/Smb2ChangeNotifyRequestTest.java

            int written = request.writeBytesWireFormat(buffer, 0);
    
            // Then
            assertEquals(32, written);
    
            // Verify complete structure
            assertEquals(32, SMBUtil.readInt2(buffer, 0)); // StructureSize
            assertEquals(0x0001, SMBUtil.readInt2(buffer, 2)); // Flags
            assertEquals(8192, SMBUtil.readInt4(buffer, 4)); // OutputBufferLength
            // FileId at offset 8-23
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 17.1K bytes
    - Viewed (0)
  9. src/test/java/jcifs/internal/smb2/nego/Smb2NegotiateResponseTest.java

        @DisplayName("Should throw exception for invalid structure size")
        @ValueSource(ints = { 0, 1, 64, 66, 128 })
        void testReadBytesWireFormatInvalidStructureSize(int structureSize) {
            // Given
            byte[] buffer = new byte[256];
            SMBUtil.writeInt2(structureSize, buffer, 0);
    
            // When & Then
            assertThrows(SMBProtocolDecodingException.class, () -> response.readBytesWireFormat(buffer, 0), "Structure size is not 65");
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 32.5K bytes
    - Viewed (0)
  10. src/test/java/jcifs/internal/smb2/create/Smb2CreateResponseTest.java

                long chtime, long allocSize, long eof, int attrs, byte[] fileId) {
            byte[] body = new byte[2 + 2 + 4 + 8 + 8 + 8 + 8 + 8 + 8 + 4 + 4 + 16 + 4 + 4];
            int i = 0;
            SMBUtil.writeInt2(89, body, i); // StructureSize
            body[i + 2] = oplock;
            body[i + 3] = openFlags;
            i += 4;
    
            SMBUtil.writeInt4(createAction, body, i); // CreateAction
            i += 4;
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 11.5K bytes
    - Viewed (0)
Back to top