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