.TH unix_telnet 3erl "common_test 1.8.2" "" "Erlang Module Definition" .SH NAME unix_telnet \- Callback module for ct_telnet, for connecting to a telnet server on a unix host. .SH DESCRIPTION .LP Callback module for ct_telnet, for connecting to a telnet server on a unix host\&. .LP It requires the following entry in the config file: .LP .nf {unix,[{telnet,HostNameOrIpAddress}, {port,PortNum}, % optional {username,UserName}, {password,Password}, {keep_alive,Bool}]}. % optional .fi .LP To communicate via telnet to the host specified by \fIHostNameOrIpAddress\fR\&, use the interface functions in \fIct_telnet\fR\&, e\&.g\&. \fIopen(Name), cmd(Name,Cmd), \&.\&.\&.\fR\&\&. .LP \fIName\fR\& is the name you allocated to the unix host in your \fIrequire\fR\& statement\&. E\&.g\&. .LP .nf suite() -> [{require,Name,{unix,[telnet]}}]. .fi .LP or .LP .nf ct:require(Name,{unix,[telnet]}). .fi .LP The "keep alive" activity (i\&.e\&. that Common Test sends NOP to the server every 10 seconds if the connection is idle) may be enabled or disabled for one particular connection as described here\&. It may be disabled for all connections using \fItelnet_settings\fR\& (see \fIct_telnet\fR\&)\&. .LP Note that the \fI{port,PortNum}\fR\& tuple is optional and if omitted, default telnet port 23 will be used\&. Also the \fIkeep_alive\fR\& tuple is optional, and the value defauls to true (enabled)\&. .SH EXPORTS .LP .B connect(ConnName, Ip, Port, Timeout, KeepAlive, Extra) -> {ok, Handle} | {error, Reason} .br .RS .LP Types: .RS 3 ConnName = target_name() (see module ct) .br Ip = string() | {integer(), integer(), integer(), integer()} .br Port = integer() .br Timeout = integer() .br KeepAlive = bool() .br Extra = target_name() (see module ct) | {Username, Password} .br Username = string() .br Password = string() .br Handle = handle() (see module ct_telnet) .br Reason = term() .br .RE .RE .RS .LP Callback for ct_telnet\&.erl\&. .LP Setup telnet connection to a unix host\&. .RE .LP .B get_prompt_regexp() -> PromptRegexp .br .RS .LP Types: .RS 3 PromptRegexp = prompt_regexp() (see module ct_telnet) .br .RE .RE .RS .LP Callback for ct_telnet\&.erl\&. .LP Return a suitable regexp string that will match common prompts for users on unix hosts\&. .RE .SH "SEE ALSO" .LP \fBct\fR\&, \fBct_telnet\fR\& .SH AUTHORS .LP .I <>