]> git.ozlabs.org Git - ccan/blobdiff - ccan/nfs/rpc/portmap.h
nfs: add generates C files
[ccan] / ccan / nfs / rpc / portmap.h
diff --git a/ccan/nfs/rpc/portmap.h b/ccan/nfs/rpc/portmap.h
new file mode 100644 (file)
index 0000000..7623d28
--- /dev/null
@@ -0,0 +1,87 @@
+/*
+ * Please do not edit this file.
+ * It was generated using rpcgen.
+ */
+
+#ifndef _PORTMAP_H_RPCGEN
+#define _PORTMAP_H_RPCGEN
+
+#include <rpc/rpc.h>
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define PMAP_PORT 111
+
+struct mapping {
+       u_int prog;
+       u_int vers;
+       u_int prot;
+       u_int port;
+};
+typedef struct mapping mapping;
+
+struct call_args {
+       u_int prog;
+       u_int vers;
+       u_int proc;
+       struct {
+               u_int args_len;
+               char *args_val;
+       } args;
+};
+typedef struct call_args call_args;
+
+#define PMAP_PROGRAM 100000
+#define PMAP_V2 2
+
+#if defined(__STDC__) || defined(__cplusplus)
+#define PMAP_NULL 0
+extern  void * pmap_null_2(void *, CLIENT *);
+extern  void * pmap_null_2_svc(void *, struct svc_req *);
+#define PMAP_SET 1
+extern  bool_t * pmap_set_2(mapping *, CLIENT *);
+extern  bool_t * pmap_set_2_svc(mapping *, struct svc_req *);
+#define PMAP_UNSET 2
+extern  bool_t * pmap_unset_2(mapping *, CLIENT *);
+extern  bool_t * pmap_unset_2_svc(mapping *, struct svc_req *);
+#define PMAP_GETPORT 3
+extern  u_int * pmap_getport_2(mapping *, CLIENT *);
+extern  u_int * pmap_getport_2_svc(mapping *, struct svc_req *);
+extern int pmap_program_2_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
+
+#else /* K&R C */
+#define PMAP_NULL 0
+extern  void * pmap_null_2();
+extern  void * pmap_null_2_svc();
+#define PMAP_SET 1
+extern  bool_t * pmap_set_2();
+extern  bool_t * pmap_set_2_svc();
+#define PMAP_UNSET 2
+extern  bool_t * pmap_unset_2();
+extern  bool_t * pmap_unset_2_svc();
+#define PMAP_GETPORT 3
+extern  u_int * pmap_getport_2();
+extern  u_int * pmap_getport_2_svc();
+extern int pmap_program_2_freeresult ();
+#endif /* K&R C */
+
+/* the xdr functions */
+
+#if defined(__STDC__) || defined(__cplusplus)
+extern  bool_t xdr_mapping (XDR *, mapping*);
+extern  bool_t xdr_call_args (XDR *, call_args*);
+
+#else /* K&R C */
+extern bool_t xdr_mapping ();
+extern bool_t xdr_call_args ();
+
+#endif /* K&R C */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* !_PORTMAP_H_RPCGEN */