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