aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/request_sock.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/request_sock.h')
-rw-r--r--include/net/request_sock.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/include/net/request_sock.h b/include/net/request_sock.h
index 8e165ca16bd8..e37baaf2080b 100644
--- a/include/net/request_sock.h
+++ b/include/net/request_sock.h
@@ -28,14 +28,15 @@ struct proto;
28 28
29struct request_sock_ops { 29struct request_sock_ops {
30 int family; 30 int family;
31 kmem_cache_t *slab;
32 int obj_size; 31 int obj_size;
32 kmem_cache_t *slab;
33 int (*rtx_syn_ack)(struct sock *sk, 33 int (*rtx_syn_ack)(struct sock *sk,
34 struct request_sock *req, 34 struct request_sock *req,
35 struct dst_entry *dst); 35 struct dst_entry *dst);
36 void (*send_ack)(struct sk_buff *skb, 36 void (*send_ack)(struct sk_buff *skb,
37 struct request_sock *req); 37 struct request_sock *req);
38 void (*send_reset)(struct sk_buff *skb); 38 void (*send_reset)(struct sock *sk,
39 struct sk_buff *skb);
39 void (*destructor)(struct request_sock *req); 40 void (*destructor)(struct request_sock *req);
40}; 41};
41 42
@@ -51,12 +52,13 @@ struct request_sock {
51 u32 rcv_wnd; /* rcv_wnd offered first time */ 52 u32 rcv_wnd; /* rcv_wnd offered first time */
52 u32 ts_recent; 53 u32 ts_recent;
53 unsigned long expires; 54 unsigned long expires;
54 struct request_sock_ops *rsk_ops; 55 const struct request_sock_ops *rsk_ops;
55 struct sock *sk; 56 struct sock *sk;
56 u32 secid; 57 u32 secid;
58 u32 peer_secid;
57}; 59};
58 60
59static inline struct request_sock *reqsk_alloc(struct request_sock_ops *ops) 61static inline struct request_sock *reqsk_alloc(const struct request_sock_ops *ops)
60{ 62{
61 struct request_sock *req = kmem_cache_alloc(ops->slab, SLAB_ATOMIC); 63 struct request_sock *req = kmem_cache_alloc(ops->slab, SLAB_ATOMIC);
62 64
@@ -120,7 +122,7 @@ struct request_sock_queue {
120}; 122};
121 123
122extern int reqsk_queue_alloc(struct request_sock_queue *queue, 124extern int reqsk_queue_alloc(struct request_sock_queue *queue,
123 const int nr_table_entries); 125 unsigned int nr_table_entries);
124 126
125static inline struct listen_sock *reqsk_queue_yank_listen_sk(struct request_sock_queue *queue) 127static inline struct listen_sock *reqsk_queue_yank_listen_sk(struct request_sock_queue *queue)
126{ 128{