*/
struct nfs_fh3 *nfs_get_fh(struct nfsfh *nfsfh);
+/* Control what the next XID value to be used on the context will be.
+ This can be used when multiple contexts are used to the same server
+ to avoid that the two contexts have xid collissions.
+ */
+void rpc_set_next_xid(struct rpc_context *rpc, uint32_t xid);
+
#define RPC_STATUS_SUCCESS 0
#define RPC_STATUS_ERROR 1
#define RPC_STATUS_CANCEL 2
* : data is NULL.
*/
int rpc_connect_async(struct rpc_context *rpc, const char *server, int port, rpc_cb cb, void *private_data);
+/*
+ * Async function to connect to a specific RPC program/version
+ * Function returns
+ * 0 : The connection was initiated. Once the connection establish finishes, the callback will be invoked.
+ * <0 : An error occured when trying to set up the connection. The callback will not be invoked.
+ *
+ * When the callback is invoked, status indicates the result:
+ * RPC_STATUS_SUCCESS : The tcp connection was successfully established.
+ * data is NULL.
+ * RPC_STATUS_ERROR : The connection failed to establish.
+ * data is the erro string.
+ * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
+ * : data is NULL.
+ */
+int rpc_connect_program_async(struct rpc_context *rpc, char *server, int program, int version, rpc_cb cb, void *private_data);
/*
* When disconnecting a connection in flight. All commands in flight will be called with the callback
* and status RPC_STATUS_ERROR. Data will be the error string for the disconnection.
struct NLM4_UNLOCKargs;
int rpc_nlm4_unlock_async(struct rpc_context *rpc, rpc_cb cb, struct NLM4_UNLOCKargs *args, void *private_data);
+/*
+ * NSM functions
+ */
+char *nsmstat1_to_str(int stat);
+
+/*
+ * Call NSM/NULL
+ * Call the NULL procedure for the NSM protocol
+ *
+ * Function returns
+ * 0 : The call was initiated. The callback will be invoked when the call completes.
+ * <0 : An error occured when trying to set up the call. The callback will not be invoked.
+ *
+ * When the callback is invoked, status indicates the result:
+ * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
+ * data is NULL
+ * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
+ * data is the error string.
+ * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
+ * data is NULL.
+ */
+int rpc_nsm1_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
+
+/*
+ * Call NSM/STAT
+ * Call the STAT procedure for the NSM protocol
+ *
+ * Function returns
+ * 0 : The call was initiated. The callback will be invoked when the call completes.
+ * <0 : An error occured when trying to set up the call. The callback will not be invoked.
+ *
+ * When the callback is invoked, status indicates the result:
+ * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
+ * data is NSM1_STATres
+ * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
+ * data is the error string.
+ * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
+ * data is NULL.
+ */
+struct NSM1_STATargs;
+int rpc_nsm1_stat_async(struct rpc_context *rpc, rpc_cb cb, struct NSM1_STATargs *args, void *private_data);
+
+/*
+ * Call NSM/MON
+ * Call the MON procedure for the NSM protocol
+ *
+ * Function returns
+ * 0 : The call was initiated. The callback will be invoked when the call completes.
+ * <0 : An error occured when trying to set up the call. The callback will not be invoked.
+ *
+ * When the callback is invoked, status indicates the result:
+ * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
+ * data is NSM1_MONres
+ * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
+ * data is the error string.
+ * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
+ * data is NULL.
+ */
+struct NSM1_MONargs;
+int rpc_nsm1_mon_async(struct rpc_context *rpc, rpc_cb cb, struct NSM1_MONargs *args, void *private_data);
+
+/*
+ * Call NSM/UNMON
+ * Call the UNMON procedure for the NSM protocol
+ *
+ * Function returns
+ * 0 : The call was initiated. The callback will be invoked when the call completes.
+ * <0 : An error occured when trying to set up the call. The callback will not be invoked.
+ *
+ * When the callback is invoked, status indicates the result:
+ * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
+ * data is NSM1_UNMONres
+ * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
+ * data is the error string.
+ * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
+ * data is NULL.
+ */
+struct NSM1_UNMONargs;
+int rpc_nsm1_unmon_async(struct rpc_context *rpc, rpc_cb cb, struct NSM1_UNMONargs *args, void *private_data);
+
+/*
+ * Call NSM/UNMONALL
+ * Call the UNMONALL procedure for the NSM protocol
+ *
+ * Function returns
+ * 0 : The call was initiated. The callback will be invoked when the call completes.
+ * <0 : An error occured when trying to set up the call. The callback will not be invoked.
+ *
+ * When the callback is invoked, status indicates the result:
+ * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
+ * data is NSM1_UNMONALLres
+ * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
+ * data is the error string.
+ * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
+ * data is NULL.
+ */
+struct NSM1_UNMONALLargs;
+int rpc_nsm1_unmonall_async(struct rpc_context *rpc, rpc_cb cb, struct NSM1_UNMONALLargs *args, void *private_data);
+
+/*
+ * Call NSM/SIMUCRASH
+ * Call the SIMUCRASH procedure for the NSM protocol
+ *
+ * Function returns
+ * 0 : The call was initiated. The callback will be invoked when the call completes.
+ * <0 : An error occured when trying to set up the call. The callback will not be invoked.
+ *
+ * When the callback is invoked, status indicates the result:
+ * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
+ * data is NULL
+ * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
+ * data is the error string.
+ * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
+ * data is NULL.
+ */
+int rpc_nsm1_simucrash_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
+
+/*
+ * Call NSM/NOTIFY
+ * Call the NOTIFY procedure for the NSM protocol
+ *
+ * Function returns
+ * 0 : The call was initiated. The callback will be invoked when the call completes.
+ * <0 : An error occured when trying to set up the call. The callback will not be invoked.
+ *
+ * When the callback is invoked, status indicates the result:
+ * RPC_STATUS_SUCCESS : We got a successful response from the nsm daemon.
+ * data is NULL
+ * RPC_STATUS_ERROR : An error occured when trying to contact the nsm daemon.
+ * data is the error string.
+ * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
+ * data is NULL.
+ */
+struct NSM1_NOTIFYargs;
+int rpc_nsm1_notify_async(struct rpc_context *rpc, rpc_cb cb, struct NSM1_NOTIFYargs *args, void *private_data);
+
#endif