X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=portmap%2Fportmap.c;h=fcfb4cd59e0662711bed8b0ead747149c06b94ac;hb=5245608a6587cf6b5279ffc4fde701d8dce23bf3;hp=16a43dcf0664eead0c548318046b52f8534c8a82;hpb=6c60e2822f0caccc4563a610aac23efe6b23aae9;p=deb_libnfs.git diff --git a/portmap/portmap.c b/portmap/portmap.c index 16a43dc..fcfb4cd 100644 --- a/portmap/portmap.c +++ b/portmap/portmap.c @@ -302,3 +302,22 @@ int rpc_pmap3_dump_async(struct rpc_context *rpc, rpc_cb cb, void *private_data) return 0; } + +int rpc_pmap3_gettime_async(struct rpc_context *rpc, rpc_cb cb, void *private_data) +{ + struct rpc_pdu *pdu; + + pdu = rpc_allocate_pdu(rpc, PMAP_PROGRAM, PMAP_V3, PMAP3_GETTIME, cb, private_data, (zdrproc_t)zdr_int, sizeof(uint32_t)); + if (pdu == NULL) { + rpc_set_error(rpc, "Out of memory. Failed to allocate pdu for PORTMAP3/GETTIME call"); + return -1; + } + + if (rpc_queue_pdu(rpc, pdu) != 0) { + rpc_set_error(rpc, "Failed to queue PORTMAP3/GETTIME pdu"); + rpc_free_pdu(rpc, pdu); + return -1; + } + + return 0; +}