int rcmd(char **ahost, int inport, const char *locuser, const char *remuser, const char *cmd, int *fd2p);
int rresvport(int *port);
int ruserok(const char *rhost, int superuser, const char *ruser, const char *luser);
int iruserok(in_addr_t raddr, int superuser, const char *ruser, const char *luser);
If the connection succeeds, a socket in the Internet domain of type SOCK_STREAM is returned to the caller, and given to the remote command as stdin and stdout. If fd2p is non-null, then an auxiliary channel to a control process will be set up, and a descriptor for it will be placed in that location to which it refers. The control process will return diagnostic output (stderr) from the command on this channel, and also accepts bytes on this channel as being UNIX signal numbers, to be forwarded to the process group of the command. The diagnostic information returned does not include remote authorization failure, as the secondary connection is set up after authorization has been verified. If fd2p is null, then the stderr of the remote command is made the same as the stdout and no provision is made for sending arbitrary signals to the remote process, although you may be able to get its attention by using out-of-band data.
If this file does not exist, is not a regular file, is owned by anyone
other than the user or the super-user, or is writable by anyone other
than the owner, the check automatically fails.
Points to the name of the host to which the connection is made. If the connection is successful, this name is updated with the standard name for the host.
Is the Internet port number on which the connection should be attempted.
Is the user name on the local system.
Is the user name to use for authentication on the remote system.
Is the command to be executed on the remote host.
If non-null, a second connection is made to stderr of the remote command, and the file descriptor is returned through this pointer. If null, stderr of the remote command is connected to its stdout.
Points to a port number to which an attempt is made to bind. This port number is updated to specify the last port number attempted.
Is the name of the remote host for which authentication is requested.
Is the address of remote host for which authentication is requested.
Is a boolean flag indicating whether the local user is to be considered the super-user.
Is the name of the remote user.
Is the name of the local user.
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
PTC MKS Toolkit 10.3 Documentation Build 39.