version 1.4, 2003/01/13 12:03:13 |
version 1.6, 2003/09/15 09:31:42 |
|
|
/* -*- mode: C -*- */ |
/* -*- mode: C -*- */ |
/* $OpenXM: OpenXM/src/ox_toolkit/zclient.c,v 1.3 2003/01/11 11:42:32 ohara Exp $ */ |
/* $OpenXM: OpenXM/src/ox_toolkit/zclient.c,v 1.5 2003/02/04 20:43:55 ohara Exp $ */ |
|
|
/* A sample implementation of an OpenXM client with OpenXM C library */ |
/* A sample implementation of an OpenXM client with OpenXM C library */ |
|
|
|
|
#include <string.h> |
#include <string.h> |
#include "ox_toolkit.h" |
#include "ox_toolkit.h" |
|
|
|
int oxc_start(char *remote_host, int port, char *passwd); |
|
|
static OXFILE *connection(int listened, char *passwd) |
static OXFILE *connection(int listened, char *passwd) |
{ |
{ |
OXFILE *oxfp = oxf_connect_passive(listened); |
OXFILE *oxfp = oxf_connect_passive(listened); |
Line 22 static OXFILE *connection(int listened, char *passwd) |
|
Line 24 static OXFILE *connection(int listened, char *passwd) |
|
|
|
OXFILE *open_server(char *remote_host) |
OXFILE *open_server(char *remote_host) |
{ |
{ |
short port; |
int port; |
int listen; |
int listen; |
char *passwd = generate_otp(); |
char *passwd = generate_otp(); |
|
|
Line 40 int main(int argc, char* argv[]) |
|
Line 42 int main(int argc, char* argv[]) |
|
OXFILE *oxfp; |
OXFILE *oxfp; |
char *remote, *cmd; |
char *remote, *cmd; |
|
|
ox_stderr_init(NULL); |
ox_stderr_init(stderr); |
if (argc < 3) { |
if (argc < 3) { |
ox_printf("we have a few argument.\n"); |
ox_printf("we have a few argument.\n"); |
ox_printf("Usage:\n %s [remotehost] [command]\n", argv[0]); |
ox_printf("Usage:\n %s [remotehost] [command]\n", argv[0]); |