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