Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 44 for StructureSize (0.26 sec)

  1. src/test/java/jcifs/internal/smb2/ioctl/Smb2IoctlResponseTest.java

            return buf;
        }
    
        // Helper: build an error body (without header) with structureSize=9
        private static byte[] buildErrorBody(int errorContextCount, int bc, byte[] errorData) {
            int bodyLen = 8 + bc; // 8 bytes fixed + variable data
            byte[] buf = new byte[bodyLen];
            SMBUtil.writeInt2(9, buf, 0); // structureSize
            buf[2] = (byte) errorContextCount; // ErrorContextCount
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 10.9K bytes
    - Viewed (0)
  2. src/test/java/jcifs/internal/smb2/session/Smb2LogoffRequestTest.java

            // Assert
            assertEquals(expected, actual, "size() must be 8-byte aligned");
        }
    
        @ParameterizedTest
        @ValueSource(ints = { 0, 1, 5 })
        @DisplayName("writeBytesWireFormat writes StructureSize=4 and Reserved=0 at given offset")
        void writeBytesWireFormat_writesExpectedValuesAtOffset(int offset) {
            // Arrange
            Smb2LogoffRequest req = newRequest();
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.4K bytes
    - Viewed (0)
  3. src/test/java/jcifs/internal/smb2/info/Smb2SetInfoResponseTest.java

                            "Should throw SMBProtocolDecodingException for invalid structure size");
    
            assertEquals("Expected structureSize = 2", exception.getMessage());
        }
    
        @Test
        @DisplayName("Test readBytesWireFormat with zero structure size throws exception")
        void testReadBytesWireFormatZeroStructureSize() {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 10.3K bytes
    - Viewed (0)
  4. src/main/java/jcifs/internal/smb2/tree/Smb2TreeConnectResponse.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 != 16) {
                throw new SMBProtocolDecodingException("Structure size is not 16");
            }
    
            this.shareType = buffer[bufferIndex + 2];
            bufferIndex += 4;
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 7.8K bytes
    - Viewed (0)
  5. src/main/java/jcifs/internal/smb2/session/Smb2LogoffResponse.java

         */
        @Override
        protected int readBytesWireFormat(final byte[] buffer, final int bufferIndex) throws SMBProtocolDecodingException {
            final int structureSize = SMBUtil.readInt2(buffer, bufferIndex);
            if (structureSize != 4) {
                throw new SMBProtocolDecodingException("Structure size is not 4");
            }
            return 4;
        }
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 2.2K bytes
    - Viewed (0)
  6. src/main/java/jcifs/internal/smb2/create/Smb2CloseResponse.java

            final int start = bufferIndex;
            final int structureSize = SMBUtil.readInt2(buffer, bufferIndex);
            if (structureSize != 60) {
                throw new SMBProtocolDecodingException("Expected structureSize = 60");
            }
            this.closeFlags = SMBUtil.readInt2(buffer, bufferIndex + 2);
            bufferIndex += 4;
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 6.1K bytes
    - Viewed (0)
  7. src/test/java/jcifs/internal/smb2/tree/Smb2TreeConnectResponseTest.java

        @ValueSource(ints = { 0, 1, 2, 4, 8, 15, 17, 32, 64, 65535 })
        void testReadBytesWireFormatInvalidStructureSize(int structureSize) {
            // Given
            byte[] buffer = new byte[256];
            int offset = 0;
    
            // Write invalid structure size
            SMBUtil.writeInt2(structureSize, buffer, offset);
    
            // When & Then
            SMBProtocolDecodingException exception =
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 19.3K bytes
    - Viewed (0)
  8. src/main/java/jcifs/internal/smb2/session/Smb2SessionSetupResponse.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 != 9) {
                throw new SMBProtocolDecodingException("Structure size != 9");
            }
    
            this.sessionFlags = SMBUtil.readInt2(buffer, bufferIndex + 2);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 4.8K bytes
    - Viewed (1)
  9. src/test/java/jcifs/internal/smb2/Smb2EchoResponseTest.java

                assertEquals("Expected structureSize = 4", exception.getMessage());
            }
    
            @ParameterizedTest
            @ValueSource(ints = { 0, 1, 2, 3, 5, 6, 100, 65535 })
            @DisplayName("Should throw exception for various invalid structure sizes")
            void testReadBytesWireFormatVariousInvalidSizes(int structureSize) {
                byte[] buffer = new byte[1024];
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 15.1K bytes
    - Viewed (0)
  10. 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)
Back to top