xref: /openbmc/linux/net/sunrpc/sunrpc.h (revision 6951867b9967066eda090f46ad91ce69e0ead611)
155ae1aabSRicardo Labiaga /******************************************************************************
255ae1aabSRicardo Labiaga 
355ae1aabSRicardo Labiaga (c) 2008 NetApp.  All Rights Reserved.
455ae1aabSRicardo Labiaga 
555ae1aabSRicardo Labiaga NetApp provides this source code under the GPL v2 License.
655ae1aabSRicardo Labiaga The GPL v2 license is available at
755ae1aabSRicardo Labiaga http://opensource.org/licenses/gpl-license.php.
855ae1aabSRicardo Labiaga 
955ae1aabSRicardo Labiaga THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1055ae1aabSRicardo Labiaga "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1155ae1aabSRicardo Labiaga LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1255ae1aabSRicardo Labiaga A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
1355ae1aabSRicardo Labiaga CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
1455ae1aabSRicardo Labiaga EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
1555ae1aabSRicardo Labiaga PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
1655ae1aabSRicardo Labiaga PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
1755ae1aabSRicardo Labiaga LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
1855ae1aabSRicardo Labiaga NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
1955ae1aabSRicardo Labiaga SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2055ae1aabSRicardo Labiaga 
2155ae1aabSRicardo Labiaga ******************************************************************************/
2255ae1aabSRicardo Labiaga 
2355ae1aabSRicardo Labiaga /*
2455ae1aabSRicardo Labiaga  * Functions and macros used internally by RPC
2555ae1aabSRicardo Labiaga  */
2655ae1aabSRicardo Labiaga 
2755ae1aabSRicardo Labiaga #ifndef _NET_SUNRPC_SUNRPC_H
2855ae1aabSRicardo Labiaga #define _NET_SUNRPC_SUNRPC_H
2955ae1aabSRicardo Labiaga 
30*6951867bSBenny Halevy #include <linux/net.h>
31*6951867bSBenny Halevy 
32*6951867bSBenny Halevy /*
33*6951867bSBenny Halevy  * Header for dynamically allocated rpc buffers.
34*6951867bSBenny Halevy  */
35*6951867bSBenny Halevy struct rpc_buffer {
36*6951867bSBenny Halevy 	size_t	len;
37*6951867bSBenny Halevy 	char	data[];
38*6951867bSBenny Halevy };
39*6951867bSBenny Halevy 
4055ae1aabSRicardo Labiaga static inline int rpc_reply_expected(struct rpc_task *task)
4155ae1aabSRicardo Labiaga {
4255ae1aabSRicardo Labiaga 	return (task->tk_msg.rpc_proc != NULL) &&
4355ae1aabSRicardo Labiaga 		(task->tk_msg.rpc_proc->p_decode != NULL);
4455ae1aabSRicardo Labiaga }
4555ae1aabSRicardo Labiaga 
4655ae1aabSRicardo Labiaga #endif /* _NET_SUNRPC_SUNRPC_H */
4755ae1aabSRicardo Labiaga 
48