Index: trunk/Ohana/src/libohana/include/ohana.h
===================================================================
--- trunk/Ohana/src/libohana/include/ohana.h	(revision 5237)
+++ trunk/Ohana/src/libohana/include/ohana.h	(revision 5273)
@@ -87,4 +87,13 @@
 # endif /* FOPEN */
 
+/* socket / pipe communication buffer */
+typedef struct {
+  char *buffer;
+  int   Nalloc;
+  int   Nreset;
+  int   Nblock;
+  int   Nbuffer;
+} IOBuffer;
+
 extern double hypot();
 
@@ -143,4 +152,18 @@
 int     str_to_radec           PROTO((double *ra, double *dec, char *str1, char *str2));
 
+/* IO Buffer functions */
+int InitIOBuffer (IOBuffer *buffer, int Nalloc);
+int FlushIOBuffer (IOBuffer *buffer);
+int ReadtoIOBuffer (IOBuffer *buffer, int fd);
+int EmptyIOBuffer (IOBuffer *buffer, int Nmax, int fd);
+void FreeIOBuffer (IOBuffer *buffer);
+
+/* communication functions */
+int ExpectMessage (int device, double timeout, IOBuffer *message);
+int ExpectCommand (int device, int length, double timeout, IOBuffer *buffer);
+int SendMessage (int device, char *format, ...);
+int SendCommand (int device, int length, char *format, ...);
+int SendCommandV (int device, int length, char *format, va_list argp);
+
 /*
 #   define F_SETFL         4   
