+extern void guestfs_error (guestfs_h *g, const char *fs, ...)
+ __attribute__((format (printf,2,3)));
+extern void guestfs_perrorf (guestfs_h *g, const char *fs, ...)
+ __attribute__((format (printf,2,3)));
+extern void *guestfs_safe_malloc (guestfs_h *g, size_t nbytes);
+extern void *guestfs_safe_calloc (guestfs_h *g, size_t n, size_t s);
+extern void *guestfs_safe_realloc (guestfs_h *g, void *ptr, int nbytes);
+extern char *guestfs_safe_strdup (guestfs_h *g, const char *str);
+extern void *guestfs_safe_memdup (guestfs_h *g, void *ptr, size_t size);
+
+extern int guestfs__switch_to_sending (guestfs_h *g);
+extern int guestfs__switch_to_receiving (guestfs_h *g);
+
+/* These *_sync calls wait until the action is performed, using the
+ * main loop. We should implement asynchronous versions too.
+ */
+extern int guestfs__send_sync (guestfs_h *g, int proc_nr, xdrproc_t xdrp, char *args);
+extern int guestfs__send_file_sync (guestfs_h *g, const char *filename);
+extern int guestfs__receive_file_sync (guestfs_h *g, const char *filename);
+