snmp.h 10 KB

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