1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 * or http://www.opensolaris.org/os/licensing. 10 * See the License for the specific language governing permissions 11 * and limitations under the License. 12 * 13 * When distributing Covered Code, include this CDDL HEADER in each 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 * 21 * Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved. 22 */ 23 /* Copyright (c) 1990 Mentat Inc. */ 24 25 #ifndef _INET_MIB2_H 26 #define _INET_MIB2_H 27 28 #include <netinet/in.h> /* For in6_addr_t */ 29 #include <sys/tsol/label.h> /* For brange_t */ 30 #include <sys/tsol/label_macro.h> /* For brange_t */ 31 32 #ifdef __cplusplus 33 extern "C" { 34 #endif 35 36 /* 37 * The IPv6 parts of this are derived from: 38 * RFC 2465 39 * RFC 2466 40 * RFC 2452 41 * RFC 2454 42 */ 43 44 /* 45 * SNMP set/get via M_PROTO T_OPTMGMT_REQ. Structure is that used 46 * for [gs]etsockopt() calls. get uses T_CURRENT, set uses T_NEOGTIATE 47 * MGMT_flags value. The following definition of opthdr is taken from 48 * socket.h: 49 * 50 * An option specification consists of an opthdr, followed by the value of 51 * the option. An options buffer contains one or more options. The len 52 * field of opthdr specifies the length of the option value in bytes. This 53 * length must be a multiple of sizeof(long) (use OPTLEN macro). 54 * 55 * struct opthdr { 56 * long level; protocol level affected 57 * long name; option to modify 58 * long len; length of option value 59 * }; 60 * 61 * #define OPTLEN(x) ((((x) + sizeof(long) - 1) / sizeof(long)) * sizeof(long)) 62 * #define OPTVAL(opt) ((char *)(opt + 1)) 63 * 64 * For get requests (T_CURRENT), any MIB2_xxx value can be used (only 65 * "get all" is supported, so all modules get a copy of the request to 66 * return everything it knows. In general, we use MIB2_IP. There is 67 * one exception: in general, IP will not report information related to 68 * ire_testhidden and IRE_IF_CLONE routes (e.g., in the MIB2_IP_ROUTE 69 * table). However, using the special value EXPER_IP_AND_ALL_IRES will cause 70 * all information to be reported. This special value should only be 71 * used by IPMP-aware low-level utilities (e.g. in.mpathd). 72 * 73 * IMPORTANT: some fields are grouped in a different structure than 74 * suggested by MIB-II, e.g., checksum error counts. The original MIB-2 75 * field name has been retained. Field names beginning with "mi" are not 76 * defined in the MIB but contain important & useful information maintained 77 * by the corresponding module. 78 */ 79 #ifndef IPPROTO_MAX 80 #define IPPROTO_MAX 256 81 #endif 82 83 #define MIB2_SYSTEM (IPPROTO_MAX+1) 84 #define MIB2_INTERFACES (IPPROTO_MAX+2) 85 #define MIB2_AT (IPPROTO_MAX+3) 86 #define MIB2_IP (IPPROTO_MAX+4) 87 #define MIB2_ICMP (IPPROTO_MAX+5) 88 #define MIB2_TCP (IPPROTO_MAX+6) 89 #define MIB2_UDP (IPPROTO_MAX+7) 90 #define MIB2_EGP (IPPROTO_MAX+8) 91 #define MIB2_CMOT (IPPROTO_MAX+9) 92 #define MIB2_TRANSMISSION (IPPROTO_MAX+10) 93 #define MIB2_SNMP (IPPROTO_MAX+11) 94 #define MIB2_IP6 (IPPROTO_MAX+12) 95 #define MIB2_ICMP6 (IPPROTO_MAX+13) 96 #define MIB2_TCP6 (IPPROTO_MAX+14) 97 #define MIB2_UDP6 (IPPROTO_MAX+15) 98 #define MIB2_SCTP (IPPROTO_MAX+16) 99 #define MIB2_DCCP (IPPROTO_MAX+17) 100 101 /* 102 * Define range of levels for use with MIB2_* 103 */ 104 #define MIB2_RANGE_START (IPPROTO_MAX+1) 105 #define MIB2_RANGE_END (IPPROTO_MAX+17) 106 107 108 #define EXPER 1024 /* experimental - not part of mib */ 109 #define EXPER_IGMP (EXPER+1) 110 #define EXPER_DVMRP (EXPER+2) 111 #define EXPER_RAWIP (EXPER+3) 112 #define EXPER_IP_AND_ALL_IRES (EXPER+4) 113 114 /* 115 * Define range of levels for experimental use 116 */ 117 #define EXPER_RANGE_START (EXPER+1) 118 #define EXPER_RANGE_END (EXPER+4) 119 120 #define BUMP_MIB(s, x) { \ 121 extern void __dtrace_probe___mib_##x(int, void *); \ 122 void *stataddr = &((s)->x); \ 123 __dtrace_probe___mib_##x(1, stataddr); \ 124 (s)->x++; \ 125 } 126 127 #define UPDATE_MIB(s, x, y) { \ 128 extern void __dtrace_probe___mib_##x(int, void *); \ 129 void *stataddr = &((s)->x); \ 130 __dtrace_probe___mib_##x(y, stataddr); \ 131 (s)->x += (y); \ 132 } 133 134 #define SET_MIB(x, y) x = y 135 #define BUMP_LOCAL(x) (x)++ 136 #define UPDATE_LOCAL(x, y) (x) += (y) 137 #define SYNC32_MIB(s, m32, m64) SET_MIB((s)->m32, (s)->m64 & 0xffffffff) 138 139 /* 140 * Each struct that has been extended have a macro (MIB_FIRST_NEW_ELM_type) 141 * that is set to the first new element of the extended struct. 142 * The LEGACY_MIB_SIZE macro can be used to determine the size of MIB 143 * objects that needs to be returned to older applications unaware of 144 * these extensions. 145 */ 146 #define MIB_PTRDIFF(s, e) (caddr_t)e - (caddr_t)s 147 #define LEGACY_MIB_SIZE(s, t) MIB_PTRDIFF(s, &(s)->MIB_FIRST_NEW_ELM_##t) 148 149 #define OCTET_LENGTH 32 /* Must be at least LIFNAMSIZ */ 150 typedef struct Octet_s { 151 int o_length; 152 char o_bytes[OCTET_LENGTH]; 153 } Octet_t; 154 155 typedef uint32_t Counter; 156 typedef uint32_t Counter32; 157 typedef uint64_t Counter64; 158 typedef uint32_t Gauge; 159 typedef uint32_t IpAddress; 160 typedef struct in6_addr Ip6Address; 161 typedef Octet_t DeviceName; 162 typedef Octet_t PhysAddress; 163 typedef uint32_t DeviceIndex; /* Interface index */ 164 165 #define MIB2_UNKNOWN_INTERFACE 0 166 #define MIB2_UNKNOWN_PROCESS 0 167 168 /* 169 * IP group 170 */ 171 #define MIB2_IP_ADDR 20 /* ipAddrEntry */ 172 #define MIB2_IP_ROUTE 21 /* ipRouteEntry */ 173 #define MIB2_IP_MEDIA 22 /* ipNetToMediaEntry */ 174 #define MIB2_IP6_ROUTE 23 /* ipv6RouteEntry */ 175 #define MIB2_IP6_MEDIA 24 /* ipv6NetToMediaEntry */ 176 #define MIB2_IP6_ADDR 25 /* ipv6AddrEntry */ 177 #define MIB2_IP_TRAFFIC_STATS 31 /* ipIfStatsEntry (IPv4) */ 178 #define EXPER_IP_GROUP_MEMBERSHIP 100 179 #define EXPER_IP6_GROUP_MEMBERSHIP 101 180 #define EXPER_IP_GROUP_SOURCES 102 181 #define EXPER_IP6_GROUP_SOURCES 103 182 #define EXPER_IP_RTATTR 104 183 #define EXPER_IP_DCE 105 184 185 /* 186 * There can be one of each of these tables per transport (MIB2_* above). 187 */ 188 #define EXPER_XPORT_MLP 105 /* transportMLPEntry */ 189 190 /* Old names retained for compatibility */ 191 #define MIB2_IP_20 MIB2_IP_ADDR 192 #define MIB2_IP_21 MIB2_IP_ROUTE 193 #define MIB2_IP_22 MIB2_IP_MEDIA 194 195 typedef struct mib2_ip { 196 /* forwarder? 1 gateway, 2 NOT gateway {ip 1} RW */ 197 int ipForwarding; 198 /* default Time-to-Live for iph {ip 2} RW */ 199 int ipDefaultTTL; 200 /* # of input datagrams {ip 3} */ 201 Counter ipInReceives; 202 /* # of dg discards for iph error {ip 4} */ 203 Counter ipInHdrErrors; 204 /* # of dg discards for bad addr {ip 5} */ 205 Counter ipInAddrErrors; 206 /* # of dg being forwarded {ip 6} */ 207 Counter ipForwDatagrams; 208 /* # of dg discards for unk protocol {ip 7} */ 209 Counter ipInUnknownProtos; 210 /* # of dg discards of good dg's {ip 8} */ 211 Counter ipInDiscards; 212 /* # of dg sent upstream {ip 9} */ 213 Counter ipInDelivers; 214 /* # of outdgs recv'd from upstream {ip 10} */ 215 Counter ipOutRequests; 216 /* # of good outdgs discarded {ip 11} */ 217 Counter ipOutDiscards; 218 /* # of outdg discards: no route found {ip 12} */ 219 Counter ipOutNoRoutes; 220 /* sec's recv'd frags held for reass. {ip 13} */ 221 int ipReasmTimeout; 222 /* # of ip frags needing reassembly {ip 14} */ 223 Counter ipReasmReqds; 224 /* # of dg's reassembled {ip 15} */ 225 Counter ipReasmOKs; 226 /* # of reassembly failures (not dg cnt){ip 16} */ 227 Counter ipReasmFails; 228 /* # of dg's fragged {ip 17} */ 229 Counter ipFragOKs; 230 /* # of dg discards for no frag set {ip 18} */ 231 Counter ipFragFails; 232 /* # of dg frags from fragmentation {ip 19} */ 233 Counter ipFragCreates; 234 /* {ip 20} */ 235 int ipAddrEntrySize; 236 /* {ip 21} */ 237 int ipRouteEntrySize; 238 /* {ip 22} */ 239 int ipNetToMediaEntrySize; 240 /* # of valid route entries discarded {ip 23} */ 241 Counter ipRoutingDiscards; 242 /* 243 * following defined in MIB-II as part of TCP & UDP groups: 244 */ 245 /* total # of segments recv'd with error { tcp 14 } */ 246 Counter tcpInErrs; 247 /* # of recv'd dg's not deliverable (no appl.) { udp 2 } */ 248 Counter udpNoPorts; 249 /* 250 * In addition to MIB-II 251 */ 252 /* # of bad IP header checksums */ 253 Counter ipInCksumErrs; 254 /* # of complete duplicates in reassembly */ 255 Counter ipReasmDuplicates; 256 /* # of partial duplicates in reassembly */ 257 Counter ipReasmPartDups; 258 /* # of packets not forwarded due to adminstrative reasons */ 259 Counter ipForwProhibits; 260 /* # of UDP packets with bad UDP checksums */ 261 Counter udpInCksumErrs; 262 /* # of UDP packets droped due to queue overflow */ 263 Counter udpInOverflows; 264 /* 265 * # of RAW IP packets (all IP protocols except UDP, TCP 266 * and ICMP) droped due to queue overflow 267 */ 268 Counter rawipInOverflows; 269 270 /* 271 * Folowing are private IPSEC MIB. 272 */ 273 /* # of incoming packets that succeeded policy checks */ 274 Counter ipsecInSucceeded; 275 /* # of incoming packets that failed policy checks */ 276 Counter ipsecInFailed; 277 /* Compatible extensions added here */ 278 int ipMemberEntrySize; /* Size of ip_member_t */ 279 int ipGroupSourceEntrySize; /* Size of ip_grpsrc_t */ 280 281 Counter ipInIPv6; /* # of IPv6 packets received by IPv4 and dropped */ 282 Counter ipOutIPv6; /* No longer used */ 283 Counter ipOutSwitchIPv6; /* No longer used */ 284 285 int ipRouteAttributeSize; /* Size of mib2_ipAttributeEntry_t */ 286 int transportMLPSize; /* Size of mib2_transportMLPEntry_t */ 287 int ipDestEntrySize; /* Size of dest_cache_entry_t */ 288 } mib2_ip_t; 289 290 /* 291 * ipv6IfStatsEntry OBJECT-TYPE 292 * SYNTAX Ipv6IfStatsEntry 293 * MAX-ACCESS not-accessible 294 * STATUS current 295 * DESCRIPTION 296 * "An interface statistics entry containing objects 297 * at a particular IPv6 interface." 298 * AUGMENTS { ipv6IfEntry } 299 * ::= { ipv6IfStatsTable 1 } 300 * 301 * Per-interface IPv6 statistics table 302 */ 303 304 typedef struct mib2_ipv6IfStatsEntry { 305 /* Local ifindex to identify the interface */ 306 DeviceIndex ipv6IfIndex; 307 308 /* forwarder? 1 gateway, 2 NOT gateway {ipv6MIBObjects 1} RW */ 309 int ipv6Forwarding; 310 /* default Hoplimit for IPv6 {ipv6MIBObjects 2} RW */ 311 int ipv6DefaultHopLimit; 312 313 int ipv6IfStatsEntrySize; 314 int ipv6AddrEntrySize; 315 int ipv6RouteEntrySize; 316 int ipv6NetToMediaEntrySize; 317 int ipv6MemberEntrySize; /* Size of ipv6_member_t */ 318 int ipv6GroupSourceEntrySize; /* Size of ipv6_grpsrc_t */ 319 320 /* # input datagrams (incl errors) { ipv6IfStatsEntry 1 } */ 321 Counter ipv6InReceives; 322 /* # errors in IPv6 headers and options { ipv6IfStatsEntry 2 } */ 323 Counter ipv6InHdrErrors; 324 /* # exceeds outgoing link MTU { ipv6IfStatsEntry 3 } */ 325 Counter ipv6InTooBigErrors; 326 /* # discarded due to no route to dest { ipv6IfStatsEntry 4 } */ 327 Counter ipv6InNoRoutes; 328 /* # invalid or unsupported addresses { ipv6IfStatsEntry 5 } */ 329 Counter ipv6InAddrErrors; 330 /* # unknown next header { ipv6IfStatsEntry 6 } */ 331 Counter ipv6InUnknownProtos; 332 /* # too short packets { ipv6IfStatsEntry 7 } */ 333 Counter ipv6InTruncatedPkts; 334 /* # discarded e.g. due to no buffers { ipv6IfStatsEntry 8 } */ 335 Counter ipv6InDiscards; 336 /* # delivered to upper layer protocols { ipv6IfStatsEntry 9 } */ 337 Counter ipv6InDelivers; 338 /* # forwarded out interface { ipv6IfStatsEntry 10 } */ 339 Counter ipv6OutForwDatagrams; 340 /* # originated out interface { ipv6IfStatsEntry 11 } */ 341 Counter ipv6OutRequests; 342 /* # discarded e.g. due to no buffers { ipv6IfStatsEntry 12 } */ 343 Counter ipv6OutDiscards; 344 /* # sucessfully fragmented packets { ipv6IfStatsEntry 13 } */ 345 Counter ipv6OutFragOKs; 346 /* # fragmentation failed { ipv6IfStatsEntry 14 } */ 347 Counter ipv6OutFragFails; 348 /* # fragments created { ipv6IfStatsEntry 15 } */ 349 Counter ipv6OutFragCreates; 350 /* # fragments to reassemble { ipv6IfStatsEntry 16 } */ 351 Counter ipv6ReasmReqds; 352 /* # packets after reassembly { ipv6IfStatsEntry 17 } */ 353 Counter ipv6ReasmOKs; 354 /* # reassembly failed { ipv6IfStatsEntry 18 } */ 355 Counter ipv6ReasmFails; 356 /* # received multicast packets { ipv6IfStatsEntry 19 } */ 357 Counter ipv6InMcastPkts; 358 /* # transmitted multicast packets { ipv6IfStatsEntry 20 } */ 359 Counter ipv6OutMcastPkts; 360 /* 361 * In addition to defined MIBs 362 */ 363 /* # discarded due to no route to dest */ 364 Counter ipv6OutNoRoutes; 365 /* # of complete duplicates in reassembly */ 366 Counter ipv6ReasmDuplicates; 367 /* # of partial duplicates in reassembly */ 368 Counter ipv6ReasmPartDups; 369 /* # of packets not forwarded due to adminstrative reasons */ 370 Counter ipv6ForwProhibits; 371 /* # of UDP packets with bad UDP checksums */ 372 Counter udpInCksumErrs; 373 /* # of UDP packets droped due to queue overflow */ 374 Counter udpInOverflows; 375 /* 376 * # of RAW IPv6 packets (all IPv6 protocols except UDP, TCP 377 * and ICMPv6) droped due to queue overflow 378 */ 379 Counter rawipInOverflows; 380 381 /* # of IPv4 packets received by IPv6 and dropped */ 382 Counter ipv6InIPv4; 383 /* # of IPv4 packets transmitted by ip_wput_wput */ 384 Counter ipv6OutIPv4; 385 /* # of times ip_wput_v6 has switched to become ip_wput */ 386 Counter ipv6OutSwitchIPv4; 387 } mib2_ipv6IfStatsEntry_t; 388 389 /* 390 * Per interface IP statistics, both v4 and v6. 391 * 392 * Some applications expect to get mib2_ipv6IfStatsEntry_t structs back when 393 * making a request. To ensure backwards compatability, the first 394 * sizeof(mib2_ipv6IfStatsEntry_t) bytes of the structure is identical to 395 * mib2_ipv6IfStatsEntry_t. This should work as long the application is 396 * written correctly (i.e., using ipv6IfStatsEntrySize to get the size of 397 * the struct) 398 * 399 * RFC4293 introduces several new counters, as well as defining 64-bit 400 * versions of existing counters. For a new counters, if they have both 32- 401 * and 64-bit versions, then we only added the latter. However, for already 402 * existing counters, we have added the 64-bit versions without removing the 403 * old (32-bit) ones. The 64- and 32-bit counters will only be synchronized 404 * when the structure contains IPv6 statistics, which is done to ensure 405 * backwards compatibility. 406 */ 407 408 /* The following are defined in RFC 4001 and are used for ipIfStatsIPVersion */ 409 #define MIB2_INETADDRESSTYPE_unknown 0 410 #define MIB2_INETADDRESSTYPE_ipv4 1 411 #define MIB2_INETADDRESSTYPE_ipv6 2 412 413 /* 414 * On amd64, the alignment requirements for long long's is different for 415 * 32 and 64 bits. If we have a struct containing long long's that is being 416 * passed between a 64-bit kernel to a 32-bit application, then it is very 417 * likely that the size of the struct will differ due to padding. Therefore, we 418 * pack the data to ensure that the struct size is the same for 32- and 419 * 64-bits. 420 */ 421 #if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4 422 #pragma pack(4) 423 #endif 424 425 typedef struct mib2_ipIfStatsEntry { 426 427 /* Local ifindex to identify the interface */ 428 DeviceIndex ipIfStatsIfIndex; 429 430 /* forwarder? 1 gateway, 2 NOT gateway { ipv6MIBObjects 1} RW */ 431 int ipIfStatsForwarding; 432 /* default Hoplimit for IPv6 { ipv6MIBObjects 2} RW */ 433 int ipIfStatsDefaultHopLimit; 434 #define ipIfStatsDefaultTTL ipIfStatsDefaultHopLimit 435 436 int ipIfStatsEntrySize; 437 int ipIfStatsAddrEntrySize; 438 int ipIfStatsRouteEntrySize; 439 int ipIfStatsNetToMediaEntrySize; 440 int ipIfStatsMemberEntrySize; 441 int ipIfStatsGroupSourceEntrySize; 442 443 /* # input datagrams (incl errors) { ipIfStatsEntry 3 } */ 444 Counter ipIfStatsInReceives; 445 /* # errors in IP headers and options { ipIfStatsEntry 7 } */ 446 Counter ipIfStatsInHdrErrors; 447 /* # exceeds outgoing link MTU(v6 only) { ipv6IfStatsEntry 3 } */ 448 Counter ipIfStatsInTooBigErrors; 449 /* # discarded due to no route to dest { ipIfStatsEntry 8 } */ 450 Counter ipIfStatsInNoRoutes; 451 /* # invalid or unsupported addresses { ipIfStatsEntry 9 } */ 452 Counter ipIfStatsInAddrErrors; 453 /* # unknown next header { ipIfStatsEntry 10 } */ 454 Counter ipIfStatsInUnknownProtos; 455 /* # too short packets { ipIfStatsEntry 11 } */ 456 Counter ipIfStatsInTruncatedPkts; 457 /* # discarded e.g. due to no buffers { ipIfStatsEntry 17 } */ 458 Counter ipIfStatsInDiscards; 459 /* # delivered to upper layer protocols { ipIfStatsEntry 18 } */ 460 Counter ipIfStatsInDelivers; 461 /* # forwarded out interface { ipIfStatsEntry 23 } */ 462 Counter ipIfStatsOutForwDatagrams; 463 /* # originated out interface { ipIfStatsEntry 20 } */ 464 Counter ipIfStatsOutRequests; 465 /* # discarded e.g. due to no buffers { ipIfStatsEntry 25 } */ 466 Counter ipIfStatsOutDiscards; 467 /* # sucessfully fragmented packets { ipIfStatsEntry 27 } */ 468 Counter ipIfStatsOutFragOKs; 469 /* # fragmentation failed { ipIfStatsEntry 28 } */ 470 Counter ipIfStatsOutFragFails; 471 /* # fragments created { ipIfStatsEntry 29 } */ 472 Counter ipIfStatsOutFragCreates; 473 /* # fragments to reassemble { ipIfStatsEntry 14 } */ 474 Counter ipIfStatsReasmReqds; 475 /* # packets after reassembly { ipIfStatsEntry 15 } */ 476 Counter ipIfStatsReasmOKs; 477 /* # reassembly failed { ipIfStatsEntry 16 } */ 478 Counter ipIfStatsReasmFails; 479 /* # received multicast packets { ipIfStatsEntry 34 } */ 480 Counter ipIfStatsInMcastPkts; 481 /* # transmitted multicast packets { ipIfStatsEntry 38 } */ 482 Counter ipIfStatsOutMcastPkts; 483 484 /* 485 * In addition to defined MIBs 486 */ 487 488 /* # discarded due to no route to dest { ipSystemStatsEntry 22 } */ 489 Counter ipIfStatsOutNoRoutes; 490 /* # of complete duplicates in reassembly */ 491 Counter ipIfStatsReasmDuplicates; 492 /* # of partial duplicates in reassembly */ 493 Counter ipIfStatsReasmPartDups; 494 /* # of packets not forwarded due to adminstrative reasons */ 495 Counter ipIfStatsForwProhibits; 496 /* # of UDP packets with bad UDP checksums */ 497 Counter udpInCksumErrs; 498 #define udpIfStatsInCksumErrs udpInCksumErrs 499 /* # of UDP packets droped due to queue overflow */ 500 Counter udpInOverflows; 501 #define udpIfStatsInOverflows udpInOverflows 502 /* 503 * # of RAW IP packets (all IP protocols except UDP, TCP 504 * and ICMP) droped due to queue overflow 505 */ 506 Counter rawipInOverflows; 507 #define rawipIfStatsInOverflows rawipInOverflows 508 509 /* 510 * # of IP packets received with the wrong version (i.e., not equal 511 * to ipIfStatsIPVersion) and that were dropped. 512 */ 513 Counter ipIfStatsInWrongIPVersion; 514 /* 515 * This counter is no longer used 516 */ 517 Counter ipIfStatsOutWrongIPVersion; 518 /* 519 * This counter is no longer used 520 */ 521 Counter ipIfStatsOutSwitchIPVersion; 522 523 /* 524 * Fields defined in RFC 4293 525 */ 526 527 /* ip version { ipIfStatsEntry 1 } */ 528 int ipIfStatsIPVersion; 529 /* # input datagrams (incl errors) { ipIfStatsEntry 4 } */ 530 Counter64 ipIfStatsHCInReceives; 531 /* # input octets (incl errors) { ipIfStatsEntry 6 } */ 532 Counter64 ipIfStatsHCInOctets; 533 /* 534 * { ipIfStatsEntry 13 } 535 * # input datagrams for which a forwarding attempt was made 536 */ 537 Counter64 ipIfStatsHCInForwDatagrams; 538 /* # delivered to upper layer protocols { ipIfStatsEntry 19 } */ 539 Counter64 ipIfStatsHCInDelivers; 540 /* # originated out interface { ipIfStatsEntry 21 } */ 541 Counter64 ipIfStatsHCOutRequests; 542 /* # forwarded out interface { ipIfStatsEntry 23 } */ 543 Counter64 ipIfStatsHCOutForwDatagrams; 544 /* # dg's requiring fragmentation { ipIfStatsEntry 26 } */ 545 Counter ipIfStatsOutFragReqds; 546 /* # output datagrams { ipIfStatsEntry 31 } */ 547 Counter64 ipIfStatsHCOutTransmits; 548 /* # output octets { ipIfStatsEntry 33 } */ 549 Counter64 ipIfStatsHCOutOctets; 550 /* # received multicast datagrams { ipIfStatsEntry 35 } */ 551 Counter64 ipIfStatsHCInMcastPkts; 552 /* # received multicast octets { ipIfStatsEntry 37 } */ 553 Counter64 ipIfStatsHCInMcastOctets; 554 /* # transmitted multicast datagrams { ipIfStatsEntry 39 } */ 555 Counter64 ipIfStatsHCOutMcastPkts; 556 /* # transmitted multicast octets { ipIfStatsEntry 41 } */ 557 Counter64 ipIfStatsHCOutMcastOctets; 558 /* # received broadcast datagrams { ipIfStatsEntry 43 } */ 559 Counter64 ipIfStatsHCInBcastPkts; 560 /* # transmitted broadcast datagrams { ipIfStatsEntry 45 } */ 561 Counter64 ipIfStatsHCOutBcastPkts; 562 563 /* 564 * Fields defined in mib2_ip_t 565 */ 566 567 /* # of incoming packets that succeeded policy checks */ 568 Counter ipsecInSucceeded; 569 #define ipsecIfStatsInSucceeded ipsecInSucceeded 570 /* # of incoming packets that failed policy checks */ 571 Counter ipsecInFailed; 572 #define ipsecIfStatsInFailed ipsecInFailed 573 /* # of bad IP header checksums */ 574 Counter ipInCksumErrs; 575 #define ipIfStatsInCksumErrs ipInCksumErrs 576 /* total # of segments recv'd with error { tcp 14 } */ 577 Counter tcpInErrs; 578 #define tcpIfStatsInErrs tcpInErrs 579 /* # of recv'd dg's not deliverable (no appl.) { udp 2 } */ 580 Counter udpNoPorts; 581 #define udpIfStatsNoPorts udpNoPorts 582 } mib2_ipIfStatsEntry_t; 583 #define MIB_FIRST_NEW_ELM_mib2_ipIfStatsEntry_t ipIfStatsIPVersion 584 585 #if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4 586 #pragma pack() 587 #endif 588 589 /* 590 * The IP address table contains this entity's IP addressing information. 591 * 592 * ipAddrTable OBJECT-TYPE 593 * SYNTAX SEQUENCE OF IpAddrEntry 594 * ACCESS not-accessible 595 * STATUS mandatory 596 * DESCRIPTION 597 * "The table of addressing information relevant to 598 * this entity's IP addresses." 599 * ::= { ip 20 } 600 */ 601 602 typedef struct mib2_ipAddrEntry { 603 /* IP address of this entry {ipAddrEntry 1} */ 604 IpAddress ipAdEntAddr; 605 /* Unique interface index {ipAddrEntry 2} */ 606 DeviceName ipAdEntIfIndex; 607 /* Subnet mask for this IP addr {ipAddrEntry 3} */ 608 IpAddress ipAdEntNetMask; 609 /* 2^lsb of IP broadcast addr {ipAddrEntry 4} */ 610 int ipAdEntBcastAddr; 611 /* max size for dg reassembly {ipAddrEntry 5} */ 612 int ipAdEntReasmMaxSize; 613 /* additional ipif_t fields */ 614 struct ipAdEntInfo_s { 615 Gauge ae_mtu; 616 /* BSD if metric */ 617 int ae_metric; 618 /* ipif broadcast addr. relation to above?? */ 619 IpAddress ae_broadcast_addr; 620 /* point-point dest addr */ 621 IpAddress ae_pp_dst_addr; 622 int ae_flags; /* IFF_* flags in if.h */ 623 Counter ae_ibcnt; /* Inbound packets */ 624 Counter ae_obcnt; /* Outbound packets */ 625 Counter ae_focnt; /* Forwarded packets */ 626 IpAddress ae_subnet; /* Subnet prefix */ 627 int ae_subnet_len; /* Subnet prefix length */ 628 IpAddress ae_src_addr; /* Source address */ 629 } ipAdEntInfo; 630 uint32_t ipAdEntRetransmitTime; /* ipInterfaceRetransmitTime */ 631 } mib2_ipAddrEntry_t; 632 #define MIB_FIRST_NEW_ELM_mib2_ipAddrEntry_t ipAdEntRetransmitTime 633 634 /* 635 * ipv6AddrTable OBJECT-TYPE 636 * SYNTAX SEQUENCE OF Ipv6AddrEntry 637 * MAX-ACCESS not-accessible 638 * STATUS current 639 * DESCRIPTION 640 * "The table of addressing information relevant to 641 * this node's interface addresses." 642 * ::= { ipv6MIBObjects 8 } 643 */ 644 645 typedef struct mib2_ipv6AddrEntry { 646 /* Unique interface index { Part of INDEX } */ 647 DeviceName ipv6AddrIfIndex; 648 649 /* IPv6 address of this entry { ipv6AddrEntry 1 } */ 650 Ip6Address ipv6AddrAddress; 651 /* Prefix length { ipv6AddrEntry 2 } */ 652 uint_t ipv6AddrPfxLength; 653 /* Type: stateless(1), stateful(2), unknown(3) { ipv6AddrEntry 3 } */ 654 uint_t ipv6AddrType; 655 /* Anycast: true(1), false(2) { ipv6AddrEntry 4 } */ 656 uint_t ipv6AddrAnycastFlag; 657 /* 658 * Address status: preferred(1), deprecated(2), invalid(3), 659 * inaccessible(4), unknown(5) { ipv6AddrEntry 5 } 660 */ 661 uint_t ipv6AddrStatus; 662 struct ipv6AddrInfo_s { 663 Gauge ae_mtu; 664 /* BSD if metric */ 665 int ae_metric; 666 /* point-point dest addr */ 667 Ip6Address ae_pp_dst_addr; 668 int ae_flags; /* IFF_* flags in if.h */ 669 Counter ae_ibcnt; /* Inbound packets */ 670 Counter ae_obcnt; /* Outbound packets */ 671 Counter ae_focnt; /* Forwarded packets */ 672 Ip6Address ae_subnet; /* Subnet prefix */ 673 int ae_subnet_len; /* Subnet prefix length */ 674 Ip6Address ae_src_addr; /* Source address */ 675 } ipv6AddrInfo; 676 uint32_t ipv6AddrReasmMaxSize; /* InterfaceReasmMaxSize */ 677 Ip6Address ipv6AddrIdentifier; /* InterfaceIdentifier */ 678 uint32_t ipv6AddrIdentifierLen; 679 uint32_t ipv6AddrReachableTime; /* InterfaceReachableTime */ 680 uint32_t ipv6AddrRetransmitTime; /* InterfaceRetransmitTime */ 681 } mib2_ipv6AddrEntry_t; 682 #define MIB_FIRST_NEW_ELM_mib2_ipv6AddrEntry_t ipv6AddrReasmMaxSize 683 684 /* 685 * The IP routing table contains an entry for each route presently known to 686 * this entity. (for IPv4 routes) 687 * 688 * ipRouteTable OBJECT-TYPE 689 * SYNTAX SEQUENCE OF IpRouteEntry 690 * ACCESS not-accessible 691 * STATUS mandatory 692 * DESCRIPTION 693 * "This entity's IP Routing table." 694 * ::= { ip 21 } 695 */ 696 697 typedef struct mib2_ipRouteEntry { 698 /* dest ip addr for this route {ipRouteEntry 1 } RW */ 699 IpAddress ipRouteDest; 700 /* unique interface index for this hop {ipRouteEntry 2 } RW */ 701 DeviceName ipRouteIfIndex; 702 /* primary route metric {ipRouteEntry 3 } RW */ 703 int ipRouteMetric1; 704 /* alternate route metric {ipRouteEntry 4 } RW */ 705 int ipRouteMetric2; 706 /* alternate route metric {ipRouteEntry 5 } RW */ 707 int ipRouteMetric3; 708 /* alternate route metric {ipRouteEntry 6 } RW */ 709 int ipRouteMetric4; 710 /* ip addr of next hop on this route {ipRouteEntry 7 } RW */ 711 IpAddress ipRouteNextHop; 712 /* other(1), inval(2), dir(3), indir(4) {ipRouteEntry 8 } RW */ 713 int ipRouteType; 714 /* mechanism by which route was learned {ipRouteEntry 9 } */ 715 int ipRouteProto; 716 /* sec's since last update of route {ipRouteEntry 10} RW */ 717 int ipRouteAge; 718 /* {ipRouteEntry 11} RW */ 719 IpAddress ipRouteMask; 720 /* alternate route metric {ipRouteEntry 12} RW */ 721 int ipRouteMetric5; 722 /* additional info from ire's {ipRouteEntry 13 } */ 723 struct ipRouteInfo_s { 724 Gauge re_max_frag; 725 Gauge re_rtt; 726 Counter re_ref; 727 int re_frag_flag; 728 IpAddress re_src_addr; 729 int re_ire_type; 730 Counter re_obpkt; 731 Counter re_ibpkt; 732 int re_flags; 733 /* 734 * The following two elements (re_in_ill and re_in_src_addr) 735 * are no longer used but are left here for the benefit of 736 * old Apps that won't be able to handle the change in the 737 * size of this struct. These elements will always be 738 * set to zeroes. 739 */ 740 DeviceName re_in_ill; /* Input interface */ 741 IpAddress re_in_src_addr; /* Input source address */ 742 } ipRouteInfo; 743 } mib2_ipRouteEntry_t; 744 745 /* 746 * The IPv6 routing table contains an entry for each route presently known to 747 * this entity. 748 * 749 * ipv6RouteTable OBJECT-TYPE 750 * SYNTAX SEQUENCE OF IpRouteEntry 751 * ACCESS not-accessible 752 * STATUS current 753 * DESCRIPTION 754 * "IPv6 Routing table. This table contains 755 * an entry for each valid IPv6 unicast route 756 * that can be used for packet forwarding 757 * determination." 758 * ::= { ipv6MIBObjects 11 } 759 */ 760 761 typedef struct mib2_ipv6RouteEntry { 762 /* dest ip addr for this route { ipv6RouteEntry 1 } */ 763 Ip6Address ipv6RouteDest; 764 /* prefix length { ipv6RouteEntry 2 } */ 765 int ipv6RoutePfxLength; 766 /* unique route index { ipv6RouteEntry 3 } */ 767 unsigned ipv6RouteIndex; 768 /* unique interface index for this hop { ipv6RouteEntry 4 } */ 769 DeviceName ipv6RouteIfIndex; 770 /* IPv6 addr of next hop on this route { ipv6RouteEntry 5 } */ 771 Ip6Address ipv6RouteNextHop; 772 /* other(1), discard(2), local(3), remote(4) */ 773 /* { ipv6RouteEntry 6 } */ 774 int ipv6RouteType; 775 /* mechanism by which route was learned { ipv6RouteEntry 7 } */ 776 /* 777 * other(1), local(2), netmgmt(3), ndisc(4), rip(5), ospf(6), 778 * bgp(7), idrp(8), igrp(9) 779 */ 780 int ipv6RouteProtocol; 781 /* policy hook or traffic class { ipv6RouteEntry 8 } */ 782 unsigned ipv6RoutePolicy; 783 /* sec's since last update of route { ipv6RouteEntry 9} */ 784 int ipv6RouteAge; 785 /* Routing domain ID of the next hop { ipv6RouteEntry 10 } */ 786 unsigned ipv6RouteNextHopRDI; 787 /* route metric { ipv6RouteEntry 11 } */ 788 unsigned ipv6RouteMetric; 789 /* preference (impl specific) { ipv6RouteEntry 12 } */ 790 unsigned ipv6RouteWeight; 791 /* additional info from ire's { } */ 792 struct ipv6RouteInfo_s { 793 Gauge re_max_frag; 794 Gauge re_rtt; 795 Counter re_ref; 796 int re_frag_flag; 797 Ip6Address re_src_addr; 798 int re_ire_type; 799 Counter re_obpkt; 800 Counter re_ibpkt; 801 int re_flags; 802 } ipv6RouteInfo; 803 } mib2_ipv6RouteEntry_t; 804 805 /* 806 * The IPv4 and IPv6 routing table entries on a trusted system also have 807 * security attributes in the form of label ranges. This experimental 808 * interface provides information about these labels. 809 * 810 * Each entry in this table contains a label range and an index that refers 811 * back to the entry in the routing table to which it applies. There may be 0, 812 * 1, or many label ranges for each routing table entry. 813 * 814 * (opthdr.level is set to MIB2_IP for IPv4 entries and MIB2_IP6 for IPv6. 815 * opthdr.name is set to EXPER_IP_GWATTR.) 816 * 817 * ipRouteAttributeTable OBJECT-TYPE 818 * SYNTAX SEQUENCE OF IpAttributeEntry 819 * ACCESS not-accessible 820 * STATUS current 821 * DESCRIPTION 822 * "IPv4 routing attributes table. This table contains 823 * an entry for each valid trusted label attached to a 824 * route in the system." 825 * ::= { ip 102 } 826 * 827 * ipv6RouteAttributeTable OBJECT-TYPE 828 * SYNTAX SEQUENCE OF IpAttributeEntry 829 * ACCESS not-accessible 830 * STATUS current 831 * DESCRIPTION 832 * "IPv6 routing attributes table. This table contains 833 * an entry for each valid trusted label attached to a 834 * route in the system." 835 * ::= { ip6 102 } 836 */ 837 838 typedef struct mib2_ipAttributeEntry { 839 uint_t iae_routeidx; 840 int iae_doi; 841 brange_t iae_slrange; 842 } mib2_ipAttributeEntry_t; 843 844 /* 845 * The IP address translation table contain the IpAddress to 846 * `physical' address equivalences. Some interfaces do not 847 * use translation tables for determining address 848 * equivalences (e.g., DDN-X.25 has an algorithmic method); 849 * if all interfaces are of this type, then the Address 850 * Translation table is empty, i.e., has zero entries. 851 * 852 * ipNetToMediaTable OBJECT-TYPE 853 * SYNTAX SEQUENCE OF IpNetToMediaEntry 854 * ACCESS not-accessible 855 * STATUS mandatory 856 * DESCRIPTION 857 * "The IP Address Translation table used for mapping 858 * from IP addresses to physical addresses." 859 * ::= { ip 22 } 860 */ 861 862 typedef struct mib2_ipNetToMediaEntry { 863 /* Unique interface index { ipNetToMediaEntry 1 } RW */ 864 DeviceName ipNetToMediaIfIndex; 865 /* Media dependent physical addr { ipNetToMediaEntry 2 } RW */ 866 PhysAddress ipNetToMediaPhysAddress; 867 /* ip addr for this physical addr { ipNetToMediaEntry 3 } RW */ 868 IpAddress ipNetToMediaNetAddress; 869 /* other(1), inval(2), dyn(3), stat(4) { ipNetToMediaEntry 4 } RW */ 870 int ipNetToMediaType; 871 struct ipNetToMediaInfo_s { 872 PhysAddress ntm_mask; /* subnet mask for entry */ 873 int ntm_flags; /* ACE_F_* flags in arp.h */ 874 } ipNetToMediaInfo; 875 } mib2_ipNetToMediaEntry_t; 876 877 /* 878 * ipv6NetToMediaTable OBJECT-TYPE 879 * SYNTAX SEQUENCE OF Ipv6NetToMediaEntry 880 * MAX-ACCESS not-accessible 881 * STATUS current 882 * DESCRIPTION 883 * "The IPv6 Address Translation table used for 884 * mapping from IPv6 addresses to physical addresses. 885 * 886 * The IPv6 address translation table contain the 887 * Ipv6Address to `physical' address equivalencies. 888 * Some interfaces do not use translation tables 889 * for determining address equivalencies; if all 890 * interfaces are of this type, then the Address 891 * Translation table is empty, i.e., has zero 892 * entries." 893 * ::= { ipv6MIBObjects 12 } 894 */ 895 896 typedef struct mib2_ipv6NetToMediaEntry { 897 /* Unique interface index { Part of INDEX } */ 898 DeviceIndex ipv6NetToMediaIfIndex; 899 900 /* ip addr for this physical addr { ipv6NetToMediaEntry 1 } */ 901 Ip6Address ipv6NetToMediaNetAddress; 902 /* Media dependent physical addr { ipv6NetToMediaEntry 2 } */ 903 PhysAddress ipv6NetToMediaPhysAddress; 904 /* 905 * Type of mapping 906 * other(1), dynamic(2), static(3), local(4) 907 * { ipv6NetToMediaEntry 3 } 908 */ 909 int ipv6NetToMediaType; 910 /* 911 * NUD state 912 * reachable(1), stale(2), delay(3), probe(4), invalid(5), unknown(6) 913 * Note: The kernel returns ND_* states. 914 * { ipv6NetToMediaEntry 4 } 915 */ 916 int ipv6NetToMediaState; 917 /* sysUpTime last time entry was updated { ipv6NetToMediaEntry 5 } */ 918 int ipv6NetToMediaLastUpdated; 919 } mib2_ipv6NetToMediaEntry_t; 920 921 922 /* 923 * List of group members per interface 924 */ 925 typedef struct ip_member { 926 /* Interface index */ 927 DeviceName ipGroupMemberIfIndex; 928 /* IP Multicast address */ 929 IpAddress ipGroupMemberAddress; 930 /* Number of member sockets */ 931 Counter ipGroupMemberRefCnt; 932 /* Filter mode: 1 => include, 2 => exclude */ 933 int ipGroupMemberFilterMode; 934 } ip_member_t; 935 936 937 /* 938 * List of IPv6 group members per interface 939 */ 940 typedef struct ipv6_member { 941 /* Interface index */ 942 DeviceIndex ipv6GroupMemberIfIndex; 943 /* IP Multicast address */ 944 Ip6Address ipv6GroupMemberAddress; 945 /* Number of member sockets */ 946 Counter ipv6GroupMemberRefCnt; 947 /* Filter mode: 1 => include, 2 => exclude */ 948 int ipv6GroupMemberFilterMode; 949 } ipv6_member_t; 950 951 /* 952 * This is used to mark transport layer entities (e.g., TCP connections) that 953 * are capable of receiving packets from a range of labels. 'level' is set to 954 * the protocol of interest (e.g., MIB2_TCP), and 'name' is set to 955 * EXPER_XPORT_MLP. The tme_connidx refers back to the entry in MIB2_TCP_CONN, 956 * MIB2_TCP6_CONN, or MIB2_SCTP_CONN. 957 * 958 * It is also used to report connections that receive packets at a single label 959 * that's other than the zone's label. This is the case when a TCP connection 960 * is accepted from a particular peer using an MLP listener. 961 */ 962 typedef struct mib2_transportMLPEntry { 963 uint_t tme_connidx; 964 uint_t tme_flags; 965 int tme_doi; 966 bslabel_t tme_label; 967 } mib2_transportMLPEntry_t; 968 969 #define MIB2_TMEF_PRIVATE 0x00000001 /* MLP on private addresses */ 970 #define MIB2_TMEF_SHARED 0x00000002 /* MLP on shared addresses */ 971 #define MIB2_TMEF_ANONMLP 0x00000004 /* Anonymous MLP port */ 972 #define MIB2_TMEF_MACEXEMPT 0x00000008 /* MAC-Exempt port */ 973 #define MIB2_TMEF_IS_LABELED 0x00000010 /* tme_doi & tme_label exists */ 974 #define MIB2_TMEF_MACIMPLICIT 0x00000020 /* MAC-Implicit */ 975 /* 976 * List of IPv4 source addresses being filtered per interface 977 */ 978 typedef struct ip_grpsrc { 979 /* Interface index */ 980 DeviceName ipGroupSourceIfIndex; 981 /* IP Multicast address */ 982 IpAddress ipGroupSourceGroup; 983 /* IP Source address */ 984 IpAddress ipGroupSourceAddress; 985 } ip_grpsrc_t; 986 987 988 /* 989 * List of IPv6 source addresses being filtered per interface 990 */ 991 typedef struct ipv6_grpsrc { 992 /* Interface index */ 993 DeviceIndex ipv6GroupSourceIfIndex; 994 /* IP Multicast address */ 995 Ip6Address ipv6GroupSourceGroup; 996 /* IP Source address */ 997 Ip6Address ipv6GroupSourceAddress; 998 } ipv6_grpsrc_t; 999 1000 1001 /* 1002 * List of destination cache entries 1003 */ 1004 typedef struct dest_cache_entry { 1005 /* IP Multicast address */ 1006 IpAddress DestIpv4Address; 1007 Ip6Address DestIpv6Address; 1008 uint_t DestFlags; /* DCEF_* */ 1009 uint32_t DestPmtu; /* Path MTU if DCEF_PMTU */ 1010 uint32_t DestIdent; /* Per destination IP ident. */ 1011 DeviceIndex DestIfindex; /* For IPv6 link-locals */ 1012 uint32_t DestAge; /* Age of MTU info in seconds */ 1013 } dest_cache_entry_t; 1014 1015 1016 /* 1017 * ICMP Group 1018 */ 1019 typedef struct mib2_icmp { 1020 /* total # of recv'd ICMP msgs { icmp 1 } */ 1021 Counter icmpInMsgs; 1022 /* recv'd ICMP msgs with errors { icmp 2 } */ 1023 Counter icmpInErrors; 1024 /* recv'd "dest unreachable" msg's { icmp 3 } */ 1025 Counter icmpInDestUnreachs; 1026 /* recv'd "time exceeded" msg's { icmp 4 } */ 1027 Counter icmpInTimeExcds; 1028 /* recv'd "parameter problem" msg's { icmp 5 } */ 1029 Counter icmpInParmProbs; 1030 /* recv'd "source quench" msg's { icmp 6 } */ 1031 Counter icmpInSrcQuenchs; 1032 /* recv'd "ICMP redirect" msg's { icmp 7 } */ 1033 Counter icmpInRedirects; 1034 /* recv'd "echo request" msg's { icmp 8 } */ 1035 Counter icmpInEchos; 1036 /* recv'd "echo reply" msg's { icmp 9 } */ 1037 Counter icmpInEchoReps; 1038 /* recv'd "timestamp" msg's { icmp 10 } */ 1039 Counter icmpInTimestamps; 1040 /* recv'd "timestamp reply" msg's { icmp 11 } */ 1041 Counter icmpInTimestampReps; 1042 /* recv'd "address mask request" msg's { icmp 12 } */ 1043 Counter icmpInAddrMasks; 1044 /* recv'd "address mask reply" msg's { icmp 13 } */ 1045 Counter icmpInAddrMaskReps; 1046 /* total # of sent ICMP msg's { icmp 14 } */ 1047 Counter icmpOutMsgs; 1048 /* # of msg's not sent for internal icmp errors { icmp 15 } */ 1049 Counter icmpOutErrors; 1050 /* # of "dest unreachable" msg's sent { icmp 16 } */ 1051 Counter icmpOutDestUnreachs; 1052 /* # of "time exceeded" msg's sent { icmp 17 } */ 1053 Counter icmpOutTimeExcds; 1054 /* # of "parameter problme" msg's sent { icmp 18 } */ 1055 Counter icmpOutParmProbs; 1056 /* # of "source quench" msg's sent { icmp 19 } */ 1057 Counter icmpOutSrcQuenchs; 1058 /* # of "ICMP redirect" msg's sent { icmp 20 } */ 1059 Counter icmpOutRedirects; 1060 /* # of "Echo request" msg's sent { icmp 21 } */ 1061 Counter icmpOutEchos; 1062 /* # of "Echo reply" msg's sent { icmp 22 } */ 1063 Counter icmpOutEchoReps; 1064 /* # of "timestamp request" msg's sent { icmp 23 } */ 1065 Counter icmpOutTimestamps; 1066 /* # of "timestamp reply" msg's sent { icmp 24 } */ 1067 Counter icmpOutTimestampReps; 1068 /* # of "address mask request" msg's sent { icmp 25 } */ 1069 Counter icmpOutAddrMasks; 1070 /* # of "address mask reply" msg's sent { icmp 26 } */ 1071 Counter icmpOutAddrMaskReps; 1072 /* 1073 * In addition to MIB-II 1074 */ 1075 /* # of received packets with checksum errors */ 1076 Counter icmpInCksumErrs; 1077 /* # of received packets with unknow codes */ 1078 Counter icmpInUnknowns; 1079 /* # of received unreachables with "fragmentation needed" */ 1080 Counter icmpInFragNeeded; 1081 /* # of sent unreachables with "fragmentation needed" */ 1082 Counter icmpOutFragNeeded; 1083 /* 1084 * # of msg's not sent since original packet was broadcast/multicast 1085 * or an ICMP error packet 1086 */ 1087 Counter icmpOutDrops; 1088 /* # of ICMP packets droped due to queue overflow */ 1089 Counter icmpInOverflows; 1090 /* recv'd "ICMP redirect" msg's that are bad thus ignored */ 1091 Counter icmpInBadRedirects; 1092 } mib2_icmp_t; 1093 1094 1095 /* 1096 * ipv6IfIcmpEntry OBJECT-TYPE 1097 * SYNTAX Ipv6IfIcmpEntry 1098 * MAX-ACCESS not-accessible 1099 * STATUS current 1100 * DESCRIPTION 1101 * "An ICMPv6 statistics entry containing 1102 * objects at a particular IPv6 interface. 1103 * 1104 * Note that a receiving interface is 1105 * the interface to which a given ICMPv6 message 1106 * is addressed which may not be necessarily 1107 * the input interface for the message. 1108 * 1109 * Similarly, the sending interface is 1110 * the interface that sources a given 1111 * ICMP message which is usually but not 1112 * necessarily the output interface for the message." 1113 * AUGMENTS { ipv6IfEntry } 1114 * ::= { ipv6IfIcmpTable 1 } 1115 * 1116 * Per-interface ICMPv6 statistics table 1117 */ 1118 1119 typedef struct mib2_ipv6IfIcmpEntry { 1120 /* Local ifindex to identify the interface */ 1121 DeviceIndex ipv6IfIcmpIfIndex; 1122 1123 int ipv6IfIcmpEntrySize; /* Size of ipv6IfIcmpEntry */ 1124 1125 /* The total # ICMP msgs rcvd includes ipv6IfIcmpInErrors */ 1126 Counter32 ipv6IfIcmpInMsgs; 1127 /* # ICMP with ICMP-specific errors (bad checkum, length, etc) */ 1128 Counter32 ipv6IfIcmpInErrors; 1129 /* # ICMP Destination Unreachable */ 1130 Counter32 ipv6IfIcmpInDestUnreachs; 1131 /* # ICMP destination unreachable/communication admin prohibited */ 1132 Counter32 ipv6IfIcmpInAdminProhibs; 1133 Counter32 ipv6IfIcmpInTimeExcds; 1134 Counter32 ipv6IfIcmpInParmProblems; 1135 Counter32 ipv6IfIcmpInPktTooBigs; 1136 Counter32 ipv6IfIcmpInEchos; 1137 Counter32 ipv6IfIcmpInEchoReplies; 1138 Counter32 ipv6IfIcmpInRouterSolicits; 1139 Counter32 ipv6IfIcmpInRouterAdvertisements; 1140 Counter32 ipv6IfIcmpInNeighborSolicits; 1141 Counter32 ipv6IfIcmpInNeighborAdvertisements; 1142 Counter32 ipv6IfIcmpInRedirects; 1143 Counter32 ipv6IfIcmpInGroupMembQueries; 1144 Counter32 ipv6IfIcmpInGroupMembResponses; 1145 Counter32 ipv6IfIcmpInGroupMembReductions; 1146 /* Total # ICMP messages attempted to send (includes OutErrors) */ 1147 Counter32 ipv6IfIcmpOutMsgs; 1148 /* # ICMP messages not sent due to ICMP problems (e.g. no buffers) */ 1149 Counter32 ipv6IfIcmpOutErrors; 1150 Counter32 ipv6IfIcmpOutDestUnreachs; 1151 Counter32 ipv6IfIcmpOutAdminProhibs; 1152 Counter32 ipv6IfIcmpOutTimeExcds; 1153 Counter32 ipv6IfIcmpOutParmProblems; 1154 Counter32 ipv6IfIcmpOutPktTooBigs; 1155 Counter32 ipv6IfIcmpOutEchos; 1156 Counter32 ipv6IfIcmpOutEchoReplies; 1157 Counter32 ipv6IfIcmpOutRouterSolicits; 1158 Counter32 ipv6IfIcmpOutRouterAdvertisements; 1159 Counter32 ipv6IfIcmpOutNeighborSolicits; 1160 Counter32 ipv6IfIcmpOutNeighborAdvertisements; 1161 Counter32 ipv6IfIcmpOutRedirects; 1162 Counter32 ipv6IfIcmpOutGroupMembQueries; 1163 Counter32 ipv6IfIcmpOutGroupMembResponses; 1164 Counter32 ipv6IfIcmpOutGroupMembReductions; 1165 /* Additions beyond the MIB */ 1166 Counter32 ipv6IfIcmpInOverflows; 1167 /* recv'd "ICMPv6 redirect" msg's that are bad thus ignored */ 1168 Counter32 ipv6IfIcmpBadHoplimit; 1169 Counter32 ipv6IfIcmpInBadNeighborAdvertisements; 1170 Counter32 ipv6IfIcmpInBadNeighborSolicitations; 1171 Counter32 ipv6IfIcmpInBadRedirects; 1172 Counter32 ipv6IfIcmpInGroupMembTotal; 1173 Counter32 ipv6IfIcmpInGroupMembBadQueries; 1174 Counter32 ipv6IfIcmpInGroupMembBadReports; 1175 Counter32 ipv6IfIcmpInGroupMembOurReports; 1176 } mib2_ipv6IfIcmpEntry_t; 1177 1178 /* 1179 * the TCP group 1180 * 1181 * Note that instances of object types that represent 1182 * information about a particular TCP connection are 1183 * transient; they persist only as long as the connection 1184 * in question. 1185 */ 1186 #define MIB2_TCP_CONN 13 /* tcpConnEntry */ 1187 #define MIB2_TCP6_CONN 14 /* tcp6ConnEntry */ 1188 1189 /* Old name retained for compatibility */ 1190 #define MIB2_TCP_13 MIB2_TCP_CONN 1191 1192 /* Pack data in mib2_tcp to make struct size the same for 32- and 64-bits */ 1193 #if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4 1194 #pragma pack(4) 1195 #endif 1196 typedef struct mib2_tcp { 1197 /* algorithm used for transmit timeout value { tcp 1 } */ 1198 int tcpRtoAlgorithm; 1199 /* minimum retransmit timeout (ms) { tcp 2 } */ 1200 int tcpRtoMin; 1201 /* maximum retransmit timeout (ms) { tcp 3 } */ 1202 int tcpRtoMax; 1203 /* maximum # of connections supported { tcp 4 } */ 1204 int tcpMaxConn; 1205 /* # of direct transitions CLOSED -> SYN-SENT { tcp 5 } */ 1206 Counter tcpActiveOpens; 1207 /* # of direct transitions LISTEN -> SYN-RCVD { tcp 6 } */ 1208 Counter tcpPassiveOpens; 1209 /* # of direct SIN-SENT/RCVD -> CLOSED/LISTEN { tcp 7 } */ 1210 Counter tcpAttemptFails; 1211 /* # of direct ESTABLISHED/CLOSE-WAIT -> CLOSED { tcp 8 } */ 1212 Counter tcpEstabResets; 1213 /* # of connections ESTABLISHED or CLOSE-WAIT { tcp 9 } */ 1214 Gauge tcpCurrEstab; 1215 /* total # of segments recv'd { tcp 10 } */ 1216 Counter tcpInSegs; 1217 /* total # of segments sent { tcp 11 } */ 1218 Counter tcpOutSegs; 1219 /* total # of segments retransmitted { tcp 12 } */ 1220 Counter tcpRetransSegs; 1221 /* {tcp 13} */ 1222 int tcpConnTableSize; /* Size of tcpConnEntry_t */ 1223 /* in ip {tcp 14} */ 1224 /* # of segments sent with RST flag { tcp 15 } */ 1225 Counter tcpOutRsts; 1226 /* In addition to MIB-II */ 1227 /* Sender */ 1228 /* total # of data segments sent */ 1229 Counter tcpOutDataSegs; 1230 /* total # of bytes in data segments sent */ 1231 Counter tcpOutDataBytes; 1232 /* total # of bytes in segments retransmitted */ 1233 Counter tcpRetransBytes; 1234 /* total # of acks sent */ 1235 Counter tcpOutAck; 1236 /* total # of delayed acks sent */ 1237 Counter tcpOutAckDelayed; 1238 /* total # of segments sent with the urg flag on */ 1239 Counter tcpOutUrg; 1240 /* total # of window updates sent */ 1241 Counter tcpOutWinUpdate; 1242 /* total # of zero window probes sent */ 1243 Counter tcpOutWinProbe; 1244 /* total # of control segments sent (syn, fin, rst) */ 1245 Counter tcpOutControl; 1246 /* total # of segments sent due to "fast retransmit" */ 1247 Counter tcpOutFastRetrans; 1248 /* Receiver */ 1249 /* total # of ack segments received */ 1250 Counter tcpInAckSegs; 1251 /* total # of bytes acked */ 1252 Counter tcpInAckBytes; 1253 /* total # of duplicate acks */ 1254 Counter tcpInDupAck; 1255 /* total # of acks acking unsent data */ 1256 Counter tcpInAckUnsent; 1257 /* total # of data segments received in order */ 1258 Counter tcpInDataInorderSegs; 1259 /* total # of data bytes received in order */ 1260 Counter tcpInDataInorderBytes; 1261 /* total # of data segments received out of order */ 1262 Counter tcpInDataUnorderSegs; 1263 /* total # of data bytes received out of order */ 1264 Counter tcpInDataUnorderBytes; 1265 /* total # of complete duplicate data segments received */ 1266 Counter tcpInDataDupSegs; 1267 /* total # of bytes in the complete duplicate data segments received */ 1268 Counter tcpInDataDupBytes; 1269 /* total # of partial duplicate data segments received */ 1270 Counter tcpInDataPartDupSegs; 1271 /* total # of bytes in the partial duplicate data segments received */ 1272 Counter tcpInDataPartDupBytes; 1273 /* total # of data segments received past the window */ 1274 Counter tcpInDataPastWinSegs; 1275 /* total # of data bytes received part the window */ 1276 Counter tcpInDataPastWinBytes; 1277 /* total # of zero window probes received */ 1278 Counter tcpInWinProbe; 1279 /* total # of window updates received */ 1280 Counter tcpInWinUpdate; 1281 /* total # of data segments received after the connection has closed */ 1282 Counter tcpInClosed; 1283 /* Others */ 1284 /* total # of failed attempts to update the rtt estimate */ 1285 Counter tcpRttNoUpdate; 1286 /* total # of successful attempts to update the rtt estimate */ 1287 Counter tcpRttUpdate; 1288 /* total # of retransmit timeouts */ 1289 Counter tcpTimRetrans; 1290 /* total # of retransmit timeouts dropping the connection */ 1291 Counter tcpTimRetransDrop; 1292 /* total # of keepalive timeouts */ 1293 Counter tcpTimKeepalive; 1294 /* total # of keepalive timeouts sending a probe */ 1295 Counter tcpTimKeepaliveProbe; 1296 /* total # of keepalive timeouts dropping the connection */ 1297 Counter tcpTimKeepaliveDrop; 1298 /* total # of connections refused due to backlog full on listen */ 1299 Counter tcpListenDrop; 1300 /* total # of connections refused due to half-open queue (q0) full */ 1301 Counter tcpListenDropQ0; 1302 /* total # of connections dropped from a full half-open queue (q0) */ 1303 Counter tcpHalfOpenDrop; 1304 /* total # of retransmitted segments by SACK retransmission */ 1305 Counter tcpOutSackRetransSegs; 1306 1307 int tcp6ConnTableSize; /* Size of tcp6ConnEntry_t */ 1308 1309 /* 1310 * fields from RFC 4022 1311 */ 1312 1313 /* total # of segments recv'd { tcp 17 } */ 1314 Counter64 tcpHCInSegs; 1315 /* total # of segments sent { tcp 18 } */ 1316 Counter64 tcpHCOutSegs; 1317 } mib2_tcp_t; 1318 #define MIB_FIRST_NEW_ELM_mib2_tcp_t tcpHCInSegs 1319 1320 #if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4 1321 #pragma pack() 1322 #endif 1323 1324 /* 1325 * The TCP/IPv4 connection table {tcp 13} contains information about this 1326 * entity's existing TCP connections over IPv4. 1327 */ 1328 /* For tcpConnState and tcp6ConnState */ 1329 #define MIB2_TCP_closed 1 1330 #define MIB2_TCP_listen 2 1331 #define MIB2_TCP_synSent 3 1332 #define MIB2_TCP_synReceived 4 1333 #define MIB2_TCP_established 5 1334 #define MIB2_TCP_finWait1 6 1335 #define MIB2_TCP_finWait2 7 1336 #define MIB2_TCP_closeWait 8 1337 #define MIB2_TCP_lastAck 9 1338 #define MIB2_TCP_closing 10 1339 #define MIB2_TCP_timeWait 11 1340 #define MIB2_TCP_deleteTCB 12 /* only writeable value */ 1341 1342 /* Pack data to make struct size the same for 32- and 64-bits */ 1343 #if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4 1344 #pragma pack(4) 1345 #endif 1346 typedef struct mib2_tcpConnEntry { 1347 /* state of tcp connection { tcpConnEntry 1} RW */ 1348 int tcpConnState; 1349 /* local ip addr for this connection { tcpConnEntry 2 } */ 1350 IpAddress tcpConnLocalAddress; 1351 /* local port for this connection { tcpConnEntry 3 } */ 1352 int tcpConnLocalPort; /* In host byte order */ 1353 /* remote ip addr for this connection { tcpConnEntry 4 } */ 1354 IpAddress tcpConnRemAddress; 1355 /* remote port for this connection { tcpConnEntry 5 } */ 1356 int tcpConnRemPort; /* In host byte order */ 1357 struct tcpConnEntryInfo_s { 1358 /* seq # of next segment to send */ 1359 Gauge ce_snxt; 1360 /* seq # of of last segment unacknowledged */ 1361 Gauge ce_suna; 1362 /* currect send window size */ 1363 Gauge ce_swnd; 1364 /* seq # of next expected segment */ 1365 Gauge ce_rnxt; 1366 /* seq # of last ack'd segment */ 1367 Gauge ce_rack; 1368 /* currenct receive window size */ 1369 Gauge ce_rwnd; 1370 /* current rto (retransmit timeout) */ 1371 Gauge ce_rto; 1372 /* current max segment size */ 1373 Gauge ce_mss; 1374 /* actual internal state */ 1375 int ce_state; 1376 } tcpConnEntryInfo; 1377 1378 /* pid of the processes that created this connection */ 1379 uint32_t tcpConnCreationProcess; 1380 /* system uptime when the connection was created */ 1381 uint64_t tcpConnCreationTime; 1382 } mib2_tcpConnEntry_t; 1383 #define MIB_FIRST_NEW_ELM_mib2_tcpConnEntry_t tcpConnCreationProcess 1384 1385 #if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4 1386 #pragma pack() 1387 #endif 1388 1389 1390 /* 1391 * The TCP/IPv6 connection table {tcp 14} contains information about this 1392 * entity's existing TCP connections over IPv6. 1393 */ 1394 1395 /* Pack data to make struct size the same for 32- and 64-bits */ 1396 #if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4 1397 #pragma pack(4) 1398 #endif 1399 typedef struct mib2_tcp6ConnEntry { 1400 /* local ip addr for this connection { ipv6TcpConnEntry 1 } */ 1401 Ip6Address tcp6ConnLocalAddress; 1402 /* local port for this connection { ipv6TcpConnEntry 2 } */ 1403 int tcp6ConnLocalPort; 1404 /* remote ip addr for this connection { ipv6TcpConnEntry 3 } */ 1405 Ip6Address tcp6ConnRemAddress; 1406 /* remote port for this connection { ipv6TcpConnEntry 4 } */ 1407 int tcp6ConnRemPort; 1408 /* interface index or zero { ipv6TcpConnEntry 5 } */ 1409 DeviceIndex tcp6ConnIfIndex; 1410 /* state of tcp6 connection { ipv6TcpConnEntry 6 } RW */ 1411 int tcp6ConnState; 1412 struct tcp6ConnEntryInfo_s { 1413 /* seq # of next segment to send */ 1414 Gauge ce_snxt; 1415 /* seq # of of last segment unacknowledged */ 1416 Gauge ce_suna; 1417 /* currect send window size */ 1418 Gauge ce_swnd; 1419 /* seq # of next expected segment */ 1420 Gauge ce_rnxt; 1421 /* seq # of last ack'd segment */ 1422 Gauge ce_rack; 1423 /* currenct receive window size */ 1424 Gauge ce_rwnd; 1425 /* current rto (retransmit timeout) */ 1426 Gauge ce_rto; 1427 /* current max segment size */ 1428 Gauge ce_mss; 1429 /* actual internal state */ 1430 int ce_state; 1431 } tcp6ConnEntryInfo; 1432 1433 /* pid of the processes that created this connection */ 1434 uint32_t tcp6ConnCreationProcess; 1435 /* system uptime when the connection was created */ 1436 uint64_t tcp6ConnCreationTime; 1437 } mib2_tcp6ConnEntry_t; 1438 #define MIB_FIRST_NEW_ELM_mib2_tcp6ConnEntry_t tcp6ConnCreationProcess 1439 1440 #if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4 1441 #pragma pack() 1442 #endif 1443 1444 /* 1445 * the UDP group 1446 */ 1447 #define MIB2_UDP_ENTRY 5 /* udpEntry */ 1448 #define MIB2_UDP6_ENTRY 6 /* udp6Entry */ 1449 1450 /* Old name retained for compatibility */ 1451 #define MIB2_UDP_5 MIB2_UDP_ENTRY 1452 1453 /* Pack data to make struct size the same for 32- and 64-bits */ 1454 #if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4 1455 #pragma pack(4) 1456 #endif 1457 typedef struct mib2_udp { 1458 /* total # of UDP datagrams sent upstream { udp 1 } */ 1459 Counter udpInDatagrams; 1460 /* in ip { udp 2 } */ 1461 /* # of recv'd dg's not deliverable (other) { udp 3 } */ 1462 Counter udpInErrors; 1463 /* total # of dg's sent { udp 4 } */ 1464 Counter udpOutDatagrams; 1465 /* { udp 5 } */ 1466 int udpEntrySize; /* Size of udpEntry_t */ 1467 int udp6EntrySize; /* Size of udp6Entry_t */ 1468 Counter udpOutErrors; 1469 1470 /* 1471 * fields from RFC 4113 1472 */ 1473 1474 /* total # of UDP datagrams sent upstream { udp 8 } */ 1475 Counter64 udpHCInDatagrams; 1476 /* total # of dg's sent { udp 9 } */ 1477 Counter64 udpHCOutDatagrams; 1478 } mib2_udp_t; 1479 #define MIB_FIRST_NEW_ELM_mib2_udp_t udpHCInDatagrams 1480 1481 #if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4 1482 #pragma pack() 1483 #endif 1484 1485 /* 1486 * The UDP listener table contains information about this entity's UDP 1487 * end-points on which a local application is currently accepting datagrams. 1488 */ 1489 1490 /* For both IPv4 and IPv6 ue_state: */ 1491 #define MIB2_UDP_unbound 1 1492 #define MIB2_UDP_idle 2 1493 #define MIB2_UDP_connected 3 1494 #define MIB2_UDP_unknown 4 1495 1496 /* Pack data to make struct size the same for 32- and 64-bits */ 1497 #if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4 1498 #pragma pack(4) 1499 #endif 1500 typedef struct mib2_udpEntry { 1501 /* local ip addr of listener { udpEntry 1 } */ 1502 IpAddress udpLocalAddress; 1503 /* local port of listener { udpEntry 2 } */ 1504 int udpLocalPort; /* In host byte order */ 1505 struct udpEntryInfo_s { 1506 int ue_state; 1507 IpAddress ue_RemoteAddress; 1508 int ue_RemotePort; /* In host byte order */ 1509 } udpEntryInfo; 1510 1511 /* 1512 * RFC 4113 1513 */ 1514 1515 /* Unique id for this 4-tuple { udpEndpointEntry 7 } */ 1516 uint32_t udpInstance; 1517 /* pid of the processes that created this endpoint */ 1518 uint32_t udpCreationProcess; 1519 /* system uptime when the endpoint was created */ 1520 uint64_t udpCreationTime; 1521 } mib2_udpEntry_t; 1522 #define MIB_FIRST_NEW_ELM_mib2_udpEntry_t udpInstance 1523 1524 #if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4 1525 #pragma pack() 1526 #endif 1527 1528 /* 1529 * The UDP (for IPv6) listener table contains information about this 1530 * entity's UDP end-points on which a local application is 1531 * currently accepting datagrams. 1532 */ 1533 1534 /* Pack data to make struct size the same for 32- and 64-bits */ 1535 #if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4 1536 #pragma pack(4) 1537 #endif 1538 typedef struct mib2_udp6Entry { 1539 /* local ip addr of listener { ipv6UdpEntry 1 } */ 1540 Ip6Address udp6LocalAddress; 1541 /* local port of listener { ipv6UdpEntry 2 } */ 1542 int udp6LocalPort; /* In host byte order */ 1543 /* interface index or zero { ipv6UdpEntry 3 } */ 1544 DeviceIndex udp6IfIndex; 1545 struct udp6EntryInfo_s { 1546 int ue_state; 1547 Ip6Address ue_RemoteAddress; 1548 int ue_RemotePort; /* In host byte order */ 1549 } udp6EntryInfo; 1550 1551 /* 1552 * RFC 4113 1553 */ 1554 1555 /* Unique id for this 4-tuple { udpEndpointEntry 7 } */ 1556 uint32_t udp6Instance; 1557 /* pid of the processes that created this endpoint */ 1558 uint32_t udp6CreationProcess; 1559 /* system uptime when the endpoint was created */ 1560 uint64_t udp6CreationTime; 1561 } mib2_udp6Entry_t; 1562 #define MIB_FIRST_NEW_ELM_mib2_udp6Entry_t udp6Instance 1563 1564 #if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4 1565 #pragma pack() 1566 #endif 1567 1568 /* 1569 * the RAWIP group 1570 */ 1571 typedef struct mib2_rawip { 1572 /* total # of RAWIP datagrams sent upstream */ 1573 Counter rawipInDatagrams; 1574 /* # of RAWIP packets with bad IPV6_CHECKSUM checksums */ 1575 Counter rawipInCksumErrs; 1576 /* # of recv'd dg's not deliverable (other) */ 1577 Counter rawipInErrors; 1578 /* total # of dg's sent */ 1579 Counter rawipOutDatagrams; 1580 /* total # of dg's not sent (e.g. no memory) */ 1581 Counter rawipOutErrors; 1582 } mib2_rawip_t; 1583 1584 /* DVMRP group */ 1585 #define EXPER_DVMRP_VIF 1 1586 #define EXPER_DVMRP_MRT 2 1587 1588 1589 /* 1590 * The SCTP group 1591 */ 1592 #define MIB2_SCTP_CONN 15 1593 #define MIB2_SCTP_CONN_LOCAL 16 1594 #define MIB2_SCTP_CONN_REMOTE 17 1595 1596 #define MIB2_SCTP_closed 1 1597 #define MIB2_SCTP_cookieWait 2 1598 #define MIB2_SCTP_cookieEchoed 3 1599 #define MIB2_SCTP_established 4 1600 #define MIB2_SCTP_shutdownPending 5 1601 #define MIB2_SCTP_shutdownSent 6 1602 #define MIB2_SCTP_shutdownReceived 7 1603 #define MIB2_SCTP_shutdownAckSent 8 1604 #define MIB2_SCTP_deleteTCB 9 1605 #define MIB2_SCTP_listen 10 /* Not in the MIB */ 1606 1607 #define MIB2_SCTP_ACTIVE 1 1608 #define MIB2_SCTP_INACTIVE 2 1609 1610 #define MIB2_SCTP_ADDR_V4 1 1611 #define MIB2_SCTP_ADDR_V6 2 1612 1613 #define MIB2_SCTP_RTOALGO_OTHER 1 1614 #define MIB2_SCTP_RTOALGO_VANJ 2 1615 1616 typedef struct mib2_sctpConnEntry { 1617 /* connection identifier { sctpAssocEntry 1 } */ 1618 uint32_t sctpAssocId; 1619 /* remote hostname (not used) { sctpAssocEntry 2 } */ 1620 Octet_t sctpAssocRemHostName; 1621 /* local port number { sctpAssocEntry 3 } */ 1622 uint32_t sctpAssocLocalPort; 1623 /* remote port number { sctpAssocEntry 4 } */ 1624 uint32_t sctpAssocRemPort; 1625 /* type of primary remote addr { sctpAssocEntry 5 } */ 1626 int sctpAssocRemPrimAddrType; 1627 /* primary remote address { sctpAssocEntry 6 } */ 1628 Ip6Address sctpAssocRemPrimAddr; 1629 /* local address */ 1630 Ip6Address sctpAssocLocPrimAddr; 1631 /* current heartbeat interval { sctpAssocEntry 7 } */ 1632 uint32_t sctpAssocHeartBeatInterval; 1633 /* state of this association { sctpAssocEntry 8 } */ 1634 int sctpAssocState; 1635 /* # of inbound streams { sctpAssocEntry 9 } */ 1636 uint32_t sctpAssocInStreams; 1637 /* # of outbound streams { sctpAssocEntry 10 } */ 1638 uint32_t sctpAssocOutStreams; 1639 /* max # of data retans { sctpAssocEntry 11 } */ 1640 uint32_t sctpAssocMaxRetr; 1641 /* sysId for assoc owner { sctpAssocEntry 12 } */ 1642 uint32_t sctpAssocPrimProcess; 1643 /* # of rxmit timeouts during hanshake */ 1644 Counter32 sctpAssocT1expired; /* { sctpAssocEntry 13 } */ 1645 /* # of rxmit timeouts during shutdown */ 1646 Counter32 sctpAssocT2expired; /* { sctpAssocEntry 14 } */ 1647 /* # of rxmit timeouts during data transfer */ 1648 Counter32 sctpAssocRtxChunks; /* { sctpAssocEntry 15 } */ 1649 /* assoc start-up time { sctpAssocEntry 16 } */ 1650 uint32_t sctpAssocStartTime; 1651 struct sctpConnEntryInfo_s { 1652 /* amount of data in send Q */ 1653 Gauge ce_sendq; 1654 /* amount of data in recv Q */ 1655 Gauge ce_recvq; 1656 /* currect send window size */ 1657 Gauge ce_swnd; 1658 /* currenct receive window size */ 1659 Gauge ce_rwnd; 1660 /* current max segment size */ 1661 Gauge ce_mss; 1662 } sctpConnEntryInfo; 1663 } mib2_sctpConnEntry_t; 1664 1665 typedef struct mib2_sctpConnLocalAddrEntry { 1666 /* connection identifier */ 1667 uint32_t sctpAssocId; 1668 /* type of local addr { sctpAssocLocalEntry 1 } */ 1669 int sctpAssocLocalAddrType; 1670 /* local address { sctpAssocLocalEntry 2 } */ 1671 Ip6Address sctpAssocLocalAddr; 1672 } mib2_sctpConnLocalEntry_t; 1673 1674 typedef struct mib2_sctpConnRemoteAddrEntry { 1675 /* connection identier */ 1676 uint32_t sctpAssocId; 1677 /* remote addr type { sctpAssocRemEntry 1 } */ 1678 int sctpAssocRemAddrType; 1679 /* remote address { sctpAssocRemEntry 2 } */ 1680 Ip6Address sctpAssocRemAddr; 1681 /* is the address active { sctpAssocRemEntry 3 } */ 1682 int sctpAssocRemAddrActive; 1683 /* whether hearbeat is active { sctpAssocRemEntry 4 } */ 1684 int sctpAssocRemAddrHBActive; 1685 /* current RTO { sctpAssocRemEntry 5 } */ 1686 uint32_t sctpAssocRemAddrRTO; 1687 /* max # of rexmits before becoming inactive */ 1688 uint32_t sctpAssocRemAddrMaxPathRtx; /* {sctpAssocRemEntry 6} */ 1689 /* # of rexmits to this dest { sctpAssocRemEntry 7 } */ 1690 uint32_t sctpAssocRemAddrRtx; 1691 } mib2_sctpConnRemoteEntry_t; 1692 1693 1694 1695 /* Pack data in mib2_sctp to make struct size the same for 32- and 64-bits */ 1696 #if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4 1697 #pragma pack(4) 1698 #endif 1699 1700 typedef struct mib2_sctp { 1701 /* algorithm used to determine rto { sctpParams 1 } */ 1702 int sctpRtoAlgorithm; 1703 /* min RTO in msecs { sctpParams 2 } */ 1704 uint32_t sctpRtoMin; 1705 /* max RTO in msecs { sctpParams 3 } */ 1706 uint32_t sctpRtoMax; 1707 /* initial RTO in msecs { sctpParams 4 } */ 1708 uint32_t sctpRtoInitial; 1709 /* max # of assocs { sctpParams 5 } */ 1710 int32_t sctpMaxAssocs; 1711 /* cookie lifetime in msecs { sctpParams 6 } */ 1712 uint32_t sctpValCookieLife; 1713 /* max # of retrans in startup { sctpParams 7 } */ 1714 uint32_t sctpMaxInitRetr; 1715 /* # of conns ESTABLISHED, SHUTDOWN-RECEIVED or SHUTDOWN-PENDING */ 1716 Counter32 sctpCurrEstab; /* { sctpStats 1 } */ 1717 /* # of active opens { sctpStats 2 } */ 1718 Counter32 sctpActiveEstab; 1719 /* # of passive opens { sctpStats 3 } */ 1720 Counter32 sctpPassiveEstab; 1721 /* # of aborted conns { sctpStats 4 } */ 1722 Counter32 sctpAborted; 1723 /* # of graceful shutdowns { sctpStats 5 } */ 1724 Counter32 sctpShutdowns; 1725 /* # of OOB packets { sctpStats 6 } */ 1726 Counter32 sctpOutOfBlue; 1727 /* # of packets discarded due to cksum { sctpStats 7 } */ 1728 Counter32 sctpChecksumError; 1729 /* # of control chunks sent { sctpStats 8 } */ 1730 Counter64 sctpOutCtrlChunks; 1731 /* # of ordered data chunks sent { sctpStats 9 } */ 1732 Counter64 sctpOutOrderChunks; 1733 /* # of unordered data chunks sent { sctpStats 10 } */ 1734 Counter64 sctpOutUnorderChunks; 1735 /* # of retransmitted data chunks */ 1736 Counter64 sctpRetransChunks; 1737 /* # of SACK chunks sent */ 1738 Counter sctpOutAck; 1739 /* # of delayed ACK timeouts */ 1740 Counter sctpOutAckDelayed; 1741 /* # of SACK chunks sent to update window */ 1742 Counter sctpOutWinUpdate; 1743 /* # of fast retransmits */ 1744 Counter sctpOutFastRetrans; 1745 /* # of window probes sent */ 1746 Counter sctpOutWinProbe; 1747 /* # of control chunks received { sctpStats 11 } */ 1748 Counter64 sctpInCtrlChunks; 1749 /* # of ordered data chunks rcvd { sctpStats 12 } */ 1750 Counter64 sctpInOrderChunks; 1751 /* # of unord data chunks rcvd { sctpStats 13 } */ 1752 Counter64 sctpInUnorderChunks; 1753 /* # of received SACK chunks */ 1754 Counter sctpInAck; 1755 /* # of received SACK chunks with duplicate TSN */ 1756 Counter sctpInDupAck; 1757 /* # of SACK chunks acking unsent data */ 1758 Counter sctpInAckUnsent; 1759 /* # of Fragmented User Messages { sctpStats 14 } */ 1760 Counter64 sctpFragUsrMsgs; 1761 /* # of Reassembled User Messages { sctpStats 15 } */ 1762 Counter64 sctpReasmUsrMsgs; 1763 /* # of Sent SCTP Packets { sctpStats 16 } */ 1764 Counter64 sctpOutSCTPPkts; 1765 /* # of Received SCTP Packets { sctpStats 17 } */ 1766 Counter64 sctpInSCTPPkts; 1767 /* # of invalid cookies received */ 1768 Counter sctpInInvalidCookie; 1769 /* total # of retransmit timeouts */ 1770 Counter sctpTimRetrans; 1771 /* total # of retransmit timeouts dropping the connection */ 1772 Counter sctpTimRetransDrop; 1773 /* total # of heartbeat probes */ 1774 Counter sctpTimHeartBeatProbe; 1775 /* total # of heartbeat timeouts dropping the connection */ 1776 Counter sctpTimHeartBeatDrop; 1777 /* total # of conns refused due to backlog full on listen */ 1778 Counter sctpListenDrop; 1779 /* total # of pkts received after the association has closed */ 1780 Counter sctpInClosed; 1781 int sctpEntrySize; 1782 int sctpLocalEntrySize; 1783 int sctpRemoteEntrySize; 1784 } mib2_sctp_t; 1785 1786 #if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4 1787 #pragma pack() 1788 #endif 1789 1790 /* 1791 * the DCCP group 1792 */ 1793 #define MIB2_DCCP_CONN 18 1794 1795 #define MIB2_DCCP_closed 1 1796 #define MIB2_DCCP_listen 2 1797 1798 /* Pack data to make struct size the same for 32- and 64-bits */ 1799 #if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4 1800 #pragma pack(4) 1801 #endif 1802 1803 typedef struct mib2_dccp { 1804 1805 Counter dccpActiveOpens; 1806 1807 int dccpEntrySize; 1808 } mib2_dccp_t; 1809 1810 #if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4 1811 #pragma pack() 1812 #endif 1813 1814 /* Pack data to make struct size the same for 32- and 64-bits */ 1815 #if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4 1816 #pragma pack(4) 1817 #endif 1818 1819 typedef struct mib2_dccpConnEntry { 1820 int dccpConnState; 1821 IpAddress dccpConnLocalAddress; 1822 int dccpConnLocalPort; 1823 IpAddress dccpConnRemAddress; 1824 int dccpConnRemPort; 1825 1826 uint32_t dccpConnCreationProcess; 1827 uint64_t dccpConnCreationTime; 1828 } mib2_dccpConnEntry_t; 1829 #define MIB_FIRST_NEW_ELM_mib2_dccpConnEntry_t dccpConnCreationProcess 1830 1831 #if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4 1832 #pragma pack() 1833 #endif 1834 1835 #ifdef __cplusplus 1836 } 1837 #endif 1838 1839 #endif /* _INET_MIB2_H */