Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Arnaldo Carvalho de Melo and committed by
David S. Miller
a8c2190e 73c1f4a0

+16 -15
include/linux/tcp_diag.h include/linux/inet_diag.h
+1 -1
net/dccp/diag.c
··· 12 12 #include <linux/config.h> 13 13 14 14 #include <linux/module.h> 15 - #include <linux/tcp_diag.h> 15 + #include <linux/inet_diag.h> 16 16 17 17 #include "dccp.h" 18 18
+1 -1
net/ipv4/Makefile
··· 30 30 obj-$(CONFIG_IP_ROUTE_MULTIPATH_DRR) += multipath_drr.o 31 31 obj-$(CONFIG_NETFILTER) += netfilter/ 32 32 obj-$(CONFIG_IP_VS) += ipvs/ 33 - obj-$(CONFIG_IP_INET_DIAG) += tcp_diag.o 33 + obj-$(CONFIG_IP_INET_DIAG) += inet_diag.o 34 34 obj-$(CONFIG_IP_ROUTE_MULTIPATH_CACHED) += multipath.o 35 35 obj-$(CONFIG_TCP_CONG_BIC) += tcp_bic.o 36 36 obj-$(CONFIG_TCP_CONG_WESTWOOD) += tcp_westwood.o
+12 -11
net/ipv4/tcp_diag.c net/ipv4/inet_diag.c
··· 32 32 #include <linux/inet.h> 33 33 #include <linux/stddef.h> 34 34 35 - #include <linux/tcp_diag.h> 35 + #include <linux/inet_diag.h> 36 36 37 37 static const struct inet_diag_handler **inet_diag_table; 38 38 ··· 140 140 } 141 141 #endif 142 142 143 - #define EXPIRES_IN_MS(tmo) ((tmo-jiffies)*1000+HZ-1)/HZ 143 + #define EXPIRES_IN_MS(tmo) ((tmo - jiffies) * 1000 + HZ - 1) / HZ 144 144 145 145 if (icsk->icsk_pending == ICSK_TIME_RETRANS) { 146 146 r->idiag_timer = 1; ··· 311 311 yes = !(entry->userlocks & SOCK_BINDPORT_LOCK); 312 312 break; 313 313 case INET_DIAG_BC_S_COND: 314 - case INET_DIAG_BC_D_COND: 315 - { 316 - struct inet_diag_hostcond *cond = (struct inet_diag_hostcond*)(op+1); 314 + case INET_DIAG_BC_D_COND: { 315 + struct inet_diag_hostcond *cond; 317 316 u32 *addr; 318 317 318 + cond = (struct inet_diag_hostcond *)(op + 1); 319 319 if (cond->port != -1 && 320 320 cond->port != (op->code == INET_DIAG_BC_S_COND ? 321 321 entry->sport : entry->dport)) { ··· 337 337 cond->family == AF_INET) { 338 338 if (addr[0] == 0 && addr[1] == 0 && 339 339 addr[2] == htonl(0xffff) && 340 - bitstring_match(addr+3, cond->addr, cond->prefix_len)) 340 + bitstring_match(addr + 3, cond->addr, 341 + cond->prefix_len)) 341 342 break; 342 343 } 343 344 yes = 0; ··· 380 379 int len = bytecode_len; 381 380 382 381 while (len > 0) { 383 - struct inet_diag_bc_op *op = (struct inet_diag_bc_op*)bc; 382 + struct inet_diag_bc_op *op = (struct inet_diag_bc_op *)bc; 384 383 385 384 //printk("BC: %d %d %d {%d} / %d\n", op->code, op->yes, op->no, op[1].no, len); 386 385 switch (op->code) { ··· 391 390 case INET_DIAG_BC_S_LE: 392 391 case INET_DIAG_BC_D_GE: 393 392 case INET_DIAG_BC_D_LE: 394 - if (op->yes < 4 || op->yes > len+4) 393 + if (op->yes < 4 || op->yes > len + 4) 395 394 return -EINVAL; 396 395 case INET_DIAG_BC_JMP: 397 - if (op->no < 4 || op->no > len+4) 396 + if (op->no < 4 || op->no > len + 4) 398 397 return -EINVAL; 399 398 if (op->no < len && 400 - !valid_cc(bytecode, bytecode_len, len-op->no)) 399 + !valid_cc(bytecode, bytecode_len, len - op->no)) 401 400 return -EINVAL; 402 401 break; 403 402 case INET_DIAG_BC_NOP: 404 - if (op->yes < 4 || op->yes > len+4) 403 + if (op->yes < 4 || op->yes > len + 4) 405 404 return -EINVAL; 406 405 break; 407 406 default:
+1 -1
net/ipv4/tcp_vegas.c
··· 35 35 #include <linux/mm.h> 36 36 #include <linux/module.h> 37 37 #include <linux/skbuff.h> 38 - #include <linux/tcp_diag.h> 38 + #include <linux/inet_diag.h> 39 39 40 40 #include <net/tcp.h> 41 41
+1 -1
net/ipv4/tcp_westwood.c
··· 8 8 #include <linux/mm.h> 9 9 #include <linux/module.h> 10 10 #include <linux/skbuff.h> 11 - #include <linux/tcp_diag.h> 11 + #include <linux/inet_diag.h> 12 12 #include <net/tcp.h> 13 13 14 14 /* TCP Westwood structure */