def pack_call(xid, prog, vers, proc, cred=NULL_AUTH, verf=NULL_AUTH): """Packs an RPC call message; returns an xdrlib.Packer that the caller can use to add more data, e.g., the call arguments. """ msg = RPCProto.rpc_msg() msg.xid = xid msg.body = RPCProto.body_t() msg.body.mtype = RPCProto.CALL msg.body.cbody = RPCProto.call_body() msg.body.cbody.rpcvers = RPCProto.RPC_VERSION msg.body.cbody.prog = prog msg.body.cbody.vers = vers msg.body.cbody.proc = proc msg.body.cbody.cred = cred msg.body.cbody.verf = verf p = Packer() RPCProto.pack_rpc_msg(p, msg) return p