source: rtems/cpukit/libnetworking/rtems/rtems_showudpstat.c @ 9b4422a2

4.115
Last change on this file since 9b4422a2 was 9b4422a2, checked in by Joel Sherrill <joel.sherrill@…>, on 05/03/12 at 15:09:24

Remove All CVS Id Strings Possible Using a Script

Script does what is expected and tries to do it as
smartly as possible.

+ remove occurrences of two blank comment lines

next to each other after Id string line removed.

+ remove entire comment blocks which only exited to

contain CVS Ids

+ If the processing left a blank line at the top of

a file, it was removed.

  • Property mode set to 100644
File size: 1.4 KB
Line 
1#if HAVE_CONFIG_H
2#include "config.h"
3#endif
4
5#include <sys/param.h>
6#include <sys/queue.h>
7#include <sys/systm.h>
8#include <sys/kernel.h>
9#include <sys/sysctl.h>
10#include <sys/proc.h>
11#include <sys/mbuf.h>
12#include <sys/socket.h>
13#include <net/if.h>
14#include <netinet/in.h>
15#include <netinet/in_systm.h>
16#include <netinet/ip.h>
17#include <netinet/ip_var.h>
18#include <netinet/udp.h>
19#include <netinet/udp_var.h>
20
21/*
22 * Display UDP statistics
23 * Don't lock the rest of the network tasks out while printing.
24 * It's no big deal if the values change while being printed.
25 */
26static void
27showudpstat (const char *name, unsigned long n)
28{
29        if (n)
30                printf ("%35s%12lu\n", name, n);
31}
32
33void
34rtems_bsdnet_show_udp_stats (void)
35{
36        printf ("************ UDP Statistics ************\n");
37        showudpstat ("total input packets", udpstat.udps_ipackets);
38        showudpstat ("packet shorter than header", udpstat.udps_hdrops);
39        showudpstat ("checksum error", udpstat.udps_badsum);
40        showudpstat ("data length larger than packet", udpstat.udps_badlen);
41        showudpstat ("no socket on port", udpstat.udps_noport);
42        showudpstat ("of above, arrived as broadcast", udpstat.udps_noportbcast);
43        showudpstat ("not delivered, input socket full", udpstat.udps_fullsock);
44        showudpstat ("input packets missing pcb cache", udpstat.udpps_pcbcachemiss);
45        showudpstat ("input packets not for hashed pcb", udpstat.udpps_pcbhashmiss);
46        showudpstat ("total output packets", udpstat.udps_opackets);
47        printf ("\n");
48}
Note: See TracBrowser for help on using the repository browser.