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