diff options
author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2005-10-03 13:43:40 +0000 |
---|---|---|
committer | <> | 2014-09-25 11:25:48 +0000 |
commit | 10de491ef0bc43827ab8631a4c02860134e620a9 (patch) | |
tree | 22e734337cc9aa5d9b1d7c71261d160b6a60634d /os2/rcmd.c | |
download | cvs-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.c')
-rw-r--r-- | os2/rcmd.c | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/os2/rcmd.c b/os2/rcmd.c new file mode 100644 index 0000000..2996e49 --- /dev/null +++ b/os2/rcmd.c @@ -0,0 +1,76 @@ +/* rcmd.c --- execute a command on a remote host from OS/2 + 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. */ + +#include <io.h> +#include <stdio.h> +#include <fcntl.h> +#include <malloc.h> +#include <errno.h> +/* <sys/socket.h> wants `off_t': */ +#include <sys/types.h> +/* This should get us ibmtcpip\include\sys\socket.h: */ +#include <sys/socket.h> +#include <assert.h> + +#include "rcmd.h" + +void +init_sockets () +{ + int rc; + + rc = sock_init (); + if (rc != 0) + { + fprintf (stderr, "sock_init() failed -- returned %d!\n", rc); + exit (1); + } +} + + +static int +resolve_address (const char **ahost, struct sockaddr_in *sai) +{ + fprintf (stderr, + "Error: resolve_address() doesn't work.\n"); + exit (1); +} + +static int +bind_and_connect (struct sockaddr_in *server_sai) +{ + fprintf (stderr, + "Error: bind_and_connect() doesn't work.\n"); + exit (1); +} + +static int +rcmd_authenticate (int fd, char *locuser, char *remuser, char *command) +{ + fprintf (stderr, + "Error: rcmd_authenticate() doesn't work.\n"); + exit (1); +} + +int +rcmd (const char **ahost, + unsigned short inport, + char *locuser, + char *remuser, + char *cmd, + int *fd2p) +{ + fprintf (stderr, + "Error: rcmd() doesn't work.\n"); + exit (1); +} |