Linux Audio

Check our new training course

Loading...
v6.8
 1/* SPDX-License-Identifier: GPL-2.0-only */
 2/******************************************************************************
 3
 4(c) 2008 NetApp.  All Rights Reserved.
 5
 6
 7******************************************************************************/
 8
 9/*
10 * Functions and macros used internally by RPC
11 */
12
13#ifndef _NET_SUNRPC_SUNRPC_H
14#define _NET_SUNRPC_SUNRPC_H
15
16#include <linux/net.h>
17
18/*
19 * Header for dynamically allocated rpc buffers.
20 */
21struct rpc_buffer {
22	size_t	len;
23	char	data[];
24};
25
26static inline int sock_is_loopback(struct sock *sk)
27{
28	struct dst_entry *dst;
29	int loopback = 0;
30	rcu_read_lock();
31	dst = rcu_dereference(sk->sk_dst_cache);
32	if (dst && dst->dev &&
33	    (dst->dev->features & NETIF_F_LOOPBACK))
34		loopback = 1;
35	rcu_read_unlock();
36	return loopback;
37}
38
 
 
39int rpc_clients_notifier_register(void);
40void rpc_clients_notifier_unregister(void);
41void auth_domain_cleanup(void);
 
 
42#endif /* _NET_SUNRPC_SUNRPC_H */
v6.13.7
 1/* SPDX-License-Identifier: GPL-2.0-only */
 2/******************************************************************************
 3
 4(c) 2008 NetApp.  All Rights Reserved.
 5
 6
 7******************************************************************************/
 8
 9/*
10 * Functions and macros used internally by RPC
11 */
12
13#ifndef _NET_SUNRPC_SUNRPC_H
14#define _NET_SUNRPC_SUNRPC_H
15
16#include <linux/net.h>
17
18/*
19 * Header for dynamically allocated rpc buffers.
20 */
21struct rpc_buffer {
22	size_t	len;
23	char	data[];
24};
25
26static inline int sock_is_loopback(struct sock *sk)
27{
28	struct dst_entry *dst;
29	int loopback = 0;
30	rcu_read_lock();
31	dst = rcu_dereference(sk->sk_dst_cache);
32	if (dst && dst->dev &&
33	    (dst->dev->features & NETIF_F_LOOPBACK))
34		loopback = 1;
35	rcu_read_unlock();
36	return loopback;
37}
38
39struct svc_serv;
40struct svc_rqst;
41int rpc_clients_notifier_register(void);
42void rpc_clients_notifier_unregister(void);
43void auth_domain_cleanup(void);
44void svc_sock_update_bufs(struct svc_serv *serv);
45enum svc_auth_status svc_authenticate(struct svc_rqst *rqstp);
46#endif /* _NET_SUNRPC_SUNRPC_H */