17 #include <linux/compiler.h>
18 #include <linux/dccp.h>
19 #include <linux/list.h>
20 #include <linux/module.h>
24 #define CCID_SLAB_NAME_LENGTH 32
82 const int optname,
int len,
86 const int optname,
int len,
92 #ifdef CONFIG_IP_DCCP_CCID3
104 static inline void *ccid_priv(
const struct ccid *
ccid)
112 char __user *,
int __user *);
116 static inline int ccid_get_current_rx_ccid(
struct dccp_sock *
dp)
125 static inline int ccid_get_current_tx_ccid(
struct dccp_sock *dp)
155 static inline int ccid_packet_dequeue_eval(
const int return_code)
159 if (return_code == 0)
166 static inline int ccid_hc_tx_send_packet(
struct ccid *ccid,
struct sock *
sk,
170 return ccid->
ccid_ops->ccid_hc_tx_send_packet(sk, skb);
174 static inline void ccid_hc_tx_packet_sent(
struct ccid *ccid,
struct sock *sk,
178 ccid->
ccid_ops->ccid_hc_tx_packet_sent(sk, len);
181 static inline void ccid_hc_rx_packet_recv(
struct ccid *ccid,
struct sock *sk,
185 ccid->
ccid_ops->ccid_hc_rx_packet_recv(sk, skb);
188 static inline void ccid_hc_tx_packet_recv(
struct ccid *ccid,
struct sock *sk,
192 ccid->
ccid_ops->ccid_hc_tx_packet_recv(sk, skb);
202 static inline int ccid_hc_tx_parse_options(
struct ccid *ccid,
struct sock *sk,
207 return ccid->
ccid_ops->ccid_hc_tx_parse_options(sk, pkt, opt, val, len);
214 static inline int ccid_hc_rx_parse_options(
struct ccid *ccid,
struct sock *sk,
219 return ccid->
ccid_ops->ccid_hc_rx_parse_options(sk, pkt, opt, val, len);
222 static inline int ccid_hc_rx_insert_options(
struct ccid *ccid,
struct sock *sk,
226 return ccid->
ccid_ops->ccid_hc_rx_insert_options(sk, skb);
230 static inline void ccid_hc_rx_get_info(
struct ccid *ccid,
struct sock *sk,
234 ccid->
ccid_ops->ccid_hc_rx_get_info(sk, info);
237 static inline void ccid_hc_tx_get_info(
struct ccid *ccid,
struct sock *sk,
241 ccid->
ccid_ops->ccid_hc_tx_get_info(sk, info);
244 static inline int ccid_hc_rx_getsockopt(
struct ccid *ccid,
struct sock *sk,
245 const int optname,
int len,
246 u32 __user *optval,
int __user *optlen)
250 rc = ccid->
ccid_ops->ccid_hc_rx_getsockopt(sk, optname, len,
255 static inline int ccid_hc_tx_getsockopt(
struct ccid *ccid,
struct sock *sk,
256 const int optname,
int len,
257 u32 __user *optval,
int __user *optlen)
261 rc = ccid->
ccid_ops->ccid_hc_tx_getsockopt(sk, optname, len,