public class NTTransPacket extends SMBSrvPacket
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 |
---|
NTTransPacket()
Default constructor
|
NTTransPacket(byte[] buf)
Class constructor
|
NTTransPacket(NTTransPacket pkt)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
static int |
calculateResponseLength(int plen,
int dlen,
int setupcnt)
Calculate the buffer length required to hold a transaction response
|
int |
getDataBlockCount()
Return the data block count
|
int |
getDataBlockDisplacement()
Return the data block displacment
|
int |
getDataBlockOffset()
Return the data block offset
|
int |
getDataLength()
Return the data block size
|
int |
getDataOffset()
Return the data block offset
|
int |
getMaximumDataReturn()
Return the maximum data block length to be returned
|
int |
getMaximumParameterReturn()
Return the maximum parameter block length to be returned
|
int |
getNTFunction()
Get the NT transaction function code
|
protected int |
getNTParameter(int idx)
Get an NT parameter (32bit)
|
int[] |
getParameterBlock()
Unpack the parameter block
|
int |
getParameterBlockCount()
Return the parameter block count
|
int |
getParameterBlockDisplacement()
Return the paramater block displacement
|
int |
getParameterBlockOffset()
Return the parameter block offset
|
int |
getSetupCount()
Get the setup parameter count
|
int |
getSetupOffset()
Return the offset to the setup words data
|
int |
getTotalDataCount()
Return the total data count
|
int |
getTotalParameterCount()
Return the total parameter count
|
void |
initTransact(int func,
byte[] paramblk,
int plen,
byte[] datablk,
int dlen,
int setupcnt)
Initialize the transact SMB packet
|
void |
initTransact(int func,
byte[] paramblk,
int plen,
byte[] datablk,
int dlen,
int setupcnt,
int maxPrm,
int maxData)
Initialize the transact SMB packet
|
void |
initTransactReply(byte[] paramblk,
int plen,
byte[] datablk,
int dlen)
Initialize the NT transaction reply
|
void |
initTransactReply(byte[] paramblk,
int plen,
byte[] datablk,
int dlen,
int setupCnt)
Initialize the NT transaction reply
|
void |
resetDataBlockPointer()
Reset the byte/parameter pointer area for packing/unpacking the transaction data block
|
void |
resetParameterBlockPointer()
Reset the byte/parameter pointer area for packing/unpacking the transaction paramater block
|
void |
resetSetupPointer()
Reset the byte/parameter pointer area for packing/unpacking setup paramaters items to the
packet
|
void |
setDataBlockCount(int cnt)
Set the data block count
|
void |
setDataBlockOffset(int off)
Set the data block offset
|
void |
setMaximumDataReturn(int cnt)
Set the maximum return data count
|
void |
setMaximumParameterReturn(int cnt)
Set the maximum return parameter count
|
void |
setMaximumSetupCount(int cnt)
Set the maximum setup parameter count
|
void |
setNTFunction(int func)
Set the NT transaction function code
|
void |
setNTParameter(int idx,
int val)
Set an NT parameter (32bit)
|
void |
setParameterBlockOffset(int off)
Set the parameter block offset within the packet
|
void |
setReplyDataCount(int cnt)
Set the reply data byte count
|
void |
setReplyDataDisplacement(int disp)
Set the reply data bytes displacement
|
void |
setReplyDataOffset(int off)
Set the reply data offset
|
void |
setReplyParameterCount(int cnt)
Set the reply parameter byte count
|
void |
setReplyParameterDisplacement(int disp)
Set the reply parameter bytes displacement
|
void |
setReplyParameterOffset(int off)
Set the reply parameter offset
|
void |
setSetupCount(int cnt)
Set the setup parameter count
|
void |
setSetupParameter(int setupIdx,
int setupVal)
Set the specified setup parameter
|
void |
setTotalDataCount(int cnt)
Set the total data count
|
void |
setTotalParameterCount(int cnt)
Set the total parameter count
|
void |
setTransactParameterCount(int cnt)
Set the paramater block count
|
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
public NTTransPacket()
public NTTransPacket(byte[] buf)
buf
- byte[]public NTTransPacket(NTTransPacket pkt)
pkt
- NTTransPacketpublic final int getDataLength()
public final int getDataOffset()
public final int[] getParameterBlock()
public final int getTotalParameterCount()
public final int getTotalDataCount()
public final int getMaximumParameterReturn()
public final int getMaximumDataReturn()
public final int getParameterBlockCount()
public final int getParameterBlockOffset()
public final int getParameterBlockDisplacement()
public final int getDataBlockCount()
public final int getDataBlockOffset()
public final int getDataBlockDisplacement()
protected final int getNTParameter(int idx)
idx
- intpublic final int getSetupCount()
public final int getSetupOffset()
public final int getNTFunction()
public static final int calculateResponseLength(int plen, int dlen, int setupcnt)
plen
- Parameter block lengthdlen
- Data block length @ param setupcnt Setup parameter countpublic final void initTransact(int func, byte[] paramblk, int plen, byte[] datablk, int dlen, int setupcnt)
func
- NT transaction function codeparamblk
- Parameter block data bytesplen
- Parameter block data lengthdatablk
- Data block data bytesdlen
- Data block data lengthsetupcnt
- Number of setup parameterspublic final void initTransact(int func, byte[] paramblk, int plen, byte[] datablk, int dlen, int setupcnt, int maxPrm, int maxData)
func
- NT transaction function codeparamblk
- Parameter block data bytesplen
- Parameter block data lengthdatablk
- Data block data bytesdlen
- Data block data lengthsetupcnt
- Number of setup parametersmaxPrm
- Maximum parameter bytes to returnmaxData
- Maximum data bytes to returnpublic final void initTransactReply(byte[] paramblk, int plen, byte[] datablk, int dlen)
paramblk
- Parameter block data bytesplen
- Parameter block data lengthdatablk
- Data block data bytesdlen
- Data block data lengthpublic final void initTransactReply(byte[] paramblk, int plen, byte[] datablk, int dlen, int setupCnt)
paramblk
- Parameter block data bytesplen
- Parameter block data lengthdatablk
- Data block data bytesdlen
- Data block data lengthsetupCnt
- Number of setup parameterpublic final void setTotalParameterCount(int cnt)
cnt
- intpublic final void setTotalDataCount(int cnt)
cnt
- intpublic final void setMaximumParameterReturn(int cnt)
cnt
- intpublic final void setMaximumDataReturn(int cnt)
cnt
- intpublic final void setTransactParameterCount(int cnt)
cnt
- intpublic final void setReplyParameterCount(int cnt)
cnt
- intpublic final void setReplyParameterOffset(int off)
off
- intpublic final void setReplyParameterDisplacement(int disp)
disp
- intpublic final void setReplyDataCount(int cnt)
cnt
- intpublic final void setReplyDataOffset(int off)
off
- intpublic final void setReplyDataDisplacement(int disp)
disp
- intpublic final void setParameterBlockOffset(int off)
off
- intpublic final void setDataBlockCount(int cnt)
cnt
- intpublic final void setDataBlockOffset(int off)
off
- intpublic final void setNTParameter(int idx, int val)
idx
- intval
- intpublic final void setMaximumSetupCount(int cnt)
cnt
- Maximum count of setup paramater wordspublic final void setSetupCount(int cnt)
cnt
- Count of setup paramater wordspublic final void setSetupParameter(int setupIdx, int setupVal)
setupIdx
- Setup parameter indexsetupVal
- Setup parameter valuepublic final void setNTFunction(int func)
func
- intpublic final void resetSetupPointer()
public final void resetDataBlockPointer()
public final void resetParameterBlockPointer()
Copyright © 2005–2018 Alfresco Software. All rights reserved.