-
Notifications
You must be signed in to change notification settings - Fork 113
/
Copy pathnetstats.h
175 lines (166 loc) · 4.38 KB
/
netstats.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
/*
** ATOP - System & Process Monitor
**
** The program 'atop' offers the possibility to view the activity of
** the system on system-level as well as process-level.
** ==========================================================================
** Author: Gerlof Langeveld
** E-mail: [email protected]
** Date: September 2002
** --------------------------------------------------------------------------
** Copyright (C) 2000-2010 Gerlof Langeveld
**
** This program is free software; you can redistribute it and/or modify it
** under the terms of the GNU General Public License as published by the
** Free Software Foundation; either version 2, or (at your option) any
** later version.
**
** This program is distributed in the hope that it will be useful, but
** WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
** See the GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
** --------------------------------------------------------------------------
*/
#ifndef __NETSTATS__
#define __NETSTATS__
/*
** structures defined from the output of /proc/net/snmp and /proc/net/snmp6
*/
struct ipv4_stats {
count_t Forwarding;
count_t DefaultTTL;
count_t InReceives;
count_t InHdrErrors;
count_t InAddrErrors;
count_t ForwDatagrams;
count_t InUnknownProtos;
count_t InDiscards;
count_t InDelivers;
count_t OutRequests;
count_t OutDiscards;
count_t OutNoRoutes;
count_t ReasmTimeout;
count_t ReasmReqds;
count_t ReasmOKs;
count_t ReasmFails;
count_t FragOKs;
count_t FragFails;
count_t FragCreates;
};
struct icmpv4_stats {
count_t InMsgs;
count_t InErrors;
count_t InCsumErrors;
count_t InDestUnreachs;
count_t InTimeExcds;
count_t InParmProbs;
count_t InSrcQuenchs;
count_t InRedirects;
count_t InEchos;
count_t InEchoReps;
count_t InTimestamps;
count_t InTimestampReps;
count_t InAddrMasks;
count_t InAddrMaskReps;
count_t OutMsgs;
count_t OutErrors;
count_t OutDestUnreachs;
count_t OutTimeExcds;
count_t OutParmProbs;
count_t OutSrcQuenchs;
count_t OutRedirects;
count_t OutEchos;
count_t OutEchoReps;
count_t OutTimestamps;
count_t OutTimestampReps;
count_t OutAddrMasks;
count_t OutAddrMaskReps;
};
struct udpv4_stats {
count_t InDatagrams;
count_t NoPorts;
count_t InErrors;
count_t OutDatagrams;
};
struct tcp_stats {
count_t RtoAlgorithm;
count_t RtoMin;
count_t RtoMax;
count_t MaxConn;
count_t ActiveOpens;
count_t PassiveOpens;
count_t AttemptFails;
count_t EstabResets;
count_t CurrEstab;
count_t InSegs;
count_t OutSegs;
count_t RetransSegs;
count_t InErrs;
count_t OutRsts;
count_t InCsumErrors;
};
struct ipv6_stats {
count_t Ip6InReceives;
count_t Ip6InHdrErrors;
count_t Ip6InTooBigErrors;
count_t Ip6InNoRoutes;
count_t Ip6InAddrErrors;
count_t Ip6InUnknownProtos;
count_t Ip6InTruncatedPkts;
count_t Ip6InDiscards;
count_t Ip6InDelivers;
count_t Ip6OutForwDatagrams;
count_t Ip6OutRequests;
count_t Ip6OutDiscards;
count_t Ip6OutNoRoutes;
count_t Ip6ReasmTimeout;
count_t Ip6ReasmReqds;
count_t Ip6ReasmOKs;
count_t Ip6ReasmFails;
count_t Ip6FragOKs;
count_t Ip6FragFails;
count_t Ip6FragCreates;
count_t Ip6InMcastPkts;
count_t Ip6OutMcastPkts;
};
struct icmpv6_stats {
count_t Icmp6InMsgs;
count_t Icmp6InErrors;
count_t Icmp6InDestUnreachs;
count_t Icmp6InPktTooBigs;
count_t Icmp6InTimeExcds;
count_t Icmp6InParmProblems;
count_t Icmp6InEchos;
count_t Icmp6InEchoReplies;
count_t Icmp6InGroupMembQueries;
count_t Icmp6InGroupMembResponses;
count_t Icmp6InGroupMembReductions;
count_t Icmp6InRouterSolicits;
count_t Icmp6InRouterAdvertisements;
count_t Icmp6InNeighborSolicits;
count_t Icmp6InNeighborAdvertisements;
count_t Icmp6InRedirects;
count_t Icmp6OutMsgs;
count_t Icmp6OutDestUnreachs;
count_t Icmp6OutPktTooBigs;
count_t Icmp6OutTimeExcds;
count_t Icmp6OutParmProblems;
count_t Icmp6OutEchoReplies;
count_t Icmp6OutRouterSolicits;
count_t Icmp6OutNeighborSolicits;
count_t Icmp6OutNeighborAdvertisements;
count_t Icmp6OutRedirects;
count_t Icmp6OutGroupMembResponses;
count_t Icmp6OutGroupMembReductions;
};
struct udpv6_stats {
count_t Udp6InDatagrams;
count_t Udp6NoPorts;
count_t Udp6InErrors;
count_t Udp6OutDatagrams;
};
#endif