VxWorks Reference Manual : Libraries
rlogLib - remote login library
rlogInit( ) - initialize the remote login facility
rlogind( ) - the VxWorks remote login daemon
rlogin( ) - log in to a remote host
This library provides a remote login facility for VxWorks that uses the UNIX rlogin protocol (as implemented in UNIX BSD 4.3) to allow users at a VxWorks terminal to log in to remote systems via the network, and users at remote systems to log in to VxWorks via the network.
A VxWorks user may log in to any other remote VxWorks or UNIX system via the network by calling rlogin( ) from the shell.
The remote login daemon, rlogind( ), allows remote users to log in to VxWorks. The daemon is started by calling rlogInit( ), which is called automatically when the configuration macro INCLUDE_RLOGIN is defined. The remote login daemon accepts remote login requests from another VxWorks or UNIX system, and causes the shell's input and output to be redirected to the remote user.
Internally, rlogind( ) provides a tty-like interface to the remote user through the use of the VxWorks pseudo-terminal driver ptyDrv.
rlogLib.h
rlogLib, ptyDrv, telnetLib, UNIX BSD 4.3 manual entries for rlogin, rlogind, and pty
rlogInit( ) - initialize the remote login facility
STATUS rlogInit (void)
This routine initializes the remote login facility. It creates a pty (pseudo tty) device and spawns rlogind( ). If the configuratiion macro INCLUDE_RLOGIN is defined, rlogInit( ) is called automatically at boot time.
OK or ERROR.
rlogind( ) - the VxWorks remote login daemon
void rlogind (void)
This routine provides a facility for remote users to log in to VxWorks over the network. If the configuration macro INCLUDE_RLOGIN is defined, rlogind( ) is spawned by rlogInit( ) at boot time.
Remote login requests will cause stdin, stdout, and stderr to be directed away from the console. When the remote user disconnects, stdin, stdout, and stderr are restored, and the shell is restarted. The rlogind( ) routine uses the remote user verification protocol specified by the UNIX remote shell daemon documentation, but ignores all the information except the user name, which is used to set the VxWorks remote identity (see the manual entry for iam( )).
The remote login daemon requires the existence of a pseudo-terminal device, which is created by rlogInit( ) before rlogind( ) is spawned. The rlogind( ) routine creates two child processes, tRlogInTask and tRlogOutTask, whenever a remote user is logged in. These processes exit when the remote connection is terminated.
N/A
rlogin( ) - log in to a remote host
STATUS rlogin ( char * host /* name of host to connect to */ )
This routine allows users to log in to a remote host. It may be called from the VxWorks shell as follows:
-> rlogin "remoteSystem"where remoteSystem is either a host name, which has been previously added to the remote host table by a call to hostAdd( ), or an Internet address in dot notation (e.g., "90.0.0.2"). The remote system will be logged into with the current user name as set by a call to iam( ).The user disconnects from the remote system by typing:
~.as the only characters on the line, or by simply logging out from the remote system using logout( ).
OK, or ERROR if the host is unknown, no privileged ports are available, the routine is unable to connect to the host, or the child process cannot be spawned.