rfc2593.txt

来自「著名的RFC文档,其中有一些文档是已经翻译成中文的的.」· 文本 代码 · 共 1,236 行 · 第 1/4 页

TXT
1,236
字号
RFC 2593                    SMX Protocol 1.0                    May 19996.1.4.  Processing the `resume' Command   When the runtime system receives a `resume' command, it processes it   as follows:   1.   If there is a syntax error in the running script identifier or        if there is no running script matching the identifier, a `431'        reply is sent and processing of the command is stopped.   2.   If the running script is already in the state `running', a `231'        reply is sent and processing of the command is stopped.   3.   If the running script is in the state `suspended', it is resumed        and a `231' reply is sent after resuming. If resuming fails, a        `434' reply is sent and processing of the command is stopped.   4.   If the `start' command is still being processed for the script,        a `231' reply is sent when the state `running' has been reached.   5.   If the running script is in any other state, a `434' reply is        sent.6.1.5.  Processing the `abort' Command   When the runtime system receives an `abort' command, it processes it   as follows:   1.   If there is a syntax error in the running script identifier or        if there is no running script matching the identifier, a `431'        reply is sent and processing of the command is stopped.   2.   If the running script is already aborted, a `232' reply is sent        and processing of the command is stopped.   3.   The running script is aborted and a `232' reply is sent after        aborting. If aborting fails, a `434' reply is sent and        processing is stopped.6.1.6.  Processing the `status' Command   When the runtime system receives a `status' command, it processes it   as follows:   1.   If there is a syntax error in the running script identifier or        if there is no running script matching the identifier, a `431'        reply is sent and processing of the command is stopped.   2.   The status of the script is obtained and a `231' reply is sent.Schoenwaelder & Quittek       Experimental                     [Page 12]RFC 2593                    SMX Protocol 1.0                    May 19996.1.7.  Generation of Asynchronous Notifications   The runtime system generates or may generate the following   notifications:   1.   If a change of the status of a running script is observed by the        runtime system, a `531' reply is sent.   2.   A `534' reply is sent if a running script terminates normally.   3.   A `535' reply is sent if a running script terminates abnormally.   4.   If a script generates an intermediate result, a `532' reply is        sent.   5.   If a script requests the generation of a `smScriptResult'        notification, a `533' reply is sent.   6.   Besides the notifications mentioned above, the runtime system        may generate arbitrary `511' replies, which are logged or        displayed by the SNMP agent.6.2.  SMX Message Processing on the SNMP Agent   This section describes the conditions under which an SNMP agent   implementing the Script MIB generates SMX commands. It also describes   how the SNMP agent processes replies to SMX commands.6.2.1.  Creating a Runtime System   New runtime systems are started by the SNMP agent while processing   set requests for a `smLaunchStart' variable. The SNMP agent first   searches for an already running runtime systems which matches the   security profiles associated with the `smLaunchStart' variable. If no   suitable runtime system is available, a new runtime system is started   by preparing the environment for the new runtime system and starting   the executable for the runtime system in a new process which conforms   to the operating system security profile. The SNMP agent prepares to   accept a connection from the new runtime system. The `smRunState' of   all scripts that should be executed in this new runtime system is set   to `initializing'.6.2.2.  Generating the `hello' Command   The `hello' command is generated once a connection request from a   runtime system has been accepted. The SNMP agent sends the `hello'   command as defined in section 5.2. The SNMP agent then expects a   reply from the runtime system within a reasonable timeout interval.Schoenwaelder & Quittek       Experimental                     [Page 13]RFC 2593                    SMX Protocol 1.0                    May 1999   1.   If the timeout expires before the SNMP agent received a reply,        then the connection is closed and all data associated with it is        deleted.  Any scripts that should be running in this runtime        system are aborted, the `smRunExitCode' is set to `genericError'        and `smRunError' is modified to describe the error situation.   2.   If the received message can not be analyzed because it does not        have the required format, then the connection is closed and all        data associated with it is deleted. Any scripts that should be        running in this runtime system are aborted, the `smRunExitCode'        is set to `genericError' and `smRunError' is modified to        describe the error situation.   3.   If the received message is a `211' reply, then the `Id' is        checked whether it matches the `Id' used in the `hello' command.        If the `Id' matches, then the `Version' is checked. If the        `Version' matches a supported SMX protocol version, then the        `Cookie' is checked whether it matches the cookie passed to the        runtime system. If any of these tests fails, then the connection        is closed and all data associated with this runtime system is        deleted. Any scripts that should be running in this runtime        system are aborted, the `smRunExitCode' is set to `genericError'        and `smRunError' is modified to describe the error situation.   4.   Received messages are discarded if none of the previous rules        applies.6.2.3.  Generating the `start' Command   The `start' command is generated while processing set-requests for a   `smLaunchStart' variable. The `start' command assumes that the SNMP   agent already determined a runtime system suitable to execute the   script associated with the `smLaunchStart' variable.  The SNMP agent   sends the `start' command as defined in section 5.2 to the selected   runtime system. The SNMP agent then expects a reply from the runtime   system within a reasonable timeout interval.   1.   If the timeout expires before the SNMP agent received a reply,        then the SNMP agent sends an `abort' command to abort the        running script and sets the `smRunState' of the running script        to `terminated', the `smRunExitCode' to `genericError' and        `smRunError' is modified to describe the timeout situation.   2.   If the received message can not be analyzed because it does not        have the required format, then the message is ignored. The SNMP        agent continues to wait for a valid reply message until the        timeout expires.Schoenwaelder & Quittek       Experimental                     [Page 14]RFC 2593                    SMX Protocol 1.0                    May 1999   3.   If the received message is a `4yz' reply and the `Id' matches        the `Id' of the `start' command, then the SNMP agent assumes        that the script can not be started. The `smRunState' of the        running script is set to `terminated', the `smRunExitCode' to        `genericError' and the `smRunError' is modified to contain a        message describing the error situation.   4.   If the received message is a `231' reply and the `Id' matches        the `Id' of the `start' command, then the `smRunState' variable        of the running script is updated.   5.   Received messages are discarded if none of the previous rules        applies.6.2.4.  Generating the `suspend' Command   The `suspend' command is generated while processing set-requests for   the `smLaunchControl' and `smRunControl' variables which change the   value to `suspend'. The SNMP agent sets the `smRunState' variable to   `suspending' and sends the `suspend' command as defined in section   5.2. The SNMP agent then expects a reply from the runtime system   within a reasonable timeout interval.   1.   If the timeout expires before the SNMP agent received a reply,        then the SNMP agent sends an `abort' command to abort the        running script and sets the `smRunState' of the running script        to `terminated', the `smRunExitCode' to `genericError' and        `smRunError' is modified to describe the timeout situation.   2.   If the received message can not be analyzed because it does not        have the required format, then the message is ignored. The SNMP        agent continues to wait for a valid reply message until the        timeout expires.   3.   If the received message is a `401', `402' or a `431' reply and        the `Id' matches the `Id' of the `suspend' command, then the        runtime systems is assumed to not provide the suspend/resume        capability and processing of the `suspend' command stops.   4.   If the received message is a `231' reply and the `Id' matches        the `Id' of the `suspend' command, then the `smRunState'        variable of the running script is updated.   5.   Received messages are discarded if none of the previous rules        applies.Schoenwaelder & Quittek       Experimental                     [Page 15]RFC 2593                    SMX Protocol 1.0                    May 19996.2.5.  Generating the `resume' Command   The `resume' command is generated while processing set-requests for   the `smLaunchControl' and `smRunControl' variables which change the   value to `resume'. The SNMP agent sets the `smRunState' variable to   `resuming' and sends the `resume' command as defined in section 5.2.   The SNMP agent then expects a reply from the runtime system within a   reasonable timeout interval.   1.   If the timeout expires before the SNMP agent received a reply,        then the SNMP agent sends an `abort' command to abort the        running script and sets the `smRunState' of the running script        to `terminated', the `smRunExitCode' to `genericError' and        `smRunError' is modified to describe the timeout situation.   2.   If the received message can not be analyzed because it does not        have the required format, then the message is ignored. The SNMP        agent continues to wait for a valid reply message until the        timeout expires.   3.   If the received message is a `401', `402' or a `431' reply and        the `Id' matches the `Id' of the `resume' command, then the        runtime systems is assumed to not provide the suspend/resume        capability and processing of the `resume' command stops.   4.   If the received message is a `231' reply and the `Id' matches        the `Id' of the `resume' command, then the `smRunState' variable        of the running script is updated.   5.   Received messages are discarded if none of the previous rules        applies.6.2.6.  Generating the `abort' Command   The `abort' command is generated while processing set-requests for   the `smLaunchControl' and `smRunControl' variables which change the   value to `abort'. In addition, the `abort' command is also generated   if the `smRunLifeTime' variable reaches the value 0. The SNMP agent   sends the `abort' command as defined in section 5.2. The SNMP agent   then expects a reply from the runtime system within a reasonable   timeout interval.   1.   If the timeout expires before the SNMP agent received a reply,        then the SNMP agent sets the `smRunState' of the running script        to `terminated', the `smRunExitCode' to `genericError' and        `smRunError' is modified to describe the timeout situation.Schoenwaelder & Quittek       Experimental                     [Page 16]RFC 2593                    SMX Protocol 1.0                    May 1999   2.   If the received message can not be analyzed because it does not        have the required format, then the message is ignored. The SNMP        agent continues to wait for a valid reply message until the        timeout expires.   3.   If the received message is a `4yz' reply and the `Id' matches        the `Id' of the `abort' command, then the SNMP agent assumes        that the script can not be aborted. The `smRunState' of the        running script is set to `terminated', the `smRunExitCode' to        `genericError' and the `smRunResult' is modified to describe the        error situation.   4.   If the received message is a `232' reply and the `Id' matches        the `Id' of the `abort' command, then the `smRunExitCode'        variable of the terminated script is changed to either `halted'        (when processing a set-request for the `smLaunchControl' and        `smRunControl' variables) or `lifeTimeExceeded' (if the `abort'        command was generated because the `smRunLifeTime' variable        reached the value 0). The `smRunState' variable is changed to        the value `terminated'.   5.   Received messages are discarded if none of the previous rules        applies.6.2.7.  Generating the `status' Command

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?