1 /* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */ 2 3 #ifndef RXE_NS_H 4 #define RXE_NS_H 5 6 struct sock *rxe_ns_pernet_sk4(struct net *net); 7 void rxe_ns_pernet_set_sk4(struct net *net, struct sock *sk); 8 9 #if IS_ENABLED(CONFIG_IPV6) 10 void rxe_ns_pernet_set_sk6(struct net *net, struct sock *sk); 11 struct sock *rxe_ns_pernet_sk6(struct net *net); 12 #else /* IPv6 */ 13 static inline struct sock *rxe_ns_pernet_sk6(struct net *net) 14 { 15 return NULL; 16 } 17 18 static inline void rxe_ns_pernet_set_sk6(struct net *net, struct sock *sk) 19 { 20 } 21 #endif /* IPv6 */ 22 23 int rxe_namespace_init(void); 24 void rxe_namespace_exit(void); 25 26 #endif /* RXE_NS_H */ 27