static int ccid3_debug;
-struct dccp_tx_hist *ccid3_tx_hist;
-struct dccp_rx_hist *ccid3_rx_hist;
+static struct dccp_tx_hist *ccid3_tx_hist;
+static struct dccp_rx_hist *ccid3_rx_hist;
static kmem_cache_t *ccid3_loss_interval_hist_slab;
-static inline struct ccid3_loss_interval_hist_entry *ccid3_loss_interval_hist_entry_new(int prio)
+static inline struct ccid3_loss_interval_hist_entry *
+ ccid3_loss_interval_hist_entry_new(const unsigned int __nocast prio)
{
return kmem_cache_alloc(ccid3_loss_interval_hist_slab, prio);
}
* These are integers as per section 8 of RFC3448. We can then divide by 4 *
* when we use it.
*/
-const int ccid3_hc_rx_w[TFRC_RECV_IVAL_F_LENGTH] = { 4, 4, 4, 4, 3, 2, 1, 1, };
+static const int ccid3_hc_rx_w[TFRC_RECV_IVAL_F_LENGTH] = {
+ 4, 4, 4, 4, 3, 2, 1, 1,
+};
/*
* args: fvalue - function value to match
*
* both fvalue and p are multiplied by 1,000,000 to use ints
*/
-u32 calcx_reverse_lookup(u32 fvalue) {
+static u32 calcx_reverse_lookup(u32 fvalue) {
int ctr = 0;
int small;
extern struct sk_buff *dccp_make_response(struct sock *sk,
struct dst_entry *dst,
struct request_sock *req);
+extern struct sk_buff *dccp_make_reset(struct sock *sk,
+ struct dst_entry *dst,
+ enum dccp_reset_codes code);
extern int dccp_connect(struct sock *sk);
extern int dccp_disconnect(struct sock *sk, int flags);
extern int dccp_getsockopt(struct sock *sk, int level, int optname,
- char *optval, int *optlen);
+ char __user *optval, int __user *optlen);
+extern int dccp_setsockopt(struct sock *sk, int level, int optname,
+ char __user *optval, int optlen);
extern int dccp_ioctl(struct sock *sk, int cmd, unsigned long arg);
extern int dccp_sendmsg(struct kiocb *iocb, struct sock *sk,
struct msghdr *msg, size_t size);
extern int dccp_recvmsg(struct kiocb *iocb, struct sock *sk,
struct msghdr *msg, size_t len, int nonblock,
int flags, int *addr_len);
-extern int dccp_setsockopt(struct sock *sk, int level, int optname,
- char *optval, int optlen);
extern void dccp_shutdown(struct sock *sk, int how);
extern int dccp_v4_checksum(const struct sk_buff *skb,
u8 dccpap_buf[0];
};
-extern struct dccp_ackpkts *dccp_ackpkts_alloc(unsigned int len, int priority);
+extern struct dccp_ackpkts *
+ dccp_ackpkts_alloc(unsigned int len,
+ const unsigned int __nocast priority);
extern void dccp_ackpkts_free(struct dccp_ackpkts *ap);
extern int dccp_ackpkts_add(struct dccp_ackpkts *ap, u64 ackno, u8 state);
extern void dccp_ackpkts_check_rcv_ackno(struct dccp_ackpkts *ap,
sock_put(sk);
}
-extern struct sk_buff *dccp_make_reset(struct sock *sk, struct dst_entry *dst,
- enum dccp_reset_codes code);
-
int dccp_v4_send_reset(struct sock *sk, enum dccp_reset_codes code)
{
struct sk_buff *skb;
return &rt->u.dst;
}
-void dccp_v4_ctl_send_reset(struct sk_buff *rxskb)
+static void dccp_v4_ctl_send_reset(struct sk_buff *rxskb)
{
int err;
struct dccp_hdr *rxdh = dccp_hdr(rxskb), *dh;
return 0;
}
-int dccp_v4_destroy_sock(struct sock *sk)
+static int dccp_v4_destroy_sock(struct sock *sk)
{
struct dccp_sock *dp = dccp_sk(sk);
}
}
-struct dccp_ackpkts *dccp_ackpkts_alloc(unsigned int len, int priority)
+struct dccp_ackpkts *dccp_ackpkts_alloc(const unsigned int len,
+ const unsigned int __nocast priority)
{
struct dccp_ackpkts *ap = kmalloc(sizeof(*ap) + len, priority);
dccp_rx_hist_find_data_packet(const struct list_head *list);
static inline struct dccp_tx_hist_entry *
- dccp_tx_hist_entry_new(struct dccp_tx_hist *hist,
- const int prio)
+ dccp_tx_hist_entry_new(struct dccp_tx_hist *hist,
+ const unsigned int __nocast prio)
{
struct dccp_tx_hist_entry *entry = kmem_cache_alloc(hist->dccptxh_slab,
prio);
}
static inline struct dccp_rx_hist_entry *
- dccp_rx_hist_entry_new(struct dccp_rx_hist *hist,
- const u32 ndp,
- const struct sk_buff *skb,
- const int prio)
+ dccp_rx_hist_entry_new(struct dccp_rx_hist *hist,
+ const u32 ndp,
+ const struct sk_buff *skb,
+ const unsigned int __nocast prio)
{
struct dccp_rx_hist_entry *entry = kmem_cache_alloc(hist->dccprxh_slab,
prio);
}
int dccp_setsockopt(struct sock *sk, int level, int optname,
- char *optval, int optlen)
+ char __user *optval, int optlen)
{
dccp_pr_debug("entry\n");
}
int dccp_getsockopt(struct sock *sk, int level, int optname,
- char *optval, int *optlen)
+ char __user *optval, int __user *optlen)
{
dccp_pr_debug("entry\n");
dccp_pr_debug("entry\n");
}
-struct proto_ops inet_dccp_ops = {
+static struct proto_ops inet_dccp_ops = {
.family = PF_INET,
.owner = THIS_MODULE,
.release = inet_release,
module_param(thash_entries, int, 0444);
MODULE_PARM_DESC(thash_entries, "Number of ehash buckets");
+#ifdef CONFIG_IP_DCCP_DEBUG
int dccp_debug;
module_param(dccp_debug, int, 0444);
MODULE_PARM_DESC(dccp_debug, "Enable debug messages");
+#endif
static int __init dccp_init(void)
{