Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 50 for SMB2_HEADER_LENGTH (0.42 sec)

  1. src/test/java/jcifs/internal/smb2/tree/Smb2TreeDisconnectRequestTest.java

            // When
            int size = request.size();
    
            // Then
            // Verify size includes SMB2_HEADER_LENGTH
            assertTrue(size >= Smb2Constants.SMB2_HEADER_LENGTH);
    
            // The actual calculation: (SMB2_HEADER_LENGTH + 4 + 7) & ~7
            int expectedBase = Smb2Constants.SMB2_HEADER_LENGTH + 4;
            int expectedAligned = (expectedBase + 7) & ~7;
            assertEquals(expectedAligned, size);
        }
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 14.1K bytes
    - Viewed (0)
  2. src/test/java/jcifs/internal/smb2/session/Smb2SessionSetupRequestTest.java

            request.encode(buffer, 0);
    
            // Then
            int bodyOffset = Smb2Constants.SMB2_HEADER_LENGTH;
            int securityBufferOffset = SMBUtil.readInt2(buffer, bodyOffset + 12);
    
            // The offset should point to the location after the fixed structure (relative to header start)
            int expectedOffset = Smb2Constants.SMB2_HEADER_LENGTH + 24;
            while ((expectedOffset % 8) != 0) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 21.2K bytes
    - Viewed (0)
  3. src/test/java/jcifs/internal/smb2/session/Smb2SessionSetupResponseTest.java

            buildHeader(buf, headerStart, NtStatus.NT_STATUS_MORE_PROCESSING_REQUIRED, 0x0001, expectedSessionId);
    
            int bodyStart = headerStart + Smb2Constants.SMB2_HEADER_LENGTH;
            byte[] blob = new byte[] { 10, 20, 30, 40, 50 };
            int secBufOffset = Smb2Constants.SMB2_HEADER_LENGTH + 8; // directly after fixed part
            int sessionFlags = Smb2SessionSetupResponse.SMB2_SESSION_FLAGS_IS_GUEST;
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 9.7K bytes
    - Viewed (0)
  4. src/test/java/jcifs/internal/smb2/io/Smb2WriteRequestTest.java

                assertEquals(Smb2Constants.SMB2_HEADER_LENGTH + 48, Smb2WriteRequest.OVERHEAD);
            }
    
            @Test
            @DisplayName("Should handle boundary conditions")
            void testBoundaryConditions() {
                // Test with exactly aligned data
                request.setData(new byte[8], 0, 8); // 8-byte aligned
                assertEquals(((Smb2Constants.SMB2_HEADER_LENGTH + 48 + 8 + 7) / 8) * 8, request.size());
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 22.4K bytes
    - Viewed (0)
  5. src/test/java/jcifs/internal/smb2/info/Smb2QueryDirectoryRequestTest.java

            // FileIndex is at offset 4 in the request structure
            int readIndex = (buffer[Smb2Constants.SMB2_HEADER_LENGTH + 4] & 0xFF) | ((buffer[Smb2Constants.SMB2_HEADER_LENGTH + 5] & 0xFF) << 8)
                    | ((buffer[Smb2Constants.SMB2_HEADER_LENGTH + 6] & 0xFF) << 16)
                    | ((buffer[Smb2Constants.SMB2_HEADER_LENGTH + 7] & 0xFF) << 24);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 13.2K bytes
    - Viewed (0)
  6. src/test/java/jcifs/internal/smb2/lock/Smb2LockRequestTest.java

                Smb2LockRequest req = new Smb2LockRequest(mockConfig, testFileId, singleLock);
    
                int expectedSize = Smb2Constants.SMB2_HEADER_LENGTH + 24 + 24; // header + structure + 1 lock
                expectedSize = ((expectedSize + 7) / 8) * 8; // 8-byte alignment
                assertEquals(expectedSize, req.size());
            }
    
            @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 25.3K bytes
    - Viewed (0)
  7. src/test/java/jcifs/internal/smb2/tree/Smb2TreeConnectRequestTest.java

            int shortSize = shortReq.size();
            int longSize = longReq.size();
    
            // Then
            // SMB2_HEADER_LENGTH + 8 + path.length() * 2 (UTF-16LE)
            int expectedShortSize = Smb2Constants.SMB2_HEADER_LENGTH + 8 + shortPath.length() * 2;
            int expectedLongSize = Smb2Constants.SMB2_HEADER_LENGTH + 8 + longPath.length() * 2;
    
            // size8 method aligns to 8-byte boundary
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 18.6K bytes
    - Viewed (0)
  8. src/main/java/jcifs/internal/smb2/tree/Smb2TreeDisconnectRequest.java

        }
    
        /**
         * {@inheritDoc}
         *
         * @see jcifs.internal.CommonServerMessageBlockRequest#size()
         */
        @Override
        public int size() {
            return size8(Smb2Constants.SMB2_HEADER_LENGTH + 4);
        }
    
        /**
         * {@inheritDoc}
         *
         * @see jcifs.internal.smb2.ServerMessageBlock2#writeBytesWireFormat(byte[], int)
         */
        @Override
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 2.5K bytes
    - Viewed (0)
  9. src/test/java/jcifs/internal/smb2/notify/Smb2ChangeNotifyRequestTest.java

        void testSize() {
            // When
            int size = request.size();
    
            // Then
            // Size should be aligned to 8 bytes: SMB2_HEADER_LENGTH + 32
            int expectedSize = Smb2Constants.SMB2_HEADER_LENGTH + 32;
            // The size8 method aligns to 8-byte boundary
            int alignedSize = (expectedSize + 7) & ~7;
            assertEquals(alignedSize, size);
        }
    
        @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 17.1K bytes
    - Viewed (0)
  10. src/main/java/jcifs/internal/smb2/lock/Smb2LeaseBreakAcknowledgment.java

            return new Smb2LeaseBreakResponse(tc.getConfig());
        }
    
        @Override
        public int size() {
            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
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 23 02:21:31 UTC 2025
    - 4.2K bytes
    - Viewed (0)
Back to top