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