Exemple #1
0
 /// <summary>
 ///   Initializes SMB message for SMB_COM_TRANSACTION_SECONDARY
 /// </summary>
 /// <param name = "msg">SMB message</param>
 /// <param name = "cmd">Command</param>
 internal void SetupSmbMessageSecondary(SmbMessage msg, byte cmd) // should be protected
 {
     msg.setCommand(cmd);
     msg.setUID(fUID);
     msg.setTID(fTID);
     msg.setPID(fPID);
     msg.setMID(fMID);
     msg.setCanHandleLongNames();
     msg.setExtededAttributes();
 }
Exemple #2
0
        /// <summary>
        ///   Initializes the SMB message
        /// </summary>
        /// <param name = "msg">SMB message</param>
        /// <param name = "cmd">Command</param>
        internal void SetupSmbMessage(SmbMessage msg, byte cmd) // should be protected
        {
            msg.setCommand(cmd);
            msg.setUID(fUID);
            msg.setTID(fTID);
            msg.setPID(fPID);
            msg.setMID(nextMID());
            msg.setCanHandleLongNames();
            msg.setExtededAttributes();

            if (cmd == SmbMessage.SMB_COM_TREE_CONNECT_ANDX ||
                cmd == SmbMessage.SMB_COM_TREE_DISCONNECT ||
                cmd == SmbMessage.SMB_COM_SESSION_SETUP_ANDX ||
                cmd == SmbMessage.SMB_COM_LOGOFF_ANDX)
                return;

            CheckConnection();
        }