Index: trunk/Ohana/src/opihi/include/pcontrol.h
===================================================================
--- trunk/Ohana/src/opihi/include/pcontrol.h	(revision 25872)
+++ trunk/Ohana/src/opihi/include/pcontrol.h	(revision 26411)
@@ -98,4 +98,14 @@
   int          requested;
 } JobOutput;
+
+/* A machine has a unique name and may have multiple Hosts (each of which can run a single job)
+   We use this to track aspects of the analysis per machine, to eg, limit the number of jobs 
+   desired on a single machine */
+typedef struct {
+  char *name;
+  int Nhosts;		      // how many hosts are selected for this machine (whatever state)
+  int NjobsRealhost;
+  int NjobsWanthost;
+} Machine;
 
 /* data to define a job */
@@ -140,4 +150,5 @@
 } Host;
 
+/* the Jobs and Hosts are managed in a set of Stacks which define their state */
 typedef struct {
   void **object;
@@ -280,4 +291,24 @@
 void   LinkJobAndHost (Job *job, Host *host);
 
+/*** MachineOps.c ***/
+void InitMachines ();
+void FreeMachines ();
+Machine *FindMachineByName (char *name);
+Machine *AddMachine (char *name);
+int DelMachine (char *name);
+int AddMachineHost (Host *host);
+int DelMachineHost (Host *host);
+int AddMachineJob (Host *host, Job *job);
+int DelMachineJob (Host *host, Job *job);
+int PrintMachines ();
+int CheckMachineJobs (Host *host, Job *job);
+int GetMaxUnwantedHostJobs (void);
+void SetMaxUnwantedHostJobs (int value);
+
+float GetMaxConnectTime (void);
+void SetMaxConnectTime (float value);
+float GetMaxWantHostWait (void);
+void SetMaxWantHostWait (float value);
+
 void pcontrol_exit (int n);
 
