diff options
author | Ursula Braun <ubraun@linux.vnet.ibm.com> | 2017-01-09 10:55:16 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-01-09 16:07:39 -0500 |
commit | a046d57da19f812216f393e7c535f5858f793ac3 (patch) | |
tree | 9b3c535ff6cd3da3cf06b3164cd727839df25f38 /net/smc/smc.h | |
parent | 6812baabf24d5c299c13223366a23c269408f4d0 (diff) |
smc: CLC handshake (incl. preparation steps)
* CLC (Connection Layer Control) handshake
Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/smc/smc.h')
-rw-r--r-- | net/smc/smc.h | 22 |
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 */ | |||
28 | struct smc_sock { /* smc sock container */ | 28 | struct smc_sock { /* smc sock container */ |
29 | struct sock sk; | 29 | struct sock sk; |
30 | struct socket *clcsock; /* internal tcp socket */ | 30 | struct socket *clcsock; /* internal tcp socket */ |
31 | struct sockaddr *addr; /* inet connect address */ | ||
32 | struct smc_sock *listen_smc; /* listen parent */ | ||
33 | struct work_struct tcp_listen_work;/* handle tcp socket accepts */ | ||
34 | struct work_struct smc_listen_work;/* prepare new accept socket */ | ||
35 | struct list_head accept_q; /* sockets to be accepted */ | ||
36 | spinlock_t accept_q_lock; /* protects accept_q */ | ||
31 | bool use_fallback; /* fallback to tcp */ | 37 | bool use_fallback; /* fallback to tcp */ |
32 | }; | 38 | }; |
33 | 39 | ||
@@ -40,4 +46,20 @@ static inline struct smc_sock *smc_sk(const struct sock *sk) | |||
40 | 46 | ||
41 | extern u8 local_systemid[SMC_SYSTEMID_LEN]; /* unique system identifier */ | 47 | extern u8 local_systemid[SMC_SYSTEMID_LEN]; /* unique system identifier */ |
42 | 48 | ||
49 | #ifdef CONFIG_XFRM | ||
50 | static inline bool using_ipsec(struct smc_sock *smc) | ||
51 | { | ||
52 | return (smc->clcsock->sk->sk_policy[0] || | ||
53 | smc->clcsock->sk->sk_policy[1]) ? 1 : 0; | ||
54 | } | ||
55 | #else | ||
56 | static inline bool using_ipsec(struct smc_sock *smc) | ||
57 | { | ||
58 | return 0; | ||
59 | } | ||
60 | #endif | ||
61 | |||
62 | int smc_netinfo_by_tcpsk(struct socket *clcsock, __be32 *subnet, | ||
63 | u8 *prefix_len); | ||
64 | |||
43 | #endif /* __SMC_H */ | 65 | #endif /* __SMC_H */ |