snmp.h 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325
  1. /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2. /*
  3. * Definitions for MIBs
  4. *
  5. * Author: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
  6. */
  7. #ifndef _LINUX_SNMP_H
  8. #define _LINUX_SNMP_H
  9. /* ipstats mib definitions */
  10. /*
  11. * RFC 1213: MIB-II
  12. * RFC 2011 (updates 1213): SNMPv2-MIB-IP
  13. * RFC 2863: Interfaces Group MIB
  14. * RFC 2465: IPv6 MIB: General Group
  15. * draft-ietf-ipv6-rfc2011-update-10.txt: MIB for IP: IP Statistics Tables
  16. */
  17. enum
  18. {
  19. IPSTATS_MIB_NUM = 0,
  20. /* frequently written fields in fast path, kept in same cache line */
  21. IPSTATS_MIB_INPKTS, /* InReceives */
  22. IPSTATS_MIB_INOCTETS, /* InOctets */
  23. IPSTATS_MIB_INDELIVERS, /* InDelivers */
  24. IPSTATS_MIB_OUTFORWDATAGRAMS, /* OutForwDatagrams */
  25. IPSTATS_MIB_OUTPKTS, /* OutRequests */
  26. IPSTATS_MIB_OUTOCTETS, /* OutOctets */
  27. /* other fields */
  28. IPSTATS_MIB_INHDRERRORS, /* InHdrErrors */
  29. IPSTATS_MIB_INTOOBIGERRORS, /* InTooBigErrors */
  30. IPSTATS_MIB_INNOROUTES, /* InNoRoutes */
  31. IPSTATS_MIB_INADDRERRORS, /* InAddrErrors */
  32. IPSTATS_MIB_INUNKNOWNPROTOS, /* InUnknownProtos */
  33. IPSTATS_MIB_INTRUNCATEDPKTS, /* InTruncatedPkts */
  34. IPSTATS_MIB_INDISCARDS, /* InDiscards */
  35. IPSTATS_MIB_OUTDISCARDS, /* OutDiscards */
  36. IPSTATS_MIB_OUTNOROUTES, /* OutNoRoutes */
  37. IPSTATS_MIB_REASMTIMEOUT, /* ReasmTimeout */
  38. IPSTATS_MIB_REASMREQDS, /* ReasmReqds */
  39. IPSTATS_MIB_REASMOKS, /* ReasmOKs */
  40. IPSTATS_MIB_REASMFAILS, /* ReasmFails */
  41. IPSTATS_MIB_FRAGOKS, /* FragOKs */
  42. IPSTATS_MIB_FRAGFAILS, /* FragFails */
  43. IPSTATS_MIB_FRAGCREATES, /* FragCreates */
  44. IPSTATS_MIB_INMCASTPKTS, /* InMcastPkts */
  45. IPSTATS_MIB_OUTMCASTPKTS, /* OutMcastPkts */
  46. IPSTATS_MIB_INBCASTPKTS, /* InBcastPkts */
  47. IPSTATS_MIB_OUTBCASTPKTS, /* OutBcastPkts */
  48. IPSTATS_MIB_INMCASTOCTETS, /* InMcastOctets */
  49. IPSTATS_MIB_OUTMCASTOCTETS, /* OutMcastOctets */
  50. IPSTATS_MIB_INBCASTOCTETS, /* InBcastOctets */
  51. IPSTATS_MIB_OUTBCASTOCTETS, /* OutBcastOctets */
  52. IPSTATS_MIB_CSUMERRORS, /* InCsumErrors */
  53. IPSTATS_MIB_NOECTPKTS, /* InNoECTPkts */
  54. IPSTATS_MIB_ECT1PKTS, /* InECT1Pkts */
  55. IPSTATS_MIB_ECT0PKTS, /* InECT0Pkts */
  56. IPSTATS_MIB_CEPKTS, /* InCEPkts */
  57. IPSTATS_MIB_REASM_OVERLAPS, /* ReasmOverlaps */
  58. __IPSTATS_MIB_MAX
  59. };
  60. /* icmp mib definitions */
  61. /*
  62. * RFC 1213: MIB-II ICMP Group
  63. * RFC 2011 (updates 1213): SNMPv2 MIB for IP: ICMP group
  64. */
  65. enum
  66. {
  67. ICMP_MIB_NUM = 0,
  68. ICMP_MIB_INMSGS, /* InMsgs */
  69. ICMP_MIB_INERRORS, /* InErrors */
  70. ICMP_MIB_INDESTUNREACHS, /* InDestUnreachs */
  71. ICMP_MIB_INTIMEEXCDS, /* InTimeExcds */
  72. ICMP_MIB_INPARMPROBS, /* InParmProbs */
  73. ICMP_MIB_INSRCQUENCHS, /* InSrcQuenchs */
  74. ICMP_MIB_INREDIRECTS, /* InRedirects */
  75. ICMP_MIB_INECHOS, /* InEchos */
  76. ICMP_MIB_INECHOREPS, /* InEchoReps */
  77. ICMP_MIB_INTIMESTAMPS, /* InTimestamps */
  78. ICMP_MIB_INTIMESTAMPREPS, /* InTimestampReps */
  79. ICMP_MIB_INADDRMASKS, /* InAddrMasks */
  80. ICMP_MIB_INADDRMASKREPS, /* InAddrMaskReps */
  81. ICMP_MIB_OUTMSGS, /* OutMsgs */
  82. ICMP_MIB_OUTERRORS, /* OutErrors */
  83. ICMP_MIB_OUTDESTUNREACHS, /* OutDestUnreachs */
  84. ICMP_MIB_OUTTIMEEXCDS, /* OutTimeExcds */
  85. ICMP_MIB_OUTPARMPROBS, /* OutParmProbs */
  86. ICMP_MIB_OUTSRCQUENCHS, /* OutSrcQuenchs */
  87. ICMP_MIB_OUTREDIRECTS, /* OutRedirects */
  88. ICMP_MIB_OUTECHOS, /* OutEchos */
  89. ICMP_MIB_OUTECHOREPS, /* OutEchoReps */
  90. ICMP_MIB_OUTTIMESTAMPS, /* OutTimestamps */
  91. ICMP_MIB_OUTTIMESTAMPREPS, /* OutTimestampReps */
  92. ICMP_MIB_OUTADDRMASKS, /* OutAddrMasks */
  93. ICMP_MIB_OUTADDRMASKREPS, /* OutAddrMaskReps */
  94. ICMP_MIB_CSUMERRORS, /* InCsumErrors */
  95. __ICMP_MIB_MAX
  96. };
  97. #define __ICMPMSG_MIB_MAX 512 /* Out+In for all 8-bit ICMP types */
  98. /* icmp6 mib definitions */
  99. /*
  100. * RFC 2466: ICMPv6-MIB
  101. */
  102. enum
  103. {
  104. ICMP6_MIB_NUM = 0,
  105. ICMP6_MIB_INMSGS, /* InMsgs */
  106. ICMP6_MIB_INERRORS, /* InErrors */
  107. ICMP6_MIB_OUTMSGS, /* OutMsgs */
  108. ICMP6_MIB_OUTERRORS, /* OutErrors */
  109. ICMP6_MIB_CSUMERRORS, /* InCsumErrors */
  110. __ICMP6_MIB_MAX
  111. };
  112. #define __ICMP6MSG_MIB_MAX 512 /* Out+In for all 8-bit ICMPv6 types */
  113. /* tcp mib definitions */
  114. /*
  115. * RFC 1213: MIB-II TCP group
  116. * RFC 2012 (updates 1213): SNMPv2-MIB-TCP
  117. */
  118. enum
  119. {
  120. TCP_MIB_NUM = 0,
  121. TCP_MIB_RTOALGORITHM, /* RtoAlgorithm */
  122. TCP_MIB_RTOMIN, /* RtoMin */
  123. TCP_MIB_RTOMAX, /* RtoMax */
  124. TCP_MIB_MAXCONN, /* MaxConn */
  125. TCP_MIB_ACTIVEOPENS, /* ActiveOpens */
  126. TCP_MIB_PASSIVEOPENS, /* PassiveOpens */
  127. TCP_MIB_ATTEMPTFAILS, /* AttemptFails */
  128. TCP_MIB_ESTABRESETS, /* EstabResets */
  129. TCP_MIB_CURRESTAB, /* CurrEstab */
  130. TCP_MIB_INSEGS, /* InSegs */
  131. TCP_MIB_OUTSEGS, /* OutSegs */
  132. TCP_MIB_RETRANSSEGS, /* RetransSegs */
  133. TCP_MIB_INERRS, /* InErrs */
  134. TCP_MIB_OUTRSTS, /* OutRsts */
  135. TCP_MIB_CSUMERRORS, /* InCsumErrors */
  136. __TCP_MIB_MAX
  137. };
  138. /* udp mib definitions */
  139. /*
  140. * RFC 1213: MIB-II UDP group
  141. * RFC 2013 (updates 1213): SNMPv2-MIB-UDP
  142. */
  143. enum
  144. {
  145. UDP_MIB_NUM = 0,
  146. UDP_MIB_INDATAGRAMS, /* InDatagrams */
  147. UDP_MIB_NOPORTS, /* NoPorts */
  148. UDP_MIB_INERRORS, /* InErrors */
  149. UDP_MIB_OUTDATAGRAMS, /* OutDatagrams */
  150. UDP_MIB_RCVBUFERRORS, /* RcvbufErrors */
  151. UDP_MIB_SNDBUFERRORS, /* SndbufErrors */
  152. UDP_MIB_CSUMERRORS, /* InCsumErrors */
  153. UDP_MIB_IGNOREDMULTI, /* IgnoredMulti */
  154. __UDP_MIB_MAX
  155. };
  156. /* linux mib definitions */
  157. enum
  158. {
  159. LINUX_MIB_NUM = 0,
  160. LINUX_MIB_SYNCOOKIESSENT, /* SyncookiesSent */
  161. LINUX_MIB_SYNCOOKIESRECV, /* SyncookiesRecv */
  162. LINUX_MIB_SYNCOOKIESFAILED, /* SyncookiesFailed */
  163. LINUX_MIB_EMBRYONICRSTS, /* EmbryonicRsts */
  164. LINUX_MIB_PRUNECALLED, /* PruneCalled */
  165. LINUX_MIB_RCVPRUNED, /* RcvPruned */
  166. LINUX_MIB_OFOPRUNED, /* OfoPruned */
  167. LINUX_MIB_OUTOFWINDOWICMPS, /* OutOfWindowIcmps */
  168. LINUX_MIB_LOCKDROPPEDICMPS, /* LockDroppedIcmps */
  169. LINUX_MIB_ARPFILTER, /* ArpFilter */
  170. LINUX_MIB_TIMEWAITED, /* TimeWaited */
  171. LINUX_MIB_TIMEWAITRECYCLED, /* TimeWaitRecycled */
  172. LINUX_MIB_TIMEWAITKILLED, /* TimeWaitKilled */
  173. LINUX_MIB_PAWSACTIVEREJECTED, /* PAWSActiveRejected */
  174. LINUX_MIB_PAWSESTABREJECTED, /* PAWSEstabRejected */
  175. LINUX_MIB_DELAYEDACKS, /* DelayedACKs */
  176. LINUX_MIB_DELAYEDACKLOCKED, /* DelayedACKLocked */
  177. LINUX_MIB_DELAYEDACKLOST, /* DelayedACKLost */
  178. LINUX_MIB_LISTENOVERFLOWS, /* ListenOverflows */
  179. LINUX_MIB_LISTENDROPS, /* ListenDrops */
  180. LINUX_MIB_TCPHPHITS, /* TCPHPHits */
  181. LINUX_MIB_TCPPUREACKS, /* TCPPureAcks */
  182. LINUX_MIB_TCPHPACKS, /* TCPHPAcks */
  183. LINUX_MIB_TCPRENORECOVERY, /* TCPRenoRecovery */
  184. LINUX_MIB_TCPSACKRECOVERY, /* TCPSackRecovery */
  185. LINUX_MIB_TCPSACKRENEGING, /* TCPSACKReneging */
  186. LINUX_MIB_TCPSACKREORDER, /* TCPSACKReorder */
  187. LINUX_MIB_TCPRENOREORDER, /* TCPRenoReorder */
  188. LINUX_MIB_TCPTSREORDER, /* TCPTSReorder */
  189. LINUX_MIB_TCPFULLUNDO, /* TCPFullUndo */
  190. LINUX_MIB_TCPPARTIALUNDO, /* TCPPartialUndo */
  191. LINUX_MIB_TCPDSACKUNDO, /* TCPDSACKUndo */
  192. LINUX_MIB_TCPLOSSUNDO, /* TCPLossUndo */
  193. LINUX_MIB_TCPLOSTRETRANSMIT, /* TCPLostRetransmit */
  194. LINUX_MIB_TCPRENOFAILURES, /* TCPRenoFailures */
  195. LINUX_MIB_TCPSACKFAILURES, /* TCPSackFailures */
  196. LINUX_MIB_TCPLOSSFAILURES, /* TCPLossFailures */
  197. LINUX_MIB_TCPFASTRETRANS, /* TCPFastRetrans */
  198. LINUX_MIB_TCPSLOWSTARTRETRANS, /* TCPSlowStartRetrans */
  199. LINUX_MIB_TCPTIMEOUTS, /* TCPTimeouts */
  200. LINUX_MIB_TCPLOSSPROBES, /* TCPLossProbes */
  201. LINUX_MIB_TCPLOSSPROBERECOVERY, /* TCPLossProbeRecovery */
  202. LINUX_MIB_TCPRENORECOVERYFAIL, /* TCPRenoRecoveryFail */
  203. LINUX_MIB_TCPSACKRECOVERYFAIL, /* TCPSackRecoveryFail */
  204. LINUX_MIB_TCPRCVCOLLAPSED, /* TCPRcvCollapsed */
  205. LINUX_MIB_TCPDSACKOLDSENT, /* TCPDSACKOldSent */
  206. LINUX_MIB_TCPDSACKOFOSENT, /* TCPDSACKOfoSent */
  207. LINUX_MIB_TCPDSACKRECV, /* TCPDSACKRecv */
  208. LINUX_MIB_TCPDSACKOFORECV, /* TCPDSACKOfoRecv */
  209. LINUX_MIB_TCPABORTONDATA, /* TCPAbortOnData */
  210. LINUX_MIB_TCPABORTONCLOSE, /* TCPAbortOnClose */
  211. LINUX_MIB_TCPABORTONMEMORY, /* TCPAbortOnMemory */
  212. LINUX_MIB_TCPABORTONTIMEOUT, /* TCPAbortOnTimeout */
  213. LINUX_MIB_TCPABORTONLINGER, /* TCPAbortOnLinger */
  214. LINUX_MIB_TCPABORTFAILED, /* TCPAbortFailed */
  215. LINUX_MIB_TCPMEMORYPRESSURES, /* TCPMemoryPressures */
  216. LINUX_MIB_TCPMEMORYPRESSURESCHRONO, /* TCPMemoryPressuresChrono */
  217. LINUX_MIB_TCPSACKDISCARD, /* TCPSACKDiscard */
  218. LINUX_MIB_TCPDSACKIGNOREDOLD, /* TCPSACKIgnoredOld */
  219. LINUX_MIB_TCPDSACKIGNOREDNOUNDO, /* TCPSACKIgnoredNoUndo */
  220. LINUX_MIB_TCPSPURIOUSRTOS, /* TCPSpuriousRTOs */
  221. LINUX_MIB_TCPMD5NOTFOUND, /* TCPMD5NotFound */
  222. LINUX_MIB_TCPMD5UNEXPECTED, /* TCPMD5Unexpected */
  223. LINUX_MIB_TCPMD5FAILURE, /* TCPMD5Failure */
  224. LINUX_MIB_SACKSHIFTED,
  225. LINUX_MIB_SACKMERGED,
  226. LINUX_MIB_SACKSHIFTFALLBACK,
  227. LINUX_MIB_TCPBACKLOGDROP,
  228. LINUX_MIB_PFMEMALLOCDROP,
  229. LINUX_MIB_TCPMINTTLDROP, /* RFC 5082 */
  230. LINUX_MIB_TCPDEFERACCEPTDROP,
  231. LINUX_MIB_IPRPFILTER, /* IP Reverse Path Filter (rp_filter) */
  232. LINUX_MIB_TCPTIMEWAITOVERFLOW, /* TCPTimeWaitOverflow */
  233. LINUX_MIB_TCPREQQFULLDOCOOKIES, /* TCPReqQFullDoCookies */
  234. LINUX_MIB_TCPREQQFULLDROP, /* TCPReqQFullDrop */
  235. LINUX_MIB_TCPRETRANSFAIL, /* TCPRetransFail */
  236. LINUX_MIB_TCPRCVCOALESCE, /* TCPRcvCoalesce */
  237. LINUX_MIB_TCPOFOQUEUE, /* TCPOFOQueue */
  238. LINUX_MIB_TCPOFODROP, /* TCPOFODrop */
  239. LINUX_MIB_TCPOFOMERGE, /* TCPOFOMerge */
  240. LINUX_MIB_TCPCHALLENGEACK, /* TCPChallengeACK */
  241. LINUX_MIB_TCPSYNCHALLENGE, /* TCPSYNChallenge */
  242. LINUX_MIB_TCPFASTOPENACTIVE, /* TCPFastOpenActive */
  243. LINUX_MIB_TCPFASTOPENACTIVEFAIL, /* TCPFastOpenActiveFail */
  244. LINUX_MIB_TCPFASTOPENPASSIVE, /* TCPFastOpenPassive*/
  245. LINUX_MIB_TCPFASTOPENPASSIVEFAIL, /* TCPFastOpenPassiveFail */
  246. LINUX_MIB_TCPFASTOPENLISTENOVERFLOW, /* TCPFastOpenListenOverflow */
  247. LINUX_MIB_TCPFASTOPENCOOKIEREQD, /* TCPFastOpenCookieReqd */
  248. LINUX_MIB_TCPFASTOPENBLACKHOLE, /* TCPFastOpenBlackholeDetect */
  249. LINUX_MIB_TCPSPURIOUS_RTX_HOSTQUEUES, /* TCPSpuriousRtxHostQueues */
  250. LINUX_MIB_BUSYPOLLRXPACKETS, /* BusyPollRxPackets */
  251. LINUX_MIB_TCPAUTOCORKING, /* TCPAutoCorking */
  252. LINUX_MIB_TCPFROMZEROWINDOWADV, /* TCPFromZeroWindowAdv */
  253. LINUX_MIB_TCPTOZEROWINDOWADV, /* TCPToZeroWindowAdv */
  254. LINUX_MIB_TCPWANTZEROWINDOWADV, /* TCPWantZeroWindowAdv */
  255. LINUX_MIB_TCPSYNRETRANS, /* TCPSynRetrans */
  256. LINUX_MIB_TCPORIGDATASENT, /* TCPOrigDataSent */
  257. LINUX_MIB_TCPHYSTARTTRAINDETECT, /* TCPHystartTrainDetect */
  258. LINUX_MIB_TCPHYSTARTTRAINCWND, /* TCPHystartTrainCwnd */
  259. LINUX_MIB_TCPHYSTARTDELAYDETECT, /* TCPHystartDelayDetect */
  260. LINUX_MIB_TCPHYSTARTDELAYCWND, /* TCPHystartDelayCwnd */
  261. LINUX_MIB_TCPACKSKIPPEDSYNRECV, /* TCPACKSkippedSynRecv */
  262. LINUX_MIB_TCPACKSKIPPEDPAWS, /* TCPACKSkippedPAWS */
  263. LINUX_MIB_TCPACKSKIPPEDSEQ, /* TCPACKSkippedSeq */
  264. LINUX_MIB_TCPACKSKIPPEDFINWAIT2, /* TCPACKSkippedFinWait2 */
  265. LINUX_MIB_TCPACKSKIPPEDTIMEWAIT, /* TCPACKSkippedTimeWait */
  266. LINUX_MIB_TCPACKSKIPPEDCHALLENGE, /* TCPACKSkippedChallenge */
  267. LINUX_MIB_TCPWINPROBE, /* TCPWinProbe */
  268. LINUX_MIB_TCPKEEPALIVE, /* TCPKeepAlive */
  269. LINUX_MIB_TCPMTUPFAIL, /* TCPMTUPFail */
  270. LINUX_MIB_TCPMTUPSUCCESS, /* TCPMTUPSuccess */
  271. LINUX_MIB_TCPDELIVERED, /* TCPDelivered */
  272. LINUX_MIB_TCPDELIVEREDCE, /* TCPDeliveredCE */
  273. LINUX_MIB_TCPACKCOMPRESSED, /* TCPAckCompressed */
  274. LINUX_MIB_TCPZEROWINDOWDROP, /* TCPZeroWindowDrop */
  275. LINUX_MIB_TCPRCVQDROP, /* TCPRcvQDrop */
  276. LINUX_MIB_TCPWQUEUETOOBIG, /* TCPWqueueTooBig */
  277. __LINUX_MIB_MAX
  278. };
  279. /* linux Xfrm mib definitions */
  280. enum
  281. {
  282. LINUX_MIB_XFRMNUM = 0,
  283. LINUX_MIB_XFRMINERROR, /* XfrmInError */
  284. LINUX_MIB_XFRMINBUFFERERROR, /* XfrmInBufferError */
  285. LINUX_MIB_XFRMINHDRERROR, /* XfrmInHdrError */
  286. LINUX_MIB_XFRMINNOSTATES, /* XfrmInNoStates */
  287. LINUX_MIB_XFRMINSTATEPROTOERROR, /* XfrmInStateProtoError */
  288. LINUX_MIB_XFRMINSTATEMODEERROR, /* XfrmInStateModeError */
  289. LINUX_MIB_XFRMINSTATESEQERROR, /* XfrmInStateSeqError */
  290. LINUX_MIB_XFRMINSTATEEXPIRED, /* XfrmInStateExpired */
  291. LINUX_MIB_XFRMINSTATEMISMATCH, /* XfrmInStateMismatch */
  292. LINUX_MIB_XFRMINSTATEINVALID, /* XfrmInStateInvalid */
  293. LINUX_MIB_XFRMINTMPLMISMATCH, /* XfrmInTmplMismatch */
  294. LINUX_MIB_XFRMINNOPOLS, /* XfrmInNoPols */
  295. LINUX_MIB_XFRMINPOLBLOCK, /* XfrmInPolBlock */
  296. LINUX_MIB_XFRMINPOLERROR, /* XfrmInPolError */
  297. LINUX_MIB_XFRMOUTERROR, /* XfrmOutError */
  298. LINUX_MIB_XFRMOUTBUNDLEGENERROR, /* XfrmOutBundleGenError */
  299. LINUX_MIB_XFRMOUTBUNDLECHECKERROR, /* XfrmOutBundleCheckError */
  300. LINUX_MIB_XFRMOUTNOSTATES, /* XfrmOutNoStates */
  301. LINUX_MIB_XFRMOUTSTATEPROTOERROR, /* XfrmOutStateProtoError */
  302. LINUX_MIB_XFRMOUTSTATEMODEERROR, /* XfrmOutStateModeError */
  303. LINUX_MIB_XFRMOUTSTATESEQERROR, /* XfrmOutStateSeqError */
  304. LINUX_MIB_XFRMOUTSTATEEXPIRED, /* XfrmOutStateExpired */
  305. LINUX_MIB_XFRMOUTPOLBLOCK, /* XfrmOutPolBlock */
  306. LINUX_MIB_XFRMOUTPOLDEAD, /* XfrmOutPolDead */
  307. LINUX_MIB_XFRMOUTPOLERROR, /* XfrmOutPolError */
  308. LINUX_MIB_XFRMFWDHDRERROR, /* XfrmFwdHdrError*/
  309. LINUX_MIB_XFRMOUTSTATEINVALID, /* XfrmOutStateInvalid */
  310. LINUX_MIB_XFRMACQUIREERROR, /* XfrmAcquireError */
  311. __LINUX_MIB_XFRMMAX
  312. };
  313. #endif /* _LINUX_SNMP_H */