From: Andreas K. <and...@ac...> - 2006-08-10 21:31:34
|
comm::interp - Remote communication Generated from file './modules/comm/interp.man' by tcllib/doctools with format 'text' comm::interp(n) 0.1 comm "Remote communication" NAME ==== comm::interp - Linking communication channels to interpreters SYNOPSIS ======== package require Tcl 8.4 package require comm ?0.1? ::comm::comm::interp::protocol ?-option val...? cmds ?exeip? ::comm::comm::interp::safeBasic ?-option val...? ::comm::comm::interp::safe ?-option val...? ::comm::comm::interp::link comm ip DESCRIPTION =========== The package *comm::interp* is a supplement to the package *comm* providing facilities to easily link comm channels to Tcl interpreters. By default the scripts received by a comm channel are executed in the main interpreter of the receiving process, making for a very insecure model of execution. Something to be used only in a very secure and/or trusted environment. For everyone else this package was written, allowing the easy compartmentalization of execution, restriction to a safe environment, to specific commands, etc. Together with the ability of *comm* to create multiple channels, non-listening channels, local channels, etc. it is possible to handle a very wide range of security requirements. API === ::comm::comm::interp::protocol ?-option val...? cmds ?exeip? This command creates a new communication channel which understands only the commands listed as the keys of the dictionary cmds. The associated values are the actual commands executed in their lieu, in the interpreter exeip. This interpreter defaults to the main interpreter of the thread this command is executed in. To facilitate the above the command creates an internal interpreter which aliases the commands to the execution interpreter on the one hand, and is linked to the communication channel on the other hand. The command returns the path of the internal interpreter to enable the caller to perform additional intializations. Using an empty cmds mapping for example leaves us with an empty interpreter to be initialized at will. The options and their values coming before the cmds mapping are delegated to the new communication channel. The known options are -port, -local, and -silent, with the same meaning as explained in the documentation for the package *comm*. The option -listen is not recognized, as the new communication channel will always listen for incoming scripts, this cannot be deactivated. ::comm::comm::interp::safeBasic ?-option val...? This command a new communication channel which understands all the commands of a basic safe interpreter. The safe interpreter used for the execution of the received scripts is created by the command and returned as its result, to enable the caller to perform additional initialization at will. The term _basic_ means that the created interpreter is the plain result of invoking interp create -safe. The options and their values are delegated to the new communication channel. See comm::interp::protocol for the in-depth explanation of the recognized options. ::comm::comm::interp::safe ?-option val...? This command a new communication channel which understands all the commands of a safe interpreter crated by the *safe* package of the Tcl core. The safe interpreter used for the execution of the received scripts is created by the command using the command ::safe::interpCreate and returned as its result, to enable the caller to perform additional initialization at will. The options and their values are delegated to the new communication channel. See comm::interp::protocol for the in-depth explanation of the recognized options. ::comm::comm::interp::link comm ip This command takes an existing communication channel/object comm, and an existing interpreter ip and links them together. Afterward all scripts received by the channel are executed within the interpreter ip. This is the core functionality of this package, used by all preceding commands. It allows the most flexibility as both communication channel and executing interpreter can be created and configured at will. Thereas for the preceding commands the communication channel is restricted to a listener, and the interpreters are various forms of safe environments. SEE ALSO ======== comm KEYWORDS ======== communication, ipc, message, remote communication, rpc, socket COPYRIGHT ========= Copyright (c) 2006 Andreas Kupries. -- Andreas Kupries <and...@Ac...> Developer @ http://www.ActiveState.com Tel: +1 778-786-1122 |