]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/net/request_sock.h
m68k: Kill CONFIG_WHIPPET_SERIAL
[linux-2.6-omap-h63xx.git] / include / net / request_sock.h
index f743a941a4f243d618fcb55c76d7f71b750a5669..b220b5f624de2cb97c60ba5c9453633f8d24be8c 100644 (file)
@@ -28,14 +28,14 @@ struct proto;
 
 struct request_sock_ops {
        int             family;
-       kmem_cache_t    *slab;
        int             obj_size;
+       struct kmem_cache       *slab;
        int             (*rtx_syn_ack)(struct sock *sk,
-                                      struct request_sock *req,
-                                      struct dst_entry *dst);
+                                      struct request_sock *req);
        void            (*send_ack)(struct sk_buff *skb,
                                    struct request_sock *req);
-       void            (*send_reset)(struct sk_buff *skb);
+       void            (*send_reset)(struct sock *sk,
+                                     struct sk_buff *skb);
        void            (*destructor)(struct request_sock *req);
 };
 
@@ -45,21 +45,21 @@ struct request_sock {
        struct request_sock             *dl_next; /* Must be first member! */
        u16                             mss;
        u8                              retrans;
-       u8                              __pad;
+       u8                              cookie_ts; /* syncookie: encode tcpopts in timestamp */
        /* The following two fields can be easily recomputed I think -AK */
        u32                             window_clamp; /* window clamp at creation time */
        u32                             rcv_wnd;          /* rcv_wnd offered first time */
        u32                             ts_recent;
        unsigned long                   expires;
-       struct request_sock_ops         *rsk_ops;
+       const struct request_sock_ops   *rsk_ops;
        struct sock                     *sk;
        u32                             secid;
        u32                             peer_secid;
 };
 
-static inline struct request_sock *reqsk_alloc(struct request_sock_ops *ops)
+static inline struct request_sock *reqsk_alloc(const struct request_sock_ops *ops)
 {
-       struct request_sock *req = kmem_cache_alloc(ops->slab, SLAB_ATOMIC);
+       struct request_sock *req = kmem_cache_alloc(ops->slab, GFP_ATOMIC);
 
        if (req != NULL)
                req->rsk_ops = ops;
@@ -115,31 +115,15 @@ struct request_sock_queue {
        struct request_sock     *rskq_accept_head;
        struct request_sock     *rskq_accept_tail;
        rwlock_t                syn_wait_lock;
-       u                     rskq_defer_accept;
-       /* 3 bytes hole, try to pack */
+       u16                     rskq_defer_accept;
+       /* 2 bytes hole, try to pack */
        struct listen_sock      *listen_opt;
 };
 
 extern int reqsk_queue_alloc(struct request_sock_queue *queue,
-                            const int nr_table_entries);
-
-static inline struct listen_sock *reqsk_queue_yank_listen_sk(struct request_sock_queue *queue)
-{
-       struct listen_sock *lopt;
-
-       write_lock_bh(&queue->syn_wait_lock);
-       lopt = queue->listen_opt;
-       queue->listen_opt = NULL;
-       write_unlock_bh(&queue->syn_wait_lock);
-
-       return lopt;
-}
-
-static inline void __reqsk_queue_destroy(struct request_sock_queue *queue)
-{
-       kfree(reqsk_queue_yank_listen_sk(queue));
-}
+                            unsigned int nr_table_entries);
 
+extern void __reqsk_queue_destroy(struct request_sock_queue *queue);
 extern void reqsk_queue_destroy(struct request_sock_queue *queue);
 
 static inline struct request_sock *