aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@ghostprotocols.net>2005-06-18 22:47:21 -0700
committerDavid S. Miller <davem@davemloft.net>2005-06-18 22:47:21 -0700
commit60236fdd08b2169045a3bbfc5ffe1576e6c3c17b (patch)
tree4541c682cc72daf560ec516e2b5868089a88b6ea /include
parent2e6599cb899ba4b133f42cbf9d2b1883d2dc583a (diff)
[NET] Rename open_request to request_sock
Ok, this one just renames some stuff to have a better namespace and to dissassociate it from TCP: struct open_request -> struct request_sock tcp_openreq_alloc -> reqsk_alloc tcp_openreq_free -> reqsk_free tcp_openreq_fastfree -> __reqsk_free With this most of the infrastructure closely resembles a struct sock methods subset. Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/ip.h4
-rw-r--r--include/linux/ipv6.h2
-rw-r--r--include/linux/tcp.h6
-rw-r--r--include/net/request_sock.h34
-rw-r--r--include/net/sock.h4
-rw-r--r--include/net/tcp.h30
-rw-r--r--include/net/tcp_ecn.h6
7 files changed, 43 insertions, 43 deletions
diff --git a/include/linux/ip.h b/include/linux/ip.h
index d5b7c907204..31e7cedd9f8 100644
--- a/include/linux/ip.h
+++ b/include/linux/ip.h
@@ -109,7 +109,7 @@ struct ip_options {
#define optlength(opt) (sizeof(struct ip_options) + opt->optlen)
struct inet_request_sock {
- struct open_request req;
+ struct request_sock req;
u32 loc_addr;
u32 rmt_addr;
u16 rmt_port;
@@ -123,7 +123,7 @@ struct inet_request_sock {
struct ip_options *opt;
};
-static inline struct inet_request_sock *inet_rsk(const struct open_request *sk)
+static inline struct inet_request_sock *inet_rsk(const struct request_sock *sk)
{
return (struct inet_request_sock *)sk;
}
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h
index 98acdbf3d44..6fcd6a0ade2 100644
--- a/include/linux/ipv6.h
+++ b/include/linux/ipv6.h
@@ -201,7 +201,7 @@ struct tcp6_request_sock {
int iif;
};
-static inline struct tcp6_request_sock *tcp6_rsk(const struct open_request *sk)
+static inline struct tcp6_request_sock *tcp6_rsk(const struct request_sock *sk)
{
return (struct tcp6_request_sock *)sk;
}
diff --git a/include/linux/tcp.h b/include/linux/tcp.h
index 86771b37b80..fb54292a15a 100644
--- a/include/linux/tcp.h
+++ b/include/linux/tcp.h
@@ -236,7 +236,7 @@ struct tcp_request_sock {
__u32 snt_isn;
};
-static inline struct tcp_request_sock *tcp_rsk(const struct open_request *req)
+static inline struct tcp_request_sock *tcp_rsk(const struct request_sock *req)
{
return (struct tcp_request_sock *)req;
}
@@ -393,8 +393,8 @@ struct tcp_sock {
struct tcp_listen_opt *listen_opt;
/* FIFO of established children */
- struct open_request *accept_queue;
- struct open_request *accept_queue_tail;
+ struct request_sock *accept_queue;
+ struct request_sock *accept_queue_tail;
unsigned int keepalive_time; /* time before keep alive takes place */
unsigned int keepalive_intvl; /* time interval between keep alive probes */
diff --git a/include/net/request_sock.h b/include/net/request_sock.h
index 9502f558793..08a8fd1d161 100644
--- a/include/net/request_sock.h
+++ b/include/net/request_sock.h
@@ -19,28 +19,28 @@
#include <linux/types.h>
#include <net/sock.h>
-struct open_request;
+struct request_sock;
struct sk_buff;
struct dst_entry;
struct proto;
-struct or_calltable {
+struct request_sock_ops {
int family;
kmem_cache_t *slab;
int obj_size;
int (*rtx_syn_ack)(struct sock *sk,
- struct open_request *req,
+ struct request_sock *req,
struct dst_entry *dst);
void (*send_ack)(struct sk_buff *skb,
- struct open_request *req);
+ struct request_sock *req);
void (*send_reset)(struct sk_buff *skb);
- void (*destructor)(struct open_request *req);
+ void (*destructor)(struct request_sock *req);
};
-/* struct open_request - mini sock to represent a connection request
+/* struct request_sock - mini sock to represent a connection request
*/
-struct open_request {
- struct open_request *dl_next; /* Must be first member! */
+struct request_sock {
+ struct request_sock *dl_next; /* Must be first member! */
u16 mss;
u8 retrans;
u8 __pad;
@@ -49,29 +49,29 @@ struct open_request {
u32 rcv_wnd; /* rcv_wnd offered first time */
u32 ts_recent;
unsigned long expires;
- struct or_calltable *class;
+ struct request_sock_ops *rsk_ops;
struct sock *sk;
};
-static inline struct open_request *tcp_openreq_alloc(struct or_calltable *class)
+static inline struct request_sock *reqsk_alloc(struct request_sock_ops *ops)
{
- struct open_request *req = kmem_cache_alloc(class->slab, SLAB_ATOMIC);
+ struct request_sock *req = kmem_cache_alloc(ops->slab, SLAB_ATOMIC);
if (req != NULL)
- req->class = class;
+ req->rsk_ops = ops;
return req;
}
-static inline void tcp_openreq_fastfree(struct open_request *req)
+static inline void __reqsk_free(struct request_sock *req)
{
- kmem_cache_free(req->class->slab, req);
+ kmem_cache_free(req->rsk_ops->slab, req);
}
-static inline void tcp_openreq_free(struct open_request *req)
+static inline void reqsk_free(struct request_sock *req)
{
- req->class->destructor(req);
- tcp_openreq_fastfree(req);
+ req->rsk_ops->destructor(req);
+ __reqsk_free(req);
}
#endif /* _REQUEST_SOCK_H */
diff --git a/include/net/sock.h b/include/net/sock.h
index 6919276af8a..e593af5b1ec 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -484,7 +484,7 @@ extern void sk_stream_kill_queues(struct sock *sk);
extern int sk_wait_data(struct sock *sk, long *timeo);
-struct or_calltable;
+struct request_sock_ops;
/* Networking protocol blocks we attach to sockets.
* socket layer -> transport layer interface
@@ -549,7 +549,7 @@ struct proto {
kmem_cache_t *slab;
unsigned int obj_size;
- struct or_calltable *rsk_prot;
+ struct request_sock_ops *rsk_prot;
struct module *owner;
diff --git a/include/net/tcp.h b/include/net/tcp.h
index d438ba566b8..6663086a5e3 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -641,7 +641,7 @@ struct tcp_func {
struct sock * (*syn_recv_sock) (struct sock *sk,
struct sk_buff *skb,
- struct open_request *req,
+ struct request_sock *req,
struct dst_entry *dst);
int (*remember_stamp) (struct sock *sk);
@@ -785,8 +785,8 @@ extern enum tcp_tw_status tcp_timewait_state_process(struct tcp_tw_bucket *tw,
unsigned len);
extern struct sock * tcp_check_req(struct sock *sk,struct sk_buff *skb,
- struct open_request *req,
- struct open_request **prev);
+ struct request_sock *req,
+ struct request_sock **prev);
extern int tcp_child_process(struct sock *parent,
struct sock *child,
struct sk_buff *skb);
@@ -836,12 +836,12 @@ extern int tcp_v4_conn_request(struct sock *sk,
struct sk_buff *skb);
extern struct sock * tcp_create_openreq_child(struct sock *sk,
- struct open_request *req,
+ struct request_sock *req,
struct sk_buff *skb);
extern struct sock * tcp_v4_syn_recv_sock(struct sock *sk,
struct sk_buff *skb,
- struct open_request *req,
+ struct request_sock *req,
struct dst_entry *dst);
extern int tcp_v4_do_rcv(struct sock *sk,
@@ -855,7 +855,7 @@ extern int tcp_connect(struct sock *sk);
extern struct sk_buff * tcp_make_synack(struct sock *sk,
struct dst_entry *dst,
- struct open_request *req);
+ struct request_sock *req);
extern int tcp_disconnect(struct sock *sk, int flags);
@@ -1683,7 +1683,7 @@ static inline int tcp_full_space(const struct sock *sk)
return tcp_win_from_space(sk->sk_rcvbuf);
}
-static inline void tcp_acceptq_queue(struct sock *sk, struct open_request *req,
+static inline void tcp_acceptq_queue(struct sock *sk, struct request_sock *req,
struct sock *child)
{
struct tcp_sock *tp = tcp_sk(sk);
@@ -1707,11 +1707,11 @@ struct tcp_listen_opt
int qlen_young;
int clock_hand;
u32 hash_rnd;
- struct open_request *syn_table[TCP_SYNQ_HSIZE];
+ struct request_sock *syn_table[TCP_SYNQ_HSIZE];
};
static inline void
-tcp_synq_removed(struct sock *sk, struct open_request *req)
+tcp_synq_removed(struct sock *sk, struct request_sock *req)
{
struct tcp_listen_opt *lopt = tcp_sk(sk)->listen_opt;
@@ -1745,23 +1745,23 @@ static inline int tcp_synq_is_full(struct sock *sk)
return tcp_synq_len(sk) >> tcp_sk(sk)->listen_opt->max_qlen_log;
}
-static inline void tcp_synq_unlink(struct tcp_sock *tp, struct open_request *req,
- struct open_request **prev)
+static inline void tcp_synq_unlink(struct tcp_sock *tp, struct request_sock *req,
+ struct request_sock **prev)
{
write_lock(&tp->syn_wait_lock);
*prev = req->dl_next;
write_unlock(&tp->syn_wait_lock);
}
-static inline void tcp_synq_drop(struct sock *sk, struct open_request *req,
- struct open_request **prev)
+static inline void tcp_synq_drop(struct sock *sk, struct request_sock *req,
+ struct request_sock **prev)
{
tcp_synq_unlink(tcp_sk(sk), req, prev);
tcp_synq_removed(sk, req);
- tcp_openreq_free(req);
+ reqsk_free(req);
}
-static __inline__ void tcp_openreq_init(struct open_request *req,
+static __inline__ void tcp_openreq_init(struct request_sock *req,
struct tcp_options_received *rx_opt,
struct sk_buff *skb)
{
diff --git a/include/net/tcp_ecn.h b/include/net/tcp_ecn.h
index 94ad970e844..64980ee8c92 100644
--- a/include/net/tcp_ecn.h
+++ b/include/net/tcp_ecn.h
@@ -39,7 +39,7 @@ static inline void TCP_ECN_send_syn(struct sock *sk, struct tcp_sock *tp,
}
static __inline__ void
-TCP_ECN_make_synack(struct open_request *req, struct tcphdr *th)
+TCP_ECN_make_synack(struct request_sock *req, struct tcphdr *th)
{
if (inet_rsk(req)->ecn_ok)
th->ece = 1;
@@ -112,13 +112,13 @@ static inline int TCP_ECN_rcv_ecn_echo(struct tcp_sock *tp, struct tcphdr *th)
}
static inline void TCP_ECN_openreq_child(struct tcp_sock *tp,
- struct open_request *req)
+ struct request_sock *req)
{
tp->ecn_flags = inet_rsk(req)->ecn_ok ? TCP_ECN_OK : 0;
}
static __inline__ void
-TCP_ECN_create_request(struct open_request *req, struct tcphdr *th)
+TCP_ECN_create_request(struct request_sock *req, struct tcphdr *th)
{
if (sysctl_tcp_ecn && th->ece && th->cwr)
inet_rsk(req)->ecn_ok = 1;