summaryrefslogtreecommitdiffstats
path: root/net/dccp/ccids/ccid3.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@mandriva.com>2005-09-09 07:40:58 +0200
committerArnaldo Carvalho de Melo <acme@mandriva.com>2005-09-09 07:40:58 +0200
commit59725dc2a2e86a03bbf97976ede3bdc6f95bba92 (patch)
tree2c529321fc918a7d8c7affddd35227a497e082f0 /net/dccp/ccids/ccid3.h
parent[DCCP] Introduce dccp_timestamp (diff)
downloadlinux-59725dc2a2e86a03bbf97976ede3bdc6f95bba92.tar.xz
linux-59725dc2a2e86a03bbf97976ede3bdc6f95bba92.zip
[CCID3] Introduce ccid3_hc_[rt]x_sk() for overal consistency
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Diffstat (limited to 'net/dccp/ccids/ccid3.h')
-rw-r--r--net/dccp/ccids/ccid3.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/net/dccp/ccids/ccid3.h b/net/dccp/ccids/ccid3.h
index 58be6125b695..d16f00d784f3 100644
--- a/net/dccp/ccids/ccid3.h
+++ b/net/dccp/ccids/ccid3.h
@@ -128,10 +128,14 @@ struct ccid3_hc_rx_sock {
u32 ccid3hcrx_x_recv;
};
-#define ccid3_hc_tx_field(s,field) (s->dccps_hc_tx_ccid_private == NULL ? 0 : \
- ((struct ccid3_hc_tx_sock *)s->dccps_hc_tx_ccid_private)->ccid3hctx_##field)
+static inline struct ccid3_hc_tx_sock *ccid3_hc_tx_sk(const struct sock *sk)
+{
+ return dccp_sk(sk)->dccps_hc_tx_ccid_private;
+}
-#define ccid3_hc_rx_field(s,field) (s->dccps_hc_rx_ccid_private == NULL ? 0 : \
- ((struct ccid3_hc_rx_sock *)s->dccps_hc_rx_ccid_private)->ccid3hcrx_##field)
+static inline struct ccid3_hc_rx_sock *ccid3_hc_rx_sk(const struct sock *sk)
+{
+ return dccp_sk(sk)->dccps_hc_rx_ccid_private;
+}
#endif /* _DCCP_CCID3_H_ */