public class SMBMailslotPacket extends Object
Modifier and Type | Field and Description |
---|---|
static int |
ANDXCOMMAND |
static int |
ANDXRESERVED |
static int |
COMMAND |
static int |
DEFAULT_BUFSIZE |
static int |
ERROR |
static int |
ERRORCLASS |
static int |
ERRORCODE |
static int |
FLAGS |
static int |
FLAGS2 |
static int |
FLG_CANONICAL |
static int |
FLG_CASELESS |
static int |
FLG_NOTIFY |
static int |
FLG_OPLOCK |
static int |
FLG_RESPONSE |
static int |
FLG_SUBDIALECT |
static int |
FLG2_EXTENDEDATTRIB |
static int |
FLG2_LONGERRORCODE |
static int |
FLG2_LONGFILENAMES |
static int |
FLG2_READIFEXE |
static int |
FLG2_UNICODE |
static int |
MID |
static int |
MIN_RXLEN |
static int |
PARAMWORDS |
static int |
PID |
static int |
PIDHIGH |
static int |
SEQNO |
static int |
SID |
static int |
SIGNATURE |
static int |
TID |
static int |
TRANS_HEADERLEN |
static int |
Transaction |
static int |
Transaction2 |
static int |
UID |
static int |
WORDCNT |
Constructor and Description |
---|
SMBMailslotPacket()
Default constructor
|
SMBMailslotPacket(byte[] buf)
Class constructor
|
SMBMailslotPacket(byte[] buf,
int off)
Class constructor
|
Modifier and Type | Method and Description |
---|---|
int |
getAndXCommand()
Get the secondary command code
|
byte[] |
getBuffer()
Return the byte array used for the SMB packet
|
int |
getBufferLength()
Return the total buffer size available to the SMB request
|
int |
getByteCount()
Get the data byte count for the SMB packet
|
int |
getByteOffset()
Get the data byte area offset within the SMB packet
|
int |
getCommand()
Get the SMB command
|
int |
getDataBlockOffset()
Return the offset to the data block within the SMB packet.
|
int |
getDataBlockOffset(int prmLen)
Return the offset to the data block within the SMB packet.
|
int |
getErrorClass()
Get the SMB error class
|
int |
getErrorCode()
Get the SMB error code
|
int |
getFlags()
Get the SMB flags value.
|
int |
getFlags2()
Get the SMB flags2 value.
|
int |
getLength()
Calculate the total used packet length.
|
int |
getLongErrorCode()
Get the long SMB error code
|
int |
getMailslotClass()
Return the mailslot class of service
|
int |
getMailslotDataOffset()
Return the mailslot data offset
|
int |
getMailslotOpcode()
Return the mailslot opcode
|
int |
getMailslotPriority()
Return the mailslot priority
|
int |
getMailslotSubOpcode()
Return the mailslot sub-opcode, the first byte from the mailslot data
|
int |
getMultiplexId()
Get the multiplex identifier.
|
int |
getParameter(int idx)
Get a parameter word from the SMB packet.
|
int |
getParameterBlockOffset()
Return the parameter block offset where the parameter bytes should be placed.
|
int |
getParameterCount()
Get the parameter count
|
int |
getProcessId()
Get the process indentifier (PID)
|
int |
getRxDataBlock()
Return the data block offset.
|
int |
getRxDataBlockLength()
Return the received transaction data block length.
|
int |
getRxParameter(int prmIdx)
Get the required transact parameter word (16 bit).
|
int |
getRxParameterBlock()
Return the position of the parameter block within the received packet.
|
int |
getRxParameterBlockLength()
Return the received transaction parameter block length.
|
int |
getRxParameterCount()
Return the received transaction setup parameter count.
|
int |
getRxParameterInt(int prmIdx)
Get the required transact parameter int value (32-bit).
|
String |
getRxParameterString(int pos)
Get the required transact parameter string.
|
String |
getRxParameterString(int pos,
int len)
Get the required transact parameter string.
|
String |
getRxTransactName()
Return the received transaction name.
|
int |
getSetupParameter(int idx)
Return the specified transaction setup parameter.
|
int |
getTreeId()
Get the tree identifier (TID)
|
int |
getUserId()
Get the user identifier (UID)
|
boolean |
hasLongErrorCode()
Determine if normal or long error codes have been returned
|
void |
initializeMailslotSMB(String name,
byte[] data,
int dlen)
Initialize a mailslot SMB
|
protected void |
initializeTransact(String name,
int pcnt,
byte[] paramblk,
int plen,
byte[] datablk,
int dlen)
Initialize the transact SMB packet
|
void |
resetPacket(byte[] buf,
int offset)
Reset the mailslot packet to use the specified buffer and offset
|
void |
setAndXCommand(int cmd)
Set the secondary SMB command
|
void |
setByteCount(int cnt)
Set the data byte count for this SMB packet
|
void |
setBytes(byte[] byts)
Set the data byte area in the SMB packet
|
void |
setCommand(int cmd)
Set the SMB command
|
void |
setErrorClass(int cl)
Set the SMB error class.
|
void |
setErrorCode(int sts)
Set the SMB error code
|
void |
setFlags(int flg)
Set the SMB flags value.
|
void |
setFlags2(int flg)
Set the SMB flags2 value.
|
void |
setMultiplexId(int mid)
Set the multiplex identifier.
|
void |
setParameter(int idx,
int val)
Set the specified parameter word.
|
void |
setParameterCount(int cnt)
Set the parameter count
|
void |
setProcessId(int pid)
Set the process identifier value (PID).
|
void |
setSeqNo(int seq)
Set the packet sequence number, for connectionless commands.
|
void |
setSetupParameter(int idx,
int val)
Set the specifiec setup parameter within the SMB packet.
|
void |
setSID(int sid)
Set the session id.
|
void |
setTreeId(int tid)
Set the tree identifier (TID)
|
void |
setUserId(int uid)
Set the user identifier (UID)
|
public static final int SIGNATURE
public static final int COMMAND
public static final int ERRORCODE
public static final int ERRORCLASS
public static final int ERROR
public static final int FLAGS
public static final int FLAGS2
public static final int PIDHIGH
public static final int SID
public static final int SEQNO
public static final int TID
public static final int PID
public static final int UID
public static final int MID
public static final int WORDCNT
public static final int ANDXCOMMAND
public static final int ANDXRESERVED
public static final int PARAMWORDS
public static final int TRANS_HEADERLEN
public static final int MIN_RXLEN
public static final int DEFAULT_BUFSIZE
public static final int FLG_SUBDIALECT
public static final int FLG_CASELESS
public static final int FLG_CANONICAL
public static final int FLG_OPLOCK
public static final int FLG_NOTIFY
public static final int FLG_RESPONSE
public static final int FLG2_LONGFILENAMES
public static final int FLG2_EXTENDEDATTRIB
public static final int FLG2_READIFEXE
public static final int FLG2_LONGERRORCODE
public static final int FLG2_UNICODE
public static final int Transaction
public static final int Transaction2
public SMBMailslotPacket()
public SMBMailslotPacket(byte[] buf)
buf
- byte[]public SMBMailslotPacket(byte[] buf, int off)
buf
- byte[]off
- intpublic final void resetPacket(byte[] buf, int offset)
buf
- byte[]offset
- intpublic final int getAndXCommand()
public final byte[] getBuffer()
public final int getBufferLength()
public final int getByteCount()
public final int getByteOffset()
public final int getCommand()
public final boolean hasLongErrorCode()
public final int getErrorClass()
public final int getErrorCode()
public final int getFlags()
public final int getFlags2()
public final int getLength()
public final int getLongErrorCode()
public final int getMultiplexId()
public final int getParameter(int idx) throws IndexOutOfBoundsException
idx
- Parameter index (zero based).IndexOutOfBoundsException
- If the parameter index is out of range.public final int getParameterCount()
public final int getProcessId()
public final int getTreeId()
public final int getUserId()
public final int getDataBlockOffset()
public final int getDataBlockOffset(int prmLen)
prmLen
- Parameter block length, in bytes.public final int getParameterBlockOffset()
public final int getRxDataBlock()
public final int getRxDataBlockLength()
public final int getRxParameter(int prmIdx)
prmIdx
- intpublic final int getRxParameterBlock()
public final int getRxParameterBlockLength()
public final int getRxParameterCount()
public final int getRxParameterInt(int prmIdx)
prmIdx
- intpublic final String getRxParameterString(int pos)
pos
- Offset to the string within the parameter block.public final String getRxParameterString(int pos, int len)
pos
- Offset to the string within the parameter block.len
- Length of the string.public final String getRxTransactName()
public final int getSetupParameter(int idx) throws ArrayIndexOutOfBoundsException
idx
- Setup parameter index.ArrayIndexOutOfBoundsException
public final int getMailslotOpcode()
public final int getMailslotPriority()
public final int getMailslotClass()
public final int getMailslotSubOpcode()
public final int getMailslotDataOffset()
public final void initializeMailslotSMB(String name, byte[] data, int dlen)
name
- Mailslot namedata
- Request data bytesdlen
- Data lengthprotected final void initializeTransact(String name, int pcnt, byte[] paramblk, int plen, byte[] datablk, int dlen)
name
- Transaction namepcnt
- Total parameter count for this transactionparamblk
- Parameter block data bytesplen
- Parameter block data lengthdatablk
- Data block data bytesdlen
- Data block data lengthpublic final void setAndXCommand(int cmd)
cmd
- Secondary SMB command code.public final void setByteCount(int cnt)
cnt
- Data byte count.public final void setBytes(byte[] byts)
byts
- Byte array containing the data to be copied to the SMB packet.public final void setCommand(int cmd)
cmd
- SMB command codepublic final void setErrorClass(int cl)
cl
- SMB error class.public final void setErrorCode(int sts)
sts
- SMB error code.public final void setFlags(int flg)
flg
- SMB flags value.public final void setFlags2(int flg)
flg
- SMB flags2 value.public final void setMultiplexId(int mid)
mid
- Multiplex identifierpublic final void setParameter(int idx, int val)
idx
- Parameter index (zero based).val
- Parameter value.public final void setParameterCount(int cnt)
cnt
- Parameter word count.public final void setProcessId(int pid)
pid
- Process identifier value.public final void setSeqNo(int seq)
seq
- Sequence number.public final void setSID(int sid)
sid
- Session id.public final void setTreeId(int tid)
tid
- Tree identifier value.public final void setUserId(int uid)
uid
- User identifier value.public final void setSetupParameter(int idx, int val)
idx
- Setup parameter index.val
- Setup parameter value.Copyright © 2005–2018 Alfresco Software. All rights reserved.