#include "win32_compat.h"
#endif/*WIN32*/
-#if defined(WIN32)
-#include <winsock2.h>
-#endif
-
#include <stdio.h>
#include <errno.h>
#include <sys/stat.h>
-#include <rpc/rpc.h>
-#include <rpc/xdr.h>
+#include "libnfs-zdr.h"
#include "libnfs.h"
#include "libnfs-raw.h"
#include "libnfs-private.h"
{
struct rpc_pdu *pdu;
- pdu = rpc_allocate_pdu(rpc, RQUOTA_PROGRAM, RQUOTA_V1, RQUOTA1_NULL, cb, private_data, (xdrproc_t)xdr_void, 0);
+ pdu = rpc_allocate_pdu(rpc, RQUOTA_PROGRAM, RQUOTA_V1, RQUOTA1_NULL, cb, private_data, (zdrproc_t)zdr_void, 0);
if (pdu == NULL) {
rpc_set_error(rpc, "Out of memory. Failed to allocate pdu for rquota1/null call");
return -1;
struct rpc_pdu *pdu;
GETQUOTA1args args;
- pdu = rpc_allocate_pdu(rpc, RQUOTA_PROGRAM, RQUOTA_V1, RQUOTA1_GETQUOTA, cb, private_data, (xdrproc_t)xdr_GETQUOTA1res, sizeof(GETQUOTA1res));
+ pdu = rpc_allocate_pdu(rpc, RQUOTA_PROGRAM, RQUOTA_V1, RQUOTA1_GETQUOTA, cb, private_data, (zdrproc_t)zdr_GETQUOTA1res, sizeof(GETQUOTA1res));
if (pdu == NULL) {
rpc_set_error(rpc, "Out of memory. Failed to allocate pdu for rquota1/getquota call");
return -1;
args.export = export;
args.uid = uid;
- if (xdr_GETQUOTA1args(&pdu->xdr, &args) == 0) {
- rpc_set_error(rpc, "XDR error: Failed to encode GETQUOTA1args");
+ if (zdr_GETQUOTA1args(&pdu->zdr, &args) == 0) {
+ rpc_set_error(rpc, "ZDR error: Failed to encode GETQUOTA1args");
rpc_free_pdu(rpc, pdu);
return -2;
}
struct rpc_pdu *pdu;
GETQUOTA1args args;
- pdu = rpc_allocate_pdu(rpc, RQUOTA_PROGRAM, RQUOTA_V1, RQUOTA1_GETACTIVEQUOTA, cb, private_data, (xdrproc_t)xdr_GETQUOTA1res, sizeof(GETQUOTA1res));
+ pdu = rpc_allocate_pdu(rpc, RQUOTA_PROGRAM, RQUOTA_V1, RQUOTA1_GETACTIVEQUOTA, cb, private_data, (zdrproc_t)zdr_GETQUOTA1res, sizeof(GETQUOTA1res));
if (pdu == NULL) {
rpc_set_error(rpc, "Out of memory. Failed to allocate pdu for rquota1/getactivequota call");
return -1;
args.export = export;
args.uid = uid;
- if (xdr_GETQUOTA1args(&pdu->xdr, &args) == 0) {
- rpc_set_error(rpc, "XDR error: Failed to encode GETQUOTA1args");
+ if (zdr_GETQUOTA1args(&pdu->zdr, &args) == 0) {
+ rpc_set_error(rpc, "ZDR error: Failed to encode GETQUOTA1args");
rpc_free_pdu(rpc, pdu);
return -2;
}
{
struct rpc_pdu *pdu;
- pdu = rpc_allocate_pdu(rpc, RQUOTA_PROGRAM, RQUOTA_V2, RQUOTA2_NULL, cb, private_data, (xdrproc_t)xdr_void, 0);
+ pdu = rpc_allocate_pdu(rpc, RQUOTA_PROGRAM, RQUOTA_V2, RQUOTA2_NULL, cb, private_data, (zdrproc_t)zdr_void, 0);
if (pdu == NULL) {
rpc_set_error(rpc, "Out of memory. Failed to allocate pdu for rquota2/null call");
return -1;
struct rpc_pdu *pdu;
GETQUOTA2args args;
- pdu = rpc_allocate_pdu(rpc, RQUOTA_PROGRAM, RQUOTA_V2, RQUOTA2_GETQUOTA, cb, private_data, (xdrproc_t)xdr_GETQUOTA1res, sizeof(GETQUOTA1res));
+ pdu = rpc_allocate_pdu(rpc, RQUOTA_PROGRAM, RQUOTA_V2, RQUOTA2_GETQUOTA, cb, private_data, (zdrproc_t)zdr_GETQUOTA1res, sizeof(GETQUOTA1res));
if (pdu == NULL) {
rpc_set_error(rpc, "Out of memory. Failed to allocate pdu for rquota2/getquota call");
return -1;
args.type = type;
args.uid = uid;
- if (xdr_GETQUOTA2args(&pdu->xdr, &args) == 0) {
- rpc_set_error(rpc, "XDR error: Failed to encode GETQUOTA2args");
+ if (zdr_GETQUOTA2args(&pdu->zdr, &args) == 0) {
+ rpc_set_error(rpc, "ZDR error: Failed to encode GETQUOTA2args");
rpc_free_pdu(rpc, pdu);
return -2;
}
struct rpc_pdu *pdu;
GETQUOTA2args args;
- pdu = rpc_allocate_pdu(rpc, RQUOTA_PROGRAM, RQUOTA_V2, RQUOTA2_GETACTIVEQUOTA, cb, private_data, (xdrproc_t)xdr_GETQUOTA1res, sizeof(GETQUOTA1res));
+ pdu = rpc_allocate_pdu(rpc, RQUOTA_PROGRAM, RQUOTA_V2, RQUOTA2_GETACTIVEQUOTA, cb, private_data, (zdrproc_t)zdr_GETQUOTA1res, sizeof(GETQUOTA1res));
if (pdu == NULL) {
rpc_set_error(rpc, "Out of memory. Failed to allocate pdu for rquota2/getactivequota call");
return -1;
args.type = type;
args.uid = uid;
- if (xdr_GETQUOTA2args(&pdu->xdr, &args) == 0) {
- rpc_set_error(rpc, "XDR error: Failed to encode GETQUOTA2args");
+ if (zdr_GETQUOTA2args(&pdu->zdr, &args) == 0) {
+ rpc_set_error(rpc, "ZDR error: Failed to encode GETQUOTA2args");
rpc_free_pdu(rpc, pdu);
return -2;
}