Home | History | Annotate | Download | only in inet
      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 /*
     22  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
     23  * Use is subject to license terms.
     24  */
     25 /* Copyright (c) 1990 Mentat Inc. */
     26 
     27 #ifndef	_INET_MIB2_H
     28 #define	_INET_MIB2_H
     29 
     30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
     31 
     32 #include <netinet/in.h>	/* For in6_addr_t */
     33 #include <sys/tsol/label.h> /* For brange_t */
     34 #include <sys/tsol/label_macro.h> /* For brange_t */
     35 
     36 #ifdef	__cplusplus
     37 extern "C" {
     38 #endif
     39 
     40 /*
     41  * The IPv6 parts of this are derived from:
     42  *	RFC 2465
     43  *	RFC 2466
     44  *	RFC 2452
     45  *	RFC 2454
     46  */
     47 
     48 /*
     49  * SNMP set/get via M_PROTO T_OPTMGMT_REQ.  Structure is that used
     50  * for [gs]etsockopt() calls.  get uses T_CURRENT, set uses T_NEOGTIATE
     51  * MGMT_flags value.  The following definition of opthdr is taken from
     52  * socket.h:
     53  *
     54  * An option specification consists of an opthdr, followed by the value of
     55  * the option.  An options buffer contains one or more options.  The len
     56  * field of opthdr specifies the length of the option value in bytes.  This
     57  * length must be a multiple of sizeof(long) (use OPTLEN macro).
     58  *
     59  * struct opthdr {
     60  *	long	level;	protocol level affected
     61  *	long	name;	option to modify
     62  *	long	len;	length of option value
     63  * };
     64  *
     65  * #define OPTLEN(x) ((((x) + sizeof(long) - 1) / sizeof(long)) * sizeof(long))
     66  * #define OPTVAL(opt) ((char *)(opt + 1))
     67  *
     68  * For get requests (T_NEGOTIATE), any MIB2_xxx value can be used (only
     69  * "get all" is supported, so all modules get a copy of the request to
     70  * return everything it knows.   Recommend: Use MIB2_IP
     71  *
     72  * IMPORTANT:  some fields are grouped in a different structure than
     73  * suggested by MIB-II, e.g., checksum error counts.  The original MIB-2
     74  * field name has been retained.  Field names beginning with "mi" are not
     75  * defined in the MIB but contain important & useful information maintained
     76  * by the corresponding module.
     77  */
     78 #ifndef IPPROTO_MAX
     79 #define	IPPROTO_MAX	256
     80 #endif
     81 
     82 
     83 #define	MIB2_SYSTEM		(IPPROTO_MAX+1)
     84 #define	MIB2_INTERFACES		(IPPROTO_MAX+2)
     85 #define	MIB2_AT			(IPPROTO_MAX+3)
     86 #define	MIB2_IP			(IPPROTO_MAX+4)
     87 #define	MIB2_ICMP		(IPPROTO_MAX+5)
     88 #define	MIB2_TCP		(IPPROTO_MAX+6)
     89 #define	MIB2_UDP		(IPPROTO_MAX+7)
     90 #define	MIB2_EGP		(IPPROTO_MAX+8)
     91 #define	MIB2_CMOT		(IPPROTO_MAX+9)
     92 #define	MIB2_TRANSMISSION	(IPPROTO_MAX+10)
     93 #define	MIB2_SNMP		(IPPROTO_MAX+11)
     94 #define	MIB2_IP6		(IPPROTO_MAX+12)
     95 #define	MIB2_ICMP6		(IPPROTO_MAX+13)
     96 #define	MIB2_TCP6		(IPPROTO_MAX+14)
     97 #define	MIB2_UDP6		(IPPROTO_MAX+15)
     98 #define	MIB2_SCTP		(IPPROTO_MAX+16)
     99 
    100 /*
    101  * Define range of levels for use with MIB2_*
    102  */
    103 #define	MIB2_RANGE_START	(IPPROTO_MAX+1)
    104 #define	MIB2_RANGE_END		(IPPROTO_MAX+16)
    105 
    106 
    107 #define	EXPER			1024	/* experimental - not part of mib */
    108 #define	EXPER_IGMP		(EXPER+1)
    109 #define	EXPER_DVMRP		(EXPER+2)
    110 #define	EXPER_RAWIP		(EXPER+3)
    111 
    112 /*
    113  * Define range of levels for experimental use
    114  */
    115 #define	EXPER_RANGE_START	(EXPER+1)
    116 #define	EXPER_RANGE_END		(EXPER+3)
    117 
    118 #define	BUMP_MIB(s, x)		{				\
    119 	extern void __dtrace_probe___mib_##x(int, void *);	\
    120 	void *stataddr = &((s)->x);				\
    121 	__dtrace_probe___mib_##x(1, stataddr);			\
    122 	(s)->x++;						\
    123 }
    124 
    125 #define	UPDATE_MIB(s, x, y)	{				\
    126 	extern void __dtrace_probe___mib_##x(int, void *);	\
    127 	void *stataddr = &((s)->x);				\
    128 	__dtrace_probe___mib_##x(y, stataddr);			\
    129 	(s)->x += (y);						\
    130 }
    131 
    132 #define	SET_MIB(x, y)		x = y
    133 #define	BUMP_LOCAL(x)		(x)++
    134 #define	UPDATE_LOCAL(x, y)	(x) += (y)
    135 #define	SYNC32_MIB(s, m32, m64)	SET_MIB((s)->m32, (s)->m64 & 0xffffffff)
    136 
    137 #define	OCTET_LENGTH	32	/* Must be at least LIFNAMSIZ */
    138 typedef struct Octet_s {
    139 	int	o_length;
    140 	char	o_bytes[OCTET_LENGTH];
    141 } Octet_t;
    142 
    143 typedef uint32_t	Counter;
    144 typedef uint32_t	Counter32;
    145 typedef uint64_t	Counter64;
    146 typedef uint32_t	Gauge;
    147 typedef uint32_t	IpAddress;
    148 typedef	struct in6_addr	Ip6Address;
    149 typedef Octet_t		DeviceName;
    150 typedef Octet_t		PhysAddress;
    151 typedef uint32_t	DeviceIndex;	/* Interface index */
    152 
    153 #define	MIB2_UNKNOWN_INTERFACE	0
    154 #define	MIB2_UNKNOWN_PROCESS	0
    155 
    156 /*
    157  *  IP group
    158  */
    159 #define	MIB2_IP_ADDR		20	/* ipAddrEntry */
    160 #define	MIB2_IP_ROUTE		21	/* ipRouteEntry */
    161 #define	MIB2_IP_MEDIA		22	/* ipNetToMediaEntry */
    162 #define	MIB2_IP6_ROUTE		23	/* ipv6RouteEntry */
    163 #define	MIB2_IP6_MEDIA		24	/* ipv6NetToMediaEntry */
    164 #define	MIB2_IP6_ADDR		25	/* ipv6AddrEntry */
    165 #define	MIB2_IP_TRAFFIC_STATS	31	/* ipIfStatsEntry (IPv4) */
    166 #define	EXPER_IP_GROUP_MEMBERSHIP	100
    167 #define	EXPER_IP6_GROUP_MEMBERSHIP	101
    168 #define	EXPER_IP_GROUP_SOURCES		102
    169 #define	EXPER_IP6_GROUP_SOURCES		103
    170 #define	EXPER_IP_RTATTR			104
    171 
    172 /*
    173  * There can be one of each of these tables per transport (MIB2_* above).
    174  */
    175 #define	EXPER_XPORT_MLP		105	/* transportMLPEntry */
    176 
    177 /* Old names retained for compatibility */
    178 #define	MIB2_IP_20	MIB2_IP_ADDR
    179 #define	MIB2_IP_21	MIB2_IP_ROUTE
    180 #define	MIB2_IP_22	MIB2_IP_MEDIA
    181 
    182 typedef struct mib2_ip {
    183 		/* forwarder?  1 gateway, 2 NOT gateway	{ip 1} RW */
    184 	int	ipForwarding;
    185 		/* default Time-to-Live for iph		{ip 2} RW */
    186 	int	ipDefaultTTL;
    187 		/* # of input datagrams			{ip 3} */
    188 	Counter	ipInReceives;
    189 		/* # of dg discards for iph error	{ip 4} */
    190 	Counter	ipInHdrErrors;
    191 		/* # of dg discards for bad addr	{ip 5} */
    192 	Counter	ipInAddrErrors;
    193 		/* # of dg being forwarded		{ip 6} */
    194 	Counter	ipForwDatagrams;
    195 		/* # of dg discards for unk protocol	{ip 7} */
    196 	Counter	ipInUnknownProtos;
    197 		/* # of dg discards of good dg's	{ip 8} */
    198 	Counter	ipInDiscards;
    199 		/* # of dg sent upstream		{ip 9} */
    200 	Counter ipInDelivers;
    201 		/* # of outdgs recv'd from upstream	{ip 10} */
    202 	Counter	ipOutRequests;
    203 		/* # of good outdgs discarded		{ip 11} */
    204 	Counter ipOutDiscards;
    205 		/* # of outdg discards: no route found	{ip 12} */
    206 	Counter	ipOutNoRoutes;
    207 		/* sec's recv'd frags held for reass.	{ip 13}	*/
    208 	int	ipReasmTimeout;
    209 		/* # of ip frags needing reassembly	{ip 14} */
    210 	Counter	ipReasmReqds;
    211 		/* # of dg's reassembled		{ip 15} */
    212 	Counter	ipReasmOKs;
    213 		/* # of reassembly failures (not dg cnt){ip 16} */
    214 	Counter	ipReasmFails;
    215 		/* # of dg's fragged			{ip 17} */
    216 	Counter	ipFragOKs;
    217 		/* # of dg discards for no frag set	{ip 18} */
    218 	Counter ipFragFails;
    219 		/* # of dg frags from fragmentation	{ip 19} */
    220 	Counter	ipFragCreates;
    221 		/* {ip 20} */
    222 	int	ipAddrEntrySize;
    223 		/* {ip 21} */
    224 	int	ipRouteEntrySize;
    225 		/* {ip 22} */
    226 	int	ipNetToMediaEntrySize;
    227 		/* # of valid route entries discarded 	{ip 23} */
    228 	Counter	ipRoutingDiscards;
    229 /*
    230  * following defined in MIB-II as part of TCP & UDP groups:
    231  */
    232 		/* total # of segments recv'd with error	{ tcp 14 } */
    233 	Counter	tcpInErrs;
    234 		/* # of recv'd dg's not deliverable (no appl.)	{ udp 2 } */
    235 	Counter	udpNoPorts;
    236 /*
    237  * In addition to MIB-II
    238  */
    239 		/* # of bad IP header checksums */
    240 	Counter	ipInCksumErrs;
    241 		/* # of complete duplicates in reassembly */
    242 	Counter	ipReasmDuplicates;
    243 		/* # of partial duplicates in reassembly */
    244 	Counter	ipReasmPartDups;
    245 		/* # of packets not forwarded due to adminstrative reasons */
    246 	Counter	ipForwProhibits;
    247 		/* # of UDP packets with bad UDP checksums */
    248 	Counter udpInCksumErrs;
    249 		/* # of UDP packets droped due to queue overflow */
    250 	Counter udpInOverflows;
    251 		/*
    252 		 * # of RAW IP packets (all IP protocols except UDP, TCP
    253 		 * and ICMP) droped due to queue overflow
    254 		 */
    255 	Counter rawipInOverflows;
    256 
    257 	/*
    258 	 * Folowing are private IPSEC MIB.
    259 	 */
    260 	/* # of incoming packets that succeeded policy checks */
    261 	Counter ipsecInSucceeded;
    262 	/* # of incoming packets that failed policy checks */
    263 	Counter ipsecInFailed;
    264 /* Compatible extensions added here */
    265 	int	ipMemberEntrySize;	/* Size of ip_member_t */
    266 	int	ipGroupSourceEntrySize;	/* Size of ip_grpsrc_t */
    267 
    268 		/* # of IPv6 packets received by IPv4 and dropped */
    269 	Counter ipInIPv6;
    270 		/* # of IPv6 packets transmitted by ip_wput */
    271 	Counter ipOutIPv6;
    272 		/* # of times ip_wput has switched to become ip_wput_v6 */
    273 	Counter ipOutSwitchIPv6;
    274 
    275 	int	ipRouteAttributeSize;	/* Size of mib2_ipAttributeEntry_t */
    276 	int	transportMLPSize;	/* Size of mib2_transportMLPEntry_t */
    277 } mib2_ip_t;
    278 
    279 /*
    280  *	ipv6IfStatsEntry OBJECT-TYPE
    281  *		SYNTAX     Ipv6IfStatsEntry
    282  *		MAX-ACCESS not-accessible
    283  *		STATUS     current
    284  *		DESCRIPTION
    285  *			"An interface statistics entry containing objects
    286  *			at a particular IPv6 interface."
    287  *		AUGMENTS { ipv6IfEntry }
    288  *		::= { ipv6IfStatsTable 1 }
    289  *
    290  * Per-interface IPv6 statistics table
    291  */
    292 
    293 typedef struct mib2_ipv6IfStatsEntry {
    294 	/* Local ifindex to identify the interface */
    295 	DeviceIndex	ipv6IfIndex;
    296 
    297 		/* forwarder?  1 gateway, 2 NOT gateway	{ipv6MIBObjects 1} RW */
    298 	int	ipv6Forwarding;
    299 		/* default Hoplimit for IPv6		{ipv6MIBObjects 2} RW */
    300 	int	ipv6DefaultHopLimit;
    301 
    302 	int	ipv6IfStatsEntrySize;
    303 	int	ipv6AddrEntrySize;
    304 	int	ipv6RouteEntrySize;
    305 	int	ipv6NetToMediaEntrySize;
    306 	int	ipv6MemberEntrySize;		/* Size of ipv6_member_t */
    307 	int	ipv6GroupSourceEntrySize;	/* Size of ipv6_grpsrc_t */
    308 
    309 	/* # input datagrams (incl errors)	{ ipv6IfStatsEntry 1 } */
    310 	Counter	ipv6InReceives;
    311 	/* # errors in IPv6 headers and options	{ ipv6IfStatsEntry 2 } */
    312 	Counter	ipv6InHdrErrors;
    313 	/* # exceeds outgoing link MTU		{ ipv6IfStatsEntry 3 } */
    314 	Counter	ipv6InTooBigErrors;
    315 	/* # discarded due to no route to dest 	{ ipv6IfStatsEntry 4 } */
    316 	Counter	ipv6InNoRoutes;
    317 	/* # invalid or unsupported addresses	{ ipv6IfStatsEntry 5 } */
    318 	Counter	ipv6InAddrErrors;
    319 	/* # unknown next header 		{ ipv6IfStatsEntry 6 } */
    320 	Counter	ipv6InUnknownProtos;
    321 	/* # too short packets			{ ipv6IfStatsEntry 7 } */
    322 	Counter	ipv6InTruncatedPkts;
    323 	/* # discarded e.g. due to no buffers	{ ipv6IfStatsEntry 8 } */
    324 	Counter	ipv6InDiscards;
    325 	/* # delivered to upper layer protocols	{ ipv6IfStatsEntry 9 } */
    326 	Counter	ipv6InDelivers;
    327 	/* # forwarded out interface		{ ipv6IfStatsEntry 10 } */
    328 	Counter	ipv6OutForwDatagrams;
    329 	/* # originated out interface		{ ipv6IfStatsEntry 11 } */
    330 	Counter	ipv6OutRequests;
    331 	/* # discarded e.g. due to no buffers	{ ipv6IfStatsEntry 12 } */
    332 	Counter	ipv6OutDiscards;
    333 	/* # sucessfully fragmented packets	{ ipv6IfStatsEntry 13 } */
    334 	Counter	ipv6OutFragOKs;
    335 	/* # fragmentation failed		{ ipv6IfStatsEntry 14 } */
    336 	Counter	ipv6OutFragFails;
    337 	/* # fragments created			{ ipv6IfStatsEntry 15 } */
    338 	Counter	ipv6OutFragCreates;
    339 	/* # fragments to reassemble		{ ipv6IfStatsEntry 16 } */
    340 	Counter	ipv6ReasmReqds;
    341 	/* # packets after reassembly		{ ipv6IfStatsEntry 17 } */
    342 	Counter	ipv6ReasmOKs;
    343 	/* # reassembly failed			{ ipv6IfStatsEntry 18 } */
    344 	Counter	ipv6ReasmFails;
    345 	/* # received multicast packets		{ ipv6IfStatsEntry 19 } */
    346 	Counter	ipv6InMcastPkts;
    347 	/* # transmitted multicast packets	{ ipv6IfStatsEntry 20 } */
    348 	Counter	ipv6OutMcastPkts;
    349 /*
    350  * In addition to defined MIBs
    351  */
    352 		/* # discarded due to no route to dest */
    353 	Counter	ipv6OutNoRoutes;
    354 		/* # of complete duplicates in reassembly */
    355 	Counter	ipv6ReasmDuplicates;
    356 		/* # of partial duplicates in reassembly */
    357 	Counter	ipv6ReasmPartDups;
    358 		/* # of packets not forwarded due to adminstrative reasons */
    359 	Counter	ipv6ForwProhibits;
    360 		/* # of UDP packets with bad UDP checksums */
    361 	Counter udpInCksumErrs;
    362 		/* # of UDP packets droped due to queue overflow */
    363 	Counter udpInOverflows;
    364 		/*
    365 		 * # of RAW IPv6 packets (all IPv6 protocols except UDP, TCP
    366 		 * and ICMPv6) droped due to queue overflow
    367 		 */
    368 	Counter rawipInOverflows;
    369 
    370 		/* # of IPv4 packets received by IPv6 and dropped */
    371 	Counter ipv6InIPv4;
    372 		/* # of IPv4 packets transmitted by ip_wput_wput */
    373 	Counter ipv6OutIPv4;
    374 		/* # of times ip_wput_v6 has switched to become ip_wput */
    375 	Counter ipv6OutSwitchIPv4;
    376 } mib2_ipv6IfStatsEntry_t;
    377 
    378 /*
    379  * Per interface IP statistics, both v4 and v6.
    380  *
    381  * Some applications expect to get mib2_ipv6IfStatsEntry_t structs back when
    382  * making a request. To ensure backwards compatability, the first
    383  * sizeof(mib2_ipv6IfStatsEntry_t) bytes of the structure is identical to
    384  * mib2_ipv6IfStatsEntry_t. This should work as long the application is
    385  * written correctly (i.e., using ipv6IfStatsEntrySize to get the size of
    386  * the struct)
    387  *
    388  * RFC4293 introduces several new counters, as well as defining 64-bit
    389  * versions of existing counters. For a new counters, if they have both 32-
    390  * and 64-bit versions, then we only added the latter. However, for already
    391  * existing counters, we have added the 64-bit versions without removing the
    392  * old (32-bit) ones. The 64- and 32-bit counters will only be synchronized
    393  * when the structure contains IPv6 statistics, which is done to ensure
    394  * backwards compatibility.
    395  */
    396 
    397 /* The following are defined in RFC 4001 and are used for ipIfStatsIPVersion */
    398 #define	MIB2_INETADDRESSTYPE_unknown	0
    399 #define	MIB2_INETADDRESSTYPE_ipv4	1
    400 #define	MIB2_INETADDRESSTYPE_ipv6	2
    401 
    402 /*
    403  * On amd64, the alignment requirements for long long's is different for
    404  * 32 and 64 bits. If we have a struct containing long long's that is being
    405  * passed between a 64-bit kernel to a 32-bit application, then it is very
    406  * likely that the size of the struct will differ due to padding. Therefore, we
    407  * pack the data to ensure that the struct size is the same for 32- and
    408  * 64-bits.
    409  */
    410 #if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4
    411 #pragma pack(4)
    412 #endif
    413 
    414 typedef struct mib2_ipIfStatsEntry {
    415 
    416 	/* Local ifindex to identify the interface */
    417 	DeviceIndex	ipIfStatsIfIndex;
    418 
    419 	/* forwarder?  1 gateway, 2 NOT gateway	{ ipv6MIBObjects 1} RW */
    420 	int	ipIfStatsForwarding;
    421 	/* default Hoplimit for IPv6		{ ipv6MIBObjects 2} RW */
    422 	int	ipIfStatsDefaultHopLimit;
    423 #define	ipIfStatsDefaultTTL	ipIfStatsDefaultHopLimit
    424 
    425 	int	ipIfStatsEntrySize;
    426 	int	ipIfStatsAddrEntrySize;
    427 	int	ipIfStatsRouteEntrySize;
    428 	int	ipIfStatsNetToMediaEntrySize;
    429 	int	ipIfStatsMemberEntrySize;
    430 	int	ipIfStatsGroupSourceEntrySize;
    431 
    432 	/* # input datagrams (incl errors)	{ ipIfStatsEntry 3 } */
    433 	Counter	ipIfStatsInReceives;
    434 	/* # errors in IP headers and options	{ ipIfStatsEntry 7 } */
    435 	Counter	ipIfStatsInHdrErrors;
    436 	/* # exceeds outgoing link MTU(v6 only)	{ ipv6IfStatsEntry 3 } */
    437 	Counter	ipIfStatsInTooBigErrors;
    438 	/* # discarded due to no route to dest 	{ ipIfStatsEntry 8 } */
    439 	Counter	ipIfStatsInNoRoutes;
    440 	/* # invalid or unsupported addresses	{ ipIfStatsEntry 9 } */
    441 	Counter	ipIfStatsInAddrErrors;
    442 	/* # unknown next header 		{ ipIfStatsEntry 10 } */
    443 	Counter	ipIfStatsInUnknownProtos;
    444 	/* # too short packets			{ ipIfStatsEntry 11 } */
    445 	Counter	ipIfStatsInTruncatedPkts;
    446 	/* # discarded e.g. due to no buffers	{ ipIfStatsEntry 17 } */
    447 	Counter	ipIfStatsInDiscards;
    448 	/* # delivered to upper layer protocols	{ ipIfStatsEntry 18 } */
    449 	Counter	ipIfStatsInDelivers;
    450 	/* # forwarded out interface		{ ipIfStatsEntry 23 } */
    451 	Counter	ipIfStatsOutForwDatagrams;
    452 	/* # originated out interface		{ ipIfStatsEntry 20 } */
    453 	Counter	ipIfStatsOutRequests;
    454 	/* # discarded e.g. due to no buffers	{ ipIfStatsEntry 25 } */
    455 	Counter	ipIfStatsOutDiscards;
    456 	/* # sucessfully fragmented packets	{ ipIfStatsEntry 27 } */
    457 	Counter	ipIfStatsOutFragOKs;
    458 	/* # fragmentation failed		{ ipIfStatsEntry 28 } */
    459 	Counter	ipIfStatsOutFragFails;
    460 	/* # fragments created			{ ipIfStatsEntry 29 } */
    461 	Counter	ipIfStatsOutFragCreates;
    462 	/* # fragments to reassemble		{ ipIfStatsEntry 14 } */
    463 	Counter	ipIfStatsReasmReqds;
    464 	/* # packets after reassembly		{ ipIfStatsEntry 15 } */
    465 	Counter	ipIfStatsReasmOKs;
    466 	/* # reassembly failed			{ ipIfStatsEntry 16 } */
    467 	Counter	ipIfStatsReasmFails;
    468 	/* # received multicast packets		{ ipIfStatsEntry 34 } */
    469 	Counter	ipIfStatsInMcastPkts;
    470 	/* # transmitted multicast packets	{ ipIfStatsEntry 38 } */
    471 	Counter	ipIfStatsOutMcastPkts;
    472 
    473 	/*
    474 	 * In addition to defined MIBs
    475 	 */
    476 
    477 	/* # discarded due to no route to dest 	{ ipSystemStatsEntry 22 } */
    478 	Counter	ipIfStatsOutNoRoutes;
    479 	/* # of complete duplicates in reassembly */
    480 	Counter	ipIfStatsReasmDuplicates;
    481 	/* # of partial duplicates in reassembly */
    482 	Counter	ipIfStatsReasmPartDups;
    483 	/* # of packets not forwarded due to adminstrative reasons */
    484 	Counter	ipIfStatsForwProhibits;
    485 	/* # of UDP packets with bad UDP checksums */
    486 	Counter udpInCksumErrs;
    487 #define	udpIfStatsInCksumErrs	udpInCksumErrs
    488 	/* # of UDP packets droped due to queue overflow */
    489 	Counter udpInOverflows;
    490 #define	udpIfStatsInOverflows	udpInOverflows
    491 	/*
    492 	 * # of RAW IP packets (all IP protocols except UDP, TCP
    493 	 * and ICMP) droped due to queue overflow
    494 	 */
    495 	Counter rawipInOverflows;
    496 #define	rawipIfStatsInOverflows	rawipInOverflows
    497 
    498 	/*
    499 	 * # of IP packets received with the wrong version (i.e., not equal
    500 	 * to ipIfStatsIPVersion) and that were dropped.
    501 	 */
    502 	Counter ipIfStatsInWrongIPVersion;
    503 	/*
    504 	 * Depending on the value of ipIfStatsIPVersion, this counter tracks
    505 	 * v4: # of IPv6 packets transmitted by ip_wput or,
    506 	 * v6: # of IPv4 packets transmitted by ip_wput_v6.
    507 	 */
    508 	Counter ipIfStatsOutWrongIPVersion;
    509 	/*
    510 	 * Depending on the value of ipIfStatsIPVersion, this counter tracks
    511 	 * # of times ip_wput has switched to become ip_wput_v6, or vice versa.
    512 	 */
    513 	Counter ipIfStatsOutSwitchIPVersion;
    514 
    515 	/*
    516 	 * Fields defined in RFC 4293
    517 	 */
    518 
    519 	/* ip version				{ ipIfStatsEntry 1 } */
    520 	int		ipIfStatsIPVersion;
    521 	/* # input datagrams (incl errors)	{ ipIfStatsEntry 4 } */
    522 	Counter64	ipIfStatsHCInReceives;
    523 	/* # input octets (incl errors)		{ ipIfStatsEntry 6 } */
    524 	Counter64	ipIfStatsHCInOctets;
    525 	/*
    526 	 *					{ ipIfStatsEntry 13 }
    527 	 * # input datagrams for which a forwarding attempt was made
    528 	 */
    529 	Counter64	ipIfStatsHCInForwDatagrams;
    530 	/* # delivered to upper layer protocols	{ ipIfStatsEntry 19 } */
    531 	Counter64	ipIfStatsHCInDelivers;
    532 	/* # originated out interface		{ ipIfStatsEntry 21 } */
    533 	Counter64	ipIfStatsHCOutRequests;
    534 	/* # forwarded out interface		{ ipIfStatsEntry 23 } */
    535 	Counter64	ipIfStatsHCOutForwDatagrams;
    536 	/* # dg's requiring fragmentation 	{ ipIfStatsEntry 26 } */
    537 	Counter		ipIfStatsOutFragReqds;
    538 	/* # output datagrams			{ ipIfStatsEntry 31 } */
    539 	Counter64	ipIfStatsHCOutTransmits;
    540 	/* # output octets			{ ipIfStatsEntry 33 } */
    541 	Counter64	ipIfStatsHCOutOctets;
    542 	/* # received multicast datagrams	{ ipIfStatsEntry 35 } */
    543 	Counter64	ipIfStatsHCInMcastPkts;
    544 	/* # received multicast octets		{ ipIfStatsEntry 37 } */
    545 	Counter64	ipIfStatsHCInMcastOctets;
    546 	/* # transmitted multicast datagrams	{ ipIfStatsEntry 39 } */
    547 	Counter64	ipIfStatsHCOutMcastPkts;
    548 	/* # transmitted multicast octets	{ ipIfStatsEntry 41 } */
    549 	Counter64	ipIfStatsHCOutMcastOctets;
    550 	/* # received broadcast datagrams	{ ipIfStatsEntry 43 } */
    551 	Counter64	ipIfStatsHCInBcastPkts;
    552 	/* # transmitted broadcast datagrams	{ ipIfStatsEntry 45 } */
    553 	Counter64	ipIfStatsHCOutBcastPkts;
    554 
    555 	/*
    556 	 * Fields defined in mib2_ip_t
    557 	 */
    558 
    559 	/* # of incoming packets that succeeded policy checks */
    560 	Counter		ipsecInSucceeded;
    561 #define	ipsecIfStatsInSucceeded	ipsecInSucceeded
    562 	/* # of incoming packets that failed policy checks */
    563 	Counter		ipsecInFailed;
    564 #define	ipsecIfStatsInFailed	ipsecInFailed
    565 	/* # of bad IP header checksums */
    566 	Counter		ipInCksumErrs;
    567 #define	ipIfStatsInCksumErrs	ipInCksumErrs
    568 	/* total # of segments recv'd with error	{ tcp 14 } */
    569 	Counter		tcpInErrs;
    570 #define	tcpIfStatsInErrs	tcpInErrs
    571 	/* # of recv'd dg's not deliverable (no appl.)	{ udp 2 } */
    572 	Counter		udpNoPorts;
    573 #define	udpIfStatsNoPorts	udpNoPorts
    574 } mib2_ipIfStatsEntry_t;
    575 
    576 #if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4
    577 #pragma pack()
    578 #endif
    579 
    580 /*
    581  * The IP address table contains this entity's IP addressing information.
    582  *
    583  *	ipAddrTable OBJECT-TYPE
    584  *		SYNTAX  SEQUENCE OF IpAddrEntry
    585  *		ACCESS  not-accessible
    586  *		STATUS  mandatory
    587  *		DESCRIPTION
    588  *			"The table of addressing information relevant to
    589  *			this entity's IP addresses."
    590  *		::= { ip 20 }
    591  */
    592 
    593 typedef struct mib2_ipAddrEntry {
    594 			/* IP address of this entry	{ipAddrEntry 1} */
    595 	IpAddress	ipAdEntAddr;
    596 			/* Unique interface index	{ipAddrEntry 2} */
    597 	DeviceName	ipAdEntIfIndex;
    598 			/* Subnet mask for this IP addr	{ipAddrEntry 3} */
    599 	IpAddress	ipAdEntNetMask;
    600 			/* 2^lsb of IP broadcast addr	{ipAddrEntry 4} */
    601 	int		ipAdEntBcastAddr;
    602 			/* max size for dg reassembly	{ipAddrEntry 5} */
    603 	int		ipAdEntReasmMaxSize;
    604 			/* additional ipif_t fields */
    605 	struct ipAdEntInfo_s {
    606 		Gauge		ae_mtu;
    607 				/* BSD if metric */
    608 		int		ae_metric;
    609 				/* ipif broadcast addr.  relation to above?? */
    610 		IpAddress	ae_broadcast_addr;
    611 				/* point-point dest addr */
    612 		IpAddress	ae_pp_dst_addr;
    613 		int		ae_flags;	/* IFF_* flags in if.h */
    614 		Counter		ae_ibcnt;	/* Inbound packets */
    615 		Counter		ae_obcnt;	/* Outbound packets */
    616 		Counter		ae_focnt;	/* Forwarded packets */
    617 		IpAddress	ae_subnet;	/* Subnet prefix */
    618 		int		ae_subnet_len;	/* Subnet prefix length */
    619 		IpAddress	ae_src_addr;	/* Source address */
    620 	}		ipAdEntInfo;
    621 	uint32_t	ipAdEntRetransmitTime;  /* ipInterfaceRetransmitTime */
    622 } mib2_ipAddrEntry_t;
    623 
    624 /*
    625  *	ipv6AddrTable OBJECT-TYPE
    626  *		SYNTAX      SEQUENCE OF Ipv6AddrEntry
    627  *		MAX-ACCESS  not-accessible
    628  *		STATUS      current
    629  *		DESCRIPTION
    630  *			"The table of addressing information relevant to
    631  *			this node's interface addresses."
    632  *		::= { ipv6MIBObjects 8 }
    633  */
    634 
    635 typedef struct mib2_ipv6AddrEntry {
    636 	/* Unique interface index			{ Part of INDEX } */
    637 	DeviceName	ipv6AddrIfIndex;
    638 
    639 	/* IPv6 address of this entry			{ ipv6AddrEntry 1 } */
    640 	Ip6Address	ipv6AddrAddress;
    641 	/* Prefix length				{ ipv6AddrEntry 2 } */
    642 	uint_t		ipv6AddrPfxLength;
    643 	/* Type: stateless(1), stateful(2), unknown(3)	{ ipv6AddrEntry 3 } */
    644 	uint_t		ipv6AddrType;
    645 	/* Anycast: true(1), false(2)			{ ipv6AddrEntry 4 } */
    646 	uint_t		ipv6AddrAnycastFlag;
    647 	/*
    648 	 * Address status: preferred(1), deprecated(2), invalid(3),
    649 	 * inaccessible(4), unknown(5)			{ ipv6AddrEntry 5 }
    650 	 */
    651 	uint_t		ipv6AddrStatus;
    652 	struct ipv6AddrInfo_s {
    653 		Gauge		ae_mtu;
    654 				/* BSD if metric */
    655 		int		ae_metric;
    656 				/* point-point dest addr */
    657 		Ip6Address	ae_pp_dst_addr;
    658 		int		ae_flags;	/* IFF_* flags in if.h */
    659 		Counter		ae_ibcnt;	/* Inbound packets */
    660 		Counter		ae_obcnt;	/* Outbound packets */
    661 		Counter		ae_focnt;	/* Forwarded packets */
    662 		Ip6Address	ae_subnet;	/* Subnet prefix */
    663 		int		ae_subnet_len;	/* Subnet prefix length */
    664 		Ip6Address	ae_src_addr;	/* Source address */
    665 	}		ipv6AddrInfo;
    666 	uint32_t	ipv6AddrReasmMaxSize;	/* InterfaceReasmMaxSize */
    667 	Ip6Address	ipv6AddrIdentifier;	/* InterfaceIdentifier */
    668 	uint32_t	ipv6AddrIdentifierLen;
    669 	uint32_t	ipv6AddrReachableTime;	/* InterfaceReachableTime */
    670 	uint32_t	ipv6AddrRetransmitTime; /* InterfaceRetransmitTime */
    671 } mib2_ipv6AddrEntry_t;
    672 
    673 /*
    674  * The IP routing table contains an entry for each route presently known to
    675  * this entity. (for IPv4 routes)
    676  *
    677  *	ipRouteTable OBJECT-TYPE
    678  *		SYNTAX  SEQUENCE OF IpRouteEntry
    679  *		ACCESS  not-accessible
    680  *		STATUS  mandatory
    681  *		DESCRIPTION
    682  *			"This entity's IP Routing table."
    683  *		::= { ip 21 }
    684  */
    685 
    686 typedef struct mib2_ipRouteEntry {
    687 		/* dest ip addr for this route		{ipRouteEntry 1 } RW */
    688 	IpAddress	ipRouteDest;
    689 		/* unique interface index for this hop	{ipRouteEntry 2 } RW */
    690 	DeviceName	ipRouteIfIndex;
    691 		/* primary route metric 		{ipRouteEntry 3 } RW */
    692 	int		ipRouteMetric1;
    693 		/* alternate route metric 		{ipRouteEntry 4 } RW */
    694 	int		ipRouteMetric2;
    695 		/* alternate route metric 		{ipRouteEntry 5 } RW */
    696 	int		ipRouteMetric3;
    697 		/* alternate route metric 		{ipRouteEntry 6 } RW */
    698 	int		ipRouteMetric4;
    699 		/* ip addr of next hop on this route	{ipRouteEntry 7 } RW */
    700 	IpAddress	ipRouteNextHop;
    701 		/* other(1), inval(2), dir(3), indir(4)	{ipRouteEntry 8 } RW */
    702 	int		ipRouteType;
    703 		/* mechanism by which route was learned	{ipRouteEntry 9 } */
    704 	int		ipRouteProto;
    705 		/* sec's since last update of route	{ipRouteEntry 10} RW */
    706 	int		ipRouteAge;
    707 		/* 					{ipRouteEntry 11} RW */
    708 	IpAddress	ipRouteMask;
    709 		/* alternate route metric 		{ipRouteEntry 12} RW */
    710 	int		ipRouteMetric5;
    711 		/* additional info from ire's		{ipRouteEntry 13 } */
    712 	struct ipRouteInfo_s {
    713 		Gauge		re_max_frag;
    714 		Gauge		re_rtt;
    715 		Counter		re_ref;
    716 		int		re_frag_flag;
    717 		IpAddress	re_src_addr;
    718 		int		re_ire_type;
    719 		Counter		re_obpkt;
    720 		Counter		re_ibpkt;
    721 		int		re_flags;
    722 	} 		ipRouteInfo;
    723 } mib2_ipRouteEntry_t;
    724 
    725 /*
    726  * The IPv6 routing table contains an entry for each route presently known to
    727  * this entity.
    728  *
    729  *	ipv6RouteTable OBJECT-TYPE
    730  *		SYNTAX  SEQUENCE OF IpRouteEntry
    731  *		ACCESS  not-accessible
    732  *		STATUS  current
    733  *		DESCRIPTION
    734  *			"IPv6 Routing table. This table contains
    735  *			an entry for each valid IPv6 unicast route
    736  *			that can be used for packet forwarding
    737  *			determination."
    738  *		::= { ipv6MIBObjects 11 }
    739  */
    740 
    741 typedef struct mib2_ipv6RouteEntry {
    742 		/* dest ip addr for this route		{ ipv6RouteEntry 1 } */
    743 	Ip6Address	ipv6RouteDest;
    744 		/* prefix length 			{ ipv6RouteEntry 2 } */
    745 	int		ipv6RoutePfxLength;
    746 		/* unique route index 			{ ipv6RouteEntry 3 } */
    747 	unsigned	ipv6RouteIndex;
    748 		/* unique interface index for this hop	{ ipv6RouteEntry 4 } */
    749 	DeviceName	ipv6RouteIfIndex;
    750 		/* IPv6 addr of next hop on this route	{ ipv6RouteEntry 5 } */
    751 	Ip6Address	ipv6RouteNextHop;
    752 		/* other(1), discard(2), local(3), remote(4) */
    753 		/* 					{ ipv6RouteEntry 6 } */
    754 	int		ipv6RouteType;
    755 		/* mechanism by which route was learned	{ ipv6RouteEntry 7 } */
    756 		/*
    757 		 * other(1), local(2), netmgmt(3), ndisc(4), rip(5), ospf(6),
    758 		 * bgp(7), idrp(8), igrp(9)
    759 		 */
    760 	int		ipv6RouteProtocol;
    761 		/* policy hook or traffic class		{ ipv6RouteEntry 8 } */
    762 	unsigned	ipv6RoutePolicy;
    763 		/* sec's since last update of route	{ ipv6RouteEntry 9} */
    764 	int		ipv6RouteAge;
    765 		/* Routing domain ID of the next hop	{ ipv6RouteEntry 10 } */
    766 	unsigned	ipv6RouteNextHopRDI;
    767 		/* route metric				{ ipv6RouteEntry 11 } */
    768 	unsigned	ipv6RouteMetric;
    769 		/* preference (impl specific)		{ ipv6RouteEntry 12 } */
    770 	unsigned	ipv6RouteWeight;
    771 		/* additional info from ire's		{ } */
    772 	struct ipv6RouteInfo_s {
    773 		Gauge		re_max_frag;
    774 		Gauge		re_rtt;
    775 		Counter		re_ref;
    776 		int		re_frag_flag;
    777 		Ip6Address	re_src_addr;
    778 		int		re_ire_type;
    779 		Counter		re_obpkt;
    780 		Counter		re_ibpkt;
    781 		int		re_flags;
    782 	} 		ipv6RouteInfo;
    783 } mib2_ipv6RouteEntry_t;
    784 
    785 /*
    786  * The IPv4 and IPv6 routing table entries on a trusted system also have
    787  * security attributes in the form of label ranges.  This experimental
    788  * interface provides information about these labels.
    789  *
    790  * Each entry in this table contains a label range and an index that refers
    791  * back to the entry in the routing table to which it applies.  There may be 0,
    792  * 1, or many label ranges for each routing table entry.
    793  *
    794  * (opthdr.level is set to MIB2_IP for IPv4 entries and MIB2_IP6 for IPv6.
    795  * opthdr.name is set to EXPER_IP_GWATTR.)
    796  *
    797  *	ipRouteAttributeTable OBJECT-TYPE
    798  *		SYNTAX  SEQUENCE OF IpAttributeEntry
    799  *		ACCESS  not-accessible
    800  *		STATUS  current
    801  *		DESCRIPTION
    802  *			"IPv4 routing attributes table.  This table contains
    803  *			an entry for each valid trusted label attached to a
    804  *			route in the system."
    805  *		::= { ip 102 }
    806  *
    807  *	ipv6RouteAttributeTable OBJECT-TYPE
    808  *		SYNTAX  SEQUENCE OF IpAttributeEntry
    809  *		ACCESS  not-accessible
    810  *		STATUS  current
    811  *		DESCRIPTION
    812  *			"IPv6 routing attributes table.  This table contains
    813  *			an entry for each valid trusted label attached to a
    814  *			route in the system."
    815  *		::= { ip6 102 }
    816  */
    817 
    818 typedef struct mib2_ipAttributeEntry {
    819 	uint_t		iae_routeidx;
    820 	int		iae_doi;
    821 	brange_t	iae_slrange;
    822 } mib2_ipAttributeEntry_t;
    823 
    824 /*
    825  * The IP address translation table contain the IpAddress to
    826  * `physical' address equivalences.  Some interfaces do not
    827  * use translation tables for determining address
    828  * equivalences (e.g., DDN-X.25 has an algorithmic method);
    829  * if all interfaces are of this type, then the Address
    830  * Translation table is empty, i.e., has zero entries.
    831  *
    832  *	ipNetToMediaTable OBJECT-TYPE
    833  *		SYNTAX  SEQUENCE OF IpNetToMediaEntry
    834  *		ACCESS  not-accessible
    835  *		STATUS  mandatory
    836  *		DESCRIPTION
    837  *			"The IP Address Translation table used for mapping
    838  *			from IP addresses to physical addresses."
    839  *		::= { ip 22 }
    840  */
    841 
    842 typedef struct mib2_ipNetToMediaEntry {
    843 	/* Unique interface index		{ ipNetToMediaEntry 1 } RW */
    844 	DeviceName	ipNetToMediaIfIndex;
    845 	/* Media dependent physical addr	{ ipNetToMediaEntry 2 } RW */
    846 	PhysAddress	ipNetToMediaPhysAddress;
    847 	/* ip addr for this physical addr	{ ipNetToMediaEntry 3 } RW */
    848 	IpAddress	ipNetToMediaNetAddress;
    849 	/* other(1), inval(2), dyn(3), stat(4)	{ ipNetToMediaEntry 4 } RW */
    850 	int		ipNetToMediaType;
    851 	struct ipNetToMediaInfo_s {
    852 		PhysAddress	ntm_mask;	/* subnet mask for entry */
    853 		int		ntm_flags;	/* ACE_F_* flags in arp.h */
    854 	}		ipNetToMediaInfo;
    855 } mib2_ipNetToMediaEntry_t;
    856 
    857 /*
    858  *	ipv6NetToMediaTable OBJECT-TYPE
    859  *		 SYNTAX      SEQUENCE OF Ipv6NetToMediaEntry
    860  *		 MAX-ACCESS  not-accessible
    861  *		 STATUS      current
    862  *		 DESCRIPTION
    863  *			"The IPv6 Address Translation table used for
    864  *			mapping from IPv6 addresses to physical addresses.
    865  *
    866  *			The IPv6 address translation table contain the
    867  *			Ipv6Address to `physical' address equivalencies.
    868  *			Some interfaces do not use translation tables
    869  *			for determining address equivalencies; if all
    870  *			interfaces are of this type, then the Address
    871  *			Translation table is empty, i.e., has zero
    872  *			entries."
    873  *		::= { ipv6MIBObjects 12 }
    874  */
    875 
    876 typedef struct mib2_ipv6NetToMediaEntry {
    877 	/* Unique interface index		{ Part of INDEX } */
    878 	DeviceIndex	ipv6NetToMediaIfIndex;
    879 
    880 	/* ip addr for this physical addr	{ ipv6NetToMediaEntry 1 } */
    881 	Ip6Address	ipv6NetToMediaNetAddress;
    882 	/* Media dependent physical addr	{ ipv6NetToMediaEntry 2 } */
    883 	PhysAddress	ipv6NetToMediaPhysAddress;
    884 	/*
    885 	 * Type of mapping
    886 	 * other(1), dynamic(2), static(3), local(4)
    887 	 *					{ ipv6NetToMediaEntry 3 }
    888 	 */
    889 	int		ipv6NetToMediaType;
    890 	/*
    891 	 * NUD state
    892 	 * reachable(1), stale(2), delay(3), probe(4), invalid(5), unknown(6)
    893 	 * Note: The kernel returns ND_* states.
    894 	 *					{ ipv6NetToMediaEntry 4 }
    895 	 */
    896 	int		ipv6NetToMediaState;
    897 	/* sysUpTime last time entry was updated { ipv6NetToMediaEntry 5 } */
    898 	int		ipv6NetToMediaLastUpdated;
    899 } mib2_ipv6NetToMediaEntry_t;
    900 
    901 
    902 /*
    903  * List of group members per interface
    904  */
    905 typedef struct ip_member {
    906 	/* Interface index */
    907 	DeviceName	ipGroupMemberIfIndex;
    908 	/* IP Multicast address */
    909 	IpAddress	ipGroupMemberAddress;
    910 	/* Number of member sockets */
    911 	Counter		ipGroupMemberRefCnt;
    912 	/* Filter mode: 1 => include, 2 => exclude */
    913 	int		ipGroupMemberFilterMode;
    914 } ip_member_t;
    915 
    916 
    917 /*
    918  * List of IPv6 group members per interface
    919  */
    920 typedef struct ipv6_member {
    921 	/* Interface index */
    922 	DeviceIndex	ipv6GroupMemberIfIndex;
    923 	/* IP Multicast address */
    924 	Ip6Address	ipv6GroupMemberAddress;
    925 	/* Number of member sockets */
    926 	Counter		ipv6GroupMemberRefCnt;
    927 	/* Filter mode: 1 => include, 2 => exclude */
    928 	int		ipv6GroupMemberFilterMode;
    929 } ipv6_member_t;
    930 
    931 /*
    932  * This is used to mark transport layer entities (e.g., TCP connections) that
    933  * are capable of receiving packets from a range of labels.  'level' is set to
    934  * the protocol of interest (e.g., MIB2_TCP), and 'name' is set to
    935  * EXPER_XPORT_MLP.  The tme_connidx refers back to the entry in MIB2_TCP_CONN,
    936  * MIB2_TCP6_CONN, or MIB2_SCTP_CONN.
    937  *
    938  * It is also used to report connections that receive packets at a single label
    939  * that's other than the zone's label.  This is the case when a TCP connection
    940  * is accepted from a particular peer using an MLP listener.
    941  */
    942 typedef struct mib2_transportMLPEntry {
    943 	uint_t		tme_connidx;
    944 	uint_t		tme_flags;
    945 	int		tme_doi;
    946 	bslabel_t	tme_label;
    947 } mib2_transportMLPEntry_t;
    948 
    949 #define	MIB2_TMEF_PRIVATE	0x00000001	/* MLP on private addresses */
    950 #define	MIB2_TMEF_SHARED	0x00000002	/* MLP on shared addresses */
    951 
    952 /*
    953  * List of IPv4 source addresses being filtered per interface
    954  */
    955 typedef struct ip_grpsrc {
    956 	/* Interface index */
    957 	DeviceName	ipGroupSourceIfIndex;
    958 	/* IP Multicast address */
    959 	IpAddress	ipGroupSourceGroup;
    960 	/* IP Source address */
    961 	IpAddress	ipGroupSourceAddress;
    962 } ip_grpsrc_t;
    963 
    964 
    965 /*
    966  * List of IPv6 source addresses being filtered per interface
    967  */
    968 typedef struct ipv6_grpsrc {
    969 	/* Interface index */
    970 	DeviceIndex	ipv6GroupSourceIfIndex;
    971 	/* IP Multicast address */
    972 	Ip6Address	ipv6GroupSourceGroup;
    973 	/* IP Source address */
    974 	Ip6Address	ipv6GroupSourceAddress;
    975 } ipv6_grpsrc_t;
    976 
    977 
    978 /*
    979  * ICMP Group
    980  */
    981 typedef struct mib2_icmp {
    982 	/* total # of recv'd ICMP msgs			{ icmp 1 } */
    983 	Counter	icmpInMsgs;
    984 	/* recv'd ICMP msgs with errors			{ icmp 2 } */
    985 	Counter	icmpInErrors;
    986 	/* recv'd "dest unreachable" msg's		{ icmp 3 } */
    987 	Counter	icmpInDestUnreachs;
    988 	/* recv'd "time exceeded" msg's			{ icmp 4 } */
    989 	Counter	icmpInTimeExcds;
    990 	/* recv'd "parameter problem" msg's		{ icmp 5 } */
    991 	Counter	icmpInParmProbs;
    992 	/* recv'd "source quench" msg's			{ icmp 6 } */
    993 	Counter	icmpInSrcQuenchs;
    994 	/* recv'd "ICMP redirect" msg's			{ icmp 7 } */
    995 	Counter	icmpInRedirects;
    996 	/* recv'd "echo request" msg's			{ icmp 8 } */
    997 	Counter	icmpInEchos;
    998 	/* recv'd "echo reply" msg's			{ icmp 9 } */
    999 	Counter	icmpInEchoReps;
   1000 	/* recv'd "timestamp" msg's			{ icmp 10 } */
   1001 	Counter	icmpInTimestamps;
   1002 	/* recv'd "timestamp reply" msg's		{ icmp 11 } */
   1003 	Counter	icmpInTimestampReps;
   1004 	/* recv'd "address mask request" msg's		{ icmp 12 } */
   1005 	Counter	icmpInAddrMasks;
   1006 	/* recv'd "address mask reply" msg's		{ icmp 13 } */
   1007 	Counter	icmpInAddrMaskReps;
   1008 	/* total # of sent ICMP msg's			{ icmp 14 } */
   1009 	Counter	icmpOutMsgs;
   1010 	/* # of msg's not sent for internal icmp errors	{ icmp 15 } */
   1011 	Counter	icmpOutErrors;
   1012 	/* # of "dest unreachable" msg's sent		{ icmp 16 } */
   1013 	Counter	icmpOutDestUnreachs;
   1014 	/* # of "time exceeded" msg's sent		{ icmp 17 } */
   1015 	Counter	icmpOutTimeExcds;
   1016 	/* # of "parameter problme" msg's sent		{ icmp 18 } */
   1017 	Counter	icmpOutParmProbs;
   1018 	/* # of "source quench" msg's sent		{ icmp 19 } */
   1019 	Counter	icmpOutSrcQuenchs;
   1020 	/* # of "ICMP redirect" msg's sent		{ icmp 20 } */
   1021 	Counter	icmpOutRedirects;
   1022 	/* # of "Echo request" msg's sent		{ icmp 21 } */
   1023 	Counter	icmpOutEchos;
   1024 	/* # of "Echo reply" msg's sent			{ icmp 22 } */
   1025 	Counter	icmpOutEchoReps;
   1