mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 05:02:12 +00:00
1accad5e74
Based on the normalized pattern: netapp provides this source code under the gpl v2 license the gpl v2 license is available at https://opensource org/licenses/gpl-license php this software is provided by the copyright holders and contributors as is and any express or implied warranties including but not limited to the implied warranties of merchantability and fitness for a particular purpose are disclaimed in no event shall the copyright owner or contributors be liable for any direct indirect incidental special exemplary or consequential damages (including but not limited to procurement of substitute goods or services loss of use data or profits or business interruption) however caused and on any theory of liability whether in contract strict liability or tort (including negligence or otherwise) arising in any way out of the use of this software even if advised of the possibility of such damage extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference. Reviewed-by: Allison Randal <allison@lohutok.net> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
43 lines
927 B
C
43 lines
927 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/******************************************************************************
|
|
|
|
(c) 2008 NetApp. All Rights Reserved.
|
|
|
|
|
|
******************************************************************************/
|
|
|
|
/*
|
|
* Functions and macros used internally by RPC
|
|
*/
|
|
|
|
#ifndef _NET_SUNRPC_SUNRPC_H
|
|
#define _NET_SUNRPC_SUNRPC_H
|
|
|
|
#include <linux/net.h>
|
|
|
|
/*
|
|
* Header for dynamically allocated rpc buffers.
|
|
*/
|
|
struct rpc_buffer {
|
|
size_t len;
|
|
char data[];
|
|
};
|
|
|
|
static inline int sock_is_loopback(struct sock *sk)
|
|
{
|
|
struct dst_entry *dst;
|
|
int loopback = 0;
|
|
rcu_read_lock();
|
|
dst = rcu_dereference(sk->sk_dst_cache);
|
|
if (dst && dst->dev &&
|
|
(dst->dev->features & NETIF_F_LOOPBACK))
|
|
loopback = 1;
|
|
rcu_read_unlock();
|
|
return loopback;
|
|
}
|
|
|
|
int rpc_clients_notifier_register(void);
|
|
void rpc_clients_notifier_unregister(void);
|
|
void auth_domain_cleanup(void);
|
|
#endif /* _NET_SUNRPC_SUNRPC_H */
|