diff options
author | Eric Dumazet <edumazet@google.com> | 2013-10-02 15:29:50 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-10-03 23:33:35 +0400 |
commit | 5080546682bae3d32734b18e281091684f0ebbe4 (patch) | |
tree | d83649361f75e4d053acfc1ac986dec5f273b4e4 /include/net/inet_timewait_sock.h | |
parent | 7b4371ea48f03d3ac56df44f573e314f5b06939e (diff) | |
download | linux-5080546682bae3d32734b18e281091684f0ebbe4.tar.xz |
inet: consolidate INET_TW_MATCH
TCP listener refactoring, part 2 :
We can use a generic lookup, sockets being in whatever state, if
we are sure all relevant fields are at the same place in all socket
types (ESTABLISH, TIME_WAIT, SYN_RECV)
This patch removes these macros :
inet_addrpair, inet_addrpair, tw_addrpair, tw_portpair
And adds :
sk_portpair, sk_addrpair, sk_daddr, sk_rcv_saddr
Then, INET_TW_MATCH() is really the same than INET_MATCH()
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/inet_timewait_sock.h')
-rw-r--r-- | include/net/inet_timewait_sock.h | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/include/net/inet_timewait_sock.h b/include/net/inet_timewait_sock.h index 828200ab1125..48fd3561722c 100644 --- a/include/net/inet_timewait_sock.h +++ b/include/net/inet_timewait_sock.h @@ -112,10 +112,8 @@ struct inet_timewait_sock { #define tw_net __tw_common.skc_net #define tw_daddr __tw_common.skc_daddr #define tw_rcv_saddr __tw_common.skc_rcv_saddr -#define tw_addrpair __tw_common.skc_addrpair #define tw_dport __tw_common.skc_dport #define tw_num __tw_common.skc_num -#define tw_portpair __tw_common.skc_portpair int tw_timeout; volatile unsigned char tw_substate; @@ -189,12 +187,6 @@ static inline struct inet_timewait_sock *inet_twsk(const struct sock *sk) return (struct inet_timewait_sock *)sk; } -static inline __be32 sk_rcv_saddr(const struct sock *sk) -{ -/* both inet_sk() and inet_twsk() store rcv_saddr in skc_rcv_saddr */ - return sk->__sk_common.skc_rcv_saddr; -} - void inet_twsk_put(struct inet_timewait_sock *tw); int inet_twsk_unhash(struct inet_timewait_sock *tw); |