public class SMBTransPacket extends SMBSrvPacket
Modifier and Type | Field and Description |
---|---|
static int |
IsContinued |
protected int |
m_paramCnt |
protected String |
m_transName |
protected static int |
STD_PARAMS |
ANDXCOMMAND, ANDXRESERVED, COMMAND, DEFAULT_BUFSIZE, ERROR, ERRORCLASS, ERRORCODE, FLAGS, FLAGS2, FLG_CANONICAL, FLG_CASELESS, FLG_NOTIFY, FLG_OPLOCK, FLG_RESPONSE, FLG_SUBDIALECT, FLG2_DFSRESOLVE, FLG2_EXTENDEDATTRIB, FLG2_EXTENDEDSECURITY, FLG2_LONGERRORCODE, FLG2_LONGFILENAMES, FLG2_READIFEXE, FLG2_SECURITYSIGS, FLG2_UNICODE, HeaderLength, m_endpos, m_pos, MID, MIN_RXLEN, NO_ANDX_CMD, PARAMWORDS, PID, PIDHIGH, PROTOCOL_NETBIOS, PROTOCOL_TCPIP, PROTOCOL_WIN32NETBIOS, RAW_READ, RAW_WRITE, SEC_ENCRYPT, SEC_USER, SEQNO, SID, SIGNATURE, TID, TRANS_HEADERLEN, UID, WORDCNT
Constructor and Description |
---|
SMBTransPacket(byte[] buf)
Construct an SMB transaction packet
|
SMBTransPacket(int siz)
Construct an SMB transaction packet
|
Modifier and Type | Method and Description |
---|---|
int |
getDataBlockCount()
Return the data block size in bytes for this section
|
int |
getDataBlockDisplacement()
Return the secondary data block displacement
|
int |
getDataBlockOffset()
Return the data block offset
|
static int |
getNextMultiplexId()
Get the next multiplex id to uniquely identify this transaction
|
void |
getParameterBlock(short[] prmblk)
Unpack the parameter block into the supplied array.
|
int |
getParameterBlockCount()
Return the parameter count size in bytes for this section
|
int |
getParameterBlockDisplacement()
Return the secondary parameter block displacement
|
int |
getParameterBlockOffset()
Return the parameter block offset
|
int |
getSecondaryDataBlockCount()
Return the secondary data block size in bytes
|
int |
getSecondaryDataBlockOffset()
Return the secondary data block offset
|
int |
getSecondaryParameterBlockCount()
Return the secondary parameter block size in bytes
|
int |
getSecondaryParameterBlockOffset()
Return the secondary parameter block offset
|
int |
getSubFunction()
Return the transaction sub-command
|
int |
getTotalDataCount()
Return the total data byte count
|
int |
getTotalParameterCount()
Return the total parameter byte count
|
void |
InitializeTransact(int pcnt,
byte[] paramblk,
int plen,
byte[] datablk,
int dlen)
Initialize the transact SMB packet
|
void |
setSetupParameter(int idx,
int val)
Set the specifiec setup parameter within the SMB packet.
|
void |
setTransactionName(String tname)
Set the transaction name for normal transactions
|
alignBytePointer, calculateHeaderLength, checkAndXPacketIsValid, checkPacketIsValid, checkPacketSignature, clearAssociatedPacket, clearBytes, clearHeader, clearLeaseTime, DumpPacket, DumpPacket, getAndXByteCount, getAndXByteOffset, getAndXCommand, getAndXParameter, getAndXParameterCount, getAndXParameterLong, getAssociatedPacket, getAvailableLength, getAvailableLength, getBuffer, getBufferLength, getByteCount, getByteOffset, getCommand, getDeferredCount, getErrorClass, getErrorCode, getFlags, getFlags2, getHeaderFlags, getHeaderLength, getHeaderType, getLeaseTime, getLength, getLongErrorCode, getMultiplexId, getPacketLength, getPacketTypeString, getParameter, getParameterCount, getParameterLong, getPosition, getProcessId, getProcessIdFull, getProcessIdHigh, getReceivedLength, getSID, getTreeId, getUserId, hasAndXCommand, hasAssociatedPacket, hasLeaseTime, hasMoreData, incrementDeferredCount, isCaseless, isLongErrorCode, isLongFileNames, isQueuedForAsyncIO, isRequestPacket, isResponse, isSMB2, isUnicode, isValidResponse, packByte, packByte, packBytes, packInt, packLong, packString, packString, packWord, resetBytePointer, resetBytePointerAlign, SendResponseSMB, SendResponseSMB, SendSuccessSMB, setAndXByteCount, setAndXBytes, setAndXCommand, setAndXCommand, setAndXParameter, setAndXParameterCount, setAssociatedPacket, setBuffer, setByteCount, setByteCount, setBytePointer, setBytes, setCommand, setError, setError, setErrorClass, setErrorCode, setFlags, setFlags2, setHeaderFlags, setHeaderLength, setHeaderType, setLeaseTime, setLongErrorCode, setMultiplexId, setParameter, setParameterCount, setParameterLong, setPosition, setProcessId, setQueuedForAsyncIO, setReceivedLength, setRequestPacket, setSeqNo, setSID, setSuccessStatus, setTreeId, setUserId, skipBytes, toString, unpackByte, unpackBytes, unpackInt, unpackLong, unpackString, unpackWord
protected static final int STD_PARAMS
public static final int IsContinued
protected String m_transName
protected int m_paramCnt
public SMBTransPacket(byte[] buf)
buf
- Buffer that contains the SMB transaction packet.public SMBTransPacket(int siz)
siz
- Size of packet to allocate.public static final int getNextMultiplexId()
public final int getTotalParameterCount()
public final int getTotalDataCount()
public final int getParameterBlockCount()
public final int getParameterBlockOffset()
public final int getDataBlockCount()
public final int getDataBlockOffset()
public final int getSecondaryParameterBlockCount()
public final int getSecondaryParameterBlockOffset()
public final int getParameterBlockDisplacement()
public final int getSecondaryDataBlockCount()
public final int getSecondaryDataBlockOffset()
public final int getDataBlockDisplacement()
public final int getSubFunction()
public final void getParameterBlock(short[] prmblk) throws ArrayIndexOutOfBoundsException
prmblk
- Array to unpack the parameter block words into.ArrayIndexOutOfBoundsException
public final void InitializeTransact(int pcnt, byte[] paramblk, int plen, byte[] datablk, int dlen)
pcnt
- Total parameter count for this transactionparamblk
- Parameter block data bytesplen
- Parameter block data lengthdatablk
- Data block data bytesdlen
- Data block data lengthpublic final void setSetupParameter(int idx, int val)
idx
- Setup parameter index.val
- Setup parameter value.public final void setTransactionName(String tname)
tname
- Transaction name stringCopyright © 2005–2017 Alfresco Software. All rights reserved.