summaryrefslogtreecommitdiff
path: root/os2/rcmd.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2005-10-03 13:43:40 +0000
committer <>2014-09-25 11:25:48 +0000
commit10de491ef0bc43827ab8631a4c02860134e620a9 (patch)
tree22e734337cc9aa5d9b1d7c71261d160b6a60634d /os2/rcmd.h
downloadcvs-tarball-master.tar.gz
Imported from /home/lorry/working-area/delta_cvs-tarball/cvs-1.12.13.tar.bz2.HEADcvs-1.12.13master
Diffstat (limited to 'os2/rcmd.h')
-rw-r--r--os2/rcmd.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/os2/rcmd.h b/os2/rcmd.h
new file mode 100644
index 0000000..2c84d5b
--- /dev/null
+++ b/os2/rcmd.h
@@ -0,0 +1,40 @@
+/* rcmd.h --- interface to executing commands on remote hosts
+ Karl Fogel <kfogel@cyclic.com> --- November 1995 */
+
+/* This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details. */
+
+/* Run the command CMD on the host *AHOST, and return a file descriptor for
+ a bidirectional stream socket connected to the command's standard input
+ and output.
+
+ rcmd looks up *AHOST using gethostbyname, and sets *AHOST to the host's
+ canonical name. If *AHOST is not found, rcmd returns -1.
+
+ rcmd connects to the remote host at TCP port INPORT. This should
+ probably be the "shell" service, port 514.
+
+ LOCUSER is the name of the user on the local machine, and REMUSER is
+ the name of the user on the remote machine; the remote machine uses this,
+ along with the source address of the TCP connection, to authenticate
+ the connection.
+
+ CMD is the command to execute. The remote host will tokenize it any way
+ it damn well pleases. Welcome to Unix.
+
+ FD2P is a feature we don't support, but there's no point in making mindless
+ deviations from the interface. Callers should always pass this argument
+ as zero. */
+extern int rcmd (const char **AHOST,
+ unsigned short INPORT,
+ char *LOCUSER,
+ char *REMUSER,
+ char *CMD,
+ int *fd2p);