Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /******************************************************************************
0003 
0004 (c) 2008 NetApp.  All Rights Reserved.
0005 
0006 
0007 ******************************************************************************/
0008 
0009 /*
0010  * Functions and macros used internally by RPC
0011  */
0012 
0013 #ifndef _NET_SUNRPC_SUNRPC_H
0014 #define _NET_SUNRPC_SUNRPC_H
0015 
0016 #include <linux/net.h>
0017 
0018 /*
0019  * Header for dynamically allocated rpc buffers.
0020  */
0021 struct rpc_buffer {
0022     size_t  len;
0023     char    data[];
0024 };
0025 
0026 static inline int sock_is_loopback(struct sock *sk)
0027 {
0028     struct dst_entry *dst;
0029     int loopback = 0;
0030     rcu_read_lock();
0031     dst = rcu_dereference(sk->sk_dst_cache);
0032     if (dst && dst->dev &&
0033         (dst->dev->features & NETIF_F_LOOPBACK))
0034         loopback = 1;
0035     rcu_read_unlock();
0036     return loopback;
0037 }
0038 
0039 int rpc_clients_notifier_register(void);
0040 void rpc_clients_notifier_unregister(void);
0041 void auth_domain_cleanup(void);
0042 #endif /* _NET_SUNRPC_SUNRPC_H */