RPCUTIL(1L)

# Revision 1.2 1994/02/24 07:56:34 markc # Added more comments. #

NAME
rpcUtil - Support Library

DESCRIPTION

This library provides utility functions. It provides a list class, a hash table class, and functions to support client-server communications using XDR/pvm/threads.

LIST CLASS SYNOPSIS
template <class Type> class List {
public:
List();
int empty();
friend ostream &operator<<(ostream&, List<Type>&);
void print();
void add(Type data, void *key);
void add(Type data);
Boolean addUnique(Type data);
Boolean addUnique(Type data, void *key);
Type find(void *key);
Boolean remove(void *key);
int count();
Type operator *();
void operator +=(List<Type> mergee);
Type operator ++();
void map (void (*map_function)(const Type item));
void setCurrent();
const Type getCurrent();
const Type next();
void advanceCurrent();
protected:
ListItem<Type> *head;
ListItem<Type> *current;
};

HASH TABLE CLASS SYNOPSIS

template <class Type> class HTable {
public:
friend ostream &operator<<(ostream&, HTable<Type>&);
void print();
HTable(Type data);
void add(Type data, void *key);
HTable();
Boolean addUnique(Type data, void *key);
Type find(void *key);
Boolean remove(void *key);
Type operator =(HTable<Type> arg);
Type operator *();
Type operator ++();
int count();
private:
List<Type> **table;
List<Type> currList;
int currHid;
int tableSize;
};

LIBRARY SYNOPSIS

int RPCprocessCreate (pid, host, User, command,
    args)
    int *pid;
    char *host;
    char *User;
    char *command;
    char **args;

int RPC_readReady (fd)
    int fd;

int RPC_setup_socket (socket_fd, family, type)
    int *socket_fd;
    int family;
    int type;

char **RPC_make_arg_list (program, family, type,
    port, flag)
    char *program;
    int family;
    int type;
    int port;
    int flag;

int RPC_undo_arg_list (argc, arg_list, machine,
    family, type, socket, flag)
    int argc;
    char **arg_list;
    char **machine;
    int *family;
    int *type;
    int *socket;
    int *flag;

int RPC_getConnect (fd)
    int fd;

LIST CLASS DESCRIPTION

HASH TABLE DESCRIPTION

LIBRARY DESCRIPTION

int RPCprocessCreate (pid, host, User, command, args)
int *pid;
char *host;
char *User;
char *command;
char **args;
stdout will be closed for the exec'd program. The pid is returned in pid. Host is the name of the host to start the program on. Command is the name of the command to exec. If args is non-null, it will be used as an argument for the exec. Thus, command should be the first entry in args. If args is null, command is passed as the argument list.

int RPC_readReady (fd)
    int fd;

int RPC_setup_socket (socket_fd, family, type)
    int *socket_fd;
    int family;
    int type;

char **RPC_make_arg_list (program, family, type,
    port, flag)
    char *program;
    int family;
    int type;
    int port;
    int flag;

int RPC_undo_arg_list (argc, arg_list, machine,
    family, type, socket, flag)
    int argc;
    char **arg_list;
    char **machine;
    int *family;
    int *type;
    int *socket;
    int *flag;

int RPC_getConnect (fd)
    int fd;

SEE ALSO
Paradyn(1).

COPYRIGHT
Copyright 1994, The Paradyn Software Team.

AUTHOR
Mark Callaghan (markc@cs.wisc.edu)