source/session.tcl
| Procedure Summary |
bg_sessions { }Get list of sids of background |
close_all_bg_sessions { }Close all background |
close_all_user_sessions { }Close all user |
close_session { sid {reason Unspecified} }Terminate a session and release |
common_state { sid }Set up a number of shared variables common for both 'user' and 'background' session |
create_bg_session { username {authmode priv} {confmode global} } |
create_user_session { pid cid fifos username type COLS ROWS }Establish a connection with a shell and set up a new user session @assume authmode 'user authmode and confmode 'entry' exist. |
get_sessionId { }Finds the session Id of the session on behalf of the caller procedure. |
is_bg_session { sid }Checks if a session is an background session or |
is_user_session { sid }Checks if a session is a user session or |
kill_shell { shell_pid }Kill |
listen_for_connections { }Monitor for incoming control commands. |
listen_for_connections { }Monitor for incoming control commands. |
new_connection { con } |
new_message { id } |
proxy { sid from to }Proxy input from channel $from to channel $to, while inspecting forwarded data and taking actions as necessary. |
register_new_fifos { pid }Assign a new pair of FIFOs for a new connection request for a User |
user_sessions { }Get list of sids of user |
| Procedure Detail |
proc bg_sessions { }
proc close_all_bg_sessions { }
proc close_all_user_sessions { }
proc close_session { sid {reason Unspecified} }
sid - Session id
reason - The reason for Session termination.
proc common_state { sid }
sid - Session id
proc create_bg_session { username {authmode priv} {confmode global} }
authmode - The authmode to enter to, and the relative root of authmodes to set. Default is "priv"
confmode - The confmode to enter to, and the relative root of confmodes to set. Default is "global"
proc create_user_session { pid cid fifos username type COLS ROWS }
pid - The pid of the requesting shell.
cid - The connection Id as returned by ::comm::comm self.
fifos - A tuple: {input_fifo output_fifo} assigned to the shell.
type - The type of user session. Supported types: "console" "vty"
username - The name of the user connected to this session.
COLS - Reported number of supported columns in the user terminal.
ROWS - Reported number of supported rows in the user terminal.
proc get_sessionId { }
proc is_bg_session { sid }
sid - The sid to check if is an background session.
proc is_user_session { sid }
sid - The sid to check if is an user session.
proc kill_shell { shell_pid }
shell_pid - Shell's PID.
proc listen_for_connections { }
proc listen_for_connections { }
proc new_connection { con }
proc new_message { id }
proc proxy { sid from to }
sid - Session Id.
from - Channel to redirect input from.
to - Channel to redirect output to.
proc register_new_fifos { pid }
pid - The pid of the requesting shell
proc user_sessions { }