2022-06-07 14:11:20 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
2009-04-01 13:23:03 +00:00
|
|
|
/******************************************************************************
|
|
|
|
|
|
|
|
(c) 2008 NetApp. All Rights Reserved.
|
|
|
|
|
|
|
|
|
|
|
|
******************************************************************************/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Functions and macros used internally by RPC
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _NET_SUNRPC_SUNRPC_H
|
|
|
|
#define _NET_SUNRPC_SUNRPC_H
|
|
|
|
|
2009-09-10 09:25:04 +00:00
|
|
|
#include <linux/net.h>
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Header for dynamically allocated rpc buffers.
|
|
|
|
*/
|
|
|
|
struct rpc_buffer {
|
|
|
|
size_t len;
|
|
|
|
char data[];
|
|
|
|
};
|
|
|
|
|
2014-05-12 01:22:47 +00:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2012-01-11 15:18:17 +00:00
|
|
|
int rpc_clients_notifier_register(void);
|
|
|
|
void rpc_clients_notifier_unregister(void);
|
2020-05-22 02:01:32 +00:00
|
|
|
void auth_domain_cleanup(void);
|
2009-04-01 13:23:03 +00:00
|
|
|
#endif /* _NET_SUNRPC_SUNRPC_H */
|