internal override int WriteParameterWordsWireFormat(byte[] dst, int dstIndex)
{
int start = dstIndex;
if (Command != SmbComNtTransactSecondary)
{
dst[dstIndex++] = MaxSetupCount;
}
else
{
dst[dstIndex++] = unchecked(unchecked(0x00));
}
// Reserved
dst[dstIndex++] = unchecked(unchecked(0x00));
// Reserved
dst[dstIndex++] = unchecked(unchecked(0x00));
// Reserved
WriteInt4(TotalParameterCount, dst, dstIndex);
dstIndex += 4;
WriteInt4(TotalDataCount, dst, dstIndex);
dstIndex += 4;
if (Command != SmbComNtTransactSecondary)
{
WriteInt4(MaxParameterCount, dst, dstIndex);
dstIndex += 4;
WriteInt4(MaxDataCount, dst, dstIndex);
dstIndex += 4;
}
WriteInt4(ParameterCount, dst, dstIndex);
dstIndex += 4;
WriteInt4((ParameterCount == 0 ? 0 : ParameterOffset), dst, dstIndex);
dstIndex += 4;
if (Command == SmbComNtTransactSecondary)
{
WriteInt4(ParameterDisplacement, dst, dstIndex);
dstIndex += 4;
}
WriteInt4(DataCount, dst, dstIndex);
dstIndex += 4;
WriteInt4((DataCount == 0 ? 0 : DataOffset), dst, dstIndex);
dstIndex += 4;
if (Command == SmbComNtTransactSecondary)
{
WriteInt4(DataDisplacement, dst, dstIndex);
dstIndex += 4;
dst[dstIndex++] = unchecked(unchecked(0x00));
}
else
{
// Reserved1
dst[dstIndex++] = unchecked((byte)SetupCount);
WriteInt2(Function, dst, dstIndex);
dstIndex += 2;
dstIndex += WriteSetupWireFormat(dst, dstIndex);
}
return dstIndex - start;
}
}