aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_diag.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@ghostprotocols.net>2005-08-09 23:09:46 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2005-08-29 18:42:18 -0400
commite48c414ee61f4ac8d5cff2973e66a7cbc8a93aa5 (patch)
treec4656efe48b75adf5742514c3e4286007f20bdca /net/ipv4/tcp_diag.c
parent8feaf0c0a5488b3d898a9c207eb6678f44ba3f26 (diff)
[INET]: Generalise the TCP sock ID lookup routines
And also some TIME_WAIT functions. [acme@toy net-2.6.14]$ grep built-in /tmp/before.size /tmp/after.size /tmp/before.size: 282955 13122 9312 305389 4a8ed net/ipv4/built-in.o /tmp/after.size: 281566 13122 9312 304000 4a380 net/ipv4/built-in.o [acme@toy net-2.6.14]$ I kept them still inlined, will uninline at some point to see what would be the performance difference. Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_diag.c')
-rw-r--r--net/ipv4/tcp_diag.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/net/ipv4/tcp_diag.c b/net/ipv4/tcp_diag.c
index 6f2d6f2276b9..60c6a797cc50 100644
--- a/net/ipv4/tcp_diag.c
+++ b/net/ipv4/tcp_diag.c
@@ -174,8 +174,6 @@ nlmsg_failure:
174 return -1; 174 return -1;
175} 175}
176 176
177extern struct sock *tcp_v4_lookup(u32 saddr, u16 sport, u32 daddr, u16 dport,
178 int dif);
179#ifdef CONFIG_IP_TCPDIAG_IPV6 177#ifdef CONFIG_IP_TCPDIAG_IPV6
180extern struct sock *tcp_v6_lookup(struct in6_addr *saddr, u16 sport, 178extern struct sock *tcp_v6_lookup(struct in6_addr *saddr, u16 sport,
181 struct in6_addr *daddr, u16 dport, 179 struct in6_addr *daddr, u16 dport,
@@ -197,9 +195,9 @@ static int tcpdiag_get_exact(struct sk_buff *in_skb, const struct nlmsghdr *nlh)
197 struct sk_buff *rep; 195 struct sk_buff *rep;
198 196
199 if (req->tcpdiag_family == AF_INET) { 197 if (req->tcpdiag_family == AF_INET) {
200 sk = tcp_v4_lookup(req->id.tcpdiag_dst[0], req->id.tcpdiag_dport, 198 sk = inet_lookup(&tcp_hashinfo, req->id.tcpdiag_dst[0],
201 req->id.tcpdiag_src[0], req->id.tcpdiag_sport, 199 req->id.tcpdiag_dport, req->id.tcpdiag_src[0],
202 req->id.tcpdiag_if); 200 req->id.tcpdiag_sport, req->id.tcpdiag_if);
203 } 201 }
204#ifdef CONFIG_IP_TCPDIAG_IPV6 202#ifdef CONFIG_IP_TCPDIAG_IPV6
205 else if (req->tcpdiag_family == AF_INET6) { 203 else if (req->tcpdiag_family == AF_INET6) {