aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/ccid.h
diff options
context:
space:
mode:
Diffstat (limited to 'net/dccp/ccid.h')
-rw-r--r--net/dccp/ccid.h26
1 files changed, 22 insertions, 4 deletions
diff --git a/net/dccp/ccid.h b/net/dccp/ccid.h
index fdeae7b57319..18f69423a708 100644
--- a/net/dccp/ccid.h
+++ b/net/dccp/ccid.h
@@ -103,13 +103,31 @@ static inline void *ccid_priv(const struct ccid *ccid)
103 return (void *)ccid->ccid_priv; 103 return (void *)ccid->ccid_priv;
104} 104}
105 105
106extern bool ccid_support_check(u8 const *ccid_array, u8 array_len);
107extern int ccid_get_builtin_ccids(u8 **ccid_array, u8 *array_len);
108extern int ccid_getsockopt_builtin_ccids(struct sock *sk, int len,
109 char __user *, int __user *);
110
106extern struct ccid *ccid_new(unsigned char id, struct sock *sk, int rx, 111extern struct ccid *ccid_new(unsigned char id, struct sock *sk, int rx,
107 gfp_t gfp); 112 gfp_t gfp);
108 113
109extern struct ccid *ccid_hc_rx_new(unsigned char id, struct sock *sk, 114static inline int ccid_get_current_rx_ccid(struct dccp_sock *dp)
110 gfp_t gfp); 115{
111extern struct ccid *ccid_hc_tx_new(unsigned char id, struct sock *sk, 116 struct ccid *ccid = dp->dccps_hc_rx_ccid;
112 gfp_t gfp); 117
118 if (ccid == NULL || ccid->ccid_ops == NULL)
119 return -1;
120 return ccid->ccid_ops->ccid_id;
121}
122
123static inline int ccid_get_current_tx_ccid(struct dccp_sock *dp)
124{
125 struct ccid *ccid = dp->dccps_hc_tx_ccid;
126
127 if (ccid == NULL || ccid->ccid_ops == NULL)
128 return -1;
129 return ccid->ccid_ops->ccid_id;
130}
113 131
114extern void ccid_hc_rx_delete(struct ccid *ccid, struct sock *sk); 132extern void ccid_hc_rx_delete(struct ccid *ccid, struct sock *sk);
115extern void ccid_hc_tx_delete(struct ccid *ccid, struct sock *sk); 133extern void ccid_hc_tx_delete(struct ccid *ccid, struct sock *sk);