summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/cvs/os2/rcmd.c
blob: 36b17516dd57de5df4a3200aef4c75de84cabc0d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/* rcmd.c --- execute a command on a remote host from OS/2
   Karl Fogel <kfogel@cyclic.com> --- November 1995  */

#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);
}