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