--- ray/src/util/netproc.h 1996/01/18 11:24:54 2.1 +++ ray/src/util/netproc.h 2003/10/27 10:32:06 2.7 @@ -1,11 +1,14 @@ -/* Copyright (c) 1996 Regents of the University of California */ - -/* SCCSid "$SunId$ LBL" */ - +/* RCSid $Id: netproc.h,v 2.7 2003/10/27 10:32:06 schorsch Exp $ */ /* * Header file for network processing routines */ +#ifndef _RAD_NETPROC_H_ +#define _RAD_NETPROC_H_ +#ifdef __cplusplus +extern "C" { +#endif + typedef struct { char *com; /* command (stored on client side) */ int pid; /* process ID */ @@ -13,7 +16,7 @@ typedef struct { char *errs; /* error output */ int elen; /* error output length */ int (*cf)(); /* completion callback function */ -} PROC; /* process slot */ +} NETPROC; /* process slot (name PROC conflicts with Windows) */ /* Callback function cf above passed process server, slot number and status */ @@ -23,13 +26,23 @@ typedef struct pserver { char directory[128]; /* remote execution directory */ char username[32]; /* remote user ID */ short nprocs; /* number of allocated process slots */ - PROC proc[1]; /* process slot(s) (must be last in struct) */ + NETPROC proc[1]; /* process slot(s) (must be last in struct) */ } PSERVER; /* process server */ extern PSERVER *pslist; /* global process server list */ -extern PSERVER *addpserver(), *findjob(); +extern PSERVER *addpserver(char *host, char *dir, char *usr, int np); +extern PSERVER *findjob(int *pnp); +extern char *myhostname(void); + #define LHOSTNAME "localhost" /* accepted name for local host */ #define pserverOK(ps) (wait4job(ps, startjob(ps, "true", NULL)) == 0) + + +#ifdef __cplusplus +} +#endif +#endif /* _RAD_NETPROC_H_ */ +