1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>rpc_switch_client_transport</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Linux Networking and Network Devices APIs"><link rel="up" href="ch01s05.html" title="SUN RPC subsystem"><link rel="prev" href="API-rpc-clone-client-set-auth.html" title="rpc_clone_client_set_auth"><link rel="next" href="API-rpc-bind-new-program.html" title="rpc_bind_new_program"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span class="phrase">rpc_switch_client_transport</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-rpc-clone-client-set-auth.html">Prev</a> </td><th width="60%" align="center">SUN RPC subsystem</th><td width="20%" align="right"> <a accesskey="n" href="API-rpc-bind-new-program.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-rpc-switch-client-transport"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>rpc_switch_client_transport — 2 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">rpc_switch_client_transport </b>(</code></td><td>struct rpc_clnt * <var class="pdparam">clnt</var>, </td></tr><tr><td> </td><td>struct xprt_create * <var class="pdparam">args</var>, </td></tr><tr><td> </td><td>const struct rpc_timeout * <var class="pdparam">timeout</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idp1097418340"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>clnt</code></em></span></dt><dd><p> 3 pointer to a struct rpc_clnt 4 </p></dd><dt><span class="term"><em class="parameter"><code>args</code></em></span></dt><dd><p> 5 pointer to the new transport arguments 6 </p></dd><dt><span class="term"><em class="parameter"><code>timeout</code></em></span></dt><dd><p> 7 pointer to the new timeout parameters 8 </p></dd></dl></div></div><div class="refsect1"><a name="idp1097422044"></a><h2>Description</h2><p> 9 This function allows the caller to switch the RPC transport for the 10 rpc_clnt structure 'clnt' to allow it to connect to a mirrored NFS 11 server, for instance. It assumes that the caller has ensured that 12 there are no active RPC tasks by using some form of locking. 13 </p><p> 14 15 Returns zero if <span class="quote">“<span class="quote">clnt</span>”</span> is now using the new xprt. Otherwise a 16 negative errno is returned, and <span class="quote">“<span class="quote">clnt</span>”</span> continues to use the old 17 xprt. 18</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-rpc-clone-client-set-auth.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch01s05.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-rpc-bind-new-program.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">rpc_clone_client_set_auth</span> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <span class="phrase">rpc_bind_new_program</span></td></tr></table></div></body></html> 19