Ejemplo n.º 1
0
        /// <summary>
        /// find the transaction2 packet.
        /// </summary>
        /// <param name="command">the command of transaction2 packet.</param>
        /// <returns>the target transaction2 packet</returns>
        private static SmbPacket FindTheTrans2Packet(Trans2SubCommand command)
        {
            SmbPacket smbPacket = null;

            switch ((Trans2SubCommand)command)
            {
            case Trans2SubCommand.TRANS2_FIND_FIRST2:
                smbPacket = new SmbTrans2FindFirst2RequestPacket();
                break;

            case Trans2SubCommand.TRANS2_FIND_NEXT2:
                smbPacket = new SmbTrans2FindNext2RequestPacket();
                break;

            case Trans2SubCommand.TRANS2_QUERY_FS_INFORMATION:
                smbPacket = new SmbTrans2QueryFsInformationRequestPacket();
                break;

            case Trans2SubCommand.TRANS2_SET_FS_INFORMATION:
                smbPacket = new SmbTrans2SetFsInformationRequestPacket();
                break;

            case Trans2SubCommand.TRANS2_QUERY_PATH_INFORMATION:
                smbPacket = new SmbTrans2QueryPathInformationRequestPacket();
                break;

            case Trans2SubCommand.TRANS2_SET_PATH_INFORMATION:
                smbPacket = new SmbTrans2SetPathInformationRequestPacket();
                break;

            case Trans2SubCommand.TRANS2_QUERY_FILE_INFORMATION:
                smbPacket = new SmbTrans2QueryFileInformationRequestPacket();
                break;

            case Trans2SubCommand.TRANS2_SET_FILE_INFORMATION:
                smbPacket = new SmbTrans2SetFileInformationRequestPacket();
                break;

            case Trans2SubCommand.TRANS2_GET_DFS_REFERRAL:
                smbPacket = new SmbTrans2GetDfsReferralRequestPacket();
                break;

            default:
                break;
            }
            return(smbPacket);
        }
 /// <summary>
 /// Deep copy constructor. 
 /// </summary>
 public SmbTrans2SetPathInformationRequestPacket(SmbTrans2SetPathInformationRequestPacket packet)
     : base(packet)
 {
 }
 /// <summary>
 /// Deep copy constructor.
 /// </summary>
 public SmbTrans2SetPathInformationRequestPacket(SmbTrans2SetPathInformationRequestPacket packet)
     : base(packet)
 {
 }