/// <summary>
        /// decode the batched request packet
        /// </summary>
        /// <param name="channel">the channel of bytes to read</param>
        /// <param name="request">the request of the response.</param>
        /// <param name="smbBatchedResponse">the batched response</param>
        /// <returns>the consumed length of batched response packet</returns>
        protected override int DecodeBatchedRequest(
            Channel channel,
            SmbPacket request, SmbBatchedResponsePacket smbBatchedResponse)
        {
            int result = base.DecodeBatchedRequest(channel, request, smbBatchedResponse);

            for (SmbBatchedResponsePacket currentPacket = smbBatchedResponse;
                 currentPacket != null && currentPacket.AndxPacket != null;
                 currentPacket = currentPacket.AndxPacket as SmbBatchedResponsePacket)
            {
                SmbPacket andxPacket = currentPacket.AndxPacket;

                // create the smb packet
                object smbParameters = ObjectUtility.GetFieldValue(currentPacket, "smbParameters");
                if (smbParameters != null)
                {
                    SmbHeader smbHeader = smbBatchedResponse.SmbHeader;
                    smbHeader.Command = (SmbCommand)ObjectUtility.GetFieldValue(smbParameters, "AndXCommand");
                    andxPacket        = CreateSmbResponsePacket(null, smbHeader, null);
                }

                // convert from cifs packet to smb packet
                if (andxPacket != null)
                {
                    Type smbPacketType = andxPacket.GetType();
                    andxPacket = ObjectUtility.CreateInstance(
                        smbPacketType.Module.FullyQualifiedName,
                        smbPacketType.FullName,
                        new object[] { currentPacket.AndxPacket }) as SmbPacket;
                }

                currentPacket.AndxPacket = andxPacket;
            }

            return(result);
        }