Class SMB2Packet

    • Field Detail

      • SINGLE_CREDIT_PAYLOAD_SIZE

        public static final int SINGLE_CREDIT_PAYLOAD_SIZE
        See Also:
        Constant Field Values
      • structureSize

        protected int structureSize
    • Method Detail

      • getSequenceNumber

        public long getSequenceNumber()
      • getStructureSize

        public int getStructureSize()
      • write

        public void write​(SMBBuffer buffer)
      • writeTo

        protected void writeTo​(SMBBuffer buffer)
        Write the message fields into the buffer, as specified in the [MS-SMB2] specification.
        Parameters:
        buffer -
      • isSuccess

        public final boolean isSuccess()
        Whether this packet contains a success response or an error response
        Returns:
        true if the packet does not contain error data
      • isIntermediateAsyncResponse

        public boolean isIntermediateAsyncResponse()
        Check whether this packet is an intermediate ASYNC response
      • getMaxPayloadSize

        public int getMaxPayloadSize()
        Returns the maximum payload size of this packet. Normally this is the SINGLE_CREDIT_PAYLOAD_SIZE. Can be overridden in subclasses to support multi-credit messages.
        Returns:
      • getCreditsAssigned

        public int getCreditsAssigned()
      • setCreditsAssigned

        public void setCreditsAssigned​(int creditsAssigned)
      • getPacket

        public SMB2Packet getPacket()
        Method that can be overridden by Packet Wrappers to ensure that the original (typed) packet is obtainable.
        Returns:
        this
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object