2 * NET Generic infrastructure for Network protocols.
4 * Definitions for request_sock
6 * Authors: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
8 * From code originally in include/net/tcp.h
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License
12 * as published by the Free Software Foundation; either version
13 * 2 of the License, or (at your option) any later version.
15 #ifndef _REQUEST_SOCK_H
16 #define _REQUEST_SOCK_H
18 #include <linux/slab.h>
19 #include <linux/types.h>
31 int (*rtx_syn_ack)(struct sock *sk,
32 struct open_request *req,
33 struct dst_entry *dst);
34 void (*send_ack)(struct sk_buff *skb,
35 struct open_request *req);
36 void (*send_reset)(struct sk_buff *skb);
37 void (*destructor)(struct open_request *req);
40 /* struct open_request - mini sock to represent a connection request
43 struct open_request *dl_next; /* Must be first member! */
47 /* The following two fields can be easily recomputed I think -AK */
48 u32 window_clamp; /* window clamp at creation time */
49 u32 rcv_wnd; /* rcv_wnd offered first time */
51 unsigned long expires;
52 struct or_calltable *class;
56 static inline struct open_request *tcp_openreq_alloc(struct or_calltable *class)
58 struct open_request *req = kmem_cache_alloc(class->slab, SLAB_ATOMIC);
66 static inline void tcp_openreq_fastfree(struct open_request *req)
68 kmem_cache_free(req->class->slab, req);
71 static inline void tcp_openreq_free(struct open_request *req)
73 req->class->destructor(req);
74 tcp_openreq_fastfree(req);
77 #endif /* _REQUEST_SOCK_H */