Add API: set-wrappid-path.
[wrappi.git] / lib / internal.h
index 69128e9..1c98ca4 100644 (file)
@@ -63,6 +63,7 @@ struct wrap_h {
    */
   wrap_scheme_enum scheme;
   char *hostname;
+  char *wrappid_path;
 };
 
 /* Declare an error, setting the error field in the handle. */
@@ -72,6 +73,7 @@ struct wrap_h {
   wrap_int_set_error_errno ((struct wrap_internal_h *)w, (errno), __func__, fs)
 
 extern void wrap_int_connect_ssh (wrap_h *w);
+extern int wrap_int_lookup_proc_entry (const char *name);
 extern void wrap_int_make_request (wrap_h *w, int proc_nr, const void *args, void *ret);
 extern void wrap_int_make_request_xdr (wrap_h *w, int proc_nr, const void *args, void *ret);
 extern void wrap_int_set_error (struct wrap_internal_h *w, const char *func, const char *fs, ...);
@@ -84,13 +86,24 @@ extern void wrap_int_set_error_errno (struct wrap_internal_h *w, int errnum, con
 struct proc_table {
   const char *name;             /* The name of this entry point. */
 
+  /* Size of the args and ret structs. */
+  size_t args_struct_size;
+  size_t ret_struct_size;
+
+  /* Call this procedure. */
+  void (*call) (wrap_h *w, const void *args, void *ret);
+
   /* XDR encode/decode functions for serializing the args and ret. */
-  xdrproc_t xdr_args;
-  xdrproc_t xdr_ret;
+  xdrproc_t args_xdrproc;
+  xdrproc_t ret_xdrproc;
 };
 
 extern const struct proc_table wrap_int_proc_table[];
 
 #include "internal-procs.h"
 
+/* Defined and used by lib/internal-procs-lookup.gperf */
+struct proc_entry { char *name; int proc_nr; };
+extern const struct proc_entry *wrap_int_gperf_lookup_proc_entry (register const char *str, register unsigned int len);
+
 #endif /* WRAPPI_INTERNAL_H_ */