Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
unix_telnet(3)		   Erlang Module Definition		unix_telnet(3)

NAME
       unix_telnet - Callback module for ct_telnet, for	connecting to a	telnet
       server on a unix	host.

DESCRIPTION
       Callback	module for ct_telnet, for connecting to	a telnet server	 on  a
       unix host.

       It requires the following entry in the config file:

	  {unix,[{telnet,HostNameOrIpAddress},
		 {port,PortNum},		 % optional
		 {username,UserName},
		 {password,Password},
		 {keep_alive,Bool}]}.		 % optional

       To communicate via telnet to the	host specified by HostNameOrIpAddress,
       use  the	  interface   functions	  in   ct_telnet,   e.g.   open(Name),
       cmd(Name,Cmd), ....

       Name  is	the name you allocated to the unix host	in your	require	state-
       ment. E.g.

	  suite() -> [{require,Name,{unix,[telnet]}}].

       or

	  ct:require(Name,{unix,[telnet]}).

       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 telnet_settings (see ct_telnet).

       Note  that the {port,PortNum} tuple is optional and if omitted, default
       telnet port 23 will be used. Also the keep_alive	tuple is optional, and
       the value defauls to true (enabled).

EXPORTS
       connect(ConnName,  Ip, Port, Timeout, KeepAlive,	Extra) -> {ok, Handle}
       | {error, Reason}

	      Types:

		 ConnName = target_name() (see module ct)
		 Ip = string() | {integer(), integer(),	integer(), integer()}
		 Port =	integer()
		 Timeout = integer()
		 KeepAlive = bool()
		 Extra = target_name() (see module ct) | {Username, Password}
		 Username = string()
		 Password = string()
		 Handle	= handle() (see	module ct_telnet)
		 Reason	= term()

	      Callback for ct_telnet.erl.

	      Setup telnet connection to a unix	host.

       get_prompt_regexp() -> PromptRegexp

	      Types:

		 PromptRegexp =	prompt_regexp()	(see module ct_telnet)

	      Callback for ct_telnet.erl.

	      Return a suitable	regexp string that will	match  common  prompts
	      for users	on unix	hosts.

SEE ALSO
       ct, ct_telnet

AUTHORS
       __

			       common_test 1.10			unix_telnet(3)

NAME | DESCRIPTION | EXPORTS | SEE ALSO | AUTHORS

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=unix_telnet&sektion=3&manpath=FreeBSD+12.1-RELEASE+and+Ports>

home | help