⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rfc3179.txt

📁 RFC 的详细文档!
💻 TXT
📖 第 1 页 / 共 4 页
字号:
      538 reply will follow.  Otherwise, if the error is non-fatal, the
      script continues execution.

   7. A `537' reply is sent if a running script produces an error which
      should cause the generation of a `smScriptException' notification.
      If the error is fatal, the script execution will be terminated and
      a 538 reply will follow.  Otherwise, if the error is non-fatal,
      the script continues execution.

   8. A `538' reply is sent if a running script terminates.  The
      ExitCode is used to distinguish between normal termination
      (`noError') or abnormal termination.

   9. 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.





Schoenwaelder & Quittek       Experimental                     [Page 13]

RFC 3179                    SMX Protocol 1.1                October 2001


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 either

   (a) starting the executable for the runtime system in a new process
       which conforms to the operating system security profile, and
       establishing a bi-directional pipe to the runtime systems
       standard input/output streams to be used for SMX transport, or

   (b) 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 the new
   runtime system is set to `initializing'.

6.2.2.  Generating the `hello' Command

   The `hello' command is generated once an SMX connection is
   established.  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.

   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, if present, the
      `Authenticator' is checked.  If any of the tests fails or if the



Schoenwaelder & Quittek       Experimental                     [Page 14]

RFC 3179                    SMX Protocol 1.1                October 2001


      SNMP agent requires an authenticator and it did not receive a
      matching `Authenticator' with the `211' reply, 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 `RunState' 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 `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.







Schoenwaelder & Quittek       Experimental                     [Page 15]

RFC 3179                    SMX Protocol 1.1                October 2001


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.

6.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.





Schoenwaelder & Quittek       Experimental                     [Page 16]

RFC 3179                    SMX Protocol 1.1                October 2001


   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.

   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'



Schoenwaelder & Quittek       Experimental                     [Page 17]

RFC 3179                    SMX Protocol 1.1                October 2001


      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

   The `status' command is generated either periodically or on demand by
   the SNMP agent in order to retrieve status information from running
   scripts.  The SNMP agent sends the `status' command as defined in
   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 `4yz' reply and the `Id' matches the
      `Id' of the `status' command, then the SNMP agent assumes that the
      script status can not be read, which is a fatal error condition.
      The SNMP agent sends an `abort' command to abort the running
      script.  The `smRunState' of the running script is set to
      `terminated', the `smRunExitCode' to `genericError' and the
      `smRunError' is modified to describe the error situation.

   4. If the received message is a `231' reply and the `Id' matches the
      `Id' of the `status' 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 18]

RFC 3179                    SMX Protocol 1.1                October 2001


6.2.8.  Processing Asynchronous Notifications

   The runtime system can send asynchronous status change notifications.
   These `5yz' replies are processed as described below.

   1. If the received message is a `511' reply, then the message is
      displayed or logged appropriately and processing stops.

   2. If the received message is a `531' reply, then the SNMP agent
      checks whether a running script with the given `RunId' exists in
      the runtime system.  Processing of the notification stops if there
      is no running script with the `RunId'.  Otherwise, the
      `smRunState' is updated.

   3. If the received message is a `532' reply, then the SNMP agent
      checks whether a running script with the given `RunId' exists in
      the runtime system.  Processing of the notification stops if there
      is no running script with the `RunId'.  Otherwise, `smRunState'
      and `smRunResult' are updated.

   4. If the received message is a `533' reply, then the SNMP agent
      checks whether a running script with the given `RunId' exists in
      the runtime system.  Processing of the notification stops if there
      is no running script with the `RunId'.  Otherwise, `smRunState'
      and `smRunResult' are updated and the `smScriptResult'
      notification is generated.

   5. If the received message is a `534' reply, then the SNMP agent
      checks whether a running script with the given `RunId' exists in
      the runtime system.  Processing stops if there is no running
      script with the `RunId'.  Otherwise, `smExitCode' is set to
      `noError', `smRunState' is set to `terminated' and `smRunResult'
      is updated.

   6. If the received message is a `535' reply, then the SNMP agent
      checks whether a running script with the given `RunId' exists in
      the runtime system.  Processing stops if there is no running
      script with the `RunId'.  Otherwise, `smRunState' is set to
      `terminated' and `smExitCode' and `smRunError' are updated.

⌨️ 快捷键说明

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