Index: trunk/Ohana/src/opihi/include/pcontrol.h
===================================================================
--- trunk/Ohana/src/opihi/include/pcontrol.h	(revision 17419)
+++ trunk/Ohana/src/opihi/include/pcontrol.h	(revision 17475)
@@ -28,8 +28,20 @@
   PCONTROL_HOST_IDLE,
   PCONTROL_HOST_BUSY,  
+  PCONTROL_HOST_RESP,
   PCONTROL_HOST_DOWN,
   PCONTROL_HOST_DONE,
   PCONTROL_HOST_OFF,
 } HostStat;
+
+/** host response options **/
+typedef enum {
+  PCONTROL_RESP_NONE,
+  PCONTROL_RESP_START_JOB,
+  PCONTROL_RESP_CHECK_BUSY_JOB,  
+  PCONTROL_RESP_CHECK_DONE_HOST,  
+  PCONTROL_RESP_CHECK_HOST,
+  PCONTROL_RESP_KILL_JOB,
+  PCONTROL_RESP_STOP_HOST,
+} HostResp;
 
 typedef enum {
@@ -97,4 +109,7 @@
   Ptime       nexttry;
   IDtype      HostID;
+  IOBuffer    comms_buffer;
+  char       *response;
+  HostResp    response_state;
   struct Job *job;
 } Host;
@@ -156,16 +171,30 @@
 
 /*** own files ***/
+int StartJob (Job *job, Host *host);
+int StartJobResponse (Host *host);
+
 int CheckHost (Host *host);
+int CheckHostResponse (Host *host);
+
+int CheckDoneHost (Host *host);
+int CheckDoneHostResponse (Host *host);
+
+int CheckBusyJob (Job *job, Host *host);
+int CheckBusyJobResponse (Host *host);
+
+int KillJob (Job *job, Host *host);
+int KillJobResponse (Host *host);
+
 int StartHost (Host *host);
 int CheckIdleHost (Host *host);
-int CheckDoneHost (Host *host);
-int CheckBusyJob (Job *job, Host *host);
 int CheckDoneJob (Job *job, Host *host);
-int KillJob (Job *job, Host *host);
-int StartJob (Job *job, Host *host);
-int ResetJob (Job *job);
 int GetJobOutput (char *command, Host *host, IOBuffer *buffer, int Nbytes);
-int PclientCommand (Host *host, char *command, char *response, IOBuffer *buffer);
 int rconnect (char *command, char *hostname, char *shell, int *stdio);
+
+int PclientCommand (Host *host, char *command, char *response, HostResp response_state);
+int PclientResponse (Host *host, char *response, IOBuffer *buffer);
+
+int CheckRespHosts (float MaxDelay);
+int CheckRespHost (Host *host);
 
 /*** misc files ***/
@@ -203,4 +232,5 @@
 int    DownHosts ();
 int    StopHost (Host *host);
+int    StopHostResponse (Host *host);
 int    HarvestHost (int pid);
 
