summaryrefslogtreecommitdiff
path: root/net/smc/smc.h
diff options
context:
space:
mode:
Diffstat (limited to 'net/smc/smc.h')
-rw-r--r--net/smc/smc.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/net/smc/smc.h b/net/smc/smc.h
index e87d79867099..5946aaecdebf 100644
--- a/net/smc/smc.h
+++ b/net/smc/smc.h
@@ -28,6 +28,12 @@ enum smc_state { /* possible states of an SMC socket */
struct smc_sock { /* smc sock container */
struct sock sk;
struct socket *clcsock; /* internal tcp socket */
+ struct sockaddr *addr; /* inet connect address */
+ struct smc_sock *listen_smc; /* listen parent */
+ struct work_struct tcp_listen_work;/* handle tcp socket accepts */
+ struct work_struct smc_listen_work;/* prepare new accept socket */
+ struct list_head accept_q; /* sockets to be accepted */
+ spinlock_t accept_q_lock; /* protects accept_q */
bool use_fallback; /* fallback to tcp */
};
@@ -40,4 +46,20 @@ static inline struct smc_sock *smc_sk(const struct sock *sk)
extern u8 local_systemid[SMC_SYSTEMID_LEN]; /* unique system identifier */
+#ifdef CONFIG_XFRM
+static inline bool using_ipsec(struct smc_sock *smc)
+{
+ return (smc->clcsock->sk->sk_policy[0] ||
+ smc->clcsock->sk->sk_policy[1]) ? 1 : 0;
+}
+#else
+static inline bool using_ipsec(struct smc_sock *smc)
+{
+ return 0;
+}
+#endif
+
+int smc_netinfo_by_tcpsk(struct socket *clcsock, __be32 *subnet,
+ u8 *prefix_len);
+
#endif /* __SMC_H */