blob: ea17542ff3217e65ed47fb09552300a1845393c8 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * Definitions for MIBs
3 *
4 * Author: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
5 */
6
7#ifndef _LINUX_SNMP_H
8#define _LINUX_SNMP_H
9
10/* ipstats mib definitions */
11/*
12 * RFC 1213: MIB-II
13 * RFC 2011 (updates 1213): SNMPv2-MIB-IP
14 * RFC 2863: Interfaces Group MIB
15 * RFC 2465: IPv6 MIB: General Group
16 * draft-ietf-ipv6-rfc2011-update-10.txt: MIB for IP: IP Statistics Tables
17 */
18enum
19{
20 IPSTATS_MIB_NUM = 0,
Eric Dumazet14a19682012-08-04 20:33:59 +000021/* frequently written fields in fast path, kept in same cache line */
Neil Hormanedf391f2009-04-27 02:45:02 -070022 IPSTATS_MIB_INPKTS, /* InReceives */
Eric Dumazet14a19682012-08-04 20:33:59 +000023 IPSTATS_MIB_INOCTETS, /* InOctets */
24 IPSTATS_MIB_INDELIVERS, /* InDelivers */
25 IPSTATS_MIB_OUTFORWDATAGRAMS, /* OutForwDatagrams */
26 IPSTATS_MIB_OUTPKTS, /* OutRequests */
27 IPSTATS_MIB_OUTOCTETS, /* OutOctets */
28/* other fields */
Linus Torvalds1da177e2005-04-16 15:20:36 -070029 IPSTATS_MIB_INHDRERRORS, /* InHdrErrors */
30 IPSTATS_MIB_INTOOBIGERRORS, /* InTooBigErrors */
31 IPSTATS_MIB_INNOROUTES, /* InNoRoutes */
32 IPSTATS_MIB_INADDRERRORS, /* InAddrErrors */
33 IPSTATS_MIB_INUNKNOWNPROTOS, /* InUnknownProtos */
34 IPSTATS_MIB_INTRUNCATEDPKTS, /* InTruncatedPkts */
35 IPSTATS_MIB_INDISCARDS, /* InDiscards */
Linus Torvalds1da177e2005-04-16 15:20:36 -070036 IPSTATS_MIB_OUTDISCARDS, /* OutDiscards */
37 IPSTATS_MIB_OUTNOROUTES, /* OutNoRoutes */
38 IPSTATS_MIB_REASMTIMEOUT, /* ReasmTimeout */
39 IPSTATS_MIB_REASMREQDS, /* ReasmReqds */
40 IPSTATS_MIB_REASMOKS, /* ReasmOKs */
41 IPSTATS_MIB_REASMFAILS, /* ReasmFails */
42 IPSTATS_MIB_FRAGOKS, /* FragOKs */
43 IPSTATS_MIB_FRAGFAILS, /* FragFails */
44 IPSTATS_MIB_FRAGCREATES, /* FragCreates */
45 IPSTATS_MIB_INMCASTPKTS, /* InMcastPkts */
46 IPSTATS_MIB_OUTMCASTPKTS, /* OutMcastPkts */
Mitsuru Chinen71ff6c02007-04-30 00:45:02 -070047 IPSTATS_MIB_INBCASTPKTS, /* InBcastPkts */
48 IPSTATS_MIB_OUTBCASTPKTS, /* OutBcastPkts */
Neil Hormanedf391f2009-04-27 02:45:02 -070049 IPSTATS_MIB_INMCASTOCTETS, /* InMcastOctets */
50 IPSTATS_MIB_OUTMCASTOCTETS, /* OutMcastOctets */
51 IPSTATS_MIB_INBCASTOCTETS, /* InBcastOctets */
52 IPSTATS_MIB_OUTBCASTOCTETS, /* OutBcastOctets */
Eric Dumazet6a5dc9e2013-04-29 08:39:56 +000053 IPSTATS_MIB_CSUMERRORS, /* InCsumErrors */
Linus Torvalds1da177e2005-04-16 15:20:36 -070054 __IPSTATS_MIB_MAX
55};
56
57/* icmp mib definitions */
58/*
59 * RFC 1213: MIB-II ICMP Group
60 * RFC 2011 (updates 1213): SNMPv2 MIB for IP: ICMP group
61 */
62enum
63{
64 ICMP_MIB_NUM = 0,
65 ICMP_MIB_INMSGS, /* InMsgs */
66 ICMP_MIB_INERRORS, /* InErrors */
67 ICMP_MIB_INDESTUNREACHS, /* InDestUnreachs */
68 ICMP_MIB_INTIMEEXCDS, /* InTimeExcds */
69 ICMP_MIB_INPARMPROBS, /* InParmProbs */
70 ICMP_MIB_INSRCQUENCHS, /* InSrcQuenchs */
71 ICMP_MIB_INREDIRECTS, /* InRedirects */
72 ICMP_MIB_INECHOS, /* InEchos */
73 ICMP_MIB_INECHOREPS, /* InEchoReps */
74 ICMP_MIB_INTIMESTAMPS, /* InTimestamps */
75 ICMP_MIB_INTIMESTAMPREPS, /* InTimestampReps */
76 ICMP_MIB_INADDRMASKS, /* InAddrMasks */
77 ICMP_MIB_INADDRMASKREPS, /* InAddrMaskReps */
78 ICMP_MIB_OUTMSGS, /* OutMsgs */
79 ICMP_MIB_OUTERRORS, /* OutErrors */
80 ICMP_MIB_OUTDESTUNREACHS, /* OutDestUnreachs */
81 ICMP_MIB_OUTTIMEEXCDS, /* OutTimeExcds */
82 ICMP_MIB_OUTPARMPROBS, /* OutParmProbs */
83 ICMP_MIB_OUTSRCQUENCHS, /* OutSrcQuenchs */
84 ICMP_MIB_OUTREDIRECTS, /* OutRedirects */
85 ICMP_MIB_OUTECHOS, /* OutEchos */
86 ICMP_MIB_OUTECHOREPS, /* OutEchoReps */
87 ICMP_MIB_OUTTIMESTAMPS, /* OutTimestamps */
88 ICMP_MIB_OUTTIMESTAMPREPS, /* OutTimestampReps */
89 ICMP_MIB_OUTADDRMASKS, /* OutAddrMasks */
90 ICMP_MIB_OUTADDRMASKREPS, /* OutAddrMaskReps */
Eric Dumazet6a5dc9e2013-04-29 08:39:56 +000091 ICMP_MIB_CSUMERRORS, /* InCsumErrors */
Linus Torvalds1da177e2005-04-16 15:20:36 -070092 __ICMP_MIB_MAX
93};
94
David L Stevens96793b42007-09-17 09:57:33 -070095#define __ICMPMSG_MIB_MAX 512 /* Out+In for all 8-bit ICMP types */
96
Linus Torvalds1da177e2005-04-16 15:20:36 -070097/* icmp6 mib definitions */
98/*
99 * RFC 2466: ICMPv6-MIB
100 */
101enum
102{
103 ICMP6_MIB_NUM = 0,
104 ICMP6_MIB_INMSGS, /* InMsgs */
105 ICMP6_MIB_INERRORS, /* InErrors */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700106 ICMP6_MIB_OUTMSGS, /* OutMsgs */
Eric Dumazet1f8438a2010-04-03 15:09:04 -0700107 ICMP6_MIB_OUTERRORS, /* OutErrors */
Eric Dumazet6a5dc9e2013-04-29 08:39:56 +0000108 ICMP6_MIB_CSUMERRORS, /* InCsumErrors */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700109 __ICMP6_MIB_MAX
110};
111
David L Stevens14878f72007-09-16 16:52:35 -0700112#define __ICMP6MSG_MIB_MAX 512 /* Out+In for all 8-bit ICMPv6 types */
113
Linus Torvalds1da177e2005-04-16 15:20:36 -0700114/* tcp mib definitions */
115/*
116 * RFC 1213: MIB-II TCP group
117 * RFC 2012 (updates 1213): SNMPv2-MIB-TCP
118 */
119enum
120{
121 TCP_MIB_NUM = 0,
122 TCP_MIB_RTOALGORITHM, /* RtoAlgorithm */
123 TCP_MIB_RTOMIN, /* RtoMin */
124 TCP_MIB_RTOMAX, /* RtoMax */
125 TCP_MIB_MAXCONN, /* MaxConn */
126 TCP_MIB_ACTIVEOPENS, /* ActiveOpens */
127 TCP_MIB_PASSIVEOPENS, /* PassiveOpens */
128 TCP_MIB_ATTEMPTFAILS, /* AttemptFails */
129 TCP_MIB_ESTABRESETS, /* EstabResets */
130 TCP_MIB_CURRESTAB, /* CurrEstab */
131 TCP_MIB_INSEGS, /* InSegs */
132 TCP_MIB_OUTSEGS, /* OutSegs */
133 TCP_MIB_RETRANSSEGS, /* RetransSegs */
134 TCP_MIB_INERRS, /* InErrs */
135 TCP_MIB_OUTRSTS, /* OutRsts */
Eric Dumazet6a5dc9e2013-04-29 08:39:56 +0000136 TCP_MIB_CSUMERRORS, /* InCsumErrors */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700137 __TCP_MIB_MAX
138};
139
140/* udp mib definitions */
141/*
142 * RFC 1213: MIB-II UDP group
143 * RFC 2013 (updates 1213): SNMPv2-MIB-UDP
144 */
145enum
146{
147 UDP_MIB_NUM = 0,
148 UDP_MIB_INDATAGRAMS, /* InDatagrams */
149 UDP_MIB_NOPORTS, /* NoPorts */
150 UDP_MIB_INERRORS, /* InErrors */
151 UDP_MIB_OUTDATAGRAMS, /* OutDatagrams */
Martin Bligh81aa6462006-08-14 23:57:10 -0700152 UDP_MIB_RCVBUFERRORS, /* RcvbufErrors */
153 UDP_MIB_SNDBUFERRORS, /* SndbufErrors */
Eric Dumazet6a5dc9e2013-04-29 08:39:56 +0000154 UDP_MIB_CSUMERRORS, /* InCsumErrors */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700155 __UDP_MIB_MAX
156};
157
Linus Torvalds1da177e2005-04-16 15:20:36 -0700158/* linux mib definitions */
159enum
160{
161 LINUX_MIB_NUM = 0,
162 LINUX_MIB_SYNCOOKIESSENT, /* SyncookiesSent */
163 LINUX_MIB_SYNCOOKIESRECV, /* SyncookiesRecv */
164 LINUX_MIB_SYNCOOKIESFAILED, /* SyncookiesFailed */
165 LINUX_MIB_EMBRYONICRSTS, /* EmbryonicRsts */
166 LINUX_MIB_PRUNECALLED, /* PruneCalled */
167 LINUX_MIB_RCVPRUNED, /* RcvPruned */
168 LINUX_MIB_OFOPRUNED, /* OfoPruned */
169 LINUX_MIB_OUTOFWINDOWICMPS, /* OutOfWindowIcmps */
170 LINUX_MIB_LOCKDROPPEDICMPS, /* LockDroppedIcmps */
171 LINUX_MIB_ARPFILTER, /* ArpFilter */
172 LINUX_MIB_TIMEWAITED, /* TimeWaited */
173 LINUX_MIB_TIMEWAITRECYCLED, /* TimeWaitRecycled */
174 LINUX_MIB_TIMEWAITKILLED, /* TimeWaitKilled */
175 LINUX_MIB_PAWSPASSIVEREJECTED, /* PAWSPassiveRejected */
176 LINUX_MIB_PAWSACTIVEREJECTED, /* PAWSActiveRejected */
177 LINUX_MIB_PAWSESTABREJECTED, /* PAWSEstabRejected */
178 LINUX_MIB_DELAYEDACKS, /* DelayedACKs */
179 LINUX_MIB_DELAYEDACKLOCKED, /* DelayedACKLocked */
180 LINUX_MIB_DELAYEDACKLOST, /* DelayedACKLost */
181 LINUX_MIB_LISTENOVERFLOWS, /* ListenOverflows */
182 LINUX_MIB_LISTENDROPS, /* ListenDrops */
183 LINUX_MIB_TCPPREQUEUED, /* TCPPrequeued */
184 LINUX_MIB_TCPDIRECTCOPYFROMBACKLOG, /* TCPDirectCopyFromBacklog */
185 LINUX_MIB_TCPDIRECTCOPYFROMPREQUEUE, /* TCPDirectCopyFromPrequeue */
186 LINUX_MIB_TCPPREQUEUEDROPPED, /* TCPPrequeueDropped */
187 LINUX_MIB_TCPHPHITS, /* TCPHPHits */
188 LINUX_MIB_TCPHPHITSTOUSER, /* TCPHPHitsToUser */
189 LINUX_MIB_TCPPUREACKS, /* TCPPureAcks */
190 LINUX_MIB_TCPHPACKS, /* TCPHPAcks */
191 LINUX_MIB_TCPRENORECOVERY, /* TCPRenoRecovery */
192 LINUX_MIB_TCPSACKRECOVERY, /* TCPSackRecovery */
193 LINUX_MIB_TCPSACKRENEGING, /* TCPSACKReneging */
194 LINUX_MIB_TCPFACKREORDER, /* TCPFACKReorder */
195 LINUX_MIB_TCPSACKREORDER, /* TCPSACKReorder */
196 LINUX_MIB_TCPRENOREORDER, /* TCPRenoReorder */
197 LINUX_MIB_TCPTSREORDER, /* TCPTSReorder */
198 LINUX_MIB_TCPFULLUNDO, /* TCPFullUndo */
199 LINUX_MIB_TCPPARTIALUNDO, /* TCPPartialUndo */
200 LINUX_MIB_TCPDSACKUNDO, /* TCPDSACKUndo */
201 LINUX_MIB_TCPLOSSUNDO, /* TCPLossUndo */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700202 LINUX_MIB_TCPLOSTRETRANSMIT, /* TCPLostRetransmit */
203 LINUX_MIB_TCPRENOFAILURES, /* TCPRenoFailures */
204 LINUX_MIB_TCPSACKFAILURES, /* TCPSackFailures */
205 LINUX_MIB_TCPLOSSFAILURES, /* TCPLossFailures */
206 LINUX_MIB_TCPFASTRETRANS, /* TCPFastRetrans */
207 LINUX_MIB_TCPFORWARDRETRANS, /* TCPForwardRetrans */
208 LINUX_MIB_TCPSLOWSTARTRETRANS, /* TCPSlowStartRetrans */
209 LINUX_MIB_TCPTIMEOUTS, /* TCPTimeouts */
Nandita Dukkipati6ba8a3b2013-03-11 10:00:43 +0000210 LINUX_MIB_TCPLOSSPROBES, /* TCPLossProbes */
Nandita Dukkipati9b717a82013-03-11 10:00:44 +0000211 LINUX_MIB_TCPLOSSPROBERECOVERY, /* TCPLossProbeRecovery */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700212 LINUX_MIB_TCPRENORECOVERYFAIL, /* TCPRenoRecoveryFail */
213 LINUX_MIB_TCPSACKRECOVERYFAIL, /* TCPSackRecoveryFail */
214 LINUX_MIB_TCPSCHEDULERFAILED, /* TCPSchedulerFailed */
215 LINUX_MIB_TCPRCVCOLLAPSED, /* TCPRcvCollapsed */
216 LINUX_MIB_TCPDSACKOLDSENT, /* TCPDSACKOldSent */
217 LINUX_MIB_TCPDSACKOFOSENT, /* TCPDSACKOfoSent */
218 LINUX_MIB_TCPDSACKRECV, /* TCPDSACKRecv */
219 LINUX_MIB_TCPDSACKOFORECV, /* TCPDSACKOfoRecv */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700220 LINUX_MIB_TCPABORTONDATA, /* TCPAbortOnData */
221 LINUX_MIB_TCPABORTONCLOSE, /* TCPAbortOnClose */
222 LINUX_MIB_TCPABORTONMEMORY, /* TCPAbortOnMemory */
223 LINUX_MIB_TCPABORTONTIMEOUT, /* TCPAbortOnTimeout */
224 LINUX_MIB_TCPABORTONLINGER, /* TCPAbortOnLinger */
225 LINUX_MIB_TCPABORTFAILED, /* TCPAbortFailed */
226 LINUX_MIB_TCPMEMORYPRESSURES, /* TCPMemoryPressures */
Ilpo Järvinen18f02542007-08-24 22:55:52 -0700227 LINUX_MIB_TCPSACKDISCARD, /* TCPSACKDiscard */
228 LINUX_MIB_TCPDSACKIGNOREDOLD, /* TCPSACKIgnoredOld */
229 LINUX_MIB_TCPDSACKIGNOREDNOUNDO, /* TCPSACKIgnoredNoUndo */
Ilpo Järvinen912d8f02007-09-25 22:47:31 -0700230 LINUX_MIB_TCPSPURIOUSRTOS, /* TCPSpuriousRTOs */
David S. Miller785957d2008-07-30 03:03:15 -0700231 LINUX_MIB_TCPMD5NOTFOUND, /* TCPMD5NotFound */
232 LINUX_MIB_TCPMD5UNEXPECTED, /* TCPMD5Unexpected */
Ilpo Järvinen111cc8b2008-11-24 21:27:22 -0800233 LINUX_MIB_SACKSHIFTED,
234 LINUX_MIB_SACKMERGED,
235 LINUX_MIB_SACKSHIFTFALLBACK,
Eric Dumazet6cce09f2010-03-07 23:21:57 +0000236 LINUX_MIB_TCPBACKLOGDROP,
237 LINUX_MIB_TCPMINTTLDROP, /* RFC 5082 */
Eric Dumazet907cdda2010-03-19 05:37:18 +0000238 LINUX_MIB_TCPDEFERACCEPTDROP,
Eric Dumazetb5f7e752010-06-02 12:05:27 +0000239 LINUX_MIB_IPRPFILTER, /* IP Reverse Path Filter (rp_filter) */
Tom Herbert67631512010-12-08 12:16:33 -0800240 LINUX_MIB_TCPTIMEWAITOVERFLOW, /* TCPTimeWaitOverflow */
Eric Dumazet946cedc2011-08-30 03:21:44 +0000241 LINUX_MIB_TCPREQQFULLDOCOOKIES, /* TCPReqQFullDoCookies */
242 LINUX_MIB_TCPREQQFULLDROP, /* TCPReqQFullDrop */
Eric Dumazet09e9b812012-01-25 04:44:20 +0000243 LINUX_MIB_TCPRETRANSFAIL, /* TCPRetransFail */
Eric Dumazeta6df1ae2012-07-16 01:41:36 +0000244 LINUX_MIB_TCPRCVCOALESCE, /* TCPRcvCoalesce */
245 LINUX_MIB_TCPOFOQUEUE, /* TCPOFOQueue */
246 LINUX_MIB_TCPOFODROP, /* TCPOFODrop */
247 LINUX_MIB_TCPOFOMERGE, /* TCPOFOMerge */
Eric Dumazet282f23c2012-07-17 10:13:05 +0200248 LINUX_MIB_TCPCHALLENGEACK, /* TCPChallengeACK */
Eric Dumazet0c246042012-07-17 01:41:30 +0000249 LINUX_MIB_TCPSYNCHALLENGE, /* TCPSYNChallenge */
Yuchung Cheng783237e2012-07-19 06:43:07 +0000250 LINUX_MIB_TCPFASTOPENACTIVE, /* TCPFastOpenActive */
Jerry Chu10467162012-08-31 12:29:11 +0000251 LINUX_MIB_TCPFASTOPENPASSIVE, /* TCPFastOpenPassive*/
252 LINUX_MIB_TCPFASTOPENPASSIVEFAIL, /* TCPFastOpenPassiveFail */
253 LINUX_MIB_TCPFASTOPENLISTENOVERFLOW, /* TCPFastOpenListenOverflow */
254 LINUX_MIB_TCPFASTOPENCOOKIEREQD, /* TCPFastOpenCookieReqd */
Eric Dumazet0e280af2013-04-18 06:52:51 +0000255 LINUX_MIB_TCPSPURIOUS_RTX_HOSTQUEUES, /* TCPSpuriousRtxHostQueues */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700256 __LINUX_MIB_MAX
257};
258
Masahide NAKAMURA558f82e2007-12-20 20:42:57 -0800259/* linux Xfrm mib definitions */
260enum
261{
262 LINUX_MIB_XFRMNUM = 0,
263 LINUX_MIB_XFRMINERROR, /* XfrmInError */
264 LINUX_MIB_XFRMINBUFFERERROR, /* XfrmInBufferError */
265 LINUX_MIB_XFRMINHDRERROR, /* XfrmInHdrError */
266 LINUX_MIB_XFRMINNOSTATES, /* XfrmInNoStates */
267 LINUX_MIB_XFRMINSTATEPROTOERROR, /* XfrmInStateProtoError */
268 LINUX_MIB_XFRMINSTATEMODEERROR, /* XfrmInStateModeError */
Masahide NAKAMURA9472c9e2008-01-31 17:14:58 -0800269 LINUX_MIB_XFRMINSTATESEQERROR, /* XfrmInStateSeqError */
Masahide NAKAMURA558f82e2007-12-20 20:42:57 -0800270 LINUX_MIB_XFRMINSTATEEXPIRED, /* XfrmInStateExpired */
271 LINUX_MIB_XFRMINSTATEMISMATCH, /* XfrmInStateMismatch */
272 LINUX_MIB_XFRMINSTATEINVALID, /* XfrmInStateInvalid */
273 LINUX_MIB_XFRMINTMPLMISMATCH, /* XfrmInTmplMismatch */
274 LINUX_MIB_XFRMINNOPOLS, /* XfrmInNoPols */
275 LINUX_MIB_XFRMINPOLBLOCK, /* XfrmInPolBlock */
276 LINUX_MIB_XFRMINPOLERROR, /* XfrmInPolError */
277 LINUX_MIB_XFRMOUTERROR, /* XfrmOutError */
278 LINUX_MIB_XFRMOUTBUNDLEGENERROR, /* XfrmOutBundleGenError */
279 LINUX_MIB_XFRMOUTBUNDLECHECKERROR, /* XfrmOutBundleCheckError */
280 LINUX_MIB_XFRMOUTNOSTATES, /* XfrmOutNoStates */
281 LINUX_MIB_XFRMOUTSTATEPROTOERROR, /* XfrmOutStateProtoError */
282 LINUX_MIB_XFRMOUTSTATEMODEERROR, /* XfrmOutStateModeError */
Masahide NAKAMURA9472c9e2008-01-31 17:14:58 -0800283 LINUX_MIB_XFRMOUTSTATESEQERROR, /* XfrmOutStateSeqError */
Masahide NAKAMURA558f82e2007-12-20 20:42:57 -0800284 LINUX_MIB_XFRMOUTSTATEEXPIRED, /* XfrmOutStateExpired */
285 LINUX_MIB_XFRMOUTPOLBLOCK, /* XfrmOutPolBlock */
286 LINUX_MIB_XFRMOUTPOLDEAD, /* XfrmOutPolDead */
287 LINUX_MIB_XFRMOUTPOLERROR, /* XfrmOutPolError */
jamal72032fd2010-02-18 03:35:07 +0000288 LINUX_MIB_XFRMFWDHDRERROR, /* XfrmFwdHdrError*/
Li RongQingbb65a9c2012-12-28 16:06:28 +0800289 LINUX_MIB_XFRMOUTSTATEINVALID, /* XfrmOutStateInvalid */
Fan Du4c4d41f2013-06-06 10:15:54 +0800290 LINUX_MIB_XFRMACQUIREERROR, /* XfrmAcquireError */
Masahide NAKAMURA558f82e2007-12-20 20:42:57 -0800291 __LINUX_MIB_XFRMMAX
292};
293
Linus Torvalds1da177e2005-04-16 15:20:36 -0700294#endif /* _LINUX_SNMP_H */