proc.c (8dd06ef34b6e2f41b29fbf5fc1663780f2524285) | proc.c (e3a5a1e8b6548f5d37328e2d3571edc5c9e6d7c0) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * INET An implementation of the TCP/IP protocol suite for the LINUX 4 * operating system. INET is implemented using the BSD Socket 5 * interface as the means of communication with the user level. 6 * 7 * This file implements the various access functions for the 8 * PROC file system. It is mainly used for debugging and --- 18 unchanged lines hidden (view full) --- 27 * Andi Kleen : Add support for /proc/net/netstat 28 * Arnaldo C. Melo : Convert to seq_file 29 */ 30#include <linux/types.h> 31#include <net/net_namespace.h> 32#include <net/icmp.h> 33#include <net/protocol.h> 34#include <net/tcp.h> | 1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * INET An implementation of the TCP/IP protocol suite for the LINUX 4 * operating system. INET is implemented using the BSD Socket 5 * interface as the means of communication with the user level. 6 * 7 * This file implements the various access functions for the 8 * PROC file system. It is mainly used for debugging and --- 18 unchanged lines hidden (view full) --- 27 * Andi Kleen : Add support for /proc/net/netstat 28 * Arnaldo C. Melo : Convert to seq_file 29 */ 30#include <linux/types.h> 31#include <net/net_namespace.h> 32#include <net/icmp.h> 33#include <net/protocol.h> 34#include <net/tcp.h> |
35#include <net/mptcp.h> |
|
35#include <net/udp.h> 36#include <net/udplite.h> 37#include <linux/bottom_half.h> 38#include <linux/inetdevice.h> 39#include <linux/proc_fs.h> 40#include <linux/seq_file.h> 41#include <linux/export.h> 42#include <net/sock.h> --- 243 unchanged lines hidden (view full) --- 286 SNMP_MIB_ITEM("TCPDeliveredCE", LINUX_MIB_TCPDELIVEREDCE), 287 SNMP_MIB_ITEM("TCPAckCompressed", LINUX_MIB_TCPACKCOMPRESSED), 288 SNMP_MIB_ITEM("TCPZeroWindowDrop", LINUX_MIB_TCPZEROWINDOWDROP), 289 SNMP_MIB_ITEM("TCPRcvQDrop", LINUX_MIB_TCPRCVQDROP), 290 SNMP_MIB_ITEM("TCPWqueueTooBig", LINUX_MIB_TCPWQUEUETOOBIG), 291 SNMP_MIB_ITEM("TCPFastOpenPassiveAltKey", LINUX_MIB_TCPFASTOPENPASSIVEALTKEY), 292 SNMP_MIB_ITEM("TcpTimeoutRehash", LINUX_MIB_TCPTIMEOUTREHASH), 293 SNMP_MIB_ITEM("TcpDuplicateDataRehash", LINUX_MIB_TCPDUPLICATEDATAREHASH), | 36#include <net/udp.h> 37#include <net/udplite.h> 38#include <linux/bottom_half.h> 39#include <linux/inetdevice.h> 40#include <linux/proc_fs.h> 41#include <linux/seq_file.h> 42#include <linux/export.h> 43#include <net/sock.h> --- 243 unchanged lines hidden (view full) --- 287 SNMP_MIB_ITEM("TCPDeliveredCE", LINUX_MIB_TCPDELIVEREDCE), 288 SNMP_MIB_ITEM("TCPAckCompressed", LINUX_MIB_TCPACKCOMPRESSED), 289 SNMP_MIB_ITEM("TCPZeroWindowDrop", LINUX_MIB_TCPZEROWINDOWDROP), 290 SNMP_MIB_ITEM("TCPRcvQDrop", LINUX_MIB_TCPRCVQDROP), 291 SNMP_MIB_ITEM("TCPWqueueTooBig", LINUX_MIB_TCPWQUEUETOOBIG), 292 SNMP_MIB_ITEM("TCPFastOpenPassiveAltKey", LINUX_MIB_TCPFASTOPENPASSIVEALTKEY), 293 SNMP_MIB_ITEM("TcpTimeoutRehash", LINUX_MIB_TCPTIMEOUTREHASH), 294 SNMP_MIB_ITEM("TcpDuplicateDataRehash", LINUX_MIB_TCPDUPLICATEDATAREHASH), |
295 SNMP_MIB_ITEM("TCPDSACKRecvSegs", LINUX_MIB_TCPDSACKRECVSEGS), |
|
294 SNMP_MIB_SENTINEL 295}; 296 297static void icmpmsg_put_line(struct seq_file *seq, unsigned long *vals, 298 unsigned short *type, int count) 299{ 300 int j; 301 --- 178 unchanged lines hidden (view full) --- 480 seq_puts(seq, "\nIpExt:"); 481 for (i = 0; snmp4_ipextstats_list[i].name; i++) 482 seq_printf(seq, " %llu", 483 snmp_fold_field64(net->mib.ip_statistics, 484 snmp4_ipextstats_list[i].entry, 485 offsetof(struct ipstats_mib, syncp))); 486 487 seq_putc(seq, '\n'); | 296 SNMP_MIB_SENTINEL 297}; 298 299static void icmpmsg_put_line(struct seq_file *seq, unsigned long *vals, 300 unsigned short *type, int count) 301{ 302 int j; 303 --- 178 unchanged lines hidden (view full) --- 482 seq_puts(seq, "\nIpExt:"); 483 for (i = 0; snmp4_ipextstats_list[i].name; i++) 484 seq_printf(seq, " %llu", 485 snmp_fold_field64(net->mib.ip_statistics, 486 snmp4_ipextstats_list[i].entry, 487 offsetof(struct ipstats_mib, syncp))); 488 489 seq_putc(seq, '\n'); |
490 mptcp_seq_show(seq); |
|
488 return 0; 489} 490 491static __net_init int ip_proc_init_net(struct net *net) 492{ 493 if (!proc_create_net_single("sockstat", 0444, net->proc_net, 494 sockstat_seq_show, NULL)) 495 goto out_sockstat; --- 33 unchanged lines hidden --- | 491 return 0; 492} 493 494static __net_init int ip_proc_init_net(struct net *net) 495{ 496 if (!proc_create_net_single("sockstat", 0444, net->proc_net, 497 sockstat_seq_show, NULL)) 498 goto out_sockstat; --- 33 unchanged lines hidden --- |