clntudp_bufcreate - Linux


Overview

clntudp_bufcreate allocates a send and receive buffer pair that is automatically freed when the RPC call completes.

Syntax

clntudp_bufcreate(rpcb, prog, vers, proc, xdrargs, argsp, xdrres, resp)

Options/Flags

| Option | Description |
|—|—|
| rpcb | The RPC binding handle |
| prog | The RPC program number |
| vers | The RPC program version number |
| proc | The RPC procedure number |
| xdrargs | The XDR representation of the RPC arguments |
| argsp | The RPC arguments |
| xdrres | The XDR representation of the RPC results |
| resp | The RPC results |

Examples

# Create a TCP/IP RPC client
client = clntudp_create(remotehost, prognum, versnum, procnum, xdrargs, argsp)
# Create a send buffer for a UDP RPC call
sndbuf = clntudp_bufcreate(client, prog, vers, proc, xdrargs, argsp)

Common Issues

  • Error creating client: Ensure that the RPC program number, version number, and procedure number are valid.
  • Error creating send buffer: Ensure that the XDR representation of the RPC arguments is valid.

Integration

clntudp_bufcreate can be used with other RPC library functions to create and execute RPC calls over UDP.

Related Commands