Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

664 lines
23 KiB

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name:
  4. Abstract:
  5. Author:
  6. Revision History:
  7. --*/
  8. #ifndef __OID_H__
  9. #define __OID_H__
  10. //
  11. // mib-2 OBJECT IDENTIFIER ::= {iso(1) org(3) dod(6) internet(1) mgmt(2) 1}
  12. //
  13. static UINT ids_mib2[] = {1,3,6,1,2,1};
  14. //
  15. // The groups we handle
  16. //
  17. // system OBJECT IDENTIFIER ::= { mib-2 1 }
  18. //
  19. // interfaces OBJECT IDENTIFIER ::= { mib-2 2 }
  20. //
  21. // ip OBJECT IDENTIFIER ::= { mib-2 4 }
  22. //
  23. // icmp OBJECT IDENTIFIER ::= { mib-2 5 }
  24. //
  25. // tcp OBJECT IDENTIFIER ::= { mib-2 6 }
  26. //
  27. // udp OBJECT IDENTIFIER ::= { mib-2 7 }
  28. //
  29. // ipForward OBJECT IDENTIFIER ::= { ip 24 }
  30. //
  31. // ipv6 OBJECT IDENTIFIER ::= { mib-2 55 }
  32. //
  33. //
  34. // The groups we dont handle
  35. //
  36. // at OBJECT IDENTIFIER ::= { mib-2 3 }
  37. // egp OBJECT IDENTIFIER ::= { mib-2 8 }
  38. // cmot OBJECT IDENTIFIER ::= { mib-2 9 }
  39. // transmission OBJECT IDENTIFIER ::= { mib-2 10 }
  40. // snmp OBJECT IDENTIFIER ::= { mib-2 11 }
  41. //
  42. //
  43. // Since each of the groups below is registered separately with
  44. // both the master agent and the subagent framework we need them
  45. // to be fully qualified. Each of the objects in the groups is
  46. // then relative to the oids below.
  47. //
  48. static UINT ids_sysGroup[] = {1,3,6,1,2,1,1};
  49. static UINT ids_ifGroup[] = {1,3,6,1,2,1,2};
  50. static UINT ids_ipGroup[] = {1,3,6,1,2,1,4};
  51. static UINT ids_icmpGroup[] = {1,3,6,1,2,1,5};
  52. static UINT ids_tcpGroup[] = {1,3,6,1,2,1,6};
  53. static UINT ids_udpGroup[] = {1,3,6,1,2,1,7};
  54. static UINT ids_ipv6Group[] = {1,3,6,1,2,1,55};
  55. //
  56. // Now the members of each of these groups themselves
  57. //
  58. //
  59. // Systems group
  60. //
  61. static UINT ids_sysDescr[] = {1, 0};
  62. static UINT ids_sysObjectID[] = {2, 0};
  63. static UINT ids_sysUpTime[] = {3, 0};
  64. static UINT ids_sysContact[] = {4, 0};
  65. static UINT ids_sysName[] = {5, 0};
  66. static UINT ids_sysLocation[] = {6, 0};
  67. static UINT ids_sysServices[] = {7, 0};
  68. //
  69. // Interfaces group
  70. //
  71. static UINT ids_ifNumber[] = {1, 0};
  72. static UINT ids_ifTable[] = {2};
  73. //
  74. // The IF Table is composed of IF Entries which are indexed by the IfIndex
  75. //
  76. static UINT ids_ifEntry[] = {2, 1};
  77. //
  78. // The entry is a sequence of:
  79. //
  80. static UINT ids_ifIndex[] = {2, 1, 1};
  81. static UINT ids_ifDescr[] = {2, 1, 2};
  82. static UINT ids_ifType[] = {2, 1, 3};
  83. static UINT ids_ifMtu[] = {2, 1, 4};
  84. static UINT ids_ifSpeed[] = {2, 1, 5};
  85. static UINT ids_ifPhysAddress[] = {2, 1, 6};
  86. static UINT ids_ifAdminStatus[] = {2, 1, 7};
  87. static UINT ids_ifOperStatus[] = {2, 1, 8};
  88. static UINT ids_ifLastChange[] = {2, 1, 9};
  89. static UINT ids_ifInOctets[] = {2, 1, 10};
  90. static UINT ids_ifInUcastPkts[] = {2, 1, 11};
  91. static UINT ids_ifInNUcastPkts[] = {2, 1, 12};
  92. static UINT ids_ifInDiscards[] = {2, 1, 13};
  93. static UINT ids_ifInErrors[] = {2, 1, 14};
  94. static UINT ids_ifInUnknownProtos[] = {2, 1, 15};
  95. static UINT ids_ifOutOctets[] = {2, 1, 16};
  96. static UINT ids_ifOutUcastPkts[] = {2, 1, 17};
  97. static UINT ids_ifOutNUcastPkts[] = {2, 1, 18};
  98. static UINT ids_ifOutDiscards[] = {2, 1, 19};
  99. static UINT ids_ifOutErrors[] = {2, 1, 20};
  100. static UINT ids_ifOutQLen[] = {2, 1, 21};
  101. static UINT ids_ifSpecific[] = {2, 1, 22};
  102. //
  103. // The IP Group
  104. //
  105. static UINT ids_ipForwarding[] = {1, 0};
  106. static UINT ids_ipDefaultTTL[] = {2, 0};
  107. static UINT ids_ipInReceives[] = {3, 0};
  108. static UINT ids_ipInHdrErrors[] = {4, 0};
  109. static UINT ids_ipInAddrErrors[] = {5, 0};
  110. static UINT ids_ipForwDatagrams[] = {6, 0};
  111. static UINT ids_ipInUnknownProtos[] = {7, 0};
  112. static UINT ids_ipInDiscards[] = {8, 0};
  113. static UINT ids_ipInDelivers[] = {9, 0};
  114. static UINT ids_ipOutRequests[] = {10, 0};
  115. static UINT ids_ipOutDiscards[] = {11, 0};
  116. static UINT ids_ipOutNoRoutes[] = {12, 0};
  117. static UINT ids_ipReasmTimeout[] = {13, 0};
  118. static UINT ids_ipReasmReqds[] = {14, 0};
  119. static UINT ids_ipReasmOKs[] = {15, 0};
  120. static UINT ids_ipReasmFails[] = {16, 0};
  121. static UINT ids_ipFragOKs[] = {17, 0};
  122. static UINT ids_ipFragFails[] = {18, 0};
  123. static UINT ids_ipFragCreates[] = {19, 0};
  124. static UINT ids_ipRoutingDiscards[] = {23, 0};
  125. //
  126. // There are a three tables that fit in between IpFragCreates and
  127. // IpRoutingDiscards, but there are put after the scalars for clarity
  128. //
  129. static UINT ids_ipAddrTable[] = {20};
  130. static UINT ids_ipRouteTable[] = {21};
  131. static UINT ids_ipNetToMediaTable[] = {22};
  132. //
  133. // The IP Address Table is composed of IP Address Entries which are
  134. // indexed by IpAdEntAddr
  135. //
  136. static UINT ids_ipAddrEntry[] = {20, 1};
  137. //
  138. // The entry is a sequence of:
  139. //
  140. static UINT ids_ipAdEntAddr[] = {20, 1, 1};
  141. static UINT ids_ipAdEntIfIndex[] = {20, 1, 2};
  142. static UINT ids_ipAdEntNetMask[] = {20, 1, 3};
  143. static UINT ids_ipAdEntBcastAddr[] = {20, 1, 4};
  144. static UINT ids_ipAdEntReasmMaxSize[] = {20, 1, 5};
  145. //
  146. // The IP Route Table is composed of IP Route Entries which are
  147. // indexed by IpRouteDest
  148. //
  149. static UINT ids_ipRouteEntry[] = {21, 1};
  150. //
  151. // The entry is a sequence of:
  152. //
  153. static UINT ids_ipRouteDest[] = {21, 1, 1};
  154. static UINT ids_ipRouteIfIndex[] = {21, 1, 2};
  155. static UINT ids_ipRouteMetric1[] = {21, 1, 3};
  156. static UINT ids_ipRouteMetric2[] = {21, 1, 4};
  157. static UINT ids_ipRouteMetric3[] = {21, 1, 5};
  158. static UINT ids_ipRouteMetric4[] = {21, 1, 6};
  159. static UINT ids_ipRouteNextHop[] = {21, 1, 7};
  160. static UINT ids_ipRouteType[] = {21, 1, 8};
  161. static UINT ids_ipRouteProto[] = {21, 1, 9};
  162. static UINT ids_ipRouteAge[] = {21, 1, 10};
  163. static UINT ids_ipRouteMask[] = {21, 1, 11};
  164. static UINT ids_ipRouteMetric5[] = {21, 1, 12};
  165. static UINT ids_ipRouteInfo[] = {21, 1, 13};
  166. //
  167. // The IP Net To Media Table is composed of IP Net To Media Entries which are
  168. // indexed by IpNetToMediaIfIndex and IpNetToMediaNetAddress
  169. //
  170. static UINT ids_ipNetToMediaEntry[] = {22, 1};
  171. //
  172. // The entry is a sequence of:
  173. //
  174. static UINT ids_ipNetToMediaIfIndex[] = {22, 1, 1};
  175. static UINT ids_ipNetToMediaPhysAddress[] = {22, 1, 2};
  176. static UINT ids_ipNetToMediaNetAddress[] = {22, 1, 3};
  177. static UINT ids_ipNetToMediaType[] = {22, 1, 4};
  178. //
  179. // Then there is the IP Forward group which is one scalar and one table. It
  180. // comes at the end of the IP group and is really a sub group of the IP Group
  181. //
  182. static UINT ids_ipForwardGroup[] = {24};
  183. static UINT ids_ipForwardNumber[] = {24, 1, 0};
  184. static UINT ids_ipForwardTable[] = {24, 2};
  185. //
  186. // The IP Forward Table is composed of IP Forward Entries which are
  187. // indexed by IpForwardDest, IpForwardProto, IpForwardPolicy and
  188. // IpForwardNextHop
  189. //
  190. static UINT ids_ipForwardEntry[] = {24, 2, 1};
  191. //
  192. // The entry is a sequence of:
  193. //
  194. static UINT ids_ipForwardDest[] = {24, 2, 1, 1};
  195. static UINT ids_ipForwardMask[] = {24, 2, 1, 2};
  196. static UINT ids_ipForwardPolicy[] = {24, 2, 1, 3};
  197. static UINT ids_ipForwardNextHop[] = {24, 2, 1, 4};
  198. static UINT ids_ipForwardIfIndex[] = {24, 2, 1, 5};
  199. static UINT ids_ipForwardType[] = {24, 2, 1, 6};
  200. static UINT ids_ipForwardProto[] = {24, 2, 1, 7};
  201. static UINT ids_ipForwardAge[] = {24, 2, 1, 8};
  202. static UINT ids_ipForwardInfo[] = {24, 2, 1, 9};
  203. static UINT ids_ipForwardNextHopAS[] = {24, 2, 1, 10};
  204. static UINT ids_ipForwardMetric1[] = {24, 2, 1, 11};
  205. static UINT ids_ipForwardMetric2[] = {24, 2, 1, 12};
  206. static UINT ids_ipForwardMetric3[] = {24, 2, 1, 13};
  207. static UINT ids_ipForwardMetric4[] = {24, 2, 1, 14};
  208. static UINT ids_ipForwardMetric5[] = {24, 2, 1, 15};
  209. //
  210. // The ICMP group. It is just a bunch of scalars. All are READ-ONLY
  211. //
  212. static UINT ids_icmpInMsgs[] = {1, 0};
  213. static UINT ids_icmpInErrors[] = {2, 0};
  214. static UINT ids_icmpInDestUnreachs[] = {3, 0};
  215. static UINT ids_icmpInTimeExcds[] = {4, 0};
  216. static UINT ids_icmpInParmProbs[] = {5, 0};
  217. static UINT ids_icmpInSrcQuenchs[] = {6, 0};
  218. static UINT ids_icmpInRedirects[] = {7, 0};
  219. static UINT ids_icmpInEchos[] = {8, 0};
  220. static UINT ids_icmpInEchoReps[] = {9, 0};
  221. static UINT ids_icmpInTimestamps[] = {10, 0};
  222. static UINT ids_icmpInTimestampReps[] = {11, 0};
  223. static UINT ids_icmpInAddrMasks[] = {12, 0};
  224. static UINT ids_icmpInAddrMaskReps[] = {13, 0};
  225. static UINT ids_icmpOutMsgs[] = {14, 0};
  226. static UINT ids_icmpOutErrors[] = {15, 0};
  227. static UINT ids_icmpOutDestUnreachs[] = {16, 0};
  228. static UINT ids_icmpOutTimeExcds[] = {17, 0};
  229. static UINT ids_icmpOutParmProbs[] = {18, 0};
  230. static UINT ids_icmpOutSrcQuenchs[] = {19, 0};
  231. static UINT ids_icmpOutRedirects[] = {20, 0};
  232. static UINT ids_icmpOutEchos[] = {21, 0};
  233. static UINT ids_icmpOutEchoReps[] = {22, 0};
  234. static UINT ids_icmpOutTimestamps[] = {23, 0};
  235. static UINT ids_icmpOutTimestampReps[] = {24, 0};
  236. static UINT ids_icmpOutAddrMasks[] = {25, 0};
  237. static UINT ids_icmpOutAddrMaskReps[] = {26, 0};
  238. //
  239. // The TCP group. It consists of some scalars (the TCP statistics) and the
  240. // TCP Connection table
  241. //
  242. static UINT ids_tcpRtoAlgorithm[] = {1, 0};
  243. static UINT ids_tcpRtoMin[] = {2, 0};
  244. static UINT ids_tcpRtoMax[] = {3, 0};
  245. static UINT ids_tcpMaxConn[] = {4, 0};
  246. static UINT ids_tcpActiveOpens[] = {5, 0};
  247. static UINT ids_tcpPassiveOpens[] = {6, 0};
  248. static UINT ids_tcpAttemptFails[] = {7, 0};
  249. static UINT ids_tcpEstabResets[] = {8, 0};
  250. static UINT ids_tcpCurrEstab[] = {9, 0};
  251. static UINT ids_tcpInSegs[] = {10, 0};
  252. static UINT ids_tcpOutSegs[] = {11, 0};
  253. static UINT ids_tcpRetransSegs[] = {12, 0};
  254. static UINT ids_tcpInErrs[] = {14, 0};
  255. static UINT ids_tcpOutRsts[] = {15, 0};
  256. //
  257. // The connection table fits between TcpRetransSegs and TcpInErrs
  258. //
  259. static UINT ids_tcpConnTable[] = {13};
  260. static UINT ids_tcpNewConnTable[] = {19};
  261. //
  262. // The TCP Connection Table is composed of TCP Connection Entries which are
  263. // indexed by TcpConnLocalAddress, TcpConnLocalPort, TcpConnRemAddress,
  264. // TcpConnRemPort
  265. //
  266. static UINT ids_tcpConnEntry[] = {13, 1};
  267. static UINT ids_tcpNewConnEntry[] = {19, 1};
  268. //
  269. // The entry is a sequence of:
  270. //
  271. static UINT ids_tcpConnState[] = {13, 1, 1};
  272. static UINT ids_tcpConnLocalAddress[] = {13, 1, 2};
  273. static UINT ids_tcpConnLocalPort[] = {13, 1, 3};
  274. static UINT ids_tcpConnRemAddress[] = {13, 1, 4};
  275. static UINT ids_tcpConnRemPort[] = {13, 1, 5};
  276. static UINT ids_tcpNewConnLocalAddressType[] = {19, 1, 1};
  277. static UINT ids_tcpNewConnLocalAddress[] = {19, 1, 2};
  278. static UINT ids_tcpNewConnLocalPort[] = {19, 1, 3};
  279. static UINT ids_tcpNewConnRemAddressType[] = {19, 1, 4};
  280. static UINT ids_tcpNewConnRemAddress[] = {19, 1, 5};
  281. static UINT ids_tcpNewConnRemPort[] = {19, 1, 6};
  282. static UINT ids_tcpNewConnState[] = {19, 1, 7};
  283. //
  284. // The UDP group. Like the TCP, scalar statistics and a Listener table
  285. //
  286. static UINT ids_udpInDatagrams[] = {1, 0};
  287. static UINT ids_udpNoPorts[] = {2, 0};
  288. static UINT ids_udpInErrors[] = {3, 0};
  289. static UINT ids_udpOutDatagrams[] = {4, 0};
  290. static UINT ids_udpTable[] = {5, 0};
  291. static UINT ids_udpListenerTable[] = {7, 0};
  292. //
  293. // The UDP Listener Table is composed of Udp Entries which are indexed by
  294. // UdpLocalAddress and UdpLocalPort
  295. //
  296. static UINT ids_udpEntry[] = {5, 1};
  297. static UINT ids_udpListenerEntry[] = {7, 1};
  298. //
  299. // The entry is a sequence of:
  300. //
  301. static UINT ids_udpLocalAddress[] = {5, 1, 1};
  302. static UINT ids_udpLocalPort[] = {5, 1, 2};
  303. static UINT ids_udpListenerLocalAddressType[] = {7, 1, 1};
  304. static UINT ids_udpListenerLocalAddress[] = {7, 1, 2};
  305. static UINT ids_udpListenerLocalPort[] = {7, 1, 3};
  306. SnmpMibEntry mib_sysGroup[] =
  307. {
  308. MIB_OCTETSTRING_L(sysDescr,0,255),
  309. MIB_OBJECTIDENTIFIER(sysObjectID),
  310. MIB_TIMETICKS(sysUpTime),
  311. MIB_OCTETSTRING_RW_L(sysContact,0,255),
  312. MIB_OCTETSTRING_RW_L(sysName,0,255),
  313. MIB_OCTETSTRING_RW_L(sysLocation,0,255),
  314. MIB_INTEGER_L(sysServices,0,127),
  315. MIB_END()
  316. };
  317. SnmpMibEntry mib_ifGroup[] =
  318. {
  319. MIB_INTEGER(ifNumber),
  320. MIB_TABLE_ROOT(ifTable),
  321. MIB_TABLE_ENTRY(ifEntry),
  322. MIB_INTEGER(ifIndex),
  323. MIB_DISPSTRING_L(ifDescr,0,255),
  324. MIB_INTEGER(ifType),
  325. MIB_INTEGER(ifMtu),
  326. MIB_GAUGE(ifSpeed),
  327. MIB_PHYSADDRESS(ifPhysAddress),
  328. MIB_INTEGER_RW(ifAdminStatus),
  329. MIB_INTEGER(ifOperStatus),
  330. MIB_TIMETICKS(ifLastChange),
  331. MIB_COUNTER(ifInOctets),
  332. MIB_COUNTER(ifInUcastPkts),
  333. MIB_COUNTER(ifInNUcastPkts),
  334. MIB_COUNTER(ifInDiscards),
  335. MIB_COUNTER(ifInErrors),
  336. MIB_COUNTER(ifInUnknownProtos),
  337. MIB_COUNTER(ifOutOctets),
  338. MIB_COUNTER(ifOutUcastPkts),
  339. MIB_COUNTER(ifOutNUcastPkts),
  340. MIB_COUNTER(ifOutDiscards),
  341. MIB_COUNTER(ifOutErrors),
  342. MIB_GAUGE(ifOutQLen),
  343. MIB_OBJECTIDENTIFIER(ifSpecific),
  344. MIB_END()
  345. };
  346. SnmpMibEntry mib_ipGroup[] =
  347. {
  348. MIB_INTEGER(ipForwarding),
  349. MIB_INTEGER_RW(ipDefaultTTL),
  350. MIB_COUNTER(ipInReceives),
  351. MIB_COUNTER(ipInHdrErrors),
  352. MIB_COUNTER(ipInAddrErrors),
  353. MIB_COUNTER(ipForwDatagrams),
  354. MIB_COUNTER(ipInUnknownProtos),
  355. MIB_COUNTER(ipInDiscards),
  356. MIB_COUNTER(ipInDelivers),
  357. MIB_COUNTER(ipOutRequests),
  358. MIB_COUNTER(ipOutDiscards),
  359. MIB_COUNTER(ipOutNoRoutes),
  360. MIB_INTEGER(ipReasmTimeout),
  361. MIB_COUNTER(ipReasmReqds),
  362. MIB_COUNTER(ipReasmOKs),
  363. MIB_COUNTER(ipReasmFails),
  364. MIB_COUNTER(ipFragOKs),
  365. MIB_COUNTER(ipFragFails),
  366. MIB_COUNTER(ipFragCreates),
  367. MIB_TABLE_ROOT(ipAddrTable),
  368. MIB_TABLE_ENTRY(ipAddrEntry),
  369. MIB_IPADDRESS(ipAdEntAddr),
  370. MIB_INTEGER(ipAdEntIfIndex),
  371. MIB_IPADDRESS(ipAdEntNetMask),
  372. MIB_INTEGER(ipAdEntBcastAddr),
  373. MIB_INTEGER_L(ipAdEntReasmMaxSize,0,65535),
  374. MIB_TABLE_ROOT(ipRouteTable),
  375. MIB_TABLE_ENTRY(ipRouteEntry),
  376. MIB_IPADDRESS_RW(ipRouteDest),
  377. MIB_INTEGER_RW(ipRouteIfIndex),
  378. MIB_INTEGER_RW(ipRouteMetric1),
  379. MIB_INTEGER_RW(ipRouteMetric2),
  380. MIB_INTEGER_RW(ipRouteMetric3),
  381. MIB_INTEGER_RW(ipRouteMetric4),
  382. MIB_IPADDRESS_RW(ipRouteNextHop),
  383. MIB_INTEGER_RW(ipRouteType),
  384. MIB_INTEGER(ipRouteProto),
  385. MIB_INTEGER_RW(ipRouteAge),
  386. MIB_IPADDRESS_RW(ipRouteMask),
  387. MIB_INTEGER_RW(ipRouteMetric5),
  388. MIB_OBJECTIDENTIFIER(ipRouteInfo),
  389. MIB_TABLE_ROOT(ipNetToMediaTable),
  390. MIB_TABLE_ENTRY(ipNetToMediaEntry),
  391. MIB_INTEGER_RW(ipNetToMediaIfIndex),
  392. MIB_PHYSADDRESS_RW(ipNetToMediaPhysAddress),
  393. MIB_IPADDRESS_RW(ipNetToMediaNetAddress),
  394. MIB_INTEGER_RW(ipNetToMediaType),
  395. MIB_COUNTER(ipRoutingDiscards),
  396. MIB_GROUP(ipForwardGroup),
  397. MIB_GAUGE(ipForwardNumber),
  398. MIB_TABLE_ROOT(ipForwardTable),
  399. MIB_TABLE_ENTRY(ipForwardEntry),
  400. MIB_IPADDRESS_RW(ipForwardDest),
  401. MIB_IPADDRESS_RW(ipForwardMask),
  402. MIB_INTEGER_RW(ipForwardPolicy),
  403. MIB_IPADDRESS_RW(ipForwardNextHop),
  404. MIB_INTEGER_RW(ipForwardIfIndex),
  405. MIB_INTEGER_RW(ipForwardType),
  406. MIB_INTEGER_RW(ipForwardProto),
  407. MIB_INTEGER_RW(ipForwardAge),
  408. MIB_OBJECTIDENTIFIER(ipForwardInfo),
  409. MIB_INTEGER_RW(ipForwardNextHopAS),
  410. MIB_INTEGER_RW(ipForwardMetric1),
  411. MIB_INTEGER_RW(ipForwardMetric2),
  412. MIB_INTEGER_RW(ipForwardMetric3),
  413. MIB_INTEGER_RW(ipForwardMetric4),
  414. MIB_INTEGER_RW(ipForwardMetric5),
  415. MIB_END()
  416. };
  417. SnmpMibEntry mib_icmpGroup[] =
  418. {
  419. MIB_COUNTER(icmpInMsgs),
  420. MIB_COUNTER(icmpInErrors),
  421. MIB_COUNTER(icmpInDestUnreachs),
  422. MIB_COUNTER(icmpInTimeExcds),
  423. MIB_COUNTER(icmpInParmProbs),
  424. MIB_COUNTER(icmpInSrcQuenchs),
  425. MIB_COUNTER(icmpInRedirects),
  426. MIB_COUNTER(icmpInEchos),
  427. MIB_COUNTER(icmpInEchoReps),
  428. MIB_COUNTER(icmpInTimestamps),
  429. MIB_COUNTER(icmpInTimestampReps),
  430. MIB_COUNTER(icmpInAddrMasks),
  431. MIB_COUNTER(icmpInAddrMaskReps),
  432. MIB_COUNTER(icmpOutMsgs),
  433. MIB_COUNTER(icmpOutErrors),
  434. MIB_COUNTER(icmpOutDestUnreachs),
  435. MIB_COUNTER(icmpOutTimeExcds),
  436. MIB_COUNTER(icmpOutParmProbs),
  437. MIB_COUNTER(icmpOutSrcQuenchs),
  438. MIB_COUNTER(icmpOutRedirects),
  439. MIB_COUNTER(icmpOutEchos),
  440. MIB_COUNTER(icmpOutEchoReps),
  441. MIB_COUNTER(icmpOutTimestamps),
  442. MIB_COUNTER(icmpOutTimestampReps),
  443. MIB_COUNTER(icmpOutAddrMasks),
  444. MIB_COUNTER(icmpOutAddrMaskReps),
  445. MIB_END()
  446. };
  447. SnmpMibEntry mib_tcpGroup[] =
  448. {
  449. MIB_INTEGER(tcpRtoAlgorithm),
  450. MIB_INTEGER(tcpRtoMin),
  451. MIB_INTEGER(tcpRtoMax),
  452. MIB_INTEGER(tcpMaxConn),
  453. MIB_COUNTER(tcpActiveOpens),
  454. MIB_COUNTER(tcpPassiveOpens),
  455. MIB_COUNTER(tcpAttemptFails),
  456. MIB_COUNTER(tcpEstabResets),
  457. MIB_GAUGE(tcpCurrEstab),
  458. MIB_COUNTER(tcpInSegs),
  459. MIB_COUNTER(tcpOutSegs),
  460. MIB_COUNTER(tcpRetransSegs),
  461. MIB_TABLE_ROOT(tcpConnTable),
  462. MIB_TABLE_ENTRY(tcpConnEntry),
  463. MIB_INTEGER_RW(tcpConnState),
  464. MIB_IPADDRESS(tcpConnLocalAddress),
  465. MIB_INTEGER_L(tcpConnLocalPort,0,65535),
  466. MIB_IPADDRESS(tcpConnRemAddress),
  467. MIB_INTEGER_L(tcpConnRemPort,0,65535),
  468. MIB_COUNTER(tcpInErrs),
  469. MIB_COUNTER(tcpOutRsts),
  470. // skips some oids here
  471. MIB_TABLE_ROOT(tcpNewConnTable),
  472. MIB_TABLE_ENTRY(tcpNewConnEntry),
  473. MIB_INTEGER_NA(tcpNewConnLocalAddressType),
  474. MIB_OCTETSTRING_NA(tcpNewConnLocalAddress),
  475. MIB_INTEGER_NA_L(tcpNewConnLocalPort,0,65535),
  476. MIB_INTEGER_NA(tcpNewConnRemAddressType),
  477. MIB_OCTETSTRING_NA(tcpNewConnRemAddress),
  478. MIB_INTEGER_NA_L(tcpNewConnRemPort,0,65535),
  479. MIB_INTEGER_RW(tcpNewConnState),
  480. MIB_END()
  481. };
  482. SnmpMibEntry mib_udpGroup[] =
  483. {
  484. MIB_COUNTER(udpInDatagrams),
  485. MIB_COUNTER(udpNoPorts),
  486. MIB_COUNTER(udpInErrors),
  487. MIB_COUNTER(udpOutDatagrams),
  488. MIB_TABLE_ROOT(udpTable),
  489. MIB_TABLE_ENTRY(udpEntry),
  490. MIB_IPADDRESS(udpLocalAddress),
  491. MIB_INTEGER_L(udpLocalPort,0,65535),
  492. // skips some oids here
  493. MIB_TABLE_ROOT(udpListenerTable),
  494. MIB_TABLE_ENTRY(udpListenerEntry),
  495. MIB_INTEGER_NA(udpListenerLocalAddressType),
  496. MIB_OCTETSTRING_NA(udpListenerLocalAddress),
  497. MIB_INTEGER_L(udpListenerLocalPort,0,65535),
  498. MIB_END()
  499. };
  500. //
  501. // The list of the out-of-order table indices
  502. //
  503. SnmpMibEntry * pi_ipNetToMediaEntry[] = {
  504. MIB_ENTRY_PTR(ipGroup, ipNetToMediaIfIndex),
  505. MIB_ENTRY_PTR(ipGroup, ipNetToMediaNetAddress)
  506. };
  507. SnmpMibEntry * pi_ipForwardEntry[] = {
  508. MIB_ENTRY_PTR(ipGroup, ipForwardDest),
  509. MIB_ENTRY_PTR(ipGroup, ipForwardProto),
  510. MIB_ENTRY_PTR(ipGroup, ipForwardPolicy),
  511. MIB_ENTRY_PTR(ipGroup, ipForwardNextHop)
  512. };
  513. SnmpMibEntry * pi_tcpConnEntry[] = {
  514. MIB_ENTRY_PTR(tcpGroup, tcpConnLocalAddress),
  515. MIB_ENTRY_PTR(tcpGroup, tcpConnLocalPort),
  516. MIB_ENTRY_PTR(tcpGroup, tcpConnRemAddress),
  517. MIB_ENTRY_PTR(tcpGroup, tcpConnRemPort)
  518. };
  519. //
  520. // The list of the tables supported by the sub agent
  521. //
  522. SnmpMibTable tbl_ifGroup[] =
  523. {
  524. MIB_TABLE(ifGroup, ifEntry, NULL)
  525. };
  526. SnmpMibTable tbl_ipGroup[] =
  527. {
  528. MIB_TABLE(ipGroup, ipAddrEntry, NULL),
  529. MIB_TABLE(ipGroup, ipRouteEntry, NULL),
  530. MIB_TABLE(ipGroup, ipNetToMediaEntry, pi_ipNetToMediaEntry),
  531. MIB_TABLE(ipGroup, ipForwardEntry, pi_ipForwardEntry)
  532. };
  533. SnmpMibTable tbl_tcpGroup[] =
  534. {
  535. MIB_TABLE(tcpGroup, tcpConnEntry, pi_tcpConnEntry),
  536. MIB_TABLE(tcpGroup, tcpNewConnEntry, NULL)
  537. };
  538. SnmpMibTable tbl_udpGroup[] =
  539. {
  540. MIB_TABLE(udpGroup, udpEntry, NULL),
  541. MIB_TABLE(udpGroup, udpListenerEntry, NULL)
  542. };
  543. //
  544. // This puts the mib_* and tbl_* entries together to create a complete view
  545. //
  546. SnmpMibView v_mib2[] = {{MIB_VERSION,
  547. MIB_VIEW_NORMAL,
  548. MIB_OID(ids_sysGroup),
  549. MIB_ENTRIES(mib_sysGroup),
  550. {NULL,0}},
  551. {MIB_VERSION,
  552. MIB_VIEW_NORMAL,
  553. MIB_OID(ids_ifGroup),
  554. MIB_ENTRIES(mib_ifGroup),
  555. MIB_TABLES(tbl_ifGroup)},
  556. {MIB_VERSION,
  557. MIB_VIEW_NORMAL,
  558. MIB_OID(ids_ipGroup),
  559. MIB_ENTRIES(mib_ipGroup),
  560. MIB_TABLES(tbl_ipGroup)},
  561. {MIB_VERSION,
  562. MIB_VIEW_NORMAL,
  563. MIB_OID(ids_icmpGroup),
  564. MIB_ENTRIES(mib_icmpGroup),
  565. {NULL,0}},
  566. {MIB_VERSION,
  567. MIB_VIEW_NORMAL,
  568. MIB_OID(ids_tcpGroup),
  569. MIB_ENTRIES(mib_tcpGroup),
  570. MIB_TABLES(tbl_tcpGroup)},
  571. {MIB_VERSION,
  572. MIB_VIEW_NORMAL,
  573. MIB_OID(ids_udpGroup),
  574. MIB_ENTRIES(mib_udpGroup),
  575. MIB_TABLES(tbl_udpGroup)}};
  576. #endif