- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for SMB2_HEADER (0.06 sec)
-
src/test/java/jcifs/internal/util/SMBUtilTest.java
void testSMB2Header() { assertNotNull(SMBUtil.SMB2_HEADER); // The actual header is 68 bytes (4 + 2 + 2 + 2 + 2 + 4 + 2 + 2 + 4 + 4 + 8 + 4 + 4 + 8 + 8 + 8 = 68) assertEquals(68, SMBUtil.SMB2_HEADER.length); // Verify SMB2 header signature assertEquals((byte) 0xFE, SMBUtil.SMB2_HEADER[0]); assertEquals((byte) 'S', SMBUtil.SMB2_HEADER[1]); assertEquals((byte) 'M', SMBUtil.SMB2_HEADER[2]);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 11.1K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/ServerMessageBlock2Test.java
byte[] buffer = new byte[256]; System.arraycopy(SMBUtil.SMB2_HEADER, 0, buffer, 0, 4); SMBUtil.writeInt4(128, buffer, 20); // next command offset return buffer; } private byte[] createMisalignedCompoundMessage() { byte[] buffer = new byte[256]; System.arraycopy(SMBUtil.SMB2_HEADER, 0, buffer, 0, 4);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 39.5K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/session/Smb2SessionSetupResponseTest.java
*/ private void buildHeader(byte[] buf, int start, int status, int command, long sessionId) { System.arraycopy(SMBUtil.SMB2_HEADER, 0, buf, start, SMBUtil.SMB2_HEADER.length); // Status at +8 SMBUtil.writeInt4(status, buf, start + 8); // Command at +12 SMBUtil.writeInt2(command, buf, start + 12);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 9.7K bytes - Viewed (0) -
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)
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sat Aug 16 01:32:48 UTC 2025 - 8K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/create/Smb2CreateResponseTest.java
/** * Build a minimal SMB2 header for a response. */ private static byte[] buildSmb2Header() { byte[] header = Arrays.copyOf(SMBUtil.SMB2_HEADER, SMBUtil.SMB2_HEADER.length); // Mark as server->client response for realism SMBUtil.writeInt4(0x00000001, header, 16); // Flags // Command SMB2_CREATE (0x0005) SMBUtil.writeInt2(0x0005, header, 12);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 11.5K bytes - Viewed (0) -
src/main/java/jcifs/internal/smb2/ServerMessageBlock2.java
* @return number of bytes written */ protected int writeHeaderWireFormat(final byte[] dst, final int dstIndex) { System.arraycopy(SMBUtil.SMB2_HEADER, 0, dst, dstIndex, SMBUtil.SMB2_HEADER.length); SMBUtil.writeInt2(this.creditCharge, dst, dstIndex + 6); SMBUtil.writeInt2(this.command, dst, dstIndex + 12); SMBUtil.writeInt2(this.credit, dst, dstIndex + 14);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sun Aug 31 08:00:57 UTC 2025 - 24K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/ioctl/Smb2IoctlResponseTest.java
// Helper: build a minimal SMB2 header with a given status private static byte[] buildHeader(int status) { byte[] hdr = new byte[64]; // SMB2 header is 64 bytes System.arraycopy(SMBUtil.SMB2_HEADER, 0, hdr, 0, 64); // Write Status (little-endian) at offset 8 in the SMB2 header SMBUtil.writeInt4(status, hdr, 8); // Write Command = SMB2_IOCTL (0x000B) at offset 12
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 10.9K bytes - Viewed (0)