X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=include%2Flibnfs-raw.h;h=238025d5ffeb330f9c42b0204e958644f678b63e;hb=45670bd0d680f9c9323857d785f37a214e741ddb;hp=423d1d715dc08c96bdc5e3163f63ea38ec11ae32;hpb=0118a5f0de4a611963f0fe669f450167a7569694;p=deb_libnfs.git diff --git a/include/libnfs-raw.h b/include/libnfs-raw.h index 423d1d7..238025d 100644 --- a/include/libnfs-raw.h +++ b/include/libnfs-raw.h @@ -20,8 +20,6 @@ * protocol as well as the XDR encoded/decoded structures. */ #include -#include -#include struct rpc_data { int size; @@ -160,7 +158,7 @@ int rpc_pmap_unset_async(struct rpc_context *rpc, int program, int version, int * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. * data is NULL. */ -int rpc_pmap_callit_async(struct rpc_context *rpc, int program, int version, int procedure, const char *data, int datalen, rpc_cb cb, void *private_data); +int rpc_pmap_callit_async(struct rpc_context *rpc, int program, int version, int procedure, char *data, int datalen, rpc_cb cb, void *private_data); /* * MOUNT FUNCTIONS @@ -752,6 +750,13 @@ int rpc_rquota2_getactivequota_async(struct rpc_context *rpc, rpc_cb cb, char *e + + + +/* + * NFSACL functions + */ + /* * Call NFSACL/NULL * Call the NULL procedure for the NFSACL @@ -807,3 +812,105 @@ int rpc_nfsacl_getacl_async(struct rpc_context *rpc, rpc_cb cb, struct GETACL3ar */ struct SETACL3args; int rpc_nfsacl_setacl_async(struct rpc_context *rpc, rpc_cb cb, struct SETACL3args *args, void *private_data); + + + + +/* + * NLM functions + */ +char *nlmstat4_to_str(int stat); + +/* + * Call NLM/NULL + * Call the NULL procedure for the NLM 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 nlm daemon. + * data is NULL + * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon. + * data is the error string. + * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. + * data is NULL. + */ +int rpc_nlm4_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data); + +/* + * Call NLM/TEST + * Call the TEST procedure for the NLM 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 nlm daemon. + * data is NLM4_TESTres + * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon. + * data is the error string. + * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. + * data is NULL. + */ +struct NLM4_TESTargs; +int rpc_nlm4_test_async(struct rpc_context *rpc, rpc_cb cb, struct NLM4_TESTargs *args, void *private_data); + +/* + * Call NLM/LOCK + * Call the LOCK procedure for the NLM 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 nlm daemon. + * data is NLM4_LOCKres + * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon. + * data is the error string. + * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. + * data is NULL. + */ +struct NLM4_LOCKargs; +int rpc_nlm4_lock_async(struct rpc_context *rpc, rpc_cb cb, struct NLM4_LOCKargs *args, void *private_data); + +/* + * Call NLM/CANCEL + * Call the CANCEL procedure for the NLM 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 nlm daemon. + * data is NLM4_CANCres + * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon. + * data is the error string. + * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. + * data is NULL. + */ +struct NLM4_CANCargs; +int rpc_nlm4_cancel_async(struct rpc_context *rpc, rpc_cb cb, struct NLM4_CANCargs *args, void *private_data); + +/* + * Call NLM/UNLOCK + * Call the UNLOCK procedure for the NLM 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 nlm daemon. + * data is NLM4_UNLOCKres + * RPC_STATUS_ERROR : An error occured when trying to contact the nlm daemon. + * data is the error string. + * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete. + * data is NULL. + */ +struct NLM4_UNLOCKargs; +int rpc_nlm4_unlock_async(struct rpc_context *rpc, rpc_cb cb, struct NLM4_UNLOCKargs *args, void *private_data);