summaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@mandriva.com>2005-08-12 12:56:38 -0300
committerDavid S. Miller <davem@sunset.davemloft.net>2005-08-29 15:57:48 -0700
commita8c2190ee7da1a1dc68ff1a6b5f03feb61e523a5 (patch)
tree30ab4f0cb01c493249a858ce315a1847a8c2e65f /net/ipv4
parent73c1f4a033675f168df7e98bbeeafca3c644b8a6 (diff)
downloadop-kernel-dev-a8c2190ee7da1a1dc68ff1a6b5f03feb61e523a5.zip
op-kernel-dev-a8c2190ee7da1a1dc68ff1a6b5f03feb61e523a5.tar.gz
[INET_DIAG]: Rename tcp_diag.[ch] to inet_diag.[ch]
Next changeset will introduce net/ipv4/tcp_diag.c, moving the code that was put transitioanlly in inet_diag.c. Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/Makefile2
-rw-r--r--net/ipv4/inet_diag.c (renamed from net/ipv4/tcp_diag.c)23
-rw-r--r--net/ipv4/tcp_vegas.c2
-rw-r--r--net/ipv4/tcp_westwood.c2
4 files changed, 15 insertions, 14 deletions
diff --git a/net/ipv4/Makefile b/net/ipv4/Makefile
index 9b1c894..fe5accb 100644
--- a/net/ipv4/Makefile
+++ b/net/ipv4/Makefile
@@ -30,7 +30,7 @@ obj-$(CONFIG_IP_ROUTE_MULTIPATH_WRANDOM) += multipath_wrandom.o
obj-$(CONFIG_IP_ROUTE_MULTIPATH_DRR) += multipath_drr.o
obj-$(CONFIG_NETFILTER) += netfilter/
obj-$(CONFIG_IP_VS) += ipvs/
-obj-$(CONFIG_IP_INET_DIAG) += tcp_diag.o
+obj-$(CONFIG_IP_INET_DIAG) += inet_diag.o
obj-$(CONFIG_IP_ROUTE_MULTIPATH_CACHED) += multipath.o
obj-$(CONFIG_TCP_CONG_BIC) += tcp_bic.o
obj-$(CONFIG_TCP_CONG_WESTWOOD) += tcp_westwood.o
diff --git a/net/ipv4/tcp_diag.c b/net/ipv4/inet_diag.c
index 24abe82..3bd5109 100644
--- a/net/ipv4/tcp_diag.c
+++ b/net/ipv4/inet_diag.c
@@ -32,7 +32,7 @@
#include <linux/inet.h>
#include <linux/stddef.h>
-#include <linux/tcp_diag.h>
+#include <linux/inet_diag.h>
static const struct inet_diag_handler **inet_diag_table;
@@ -140,7 +140,7 @@ static int inet_diag_fill(struct sk_buff *skb, struct sock *sk,
}
#endif
-#define EXPIRES_IN_MS(tmo) ((tmo-jiffies)*1000+HZ-1)/HZ
+#define EXPIRES_IN_MS(tmo) ((tmo - jiffies) * 1000 + HZ - 1) / HZ
if (icsk->icsk_pending == ICSK_TIME_RETRANS) {
r->idiag_timer = 1;
@@ -311,11 +311,11 @@ static int inet_diag_bc_run(const void *bc, int len,
yes = !(entry->userlocks & SOCK_BINDPORT_LOCK);
break;
case INET_DIAG_BC_S_COND:
- case INET_DIAG_BC_D_COND:
- {
- struct inet_diag_hostcond *cond = (struct inet_diag_hostcond*)(op+1);
+ case INET_DIAG_BC_D_COND: {
+ struct inet_diag_hostcond *cond;
u32 *addr;
+ cond = (struct inet_diag_hostcond *)(op + 1);
if (cond->port != -1 &&
cond->port != (op->code == INET_DIAG_BC_S_COND ?
entry->sport : entry->dport)) {
@@ -337,7 +337,8 @@ static int inet_diag_bc_run(const void *bc, int len,
cond->family == AF_INET) {
if (addr[0] == 0 && addr[1] == 0 &&
addr[2] == htonl(0xffff) &&
- bitstring_match(addr+3, cond->addr, cond->prefix_len))
+ bitstring_match(addr + 3, cond->addr,
+ cond->prefix_len))
break;
}
yes = 0;
@@ -379,7 +380,7 @@ static int inet_diag_bc_audit(const void *bytecode, int bytecode_len)
int len = bytecode_len;
while (len > 0) {
- struct inet_diag_bc_op *op = (struct inet_diag_bc_op*)bc;
+ struct inet_diag_bc_op *op = (struct inet_diag_bc_op *)bc;
//printk("BC: %d %d %d {%d} / %d\n", op->code, op->yes, op->no, op[1].no, len);
switch (op->code) {
@@ -390,17 +391,17 @@ static int inet_diag_bc_audit(const void *bytecode, int bytecode_len)
case INET_DIAG_BC_S_LE:
case INET_DIAG_BC_D_GE:
case INET_DIAG_BC_D_LE:
- if (op->yes < 4 || op->yes > len+4)
+ if (op->yes < 4 || op->yes > len + 4)
return -EINVAL;
case INET_DIAG_BC_JMP:
- if (op->no < 4 || op->no > len+4)
+ if (op->no < 4 || op->no > len + 4)
return -EINVAL;
if (op->no < len &&
- !valid_cc(bytecode, bytecode_len, len-op->no))
+ !valid_cc(bytecode, bytecode_len, len - op->no))
return -EINVAL;
break;
case INET_DIAG_BC_NOP:
- if (op->yes < 4 || op->yes > len+4)
+ if (op->yes < 4 || op->yes > len + 4)
return -EINVAL;
break;
default:
diff --git a/net/ipv4/tcp_vegas.c b/net/ipv4/tcp_vegas.c
index 8cef9dc..93c5f92 100644
--- a/net/ipv4/tcp_vegas.c
+++ b/net/ipv4/tcp_vegas.c
@@ -35,7 +35,7 @@
#include <linux/mm.h>
#include <linux/module.h>
#include <linux/skbuff.h>
-#include <linux/tcp_diag.h>
+#include <linux/inet_diag.h>
#include <net/tcp.h>
diff --git a/net/ipv4/tcp_westwood.c b/net/ipv4/tcp_westwood.c
index 3951003..0c340c3 100644
--- a/net/ipv4/tcp_westwood.c
+++ b/net/ipv4/tcp_westwood.c
@@ -8,7 +8,7 @@
#include <linux/mm.h>
#include <linux/module.h>
#include <linux/skbuff.h>
-#include <linux/tcp_diag.h>
+#include <linux/inet_diag.h>
#include <net/tcp.h>
/* TCP Westwood structure */
OpenPOWER on IntegriCloud