public class SMB2Packet extends SMBPacket<SMB2PacketData,SMB2Header>
| Modifier and Type | Field and Description |
|---|---|
static int |
SINGLE_CREDIT_PAYLOAD_SIZE |
protected int |
structureSize |
| Modifier | Constructor and Description |
|---|---|
protected |
SMB2Packet() |
protected |
SMB2Packet(int structureSize,
SMB2Dialect dialect,
SMB2MessageCommandCode messageType) |
protected |
SMB2Packet(int structureSize,
SMB2Dialect dialect,
SMB2MessageCommandCode messageType,
long sessionId) |
protected |
SMB2Packet(int structureSize,
SMB2Dialect dialect,
SMB2MessageCommandCode messageType,
long sessionId,
long treeId) |
| Modifier and Type | Method and Description |
|---|---|
SMBBuffer |
getBuffer()
The buffer from which this packet is read if it was a received packet
|
int |
getCreditsAssigned() |
SMB2Error |
getError() |
int |
getMaxPayloadSize()
Returns the maximum payload size of this packet.
|
int |
getMessageEndPos()
THe end position of this packet in the
getBuffer(). |
int |
getMessageStartPos()
The start position of this packet in the
getBuffer(). |
SMB2Packet |
getPacket()
Method that can be overridden by Packet Wrappers to ensure that the original (typed) packet is obtainable.
|
long |
getSequenceNumber() |
int |
getStructureSize() |
boolean |
isIntermediateAsyncResponse()
Check whether this packet is an intermediate ASYNC response
|
boolean |
isSuccess()
Whether this packet contains a success response or an error response
|
protected void |
read(SMB2PacketData packetData) |
protected void |
readMessage(SMBBuffer buffer)
Read the packet body, this should be implemented by the various packet types.
|
void |
setCreditsAssigned(int creditsAssigned) |
java.lang.String |
toString() |
void |
write(SMBBuffer buffer) |
protected void |
writeTo(SMBBuffer buffer)
Write the message fields into the buffer, as specified in the [MS-SMB2].pdf specification.
|
public static final int SINGLE_CREDIT_PAYLOAD_SIZE
protected int structureSize
protected SMB2Packet()
protected SMB2Packet(int structureSize,
SMB2Dialect dialect,
SMB2MessageCommandCode messageType)
protected SMB2Packet(int structureSize,
SMB2Dialect dialect,
SMB2MessageCommandCode messageType,
long sessionId)
protected SMB2Packet(int structureSize,
SMB2Dialect dialect,
SMB2MessageCommandCode messageType,
long sessionId,
long treeId)
public long getSequenceNumber()
public int getStructureSize()
public SMBBuffer getBuffer()
public int getMessageStartPos()
getBuffer(). Normally this is 0, except
when this packet was compounded.public int getMessageEndPos()
getBuffer(). Normally this is the last written position,
except when this packet was compounded.public void write(SMBBuffer buffer)
protected void writeTo(SMBBuffer buffer)
buffer - protected final void read(SMB2PacketData packetData) throws Buffer.BufferException
read in class SMBPacket<SMB2PacketData,SMB2Header>Buffer.BufferExceptionprotected void readMessage(SMBBuffer buffer) throws Buffer.BufferException
buffer - Buffer.BufferExceptionpublic final boolean isSuccess()
true if the packet does not contain error datapublic boolean isIntermediateAsyncResponse()
public int getMaxPayloadSize()
SINGLE_CREDIT_PAYLOAD_SIZE.
Can be overridden in subclasses to support multi-credit messages.public int getCreditsAssigned()
public void setCreditsAssigned(int creditsAssigned)
public SMB2Error getError()
public SMB2Packet getPacket()
public java.lang.String toString()
toString in class java.lang.Object