xref: /illumos-gate/usr/src/uts/common/inet/mib2.h (revision cebe54d9)
17c478bd9Sstevel@tonic-gate /*
27c478bd9Sstevel@tonic-gate  * CDDL HEADER START
37c478bd9Sstevel@tonic-gate  *
47c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
545916cd2Sjpk  * Common Development and Distribution License (the "License").
645916cd2Sjpk  * You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate  *
87c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate  * and limitations under the License.
127c478bd9Sstevel@tonic-gate  *
137c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate  *
197c478bd9Sstevel@tonic-gate  * CDDL HEADER END
20e11c3f44Smeem  *
216f773e29SBaban Kenkre  * Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved.
227c478bd9Sstevel@tonic-gate  */
23a2f04351SSebastien Roy /*
24a2f04351SSebastien Roy  * Copyright (c) 1990 Mentat Inc.
25a2f04351SSebastien Roy  * Copyright (c) 2015, 2016 by Delphix. All rights reserved.
26a2f04351SSebastien Roy  */
277c478bd9Sstevel@tonic-gate 
2878a2e113SAndy Fiddaman /*
2978a2e113SAndy Fiddaman  * Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
3078a2e113SAndy Fiddaman  */
3178a2e113SAndy Fiddaman 
327c478bd9Sstevel@tonic-gate #ifndef	_INET_MIB2_H
337c478bd9Sstevel@tonic-gate #define	_INET_MIB2_H
347c478bd9Sstevel@tonic-gate 
357c478bd9Sstevel@tonic-gate #include <netinet/in.h>	/* For in6_addr_t */
3645916cd2Sjpk #include <sys/tsol/label.h> /* For brange_t */
3745916cd2Sjpk #include <sys/tsol/label_macro.h> /* For brange_t */
387c478bd9Sstevel@tonic-gate 
397c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
407c478bd9Sstevel@tonic-gate extern "C" {
417c478bd9Sstevel@tonic-gate #endif
427c478bd9Sstevel@tonic-gate 
437c478bd9Sstevel@tonic-gate /*
447c478bd9Sstevel@tonic-gate  * The IPv6 parts of this are derived from:
457c478bd9Sstevel@tonic-gate  *	RFC 2465
467c478bd9Sstevel@tonic-gate  *	RFC 2466
477c478bd9Sstevel@tonic-gate  *	RFC 2452
487c478bd9Sstevel@tonic-gate  *	RFC 2454
497c478bd9Sstevel@tonic-gate  */
507c478bd9Sstevel@tonic-gate 
517c478bd9Sstevel@tonic-gate /*
527c478bd9Sstevel@tonic-gate  * SNMP set/get via M_PROTO T_OPTMGMT_REQ.  Structure is that used
537c478bd9Sstevel@tonic-gate  * for [gs]etsockopt() calls.  get uses T_CURRENT, set uses T_NEOGTIATE
547c478bd9Sstevel@tonic-gate  * MGMT_flags value.  The following definition of opthdr is taken from
557c478bd9Sstevel@tonic-gate  * socket.h:
567c478bd9Sstevel@tonic-gate  *
577c478bd9Sstevel@tonic-gate  * An option specification consists of an opthdr, followed by the value of
587c478bd9Sstevel@tonic-gate  * the option.  An options buffer contains one or more options.  The len
597c478bd9Sstevel@tonic-gate  * field of opthdr specifies the length of the option value in bytes.  This
607c478bd9Sstevel@tonic-gate  * length must be a multiple of sizeof(long) (use OPTLEN macro).
617c478bd9Sstevel@tonic-gate  *
627c478bd9Sstevel@tonic-gate  * struct opthdr {
637c478bd9Sstevel@tonic-gate  *	long	level;	protocol level affected
647c478bd9Sstevel@tonic-gate  *	long	name;	option to modify
657c478bd9Sstevel@tonic-gate  *	long	len;	length of option value
667c478bd9Sstevel@tonic-gate  * };
677c478bd9Sstevel@tonic-gate  *
687c478bd9Sstevel@tonic-gate  * #define OPTLEN(x) ((((x) + sizeof(long) - 1) / sizeof(long)) * sizeof(long))
697c478bd9Sstevel@tonic-gate  * #define OPTVAL(opt) ((char *)(opt + 1))
707c478bd9Sstevel@tonic-gate  *
71e11c3f44Smeem  * For get requests (T_CURRENT), any MIB2_xxx value can be used (only
727c478bd9Sstevel@tonic-gate  * "get all" is supported, so all modules get a copy of the request to
73e11c3f44Smeem  * return everything it knows.   In general, we use MIB2_IP.  There is
74e11c3f44Smeem  * one exception: in general, IP will not report information related to
75bd670b35SErik Nordmark  * ire_testhidden and IRE_IF_CLONE routes (e.g., in the MIB2_IP_ROUTE
76bd670b35SErik Nordmark  * table). However, using the special value EXPER_IP_AND_ALL_IRES will cause
77e11c3f44Smeem  * all information to be reported.  This special value should only be
78e11c3f44Smeem  * used by IPMP-aware low-level utilities (e.g. in.mpathd).
797c478bd9Sstevel@tonic-gate  *
807c478bd9Sstevel@tonic-gate  * IMPORTANT:  some fields are grouped in a different structure than
817c478bd9Sstevel@tonic-gate  * suggested by MIB-II, e.g., checksum error counts.  The original MIB-2
827c478bd9Sstevel@tonic-gate  * field name has been retained.  Field names beginning with "mi" are not
837c478bd9Sstevel@tonic-gate  * defined in the MIB but contain important & useful information maintained
847c478bd9Sstevel@tonic-gate  * by the corresponding module.
857c478bd9Sstevel@tonic-gate  */
867c478bd9Sstevel@tonic-gate #ifndef IPPROTO_MAX
877c478bd9Sstevel@tonic-gate #define	IPPROTO_MAX	256
887c478bd9Sstevel@tonic-gate #endif
897c478bd9Sstevel@tonic-gate 
907c478bd9Sstevel@tonic-gate #define	MIB2_SYSTEM		(IPPROTO_MAX+1)
917c478bd9Sstevel@tonic-gate #define	MIB2_INTERFACES		(IPPROTO_MAX+2)
927c478bd9Sstevel@tonic-gate #define	MIB2_AT			(IPPROTO_MAX+3)
937c478bd9Sstevel@tonic-gate #define	MIB2_IP			(IPPROTO_MAX+4)
947c478bd9Sstevel@tonic-gate #define	MIB2_ICMP		(IPPROTO_MAX+5)
957c478bd9Sstevel@tonic-gate #define	MIB2_TCP		(IPPROTO_MAX+6)
967c478bd9Sstevel@tonic-gate #define	MIB2_UDP		(IPPROTO_MAX+7)
977c478bd9Sstevel@tonic-gate #define	MIB2_EGP		(IPPROTO_MAX+8)
987c478bd9Sstevel@tonic-gate #define	MIB2_CMOT		(IPPROTO_MAX+9)
997c478bd9Sstevel@tonic-gate #define	MIB2_TRANSMISSION	(IPPROTO_MAX+10)
1007c478bd9Sstevel@tonic-gate #define	MIB2_SNMP		(IPPROTO_MAX+11)
1017c478bd9Sstevel@tonic-gate #define	MIB2_IP6		(IPPROTO_MAX+12)
1027c478bd9Sstevel@tonic-gate #define	MIB2_ICMP6		(IPPROTO_MAX+13)
1037c478bd9Sstevel@tonic-gate #define	MIB2_TCP6		(IPPROTO_MAX+14)
1047c478bd9Sstevel@tonic-gate #define	MIB2_UDP6		(IPPROTO_MAX+15)
1057c478bd9Sstevel@tonic-gate #define	MIB2_SCTP		(IPPROTO_MAX+16)
1067c478bd9Sstevel@tonic-gate 
1077c478bd9Sstevel@tonic-gate /*
1087c478bd9Sstevel@tonic-gate  * Define range of levels for use with MIB2_*
1097c478bd9Sstevel@tonic-gate  */
1107c478bd9Sstevel@tonic-gate #define	MIB2_RANGE_START	(IPPROTO_MAX+1)
1117c478bd9Sstevel@tonic-gate #define	MIB2_RANGE_END		(IPPROTO_MAX+16)
1127c478bd9Sstevel@tonic-gate 
1137c478bd9Sstevel@tonic-gate 
1147c478bd9Sstevel@tonic-gate #define	EXPER			1024	/* experimental - not part of mib */
1157c478bd9Sstevel@tonic-gate #define	EXPER_IGMP		(EXPER+1)
1167c478bd9Sstevel@tonic-gate #define	EXPER_DVMRP		(EXPER+2)
1177c478bd9Sstevel@tonic-gate #define	EXPER_RAWIP		(EXPER+3)
118bd670b35SErik Nordmark #define	EXPER_IP_AND_ALL_IRES	(EXPER+4)
1197c478bd9Sstevel@tonic-gate 
1207c478bd9Sstevel@tonic-gate /*
1217c478bd9Sstevel@tonic-gate  * Define range of levels for experimental use
1227c478bd9Sstevel@tonic-gate  */
1237c478bd9Sstevel@tonic-gate #define	EXPER_RANGE_START	(EXPER+1)
124e11c3f44Smeem #define	EXPER_RANGE_END		(EXPER+4)
1257c478bd9Sstevel@tonic-gate 
1267c478bd9Sstevel@tonic-gate #define	BUMP_MIB(s, x)		{				\
1277c478bd9Sstevel@tonic-gate 	extern void __dtrace_probe___mib_##x(int, void *);	\
1287c478bd9Sstevel@tonic-gate 	void *stataddr = &((s)->x);				\
1297c478bd9Sstevel@tonic-gate 	__dtrace_probe___mib_##x(1, stataddr);			\
1307c478bd9Sstevel@tonic-gate 	(s)->x++;						\
1317c478bd9Sstevel@tonic-gate }
1327c478bd9Sstevel@tonic-gate 
1337c478bd9Sstevel@tonic-gate #define	UPDATE_MIB(s, x, y)	{				\
1347c478bd9Sstevel@tonic-gate 	extern void __dtrace_probe___mib_##x(int, void *);	\
1357c478bd9Sstevel@tonic-gate 	void *stataddr = &((s)->x);				\
1367c478bd9Sstevel@tonic-gate 	__dtrace_probe___mib_##x(y, stataddr);			\
1377c478bd9Sstevel@tonic-gate 	(s)->x += (y);						\
1387c478bd9Sstevel@tonic-gate }
1397c478bd9Sstevel@tonic-gate 
1407c478bd9Sstevel@tonic-gate #define	SET_MIB(x, y)		x = y
1417c478bd9Sstevel@tonic-gate #define	BUMP_LOCAL(x)		(x)++
1427c478bd9Sstevel@tonic-gate #define	UPDATE_LOCAL(x, y)	(x) += (y)
1433173664eSapersson #define	SYNC32_MIB(s, m32, m64)	SET_MIB((s)->m32, (s)->m64 & 0xffffffff)
1447c478bd9Sstevel@tonic-gate 
1456f773e29SBaban Kenkre /*
1466f773e29SBaban Kenkre  * Each struct that has been extended have a macro (MIB_FIRST_NEW_ELM_type)
1476f773e29SBaban Kenkre  * that is set to the first new element of the extended struct.
1486f773e29SBaban Kenkre  * The LEGACY_MIB_SIZE macro can be used to determine the size of MIB
1496f773e29SBaban Kenkre  * objects that needs to be returned to older applications unaware of
1506f773e29SBaban Kenkre  * these extensions.
1516f773e29SBaban Kenkre  */
1526f773e29SBaban Kenkre #define	MIB_PTRDIFF(s, e)	(caddr_t)e - (caddr_t)s
1536f773e29SBaban Kenkre #define	LEGACY_MIB_SIZE(s, t)	MIB_PTRDIFF(s, &(s)->MIB_FIRST_NEW_ELM_##t)
1546f773e29SBaban Kenkre 
1557c478bd9Sstevel@tonic-gate #define	OCTET_LENGTH	32	/* Must be at least LIFNAMSIZ */
1567c478bd9Sstevel@tonic-gate typedef struct Octet_s {
1577c478bd9Sstevel@tonic-gate 	int	o_length;
1587c478bd9Sstevel@tonic-gate 	char	o_bytes[OCTET_LENGTH];
1597c478bd9Sstevel@tonic-gate } Octet_t;
1607c478bd9Sstevel@tonic-gate 
1617c478bd9Sstevel@tonic-gate typedef uint32_t	Counter;
1627c478bd9Sstevel@tonic-gate typedef uint32_t	Counter32;
1637c478bd9Sstevel@tonic-gate typedef uint64_t	Counter64;
1647c478bd9Sstevel@tonic-gate typedef uint32_t	Gauge;
1657c478bd9Sstevel@tonic-gate typedef uint32_t	IpAddress;
1667c478bd9Sstevel@tonic-gate typedef	struct in6_addr	Ip6Address;
1677c478bd9Sstevel@tonic-gate typedef Octet_t		DeviceName;
1687c478bd9Sstevel@tonic-gate typedef Octet_t		PhysAddress;
1697c478bd9Sstevel@tonic-gate typedef uint32_t	DeviceIndex;	/* Interface index */
1707c478bd9Sstevel@tonic-gate 
1713173664eSapersson #define	MIB2_UNKNOWN_INTERFACE	0
1723173664eSapersson #define	MIB2_UNKNOWN_PROCESS	0
1733173664eSapersson 
1747c478bd9Sstevel@tonic-gate /*
1757c478bd9Sstevel@tonic-gate  *  IP group
1767c478bd9Sstevel@tonic-gate  */
1773173664eSapersson #define	MIB2_IP_ADDR		20	/* ipAddrEntry */
1783173664eSapersson #define	MIB2_IP_ROUTE		21	/* ipRouteEntry */
1793173664eSapersson #define	MIB2_IP_MEDIA		22	/* ipNetToMediaEntry */
1803173664eSapersson #define	MIB2_IP6_ROUTE		23	/* ipv6RouteEntry */
1813173664eSapersson #define	MIB2_IP6_MEDIA		24	/* ipv6NetToMediaEntry */
1823173664eSapersson #define	MIB2_IP6_ADDR		25	/* ipv6AddrEntry */
1833173664eSapersson #define	MIB2_IP_TRAFFIC_STATS	31	/* ipIfStatsEntry (IPv4) */
1847c478bd9Sstevel@tonic-gate #define	EXPER_IP_GROUP_MEMBERSHIP	100
1857c478bd9Sstevel@tonic-gate #define	EXPER_IP6_GROUP_MEMBERSHIP	101
1867c478bd9Sstevel@tonic-gate #define	EXPER_IP_GROUP_SOURCES		102
1877c478bd9Sstevel@tonic-gate #define	EXPER_IP6_GROUP_SOURCES		103
18845916cd2Sjpk #define	EXPER_IP_RTATTR			104
189bd670b35SErik Nordmark #define	EXPER_IP_DCE			105
19045916cd2Sjpk 
19145916cd2Sjpk /*
19245916cd2Sjpk  * There can be one of each of these tables per transport (MIB2_* above).
19345916cd2Sjpk  */
19445916cd2Sjpk #define	EXPER_XPORT_MLP		105	/* transportMLPEntry */
19578a2e113SAndy Fiddaman #define	EXPER_SOCK_INFO		106	/* socketInfoEntry */
1967c478bd9Sstevel@tonic-gate 
1977c478bd9Sstevel@tonic-gate /* Old names retained for compatibility */
1987c478bd9Sstevel@tonic-gate #define	MIB2_IP_20	MIB2_IP_ADDR
1997c478bd9Sstevel@tonic-gate #define	MIB2_IP_21	MIB2_IP_ROUTE
2007c478bd9Sstevel@tonic-gate #define	MIB2_IP_22	MIB2_IP_MEDIA
2017c478bd9Sstevel@tonic-gate 
2027c478bd9Sstevel@tonic-gate typedef struct mib2_ip {
2037c478bd9Sstevel@tonic-gate 		/* forwarder?  1 gateway, 2 NOT gateway	{ip 1} RW */
2047c478bd9Sstevel@tonic-gate 	int	ipForwarding;
2057c478bd9Sstevel@tonic-gate 		/* default Time-to-Live for iph		{ip 2} RW */
2067c478bd9Sstevel@tonic-gate 	int	ipDefaultTTL;
2077c478bd9Sstevel@tonic-gate 		/* # of input datagrams			{ip 3} */
2087c478bd9Sstevel@tonic-gate 	Counter	ipInReceives;
2097c478bd9Sstevel@tonic-gate 		/* # of dg discards for iph error	{ip 4} */
2107c478bd9Sstevel@tonic-gate 	Counter	ipInHdrErrors;
2117c478bd9Sstevel@tonic-gate 		/* # of dg discards for bad addr	{ip 5} */
2127c478bd9Sstevel@tonic-gate 	Counter	ipInAddrErrors;
2137c478bd9Sstevel@tonic-gate 		/* # of dg being forwarded		{ip 6} */
2147c478bd9Sstevel@tonic-gate 	Counter	ipForwDatagrams;
2157c478bd9Sstevel@tonic-gate 		/* # of dg discards for unk protocol	{ip 7} */
2167c478bd9Sstevel@tonic-gate 	Counter	ipInUnknownProtos;
2177c478bd9Sstevel@tonic-gate 		/* # of dg discards of good dg's	{ip 8} */
2187c478bd9Sstevel@tonic-gate 	Counter	ipInDiscards;
2197c478bd9Sstevel@tonic-gate 		/* # of dg sent upstream		{ip 9} */
2207c478bd9Sstevel@tonic-gate 	Counter ipInDelivers;
2217c478bd9Sstevel@tonic-gate 		/* # of outdgs recv'd from upstream	{ip 10} */
2227c478bd9Sstevel@tonic-gate 	Counter	ipOutRequests;
2237c478bd9Sstevel@tonic-gate 		/* # of good outdgs discarded		{ip 11} */
2247c478bd9Sstevel@tonic-gate 	Counter ipOutDiscards;
2257c478bd9Sstevel@tonic-gate 		/* # of outdg discards: no route found	{ip 12} */
2267c478bd9Sstevel@tonic-gate 	Counter	ipOutNoRoutes;
2277c478bd9Sstevel@tonic-gate 		/* sec's recv'd frags held for reass.	{ip 13}	*/
2287c478bd9Sstevel@tonic-gate 	int	ipReasmTimeout;
2297c478bd9Sstevel@tonic-gate 		/* # of ip frags needing reassembly	{ip 14} */
2307c478bd9Sstevel@tonic-gate 	Counter	ipReasmReqds;
2317c478bd9Sstevel@tonic-gate 		/* # of dg's reassembled		{ip 15} */
2327c478bd9Sstevel@tonic-gate 	Counter	ipReasmOKs;
2337c478bd9Sstevel@tonic-gate 		/* # of reassembly failures (not dg cnt){ip 16} */
2347c478bd9Sstevel@tonic-gate 	Counter	ipReasmFails;
2357c478bd9Sstevel@tonic-gate 		/* # of dg's fragged			{ip 17} */
2367c478bd9Sstevel@tonic-gate 	Counter	ipFragOKs;
2377c478bd9Sstevel@tonic-gate 		/* # of dg discards for no frag set	{ip 18} */
2387c478bd9Sstevel@tonic-gate 	Counter ipFragFails;
2397c478bd9Sstevel@tonic-gate 		/* # of dg frags from fragmentation	{ip 19} */
2407c478bd9Sstevel@tonic-gate 	Counter	ipFragCreates;
2417c478bd9Sstevel@tonic-gate 		/* {ip 20} */
2427c478bd9Sstevel@tonic-gate 	int	ipAddrEntrySize;
2437c478bd9Sstevel@tonic-gate 		/* {ip 21} */
2447c478bd9Sstevel@tonic-gate 	int	ipRouteEntrySize;
2457c478bd9Sstevel@tonic-gate 		/* {ip 22} */
2467c478bd9Sstevel@tonic-gate 	int	ipNetToMediaEntrySize;
24778a2e113SAndy Fiddaman 		/* # of valid route entries discarded	{ip 23} */
2487c478bd9Sstevel@tonic-gate 	Counter	ipRoutingDiscards;
2497c478bd9Sstevel@tonic-gate /*
2507c478bd9Sstevel@tonic-gate  * following defined in MIB-II as part of TCP & UDP groups:
2517c478bd9Sstevel@tonic-gate  */
2527c478bd9Sstevel@tonic-gate 		/* total # of segments recv'd with error	{ tcp 14 } */
2537c478bd9Sstevel@tonic-gate 	Counter	tcpInErrs;
2547c478bd9Sstevel@tonic-gate 		/* # of recv'd dg's not deliverable (no appl.)	{ udp 2 } */
2557c478bd9Sstevel@tonic-gate 	Counter	udpNoPorts;
2567c478bd9Sstevel@tonic-gate /*
2577c478bd9Sstevel@tonic-gate  * In addition to MIB-II
2587c478bd9Sstevel@tonic-gate  */
2597c478bd9Sstevel@tonic-gate 		/* # of bad IP header checksums */
2607c478bd9Sstevel@tonic-gate 	Counter	ipInCksumErrs;
2617c478bd9Sstevel@tonic-gate 		/* # of complete duplicates in reassembly */
2627c478bd9Sstevel@tonic-gate 	Counter	ipReasmDuplicates;
2637c478bd9Sstevel@tonic-gate 		/* # of partial duplicates in reassembly */
2647c478bd9Sstevel@tonic-gate 	Counter	ipReasmPartDups;
2657c478bd9Sstevel@tonic-gate 		/* # of packets not forwarded due to adminstrative reasons */
2667c478bd9Sstevel@tonic-gate 	Counter	ipForwProhibits;
2677c478bd9Sstevel@tonic-gate 		/* # of UDP packets with bad UDP checksums */
2687c478bd9Sstevel@tonic-gate 	Counter udpInCksumErrs;
2697c478bd9Sstevel@tonic-gate 		/* # of UDP packets droped due to queue overflow */
2707c478bd9Sstevel@tonic-gate 	Counter udpInOverflows;
2717c478bd9Sstevel@tonic-gate 		/*
2727c478bd9Sstevel@tonic-gate 		 * # of RAW IP packets (all IP protocols except UDP, TCP
2737c478bd9Sstevel@tonic-gate 		 * and ICMP) droped due to queue overflow
2747c478bd9Sstevel@tonic-gate 		 */
2757c478bd9Sstevel@tonic-gate 	Counter rawipInOverflows;
2767c478bd9Sstevel@tonic-gate 
2777c478bd9Sstevel@tonic-gate 	/*
2787c478bd9Sstevel@tonic-gate 	 * Folowing are private IPSEC MIB.
2797c478bd9Sstevel@tonic-gate 	 */
2807c478bd9Sstevel@tonic-gate 	/* # of incoming packets that succeeded policy checks */
2817c478bd9Sstevel@tonic-gate 	Counter ipsecInSucceeded;
2827c478bd9Sstevel@tonic-gate 	/* # of incoming packets that failed policy checks */
2837c478bd9Sstevel@tonic-gate 	Counter ipsecInFailed;
2847c478bd9Sstevel@tonic-gate /* Compatible extensions added here */
2857c478bd9Sstevel@tonic-gate 	int	ipMemberEntrySize;	/* Size of ip_member_t */
2867c478bd9Sstevel@tonic-gate 	int	ipGroupSourceEntrySize;	/* Size of ip_grpsrc_t */
2877c478bd9Sstevel@tonic-gate 
288bd670b35SErik Nordmark 	Counter ipInIPv6; /* # of IPv6 packets received by IPv4 and dropped */
289bd670b35SErik Nordmark 	Counter ipOutIPv6;		/* No longer used */
290bd670b35SErik Nordmark 	Counter ipOutSwitchIPv6;	/* No longer used */
29145916cd2Sjpk 
29245916cd2Sjpk 	int	ipRouteAttributeSize;	/* Size of mib2_ipAttributeEntry_t */
29345916cd2Sjpk 	int	transportMLPSize;	/* Size of mib2_transportMLPEntry_t */
294bd670b35SErik Nordmark 	int	ipDestEntrySize;	/* Size of dest_cache_entry_t */
2957c478bd9Sstevel@tonic-gate } mib2_ip_t;
2967c478bd9Sstevel@tonic-gate 
2977c478bd9Sstevel@tonic-gate /*
2987c478bd9Sstevel@tonic-gate  *	ipv6IfStatsEntry OBJECT-TYPE
2997c478bd9Sstevel@tonic-gate  *		SYNTAX     Ipv6IfStatsEntry
3007c478bd9Sstevel@tonic-gate  *		MAX-ACCESS not-accessible
3017c478bd9Sstevel@tonic-gate  *		STATUS     current
3027c478bd9Sstevel@tonic-gate  *		DESCRIPTION
3037c478bd9Sstevel@tonic-gate  *			"An interface statistics entry containing objects
3047c478bd9Sstevel@tonic-gate  *			at a particular IPv6 interface."
3057c478bd9Sstevel@tonic-gate  *		AUGMENTS { ipv6IfEntry }
3067c478bd9Sstevel@tonic-gate  *		::= { ipv6IfStatsTable 1 }
3077c478bd9Sstevel@tonic-gate  *
3087c478bd9Sstevel@tonic-gate  * Per-interface IPv6 statistics table
3097c478bd9Sstevel@tonic-gate  */
3107c478bd9Sstevel@tonic-gate 
3117c478bd9Sstevel@tonic-gate typedef struct mib2_ipv6IfStatsEntry {
3127c478bd9Sstevel@tonic-gate 	/* Local ifindex to identify the interface */
3137c478bd9Sstevel@tonic-gate 	DeviceIndex	ipv6IfIndex;
3147c478bd9Sstevel@tonic-gate 
3157c478bd9Sstevel@tonic-gate 		/* forwarder?  1 gateway, 2 NOT gateway	{ipv6MIBObjects 1} RW */
3167c478bd9Sstevel@tonic-gate 	int	ipv6Forwarding;
3177c478bd9Sstevel@tonic-gate 		/* default Hoplimit for IPv6		{ipv6MIBObjects 2} RW */
3187c478bd9Sstevel@tonic-gate 	int	ipv6DefaultHopLimit;
3197c478bd9Sstevel@tonic-gate 
3207c478bd9Sstevel@tonic-gate 	int	ipv6IfStatsEntrySize;
3217c478bd9Sstevel@tonic-gate 	int	ipv6AddrEntrySize;
3227c478bd9Sstevel@tonic-gate 	int	ipv6RouteEntrySize;
3237c478bd9Sstevel@tonic-gate 	int	ipv6NetToMediaEntrySize;
3247c478bd9Sstevel@tonic-gate 	int	ipv6MemberEntrySize;		/* Size of ipv6_member_t */
3257c478bd9Sstevel@tonic-gate 	int	ipv6GroupSourceEntrySize;	/* Size of ipv6_grpsrc_t */
3267c478bd9Sstevel@tonic-gate 
3277c478bd9Sstevel@tonic-gate 	/* # input datagrams (incl errors)	{ ipv6IfStatsEntry 1 } */
3287c478bd9Sstevel@tonic-gate 	Counter	ipv6InReceives;
3297c478bd9Sstevel@tonic-gate 	/* # errors in IPv6 headers and options	{ ipv6IfStatsEntry 2 } */
3307c478bd9Sstevel@tonic-gate 	Counter	ipv6InHdrErrors;
3317c478bd9Sstevel@tonic-gate 	/* # exceeds outgoing link MTU		{ ipv6IfStatsEntry 3 } */
3327c478bd9Sstevel@tonic-gate 	Counter	ipv6InTooBigErrors;
33378a2e113SAndy Fiddaman 	/* # discarded due to no route to dest	{ ipv6IfStatsEntry 4 } */
3347c478bd9Sstevel@tonic-gate 	Counter	ipv6InNoRoutes;
3357c478bd9Sstevel@tonic-gate 	/* # invalid or unsupported addresses	{ ipv6IfStatsEntry 5 } */
3367c478bd9Sstevel@tonic-gate 	Counter	ipv6InAddrErrors;
33778a2e113SAndy Fiddaman 	/* # unknown next header		{ ipv6IfStatsEntry 6 } */
3387c478bd9Sstevel@tonic-gate 	Counter	ipv6InUnknownProtos;
3397c478bd9Sstevel@tonic-gate 	/* # too short packets			{ ipv6IfStatsEntry 7 } */
3407c478bd9Sstevel@tonic-gate 	Counter	ipv6InTruncatedPkts;
3417c478bd9Sstevel@tonic-gate 	/* # discarded e.g. due to no buffers	{ ipv6IfStatsEntry 8 } */
3427c478bd9Sstevel@tonic-gate 	Counter	ipv6InDiscards;
3437c478bd9Sstevel@tonic-gate 	/* # delivered to upper layer protocols	{ ipv6IfStatsEntry 9 } */
3447c478bd9Sstevel@tonic-gate 	Counter	ipv6InDelivers;
3457c478bd9Sstevel@tonic-gate 	/* # forwarded out interface		{ ipv6IfStatsEntry 10 } */
3467c478bd9Sstevel@tonic-gate 	Counter	ipv6OutForwDatagrams;
3477c478bd9Sstevel@tonic-gate 	/* # originated out interface		{ ipv6IfStatsEntry 11 } */
3487c478bd9Sstevel@tonic-gate 	Counter	ipv6OutRequests;
3497c478bd9Sstevel@tonic-gate 	/* # discarded e.g. due to no buffers	{ ipv6IfStatsEntry 12 } */
3507c478bd9Sstevel@tonic-gate 	Counter	ipv6OutDiscards;
3517c478bd9Sstevel@tonic-gate 	/* # sucessfully fragmented packets	{ ipv6IfStatsEntry 13 } */
3527c478bd9Sstevel@tonic-gate 	Counter	ipv6OutFragOKs;
3537c478bd9Sstevel@tonic-gate 	/* # fragmentation failed		{ ipv6IfStatsEntry 14 } */
3547c478bd9Sstevel@tonic-gate 	Counter	ipv6OutFragFails;
3557c478bd9Sstevel@tonic-gate 	/* # fragments created			{ ipv6IfStatsEntry 15 } */
3567c478bd9Sstevel@tonic-gate 	Counter	ipv6OutFragCreates;
3577c478bd9Sstevel@tonic-gate 	/* # fragments to reassemble		{ ipv6IfStatsEntry 16 } */
3587c478bd9Sstevel@tonic-gate 	Counter	ipv6ReasmReqds;
3597c478bd9Sstevel@tonic-gate 	/* # packets after reassembly		{ ipv6IfStatsEntry 17 } */
3607c478bd9Sstevel@tonic-gate 	Counter	ipv6ReasmOKs;
3617c478bd9Sstevel@tonic-gate 	/* # reassembly failed			{ ipv6IfStatsEntry 18 } */
3627c478bd9Sstevel@tonic-gate 	Counter	ipv6ReasmFails;
3637c478bd9Sstevel@tonic-gate 	/* # received multicast packets		{ ipv6IfStatsEntry 19 } */
3647c478bd9Sstevel@tonic-gate 	Counter	ipv6InMcastPkts;
3657c478bd9Sstevel@tonic-gate 	/* # transmitted multicast packets	{ ipv6IfStatsEntry 20 } */
3667c478bd9Sstevel@tonic-gate 	Counter	ipv6OutMcastPkts;
3677c478bd9Sstevel@tonic-gate /*
3687c478bd9Sstevel@tonic-gate  * In addition to defined MIBs
3697c478bd9Sstevel@tonic-gate  */
3707c478bd9Sstevel@tonic-gate 		/* # discarded due to no route to dest */
3717c478bd9Sstevel@tonic-gate 	Counter	ipv6OutNoRoutes;
3727c478bd9Sstevel@tonic-gate 		/* # of complete duplicates in reassembly */
3737c478bd9Sstevel@tonic-gate 	Counter	ipv6ReasmDuplicates;
3747c478bd9Sstevel@tonic-gate 		/* # of partial duplicates in reassembly */
3757c478bd9Sstevel@tonic-gate 	Counter	ipv6ReasmPartDups;
3767c478bd9Sstevel@tonic-gate 		/* # of packets not forwarded due to adminstrative reasons */
3777c478bd9Sstevel@tonic-gate 	Counter	ipv6ForwProhibits;
3787c478bd9Sstevel@tonic-gate 		/* # of UDP packets with bad UDP checksums */
3797c478bd9Sstevel@tonic-gate 	Counter udpInCksumErrs;
3807c478bd9Sstevel@tonic-gate 		/* # of UDP packets droped due to queue overflow */
3817c478bd9Sstevel@tonic-gate 	Counter udpInOverflows;
3827c478bd9Sstevel@tonic-gate 		/*
3837c478bd9Sstevel@tonic-gate 		 * # of RAW IPv6 packets (all IPv6 protocols except UDP, TCP
3847c478bd9Sstevel@tonic-gate 		 * and ICMPv6) droped due to queue overflow
3857c478bd9Sstevel@tonic-gate 		 */
3867c478bd9Sstevel@tonic-gate 	Counter rawipInOverflows;
3877c478bd9Sstevel@tonic-gate 
3887c478bd9Sstevel@tonic-gate 		/* # of IPv4 packets received by IPv6 and dropped */
3897c478bd9Sstevel@tonic-gate 	Counter ipv6InIPv4;
3907c478bd9Sstevel@tonic-gate 		/* # of IPv4 packets transmitted by ip_wput_wput */
3917c478bd9Sstevel@tonic-gate 	Counter ipv6OutIPv4;
3927c478bd9Sstevel@tonic-gate 		/* # of times ip_wput_v6 has switched to become ip_wput */
3937c478bd9Sstevel@tonic-gate 	Counter ipv6OutSwitchIPv4;
3947c478bd9Sstevel@tonic-gate } mib2_ipv6IfStatsEntry_t;
3957c478bd9Sstevel@tonic-gate 
3963173664eSapersson /*
3973173664eSapersson  * Per interface IP statistics, both v4 and v6.
3983173664eSapersson  *
3993173664eSapersson  * Some applications expect to get mib2_ipv6IfStatsEntry_t structs back when
4003173664eSapersson  * making a request. To ensure backwards compatability, the first
4013173664eSapersson  * sizeof(mib2_ipv6IfStatsEntry_t) bytes of the structure is identical to
4023173664eSapersson  * mib2_ipv6IfStatsEntry_t. This should work as long the application is
4033173664eSapersson  * written correctly (i.e., using ipv6IfStatsEntrySize to get the size of
4043173664eSapersson  * the struct)
4053173664eSapersson  *
4063173664eSapersson  * RFC4293 introduces several new counters, as well as defining 64-bit
4073173664eSapersson  * versions of existing counters. For a new counters, if they have both 32-
4083173664eSapersson  * and 64-bit versions, then we only added the latter. However, for already
4093173664eSapersson  * existing counters, we have added the 64-bit versions without removing the
4103173664eSapersson  * old (32-bit) ones. The 64- and 32-bit counters will only be synchronized
4113173664eSapersson  * when the structure contains IPv6 statistics, which is done to ensure
4123173664eSapersson  * backwards compatibility.
4133173664eSapersson  */
4143173664eSapersson 
4153173664eSapersson /* The following are defined in RFC 4001 and are used for ipIfStatsIPVersion */
4163173664eSapersson #define	MIB2_INETADDRESSTYPE_unknown	0
4173173664eSapersson #define	MIB2_INETADDRESSTYPE_ipv4	1
4183173664eSapersson #define	MIB2_INETADDRESSTYPE_ipv6	2
4193173664eSapersson 
4203173664eSapersson /*
4213173664eSapersson  * On amd64, the alignment requirements for long long's is different for
4223173664eSapersson  * 32 and 64 bits. If we have a struct containing long long's that is being
4233173664eSapersson  * passed between a 64-bit kernel to a 32-bit application, then it is very
4243173664eSapersson  * likely that the size of the struct will differ due to padding. Therefore, we
4253173664eSapersson  * pack the data to ensure that the struct size is the same for 32- and
4263173664eSapersson  * 64-bits.
4273173664eSapersson  */
4283173664eSapersson #if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4
4293173664eSapersson #pragma pack(4)
4303173664eSapersson #endif
4313173664eSapersson 
4323173664eSapersson typedef struct mib2_ipIfStatsEntry {
4333173664eSapersson 
4343173664eSapersson 	/* Local ifindex to identify the interface */
4353173664eSapersson 	DeviceIndex	ipIfStatsIfIndex;
4363173664eSapersson 
4373173664eSapersson 	/* forwarder?  1 gateway, 2 NOT gateway	{ ipv6MIBObjects 1} RW */
4383173664eSapersson 	int	ipIfStatsForwarding;
4393173664eSapersson 	/* default Hoplimit for IPv6		{ ipv6MIBObjects 2} RW */
4403173664eSapersson 	int	ipIfStatsDefaultHopLimit;
4413173664eSapersson #define	ipIfStatsDefaultTTL	ipIfStatsDefaultHopLimit
4423173664eSapersson 
4433173664eSapersson 	int	ipIfStatsEntrySize;
4443173664eSapersson 	int	ipIfStatsAddrEntrySize;
4453173664eSapersson 	int	ipIfStatsRouteEntrySize;
4463173664eSapersson 	int	ipIfStatsNetToMediaEntrySize;
4473173664eSapersson 	int	ipIfStatsMemberEntrySize;
4483173664eSapersson 	int	ipIfStatsGroupSourceEntrySize;
4493173664eSapersson 
4503173664eSapersson 	/* # input datagrams (incl errors)	{ ipIfStatsEntry 3 } */
4513173664eSapersson 	Counter	ipIfStatsInReceives;
4523173664eSapersson 	/* # errors in IP headers and options	{ ipIfStatsEntry 7 } */
4533173664eSapersson 	Counter	ipIfStatsInHdrErrors;
4543173664eSapersson 	/* # exceeds outgoing link MTU(v6 only)	{ ipv6IfStatsEntry 3 } */
4553173664eSapersson 	Counter	ipIfStatsInTooBigErrors;
45678a2e113SAndy Fiddaman 	/* # discarded due to no route to dest	{ ipIfStatsEntry 8 } */
4573173664eSapersson 	Counter	ipIfStatsInNoRoutes;
4583173664eSapersson 	/* # invalid or unsupported addresses	{ ipIfStatsEntry 9 } */
4593173664eSapersson 	Counter	ipIfStatsInAddrErrors;
46078a2e113SAndy Fiddaman 	/* # unknown next header		{ ipIfStatsEntry 10 } */
4613173664eSapersson 	Counter	ipIfStatsInUnknownProtos;
4623173664eSapersson 	/* # too short packets			{ ipIfStatsEntry 11 } */
4633173664eSapersson 	Counter	ipIfStatsInTruncatedPkts;
4643173664eSapersson 	/* # discarded e.g. due to no buffers	{ ipIfStatsEntry 17 } */
4653173664eSapersson 	Counter	ipIfStatsInDiscards;
4663173664eSapersson 	/* # delivered to upper layer protocols	{ ipIfStatsEntry 18 } */
4673173664eSapersson 	Counter	ipIfStatsInDelivers;
4683173664eSapersson 	/* # forwarded out interface		{ ipIfStatsEntry 23 } */
4693173664eSapersson 	Counter	ipIfStatsOutForwDatagrams;
4703173664eSapersson 	/* # originated out interface		{ ipIfStatsEntry 20 } */
4713173664eSapersson 	Counter	ipIfStatsOutRequests;
4723173664eSapersson 	/* # discarded e.g. due to no buffers	{ ipIfStatsEntry 25 } */
4733173664eSapersson 	Counter	ipIfStatsOutDiscards;
4743173664eSapersson 	/* # sucessfully fragmented packets	{ ipIfStatsEntry 27 } */
4753173664eSapersson 	Counter	ipIfStatsOutFragOKs;
4763173664eSapersson 	/* # fragmentation failed		{ ipIfStatsEntry 28 } */
4773173664eSapersson 	Counter	ipIfStatsOutFragFails;
4783173664eSapersson 	/* # fragments created			{ ipIfStatsEntry 29 } */
4793173664eSapersson 	Counter	ipIfStatsOutFragCreates;
4803173664eSapersson 	/* # fragments to reassemble		{ ipIfStatsEntry 14 } */
4813173664eSapersson 	Counter	ipIfStatsReasmReqds;
4823173664eSapersson 	/* # packets after reassembly		{ ipIfStatsEntry 15 } */
4833173664eSapersson 	Counter	ipIfStatsReasmOKs;
4843173664eSapersson 	/* # reassembly failed			{ ipIfStatsEntry 16 } */
4853173664eSapersson 	Counter	ipIfStatsReasmFails;
4863173664eSapersson 	/* # received multicast packets		{ ipIfStatsEntry 34 } */
4873173664eSapersson 	Counter	ipIfStatsInMcastPkts;
4883173664eSapersson 	/* # transmitted multicast packets	{ ipIfStatsEntry 38 } */
4893173664eSapersson 	Counter	ipIfStatsOutMcastPkts;
4903173664eSapersson 
4913173664eSapersson 	/*
4923173664eSapersson 	 * In addition to defined MIBs
4933173664eSapersson 	 */
4943173664eSapersson 
49578a2e113SAndy Fiddaman 	/* # discarded due to no route to dest	{ ipSystemStatsEntry 22 } */
4963173664eSapersson 	Counter	ipIfStatsOutNoRoutes;
4973173664eSapersson 	/* # of complete duplicates in reassembly */
4983173664eSapersson 	Counter	ipIfStatsReasmDuplicates;
4993173664eSapersson 	/* # of partial duplicates in reassembly */
5003173664eSapersson 	Counter	ipIfStatsReasmPartDups;
5013173664eSapersson 	/* # of packets not forwarded due to adminstrative reasons */
5023173664eSapersson 	Counter	ipIfStatsForwProhibits;
5033173664eSapersson 	/* # of UDP packets with bad UDP checksums */
5043173664eSapersson 	Counter udpInCksumErrs;
5053173664eSapersson #define	udpIfStatsInCksumErrs	udpInCksumErrs
5063173664eSapersson 	/* # of UDP packets droped due to queue overflow */
5073173664eSapersson 	Counter udpInOverflows;
5083173664eSapersson #define	udpIfStatsInOverflows	udpInOverflows
5093173664eSapersson 	/*
5103173664eSapersson 	 * # of RAW IP packets (all IP protocols except UDP, TCP
5113173664eSapersson 	 * and ICMP) droped due to queue overflow
5123173664eSapersson 	 */
5133173664eSapersson 	Counter rawipInOverflows;
5143173664eSapersson #define	rawipIfStatsInOverflows	rawipInOverflows
5153173664eSapersson 
5163173664eSapersson 	/*
5173173664eSapersson 	 * # of IP packets received with the wrong version (i.e., not equal
5183173664eSapersson 	 * to ipIfStatsIPVersion) and that were dropped.
5193173664eSapersson 	 */
5203173664eSapersson 	Counter ipIfStatsInWrongIPVersion;
5213173664eSapersson 	/*
522bd670b35SErik Nordmark 	 * This counter is no longer used
5233173664eSapersson 	 */
5243173664eSapersson 	Counter ipIfStatsOutWrongIPVersion;
5253173664eSapersson 	/*
526bd670b35SErik Nordmark 	 * This counter is no longer used
5273173664eSapersson 	 */
5283173664eSapersson 	Counter ipIfStatsOutSwitchIPVersion;
5293173664eSapersson 
5303173664eSapersson 	/*
5313173664eSapersson 	 * Fields defined in RFC 4293
5323173664eSapersson 	 */
5333173664eSapersson 
5343173664eSapersson 	/* ip version				{ ipIfStatsEntry 1 } */
5353173664eSapersson 	int		ipIfStatsIPVersion;
5363173664eSapersson 	/* # input datagrams (incl errors)	{ ipIfStatsEntry 4 } */
5373173664eSapersson 	Counter64	ipIfStatsHCInReceives;
5383173664eSapersson 	/* # input octets (incl errors)		{ ipIfStatsEntry 6 } */
5393173664eSapersson 	Counter64	ipIfStatsHCInOctets;
5403173664eSapersson 	/*
5413173664eSapersson 	 *					{ ipIfStatsEntry 13 }
5423173664eSapersson 	 * # input datagrams for which a forwarding attempt was made
5433173664eSapersson 	 */
5443173664eSapersson 	Counter64	ipIfStatsHCInForwDatagrams;
5453173664eSapersson 	/* # delivered to upper layer protocols	{ ipIfStatsEntry 19 } */
5463173664eSapersson 	Counter64	ipIfStatsHCInDelivers;
5473173664eSapersson 	/* # originated out interface		{ ipIfStatsEntry 21 } */
5483173664eSapersson 	Counter64	ipIfStatsHCOutRequests;
5493173664eSapersson 	/* # forwarded out interface		{ ipIfStatsEntry 23 } */
5503173664eSapersson 	Counter64	ipIfStatsHCOutForwDatagrams;
55178a2e113SAndy Fiddaman 	/* # dg's requiring fragmentation	{ ipIfStatsEntry 26 } */
5523173664eSapersson 	Counter		ipIfStatsOutFragReqds;
5533173664eSapersson 	/* # output datagrams			{ ipIfStatsEntry 31 } */
5543173664eSapersson 	Counter64	ipIfStatsHCOutTransmits;
5553173664eSapersson 	/* # output octets			{ ipIfStatsEntry 33 } */
5563173664eSapersson 	Counter64	ipIfStatsHCOutOctets;
5573173664eSapersson 	/* # received multicast datagrams	{ ipIfStatsEntry 35 } */
5583173664eSapersson 	Counter64	ipIfStatsHCInMcastPkts;
5593173664eSapersson 	/* # received multicast octets		{ ipIfStatsEntry 37 } */
5603173664eSapersson 	Counter64	ipIfStatsHCInMcastOctets;
5613173664eSapersson 	/* # transmitted multicast datagrams	{ ipIfStatsEntry 39 } */
5623173664eSapersson 	Counter64	ipIfStatsHCOutMcastPkts;
5633173664eSapersson 	/* # transmitted multicast octets	{ ipIfStatsEntry 41 } */
5643173664eSapersson 	Counter64	ipIfStatsHCOutMcastOctets;
5653173664eSapersson 	/* # received broadcast datagrams	{ ipIfStatsEntry 43 } */
5663173664eSapersson 	Counter64	ipIfStatsHCInBcastPkts;
5673173664eSapersson 	/* # transmitted broadcast datagrams	{ ipIfStatsEntry 45 } */
5683173664eSapersson 	Counter64	ipIfStatsHCOutBcastPkts;
5693173664eSapersson 
5703173664eSapersson 	/*
5713173664eSapersson 	 * Fields defined in mib2_ip_t
5723173664eSapersson 	 */
5733173664eSapersson 
5743173664eSapersson 	/* # of incoming packets that succeeded policy checks */
5753173664eSapersson 	Counter		ipsecInSucceeded;
5763173664eSapersson #define	ipsecIfStatsInSucceeded	ipsecInSucceeded
5773173664eSapersson 	/* # of incoming packets that failed policy checks */
5783173664eSapersson 	Counter		ipsecInFailed;
5793173664eSapersson #define	ipsecIfStatsInFailed	ipsecInFailed
5803173664eSapersson 	/* # of bad IP header checksums */
5813173664eSapersson 	Counter		ipInCksumErrs;
5823173664eSapersson #define	ipIfStatsInCksumErrs	ipInCksumErrs
5833173664eSapersson 	/* total # of segments recv'd with error	{ tcp 14 } */
5843173664eSapersson 	Counter		tcpInErrs;
5853173664eSapersson #define	tcpIfStatsInErrs	tcpInErrs
5863173664eSapersson 	/* # of recv'd dg's not deliverable (no appl.)	{ udp 2 } */
5873173664eSapersson 	Counter		udpNoPorts;
5883173664eSapersson #define	udpIfStatsNoPorts	udpNoPorts
5893173664eSapersson } mib2_ipIfStatsEntry_t;
5906f773e29SBaban Kenkre #define	MIB_FIRST_NEW_ELM_mib2_ipIfStatsEntry_t	ipIfStatsIPVersion
5913173664eSapersson 
5923173664eSapersson #if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4
5933173664eSapersson #pragma pack()
5943173664eSapersson #endif
5953173664eSapersson 
5967c478bd9Sstevel@tonic-gate /*
5977c478bd9Sstevel@tonic-gate  * The IP address table contains this entity's IP addressing information.
5987c478bd9Sstevel@tonic-gate  *
5997c478bd9Sstevel@tonic-gate  *	ipAddrTable OBJECT-TYPE
6007c478bd9Sstevel@tonic-gate  *		SYNTAX  SEQUENCE OF IpAddrEntry
6017c478bd9Sstevel@tonic-gate  *		ACCESS  not-accessible
6027c478bd9Sstevel@tonic-gate  *		STATUS  mandatory
6037c478bd9Sstevel@tonic-gate  *		DESCRIPTION
6047c478bd9Sstevel@tonic-gate  *			"The table of addressing information relevant to
6057c478bd9Sstevel@tonic-gate  *			this entity's IP addresses."
6067c478bd9Sstevel@tonic-gate  *		::= { ip 20 }
6077c478bd9Sstevel@tonic-gate  */
6087c478bd9Sstevel@tonic-gate 
6097c478bd9Sstevel@tonic-gate typedef struct mib2_ipAddrEntry {
6107c478bd9Sstevel@tonic-gate 			/* IP address of this entry	{ipAddrEntry 1} */
6117c478bd9Sstevel@tonic-gate 	IpAddress	ipAdEntAddr;
6127c478bd9Sstevel@tonic-gate 			/* Unique interface index	{ipAddrEntry 2} */
6137c478bd9Sstevel@tonic-gate 	DeviceName	ipAdEntIfIndex;
6147c478bd9Sstevel@tonic-gate 			/* Subnet mask for this IP addr	{ipAddrEntry 3} */
6157c478bd9Sstevel@tonic-gate 	IpAddress	ipAdEntNetMask;
6167c478bd9Sstevel@tonic-gate 			/* 2^lsb of IP broadcast addr	{ipAddrEntry 4} */
6177c478bd9Sstevel@tonic-gate 	int		ipAdEntBcastAddr;
6187c478bd9Sstevel@tonic-gate 			/* max size for dg reassembly	{ipAddrEntry 5} */
6197c478bd9Sstevel@tonic-gate 	int		ipAdEntReasmMaxSize;
6207c478bd9Sstevel@tonic-gate 			/* additional ipif_t fields */
6217c478bd9Sstevel@tonic-gate 	struct ipAdEntInfo_s {
6227c478bd9Sstevel@tonic-gate 		Gauge		ae_mtu;
6237c478bd9Sstevel@tonic-gate 				/* BSD if metric */
6247c478bd9Sstevel@tonic-gate 		int		ae_metric;
6257c478bd9Sstevel@tonic-gate 				/* ipif broadcast addr.  relation to above?? */
6267c478bd9Sstevel@tonic-gate 		IpAddress	ae_broadcast_addr;
6277c478bd9Sstevel@tonic-gate 				/* point-point dest addr */
6287c478bd9Sstevel@tonic-gate 		IpAddress	ae_pp_dst_addr;
6297c478bd9Sstevel@tonic-gate 		int		ae_flags;	/* IFF_* flags in if.h */
6307c478bd9Sstevel@tonic-gate 		Counter		ae_ibcnt;	/* Inbound packets */
6317c478bd9Sstevel@tonic-gate 		Counter		ae_obcnt;	/* Outbound packets */
6327c478bd9Sstevel@tonic-gate 		Counter		ae_focnt;	/* Forwarded packets */
6337c478bd9Sstevel@tonic-gate 		IpAddress	ae_subnet;	/* Subnet prefix */
6347c478bd9Sstevel@tonic-gate 		int		ae_subnet_len;	/* Subnet prefix length */
6357c478bd9Sstevel@tonic-gate 		IpAddress	ae_src_addr;	/* Source address */
6367c478bd9Sstevel@tonic-gate 	}		ipAdEntInfo;
6373173664eSapersson 	uint32_t	ipAdEntRetransmitTime;  /* ipInterfaceRetransmitTime */
6387c478bd9Sstevel@tonic-gate } mib2_ipAddrEntry_t;
6396f773e29SBaban Kenkre #define	MIB_FIRST_NEW_ELM_mib2_ipAddrEntry_t	ipAdEntRetransmitTime
6407c478bd9Sstevel@tonic-gate 
6417c478bd9Sstevel@tonic-gate /*
6427c478bd9Sstevel@tonic-gate  *	ipv6AddrTable OBJECT-TYPE
6437c478bd9Sstevel@tonic-gate  *		SYNTAX      SEQUENCE OF Ipv6AddrEntry
6447c478bd9Sstevel@tonic-gate  *		MAX-ACCESS  not-accessible
6457c478bd9Sstevel@tonic-gate  *		STATUS      current
6467c478bd9Sstevel@tonic-gate  *		DESCRIPTION
6477c478bd9Sstevel@tonic-gate  *			"The table of addressing information relevant to
6487c478bd9Sstevel@tonic-gate  *			this node's interface addresses."
6497c478bd9Sstevel@tonic-gate  *		::= { ipv6MIBObjects 8 }
6507c478bd9Sstevel@tonic-gate  */
6517c478bd9Sstevel@tonic-gate 
6527c478bd9Sstevel@tonic-gate typedef struct mib2_ipv6AddrEntry {
6537c478bd9Sstevel@tonic-gate 	/* Unique interface index			{ Part of INDEX } */
6547c478bd9Sstevel@tonic-gate 	DeviceName	ipv6AddrIfIndex;
6557c478bd9Sstevel@tonic-gate 
6567c478bd9Sstevel@tonic-gate 	/* IPv6 address of this entry			{ ipv6AddrEntry 1 } */
6577c478bd9Sstevel@tonic-gate 	Ip6Address	ipv6AddrAddress;
6587c478bd9Sstevel@tonic-gate 	/* Prefix length				{ ipv6AddrEntry 2 } */
6597c478bd9Sstevel@tonic-gate 	uint_t		ipv6AddrPfxLength;
6607c478bd9Sstevel@tonic-gate 	/* Type: stateless(1), stateful(2), unknown(3)	{ ipv6AddrEntry 3 } */
6617c478bd9Sstevel@tonic-gate 	uint_t		ipv6AddrType;
6627c478bd9Sstevel@tonic-gate 	/* Anycast: true(1), false(2)			{ ipv6AddrEntry 4 } */
6637c478bd9Sstevel@tonic-gate 	uint_t		ipv6AddrAnycastFlag;
6647c478bd9Sstevel@tonic-gate 	/*
6657c478bd9Sstevel@tonic-gate 	 * Address status: preferred(1), deprecated(2), invalid(3),
6667c478bd9Sstevel@tonic-gate 	 * inaccessible(4), unknown(5)			{ ipv6AddrEntry 5 }
6677c478bd9Sstevel@tonic-gate 	 */
6687c478bd9Sstevel@tonic-gate 	uint_t		ipv6AddrStatus;
6697c478bd9Sstevel@tonic-gate 	struct ipv6AddrInfo_s {
6707c478bd9Sstevel@tonic-gate 		Gauge		ae_mtu;
6717c478bd9Sstevel@tonic-gate 				/* BSD if metric */
6727c478bd9Sstevel@tonic-gate 		int		ae_metric;
6737c478bd9Sstevel@tonic-gate 				/* point-point dest addr */
6747c478bd9Sstevel@tonic-gate 		Ip6Address	ae_pp_dst_addr;
6757c478bd9Sstevel@tonic-gate 		int		ae_flags;	/* IFF_* flags in if.h */
6767c478bd9Sstevel@tonic-gate 		Counter		ae_ibcnt;	/* Inbound packets */
6777c478bd9Sstevel@tonic-gate 		Counter		ae_obcnt;	/* Outbound packets */
6787c478bd9Sstevel@tonic-gate 		Counter		ae_focnt;	/* Forwarded packets */
6797c478bd9Sstevel@tonic-gate 		Ip6Address	ae_subnet;	/* Subnet prefix */
6807c478bd9Sstevel@tonic-gate 		int		ae_subnet_len;	/* Subnet prefix length */
6817c478bd9Sstevel@tonic-gate 		Ip6Address	ae_src_addr;	/* Source address */
6827c478bd9Sstevel@tonic-gate 	}		ipv6AddrInfo;
6833173664eSapersson 	uint32_t	ipv6AddrReasmMaxSize;	/* InterfaceReasmMaxSize */
6843173664eSapersson 	Ip6Address	ipv6AddrIdentifier;	/* InterfaceIdentifier */
6853173664eSapersson 	uint32_t	ipv6AddrIdentifierLen;
6863173664eSapersson 	uint32_t	ipv6AddrReachableTime;	/* InterfaceReachableTime */
6873173664eSapersson 	uint32_t	ipv6AddrRetransmitTime; /* InterfaceRetransmitTime */
6887c478bd9Sstevel@tonic-gate } mib2_ipv6AddrEntry_t;
6896f773e29SBaban Kenkre #define	MIB_FIRST_NEW_ELM_mib2_ipv6AddrEntry_t	ipv6AddrReasmMaxSize
6907c478bd9Sstevel@tonic-gate 
6917c478bd9Sstevel@tonic-gate /*
6927c478bd9Sstevel@tonic-gate  * The IP routing table contains an entry for each route presently known to
6937c478bd9Sstevel@tonic-gate  * this entity. (for IPv4 routes)
6947c478bd9Sstevel@tonic-gate  *
6957c478bd9Sstevel@tonic-gate  *	ipRouteTable OBJECT-TYPE
6967c478bd9Sstevel@tonic-gate  *		SYNTAX  SEQUENCE OF IpRouteEntry
6977c478bd9Sstevel@tonic-gate  *		ACCESS  not-accessible
6987c478bd9Sstevel@tonic-gate  *		STATUS  mandatory
6997c478bd9Sstevel@tonic-gate  *		DESCRIPTION
7007c478bd9Sstevel@tonic-gate  *			"This entity's IP Routing table."
7017c478bd9Sstevel@tonic-gate  *		::= { ip 21 }
7027c478bd9Sstevel@tonic-gate  */
7037c478bd9Sstevel@tonic-gate 
7047c478bd9Sstevel@tonic-gate typedef struct mib2_ipRouteEntry {
7057c478bd9Sstevel@tonic-gate 		/* dest ip addr for this route		{ipRouteEntry 1 } RW */
7067c478bd9Sstevel@tonic-gate 	IpAddress	ipRouteDest;
7077c478bd9Sstevel@tonic-gate 		/* unique interface index for this hop	{ipRouteEntry 2 } RW */
7087c478bd9Sstevel@tonic-gate 	DeviceName	ipRouteIfIndex;
70978a2e113SAndy Fiddaman 		/* primary route metric			{ipRouteEntry 3 } RW */
7107c478bd9Sstevel@tonic-gate 	int		ipRouteMetric1;
71178a2e113SAndy Fiddaman 		/* alternate route metric		{ipRouteEntry 4 } RW */
7127c478bd9Sstevel@tonic-gate 	int		ipRouteMetric2;
71378a2e113SAndy Fiddaman 		/* alternate route metric		{ipRouteEntry 5 } RW */
7147c478bd9Sstevel@tonic-gate 	int		ipRouteMetric3;
71578a2e113SAndy Fiddaman 		/* alternate route metric		{ipRouteEntry 6 } RW */
7167c478bd9Sstevel@tonic-gate 	int		ipRouteMetric4;
7177c478bd9Sstevel@tonic-gate 		/* ip addr of next hop on this route	{ipRouteEntry 7 } RW */
7187c478bd9Sstevel@tonic-gate 	IpAddress	ipRouteNextHop;
7197c478bd9Sstevel@tonic-gate 		/* other(1), inval(2), dir(3), indir(4)	{ipRouteEntry 8 } RW */
7207c478bd9Sstevel@tonic-gate 	int		ipRouteType;
7217c478bd9Sstevel@tonic-gate 		/* mechanism by which route was learned	{ipRouteEntry 9 } */
7227c478bd9Sstevel@tonic-gate 	int		ipRouteProto;
7237c478bd9Sstevel@tonic-gate 		/* sec's since last update of route	{ipRouteEntry 10} RW */
7247c478bd9Sstevel@tonic-gate 	int		ipRouteAge;
72578a2e113SAndy Fiddaman 		/*					{ipRouteEntry 11} RW */
7267c478bd9Sstevel@tonic-gate 	IpAddress	ipRouteMask;
72778a2e113SAndy Fiddaman 		/* alternate route metric		{ipRouteEntry 12} RW */
7287c478bd9Sstevel@tonic-gate 	int		ipRouteMetric5;
7297c478bd9Sstevel@tonic-gate 		/* additional info from ire's		{ipRouteEntry 13 } */
7307c478bd9Sstevel@tonic-gate 	struct ipRouteInfo_s {
7317c478bd9Sstevel@tonic-gate 		Gauge		re_max_frag;
7327c478bd9Sstevel@tonic-gate 		Gauge		re_rtt;
7337c478bd9Sstevel@tonic-gate 		Counter		re_ref;
7347c478bd9Sstevel@tonic-gate 		int		re_frag_flag;
7357c478bd9Sstevel@tonic-gate 		IpAddress	re_src_addr;
7367c478bd9Sstevel@tonic-gate 		int		re_ire_type;
7377c478bd9Sstevel@tonic-gate 		Counter		re_obpkt;
7387c478bd9Sstevel@tonic-gate 		Counter		re_ibpkt;
7397c478bd9Sstevel@tonic-gate 		int		re_flags;
7406f773e29SBaban Kenkre 		/*
7416f773e29SBaban Kenkre 		 * The following two elements (re_in_ill and re_in_src_addr)
7426f773e29SBaban Kenkre 		 * are no longer used but are left here for the benefit of
7436f773e29SBaban Kenkre 		 * old Apps that won't be able to handle the change in the
7446f773e29SBaban Kenkre 		 * size of this struct. These elements will always be
7456f773e29SBaban Kenkre 		 * set to zeroes.
7466f773e29SBaban Kenkre 		 */
7476f773e29SBaban Kenkre 		DeviceName	re_in_ill;	/* Input interface */
7486f773e29SBaban Kenkre 		IpAddress	re_in_src_addr;	/* Input source address */
74978a2e113SAndy Fiddaman 	}		ipRouteInfo;
7507c478bd9Sstevel@tonic-gate } mib2_ipRouteEntry_t;
7517c478bd9Sstevel@tonic-gate 
7527c478bd9Sstevel@tonic-gate /*
7537c478bd9Sstevel@tonic-gate  * The IPv6 routing table contains an entry for each route presently known to
7547c478bd9Sstevel@tonic-gate  * this entity.
7557c478bd9Sstevel@tonic-gate  *
7567c478bd9Sstevel@tonic-gate  *	ipv6RouteTable OBJECT-TYPE
7577c478bd9Sstevel@tonic-gate  *		SYNTAX  SEQUENCE OF IpRouteEntry
7587c478bd9Sstevel@tonic-gate  *		ACCESS  not-accessible
7597c478bd9Sstevel@tonic-gate  *		STATUS  current
7607c478bd9Sstevel@tonic-gate  *		DESCRIPTION
7617c478bd9Sstevel@tonic-gate  *			"IPv6 Routing table. This table contains
7627c478bd9Sstevel@tonic-gate  *			an entry for each valid IPv6 unicast route
7637c478bd9Sstevel@tonic-gate  *			that can be used for packet forwarding
7647c478bd9Sstevel@tonic-gate  *			determination."
7657c478bd9Sstevel@tonic-gate  *		::= { ipv6MIBObjects 11 }
7667c478bd9Sstevel@tonic-gate  */
7677c478bd9Sstevel@tonic-gate 
7687c478bd9Sstevel@tonic-gate typedef struct mib2_ipv6RouteEntry {
7697c478bd9Sstevel@tonic-gate 		/* dest ip addr for this route		{ ipv6RouteEntry 1 } */
7707c478bd9Sstevel@tonic-gate 	Ip6Address	ipv6RouteDest;
77178a2e113SAndy Fiddaman 		/* prefix length			{ ipv6RouteEntry 2 } */
7727c478bd9Sstevel@tonic-gate 	int		ipv6RoutePfxLength;
77378a2e113SAndy Fiddaman 		/* unique route index			{ ipv6RouteEntry 3 } */
7747c478bd9Sstevel@tonic-gate 	unsigned	ipv6RouteIndex;
7757c478bd9Sstevel@tonic-gate 		/* unique interface index for this hop	{ ipv6RouteEntry 4 } */
7767c478bd9Sstevel@tonic-gate 	DeviceName	ipv6RouteIfIndex;
7777c478bd9Sstevel@tonic-gate 		/* IPv6 addr of next hop on this route	{ ipv6RouteEntry 5 } */
7787c478bd9Sstevel@tonic-gate 	Ip6Address	ipv6RouteNextHop;
7797c478bd9Sstevel@tonic-gate 		/* other(1), discard(2), local(3), remote(4) */
78078a2e113SAndy Fiddaman 		/*					{ ipv6RouteEntry 6 } */
7817c478bd9Sstevel@tonic-gate 	int		ipv6RouteType;
7827c478bd9Sstevel@tonic-gate 		/* mechanism by which route was learned	{ ipv6RouteEntry 7 } */
7837c478bd9Sstevel@tonic-gate 		/*
7847c478bd9Sstevel@tonic-gate 		 * other(1), local(2), netmgmt(3), ndisc(4), rip(5), ospf(6),
7857c478bd9Sstevel@tonic-gate 		 * bgp(7), idrp(8), igrp(9)
7867c478bd9Sstevel@tonic-gate 		 */
7877c478bd9Sstevel@tonic-gate 	int		ipv6RouteProtocol;
7887c478bd9Sstevel@tonic-gate 		/* policy hook or traffic class		{ ipv6RouteEntry 8 } */
7897c478bd9Sstevel@tonic-gate 	unsigned	ipv6RoutePolicy;
7907c478bd9Sstevel@tonic-gate 		/* sec's since last update of route	{ ipv6RouteEntry 9} */
7917c478bd9Sstevel@tonic-gate 	int		ipv6RouteAge;
7927c478bd9Sstevel@tonic-gate 		/* Routing domain ID of the next hop	{ ipv6RouteEntry 10 } */
7937c478bd9Sstevel@tonic-gate 	unsigned	ipv6RouteNextHopRDI;
7947c478bd9Sstevel@tonic-gate 		/* route metric				{ ipv6RouteEntry 11 } */
7957c478bd9Sstevel@tonic-gate 	unsigned	ipv6RouteMetric;
7967c478bd9Sstevel@tonic-gate 		/* preference (impl specific)		{ ipv6RouteEntry 12 } */
7977c478bd9Sstevel@tonic-gate 	unsigned	ipv6RouteWeight;
7987c478bd9Sstevel@tonic-gate 		/* additional info from ire's		{ } */
7997c478bd9Sstevel@tonic-gate 	struct ipv6RouteInfo_s {
8007c478bd9Sstevel@tonic-gate 		Gauge		re_max_frag;
8017c478bd9Sstevel@tonic-gate 		Gauge		re_rtt;
8027c478bd9Sstevel@tonic-gate 		Counter		re_ref;
8037c478bd9Sstevel@tonic-gate 		int		re_frag_flag;
8047c478bd9Sstevel@tonic-gate 		Ip6Address	re_src_addr;
8057c478bd9Sstevel@tonic-gate 		int		re_ire_type;
8067c478bd9Sstevel@tonic-gate 		Counter		re_obpkt;
8077c478bd9Sstevel@tonic-gate 		Counter		re_ibpkt;
8087c478bd9Sstevel@tonic-gate 		int		re_flags;
80978a2e113SAndy Fiddaman 	}		ipv6RouteInfo;
8107c478bd9Sstevel@tonic-gate } mib2_ipv6RouteEntry_t;
8117c478bd9Sstevel@tonic-gate 
81245916cd2Sjpk /*
81345916cd2Sjpk  * The IPv4 and IPv6 routing table entries on a trusted system also have
81445916cd2Sjpk  * security attributes in the form of label ranges.  This experimental
81545916cd2Sjpk  * interface provides information about these labels.
81645916cd2Sjpk  *
81745916cd2Sjpk  * Each entry in this table contains a label range and an index that refers
81845916cd2Sjpk  * back to the entry in the routing table to which it applies.  There may be 0,
81945916cd2Sjpk  * 1, or many label ranges for each routing table entry.
82045916cd2Sjpk  *
82145916cd2Sjpk  * (opthdr.level is set to MIB2_IP for IPv4 entries and MIB2_IP6 for IPv6.
82245916cd2Sjpk  * opthdr.name is set to EXPER_IP_GWATTR.)
82345916cd2Sjpk  *
82445916cd2Sjpk  *	ipRouteAttributeTable OBJECT-TYPE
82545916cd2Sjpk  *		SYNTAX  SEQUENCE OF IpAttributeEntry
82645916cd2Sjpk  *		ACCESS  not-accessible
82745916cd2Sjpk  *		STATUS  current
82845916cd2Sjpk  *		DESCRIPTION
82945916cd2Sjpk  *			"IPv4 routing attributes table.  This table contains
83045916cd2Sjpk  *			an entry for each valid trusted label attached to a
83145916cd2Sjpk  *			route in the system."
83245916cd2Sjpk  *		::= { ip 102 }
83345916cd2Sjpk  *
83445916cd2Sjpk  *	ipv6RouteAttributeTable OBJECT-TYPE
83545916cd2Sjpk  *		SYNTAX  SEQUENCE OF IpAttributeEntry
83645916cd2Sjpk  *		ACCESS  not-accessible
83745916cd2Sjpk  *		STATUS  current
83845916cd2Sjpk  *		DESCRIPTION
83945916cd2Sjpk  *			"IPv6 routing attributes table.  This table contains
84045916cd2Sjpk  *			an entry for each valid trusted label attached to a
84145916cd2Sjpk  *			route in the system."
84245916cd2Sjpk  *		::= { ip6 102 }
84345916cd2Sjpk  */
84445916cd2Sjpk 
84545916cd2Sjpk typedef struct mib2_ipAttributeEntry {
84645916cd2Sjpk 	uint_t		iae_routeidx;
84745916cd2Sjpk 	int		iae_doi;
84845916cd2Sjpk 	brange_t	iae_slrange;
84945916cd2Sjpk } mib2_ipAttributeEntry_t;
8507c478bd9Sstevel@tonic-gate 
8517c478bd9Sstevel@tonic-gate /*
8527c478bd9Sstevel@tonic-gate  * The IP address translation table contain the IpAddress to
8537c478bd9Sstevel@tonic-gate  * `physical' address equivalences.  Some interfaces do not
8547c478bd9Sstevel@tonic-gate  * use translation tables for determining address
8557c478bd9Sstevel@tonic-gate  * equivalences (e.g., DDN-X.25 has an algorithmic method);
8567c478bd9Sstevel@tonic-gate  * if all interfaces are of this type, then the Address
8577c478bd9Sstevel@tonic-gate  * Translation table is empty, i.e., has zero entries.
8587c478bd9Sstevel@tonic-gate  *
8597c478bd9Sstevel@tonic-gate  *	ipNetToMediaTable OBJECT-TYPE
8607c478bd9Sstevel@tonic-gate  *		SYNTAX  SEQUENCE OF IpNetToMediaEntry
8617c478bd9Sstevel@tonic-gate  *		ACCESS  not-accessible
8627c478bd9Sstevel@tonic-gate  *		STATUS  mandatory
8637c478bd9Sstevel@tonic-gate  *		DESCRIPTION
8647c478bd9Sstevel@tonic-gate  *			"The IP Address Translation table used for mapping
8657c478bd9Sstevel@tonic-gate  *			from IP addresses to physical addresses."
8667c478bd9Sstevel@tonic-gate  *		::= { ip 22 }
8677c478bd9Sstevel@tonic-gate  */
8687c478bd9Sstevel@tonic-gate 
8697c478bd9Sstevel@tonic-gate typedef struct mib2_ipNetToMediaEntry {
8707c478bd9Sstevel@tonic-gate 	/* Unique interface index		{ ipNetToMediaEntry 1 } RW */
8717c478bd9Sstevel@tonic-gate 	DeviceName	ipNetToMediaIfIndex;
8727c478bd9Sstevel@tonic-gate 	/* Media dependent physical addr	{ ipNetToMediaEntry 2 } RW */
8737c478bd9Sstevel@tonic-gate 	PhysAddress	ipNetToMediaPhysAddress;
8747c478bd9Sstevel@tonic-gate 	/* ip addr for this physical addr	{ ipNetToMediaEntry 3 } RW */
8757c478bd9Sstevel@tonic-gate 	IpAddress	ipNetToMediaNetAddress;
8767c478bd9Sstevel@tonic-gate 	/* other(1), inval(2), dyn(3), stat(4)	{ ipNetToMediaEntry 4 } RW */
8777c478bd9Sstevel@tonic-gate 	int		ipNetToMediaType;
8787c478bd9Sstevel@tonic-gate 	struct ipNetToMediaInfo_s {
8797c478bd9Sstevel@tonic-gate 		PhysAddress	ntm_mask;	/* subnet mask for entry */
8807c478bd9Sstevel@tonic-gate 		int		ntm_flags;	/* ACE_F_* flags in arp.h */
8817c478bd9Sstevel@tonic-gate 	}		ipNetToMediaInfo;
8827c478bd9Sstevel@tonic-gate } mib2_ipNetToMediaEntry_t;
8837c478bd9Sstevel@tonic-gate 
8847c478bd9Sstevel@tonic-gate /*
8857c478bd9Sstevel@tonic-gate  *	ipv6NetToMediaTable OBJECT-TYPE
8867c478bd9Sstevel@tonic-gate  *		 SYNTAX      SEQUENCE OF Ipv6NetToMediaEntry
8877c478bd9Sstevel@tonic-gate  *		 MAX-ACCESS  not-accessible
8887c478bd9Sstevel@tonic-gate  *		 STATUS      current
8897c478bd9Sstevel@tonic-gate  *		 DESCRIPTION
8907c478bd9Sstevel@tonic-gate  *			"The IPv6 Address Translation table used for
8917c478bd9Sstevel@tonic-gate  *			mapping from IPv6 addresses to physical addresses.
8927c478bd9Sstevel@tonic-gate  *
8937c478bd9Sstevel@tonic-gate  *			The IPv6 address translation table contain the
8947c478bd9Sstevel@tonic-gate  *			Ipv6Address to `physical' address equivalencies.
8957c478bd9Sstevel@tonic-gate  *			Some interfaces do not use translation tables
8967c478bd9Sstevel@tonic-gate  *			for determining address equivalencies; if all
8977c478bd9Sstevel@tonic-gate  *			interfaces are of this type, then the Address
8987c478bd9Sstevel@tonic-gate  *			Translation table is empty, i.e., has zero
8997c478bd9Sstevel@tonic-gate  *			entries."
9007c478bd9Sstevel@tonic-gate  *		::= { ipv6MIBObjects 12 }
9017c478bd9Sstevel@tonic-gate  */
9027c478bd9Sstevel@tonic-gate 
9037c478bd9Sstevel@tonic-gate typedef struct mib2_ipv6NetToMediaEntry {
9047c478bd9Sstevel@tonic-gate 	/* Unique interface index		{ Part of INDEX } */
9057c478bd9Sstevel@tonic-gate 	DeviceIndex	ipv6NetToMediaIfIndex;
9067c478bd9Sstevel@tonic-gate 
9077c478bd9Sstevel@tonic-gate 	/* ip addr for this physical addr	{ ipv6NetToMediaEntry 1 } */
9087c478bd9Sstevel@tonic-gate 	Ip6Address	ipv6NetToMediaNetAddress;
9097c478bd9Sstevel@tonic-gate 	/* Media dependent physical addr	{ ipv6NetToMediaEntry 2 } */
9107c478bd9Sstevel@tonic-gate 	PhysAddress	ipv6NetToMediaPhysAddress;
9117c478bd9Sstevel@tonic-gate 	/*
9127c478bd9Sstevel@tonic-gate 	 * Type of mapping
9137c478bd9Sstevel@tonic-gate 	 * other(1), dynamic(2), static(3), local(4)
9147c478bd9Sstevel@tonic-gate 	 *					{ ipv6NetToMediaEntry 3 }
9157c478bd9Sstevel@tonic-gate 	 */
9167c478bd9Sstevel@tonic-gate 	int		ipv6NetToMediaType;
9177c478bd9Sstevel@tonic-gate 	/*
9187c478bd9Sstevel@tonic-gate 	 * NUD state
9197c478bd9Sstevel@tonic-gate 	 * reachable(1), stale(2), delay(3), probe(4), invalid(5), unknown(6)
9207c478bd9Sstevel@tonic-gate 	 * Note: The kernel returns ND_* states.
9217c478bd9Sstevel@tonic-gate 	 *					{ ipv6NetToMediaEntry 4 }
9227c478bd9Sstevel@tonic-gate 	 */
9237c478bd9Sstevel@tonic-gate 	int		ipv6NetToMediaState;
9247c478bd9Sstevel@tonic-gate 	/* sysUpTime last time entry was updated { ipv6NetToMediaEntry 5 } */
9257c478bd9Sstevel@tonic-gate 	int		ipv6NetToMediaLastUpdated;
9267c478bd9Sstevel@tonic-gate } mib2_ipv6NetToMediaEntry_t;
9277c478bd9Sstevel@tonic-gate 
9287c478bd9Sstevel@tonic-gate 
9297c478bd9Sstevel@tonic-gate /*
9307c478bd9Sstevel@tonic-gate  * List of group members per interface
9317c478bd9Sstevel@tonic-gate  */
9327c478bd9Sstevel@tonic-gate typedef struct ip_member {
9337c478bd9Sstevel@tonic-gate 	/* Interface index */
9347c478bd9Sstevel@tonic-gate 	DeviceName	ipGroupMemberIfIndex;
9357c478bd9Sstevel@tonic-gate 	/* IP Multicast address */
9367c478bd9Sstevel@tonic-gate 	IpAddress	ipGroupMemberAddress;
9377c478bd9Sstevel@tonic-gate 	/* Number of member sockets */
9387c478bd9Sstevel@tonic-gate 	Counter		ipGroupMemberRefCnt;
9397c478bd9Sstevel@tonic-gate 	/* Filter mode: 1 => include, 2 => exclude */
9407c478bd9Sstevel@tonic-gate 	int		ipGroupMemberFilterMode;
9417c478bd9Sstevel@tonic-gate } ip_member_t;
9427c478bd9Sstevel@tonic-gate 
9437c478bd9Sstevel@tonic-gate 
9447c478bd9Sstevel@tonic-gate /*
9457c478bd9Sstevel@tonic-gate  * List of IPv6 group members per interface
9467c478bd9Sstevel@tonic-gate  */
9477c478bd9Sstevel@tonic-gate typedef struct ipv6_member {
9487c478bd9Sstevel@tonic-gate 	/* Interface index */
9497c478bd9Sstevel@tonic-gate 	DeviceIndex	ipv6GroupMemberIfIndex;
9507c478bd9Sstevel@tonic-gate 	/* IP Multicast address */
9517c478bd9Sstevel@tonic-gate 	Ip6Address	ipv6GroupMemberAddress;
9527c478bd9Sstevel@tonic-gate 	/* Number of member sockets */
9537c478bd9Sstevel@tonic-gate 	Counter		ipv6GroupMemberRefCnt;
9547c478bd9Sstevel@tonic-gate 	/* Filter mode: 1 => include, 2 => exclude */
9557c478bd9Sstevel@tonic-gate 	int		ipv6GroupMemberFilterMode;
9567c478bd9Sstevel@tonic-gate } ipv6_member_t;
9577c478bd9Sstevel@tonic-gate 
95845916cd2Sjpk /*
95945916cd2Sjpk  * This is used to mark transport layer entities (e.g., TCP connections) that
96045916cd2Sjpk  * are capable of receiving packets from a range of labels.  'level' is set to
96145916cd2Sjpk  * the protocol of interest (e.g., MIB2_TCP), and 'name' is set to
96245916cd2Sjpk  * EXPER_XPORT_MLP.  The tme_connidx refers back to the entry in MIB2_TCP_CONN,
96345916cd2Sjpk  * MIB2_TCP6_CONN, or MIB2_SCTP_CONN.
96445916cd2Sjpk  *
96545916cd2Sjpk  * It is also used to report connections that receive packets at a single label
96645916cd2Sjpk  * that's other than the zone's label.  This is the case when a TCP connection
96745916cd2Sjpk  * is accepted from a particular peer using an MLP listener.
96845916cd2Sjpk  */
96945916cd2Sjpk typedef struct mib2_transportMLPEntry {
97045916cd2Sjpk 	uint_t		tme_connidx;
97145916cd2Sjpk 	uint_t		tme_flags;
97245916cd2Sjpk 	int		tme_doi;
97345916cd2Sjpk 	bslabel_t	tme_label;
97445916cd2Sjpk } mib2_transportMLPEntry_t;
97545916cd2Sjpk 
97678a2e113SAndy Fiddaman /*
97778a2e113SAndy Fiddaman  * This is not part of mib2 but is used to communicate additional information
97878a2e113SAndy Fiddaman  * about a socket alongside the mib2 data. This is used by netstat to
97978a2e113SAndy Fiddaman  * associate sockets with processes that are connected to them.
98078a2e113SAndy Fiddaman  */
98178a2e113SAndy Fiddaman 
98278a2e113SAndy Fiddaman #define	MIB2_SOCKINFO_STREAM	0x1
98378a2e113SAndy Fiddaman #define	MIB2_SOCKINFO_IPV6	0x2	/* IPV6 entry in an IPv4 table */
98478a2e113SAndy Fiddaman 
98578a2e113SAndy Fiddaman typedef struct mib2_socketInfoEntry {
98678a2e113SAndy Fiddaman 	uint64_t	sie_connidx;
98778a2e113SAndy Fiddaman 	uint64_t	sie_inode;
98878a2e113SAndy Fiddaman 	uint64_t	sie_flags;
98978a2e113SAndy Fiddaman 	uint64_t	sie_dev;
99078a2e113SAndy Fiddaman } mib2_socketInfoEntry_t;
99178a2e113SAndy Fiddaman 
99245916cd2Sjpk #define	MIB2_TMEF_PRIVATE	0x00000001	/* MLP on private addresses */
99345916cd2Sjpk #define	MIB2_TMEF_SHARED	0x00000002	/* MLP on shared addresses */
9945f9878b0Sken Powell - Sun Microsystem #define	MIB2_TMEF_ANONMLP	0x00000004	/* Anonymous MLP port */
9955f9878b0Sken Powell - Sun Microsystem #define	MIB2_TMEF_MACEXEMPT	0x00000008	/* MAC-Exempt port */
9965f9878b0Sken Powell - Sun Microsystem #define	MIB2_TMEF_IS_LABELED	0x00000010	/* tme_doi & tme_label exists */
9975d3b8cb7SBill Sommerfeld #define	MIB2_TMEF_MACIMPLICIT	0x00000020	/* MAC-Implicit */
9987c478bd9Sstevel@tonic-gate /*
9997c478bd9Sstevel@tonic-gate  * List of IPv4 source addresses being filtered per interface
10007c478bd9Sstevel@tonic-gate  */
10017c478bd9Sstevel@tonic-gate typedef struct ip_grpsrc {
10027c478bd9Sstevel@tonic-gate 	/* Interface index */
10037c478bd9Sstevel@tonic-gate 	DeviceName	ipGroupSourceIfIndex;
10047c478bd9Sstevel@tonic-gate 	/* IP Multicast address */
10057c478bd9Sstevel@tonic-gate 	IpAddress	ipGroupSourceGroup;
10067c478bd9Sstevel@tonic-gate 	/* IP Source address */
10077c478bd9Sstevel@tonic-gate 	IpAddress	ipGroupSourceAddress;
10087c478bd9Sstevel@tonic-gate } ip_grpsrc_t;
10097c478bd9Sstevel@tonic-gate 
10107c478bd9Sstevel@tonic-gate 
10117c478bd9Sstevel@tonic-gate /*
10127c478bd9Sstevel@tonic-gate  * List of IPv6 source addresses being filtered per interface
10137c478bd9Sstevel@tonic-gate  */
10147c478bd9Sstevel@tonic-gate typedef struct ipv6_grpsrc {
10157c478bd9Sstevel@tonic-gate 	/* Interface index */
10167c478bd9Sstevel@tonic-gate 	DeviceIndex	ipv6GroupSourceIfIndex;
10177c478bd9Sstevel@tonic-gate 	/* IP Multicast address */
10187c478bd9Sstevel@tonic-gate 	Ip6Address	ipv6GroupSourceGroup;
10197c478bd9Sstevel@tonic-gate 	/* IP Source address */
10207c478bd9Sstevel@tonic-gate 	Ip6Address	ipv6GroupSourceAddress;
10217c478bd9Sstevel@tonic-gate } ipv6_grpsrc_t;
10227c478bd9Sstevel@tonic-gate 
10237c478bd9Sstevel@tonic-gate 
1024bd670b35SErik Nordmark /*
1025bd670b35SErik Nordmark  * List of destination cache entries
1026bd670b35SErik Nordmark  */
1027bd670b35SErik Nordmark typedef struct dest_cache_entry {
1028bd670b35SErik Nordmark 	/* IP Multicast address */
1029bd670b35SErik Nordmark 	IpAddress	DestIpv4Address;
1030bd670b35SErik Nordmark 	Ip6Address	DestIpv6Address;
1031bd670b35SErik Nordmark 	uint_t		DestFlags;	/* DCEF_* */
1032bd670b35SErik Nordmark 	uint32_t	DestPmtu;	/* Path MTU if DCEF_PMTU */
1033bd670b35SErik Nordmark 	uint32_t	DestIdent;	/* Per destination IP ident. */
1034bd670b35SErik Nordmark 	DeviceIndex	DestIfindex;	/* For IPv6 link-locals */
1035bd670b35SErik Nordmark 	uint32_t	DestAge;	/* Age of MTU info in seconds */
1036bd670b35SErik Nordmark } dest_cache_entry_t;
1037bd670b35SErik Nordmark 
1038bd670b35SErik Nordmark 
10397c478bd9Sstevel@tonic-gate /*
10407c478bd9Sstevel@tonic-gate  * ICMP Group
10417c478bd9Sstevel@tonic-gate  */
10427c478bd9Sstevel@tonic-gate typedef struct mib2_icmp {
10437c478bd9Sstevel@tonic-gate 	/* total # of recv'd ICMP msgs			{ icmp 1 } */
10447c478bd9Sstevel@tonic-gate 	Counter	icmpInMsgs;
10457c478bd9Sstevel@tonic-gate 	/* recv'd ICMP msgs with errors			{ icmp 2 } */
10467c478bd9Sstevel@tonic-gate 	Counter	icmpInErrors;
10477c478bd9Sstevel@tonic-gate 	/* recv'd "dest unreachable" msg's		{ icmp 3 } */
10487c478bd9Sstevel@tonic-gate 	Counter	icmpInDestUnreachs;
10497c478bd9Sstevel@tonic-gate 	/* recv'd "time exceeded" msg's			{ icmp 4 } */
10507c478bd9Sstevel@tonic-gate 	Counter	icmpInTimeExcds;
10517c478bd9Sstevel@tonic-gate 	/* recv'd "parameter problem" msg's		{ icmp 5 } */
10527c478bd9Sstevel@tonic-gate 	Counter	icmpInParmProbs;
10537c478bd9Sstevel@tonic-gate 	/* recv'd "source quench" msg's			{ icmp 6 } */
10547c478bd9Sstevel@tonic-gate 	Counter	icmpInSrcQuenchs;
10557c478bd9Sstevel@tonic-gate 	/* recv'd "ICMP redirect" msg's			{ icmp 7 } */
10567c478bd9Sstevel@tonic-gate 	Counter	icmpInRedirects;
10577c478bd9Sstevel@tonic-gate 	/* recv'd "echo request" msg's			{ icmp 8 } */
10587c478bd9Sstevel@tonic-gate 	Counter	icmpInEchos;
10597c478bd9Sstevel@tonic-gate 	/* recv'd "echo reply" msg's			{ icmp 9 } */
10607c478bd9Sstevel@tonic-gate 	Counter	icmpInEchoReps;
10617c478bd9Sstevel@tonic-gate 	/* recv'd "timestamp" msg's			{ icmp 10 } */
10627c478bd9Sstevel@tonic-gate 	Counter	icmpInTimestamps;
10637c478bd9Sstevel@tonic-gate 	/* recv'd "timestamp reply" msg's		{ icmp 11 } */
10647c478bd9Sstevel@tonic-gate 	Counter	icmpInTimestampReps;
10657c478bd9Sstevel@tonic-gate 	/* recv'd "address mask request" msg's		{ icmp 12 } */
10667c478bd9Sstevel@tonic-gate 	Counter	icmpInAddrMasks;
10677c478bd9Sstevel@tonic-gate 	/* recv'd "address mask reply" msg's		{ icmp 13 } */
10687c478bd9Sstevel@tonic-gate 	Counter	icmpInAddrMaskReps;
10697c478bd9Sstevel@tonic-gate 	/* total # of sent ICMP msg's			{ icmp 14 } */
10707c478bd9Sstevel@tonic-gate 	Counter	icmpOutMsgs;
10717c478bd9Sstevel@tonic-gate 	/* # of msg's not sent for internal icmp errors	{ icmp 15 } */
10727c478bd9Sstevel@tonic-gate 	Counter	icmpOutErrors;
10737c478bd9Sstevel@tonic-gate 	/* # of "dest unreachable" msg's sent		{ icmp 16 } */
10747c478bd9Sstevel@tonic-gate 	Counter	icmpOutDestUnreachs;
10757c478bd9Sstevel@tonic-gate 	/* # of "time exceeded" msg's sent		{ icmp 17 } */
10767c478bd9Sstevel@tonic-gate 	Counter	icmpOutTimeExcds;
10777c478bd9Sstevel@tonic-gate 	/* # of "parameter problme" msg's sent		{ icmp 18 } */
10787c478bd9Sstevel@tonic-gate 	Counter	icmpOutParmProbs;
10797c478bd9Sstevel@tonic-gate 	/* # of "source quench" msg's sent		{ icmp 19 } */
10807c478bd9Sstevel@tonic-gate 	Counter	icmpOutSrcQuenchs;
10817c478bd9Sstevel@tonic-gate 	/* # of "ICMP redirect" msg's sent		{ icmp 20 } */
10827c478bd9Sstevel@tonic-gate 	Counter	icmpOutRedirects;
10837c478bd9Sstevel@tonic-gate 	/* # of "Echo request" msg's sent		{ icmp 21 } */
10847c478bd9Sstevel@tonic-gate 	Counter	icmpOutEchos;
10857c478bd9Sstevel@tonic-gate 	/* # of "Echo reply" msg's sent			{ icmp 22 } */
10867c478bd9Sstevel@tonic-gate 	Counter	icmpOutEchoReps;
10877c478bd9Sstevel@tonic-gate 	/* # of "timestamp request" msg's sent		{ icmp 23 } */
10887c478bd9Sstevel@tonic-gate 	Counter	icmpOutTimestamps;
10897c478bd9Sstevel@tonic-gate 	/* # of "timestamp reply" msg's sent		{ icmp 24 } */
10907c478bd9Sstevel@tonic-gate 	Counter	icmpOutTimestampReps;
10917c478bd9Sstevel@tonic-gate 	/* # of "address mask request" msg's sent	{ icmp 25 } */
10927c478bd9Sstevel@tonic-gate 	Counter	icmpOutAddrMasks;
10937c478bd9Sstevel@tonic-gate 	/* # of "address mask reply" msg's sent		{ icmp 26 } */
10947c478bd9Sstevel@tonic-gate 	Counter	icmpOutAddrMaskReps;
10957c478bd9Sstevel@tonic-gate /*
10967c478bd9Sstevel@tonic-gate  * In addition to MIB-II
10977c478bd9Sstevel@tonic-gate  */
10987c478bd9Sstevel@tonic-gate 	/* # of received packets with checksum errors */
10997c478bd9Sstevel@tonic-gate 	Counter	icmpInCksumErrs;
11007c478bd9Sstevel@tonic-gate 	/* # of received packets with unknow codes */
11017c478bd9Sstevel@tonic-gate 	Counter	icmpInUnknowns;
11027c478bd9Sstevel@tonic-gate 	/* # of received unreachables with "fragmentation needed" */
11037c478bd9Sstevel@tonic-gate 	Counter	icmpInFragNeeded;
11047c478bd9Sstevel@tonic-gate 	/* # of sent unreachables with "fragmentation needed" */
11057c478bd9Sstevel@tonic-gate 	Counter	icmpOutFragNeeded;
11067c478bd9Sstevel@tonic-gate 	/*
11077c478bd9Sstevel@tonic-gate 	 * # of msg's not sent since original packet was broadcast/multicast
11087c478bd9Sstevel@tonic-gate 	 * or an ICMP error packet
11097c478bd9Sstevel@tonic-gate 	 */
11107c478bd9Sstevel@tonic-gate 	Counter	icmpOutDrops;
11117c478bd9Sstevel@tonic-gate 	/* # of ICMP packets droped due to queue overflow */
11127c478bd9Sstevel@tonic-gate 	Counter icmpInOverflows;
11137c478bd9Sstevel@tonic-gate 	/* recv'd "ICMP redirect" msg's	that are bad thus ignored */
11147c478bd9Sstevel@tonic-gate 	Counter	icmpInBadRedirects;
11157c478bd9Sstevel@tonic-gate } mib2_icmp_t;
11167c478bd9Sstevel@tonic-gate 
11177c478bd9Sstevel@tonic-gate 
11187c478bd9Sstevel@tonic-gate /*
11197c478bd9Sstevel@tonic-gate  *	ipv6IfIcmpEntry OBJECT-TYPE
11207c478bd9Sstevel@tonic-gate  *		SYNTAX      Ipv6IfIcmpEntry
11217c478bd9Sstevel@tonic-gate  *		MAX-ACCESS  not-accessible
11227c478bd9Sstevel@tonic-gate  *		STATUS      current
11237c478bd9Sstevel@tonic-gate  *		DESCRIPTION
11247c478bd9Sstevel@tonic-gate  *			"An ICMPv6 statistics entry containing
11257c478bd9Sstevel@tonic-gate  *			objects at a particular IPv6 interface.
11267c478bd9Sstevel@tonic-gate  *
11277c478bd9Sstevel@tonic-gate  *			Note that a receiving interface is
11287c478bd9Sstevel@tonic-gate  *			the interface to which a given ICMPv6 message
11297c478bd9Sstevel@tonic-gate  *			is addressed which may not be necessarily
11307c478bd9Sstevel@tonic-gate  *			the input interface for the message.
11317c478bd9Sstevel@tonic-gate  *
11327c478bd9Sstevel@tonic-gate  *			Similarly, the sending interface is
11337c478bd9Sstevel@tonic-gate  *			the interface that sources a given
11347c478bd9Sstevel@tonic-gate  *			ICMP message which is usually but not
11357c478bd9Sstevel@tonic-gate  *			necessarily the output interface for the message."
11367c478bd9Sstevel@tonic-gate  *		AUGMENTS { ipv6IfEntry }
11377c478bd9Sstevel@tonic-gate  *		::= { ipv6IfIcmpTable 1 }
11387c478bd9Sstevel@tonic-gate  *
11397c478bd9Sstevel@tonic-gate  * Per-interface ICMPv6 statistics table
11407c478bd9Sstevel@tonic-gate  */
11417c478bd9Sstevel@tonic-gate 
11427c478bd9Sstevel@tonic-gate typedef struct mib2_ipv6IfIcmpEntry {
11437c478bd9Sstevel@tonic-gate 	/* Local ifindex to identify the interface */
11447c478bd9Sstevel@tonic-gate 	DeviceIndex	ipv6IfIcmpIfIndex;
11457c478bd9Sstevel@tonic-gate 
11467c478bd9Sstevel@tonic-gate 	int		ipv6IfIcmpEntrySize;	/* Size of ipv6IfIcmpEntry */
11477c478bd9Sstevel@tonic-gate 
11487c478bd9Sstevel@tonic-gate 	/* The total # ICMP msgs rcvd includes ipv6IfIcmpInErrors */
11497c478bd9Sstevel@tonic-gate 	Counter32	ipv6IfIcmpInMsgs;
11507c478bd9Sstevel@tonic-gate 	/* # ICMP with ICMP-specific errors (bad checkum, length, etc) */
11517c478bd9Sstevel@tonic-gate 	Counter32	ipv6IfIcmpInErrors;
11527c478bd9Sstevel@tonic-gate 	/* # ICMP Destination Unreachable */
11537c478bd9Sstevel@tonic-gate 	Counter32	ipv6IfIcmpInDestUnreachs;
11547c478bd9Sstevel@tonic-gate 	/* # ICMP destination unreachable/communication admin prohibited */
11557c478bd9Sstevel@tonic-gate 	Counter32	ipv6IfIcmpInAdminProhibs;
11567c478bd9Sstevel@tonic-gate 	Counter32	ipv6IfIcmpInTimeExcds;
11577c478bd9Sstevel@tonic-gate 	Counter32	ipv6IfIcmpInParmProblems;
11587c478bd9Sstevel@tonic-gate 	Counter32	ipv6IfIcmpInPktTooBigs;
11597c478bd9Sstevel@tonic-gate 	Counter32	ipv6IfIcmpInEchos;
11607c478bd9Sstevel@tonic-gate 	Counter32	ipv6IfIcmpInEchoReplies;
11617c478bd9Sstevel@tonic-gate 	Counter32	ipv6IfIcmpInRouterSolicits;
11627c478bd9Sstevel@tonic-gate 	Counter32	ipv6IfIcmpInRouterAdvertisements;
11637c478bd9Sstevel@tonic-gate 	Counter32	ipv6IfIcmpInNeighborSolicits;
11647c478bd9Sstevel@tonic-gate 	Counter32	ipv6IfIcmpInNeighborAdvertisements;
11657c478bd9Sstevel@tonic-gate 	Counter32	ipv6IfIcmpInRedirects;
11667c478bd9Sstevel@tonic-gate 	Counter32	ipv6IfIcmpInGroupMembQueries;
11677c478bd9Sstevel@tonic-gate 	Counter32	ipv6IfIcmpInGroupMembResponses;
11687c478bd9Sstevel@tonic-gate 	Counter32	ipv6IfIcmpInGroupMembReductions;
11697c478bd9Sstevel@tonic-gate 	/* Total # ICMP messages attempted to send (includes OutErrors) */
11707c478bd9Sstevel@tonic-gate 	Counter32	ipv6IfIcmpOutMsgs;
11717c478bd9Sstevel@tonic-gate 	/* # ICMP messages not sent due to ICMP problems (e.g. no buffers) */
11727c478bd9Sstevel@tonic-gate 	Counter32	ipv6IfIcmpOutErrors;
11737c478bd9Sstevel@tonic-gate 	Counter32	ipv6IfIcmpOutDestUnreachs;
11747c478bd9Sstevel@tonic-gate 	Counter32	ipv6IfIcmpOutAdminProhibs;
11757c478bd9Sstevel@tonic-gate 	Counter32	ipv6IfIcmpOutTimeExcds;
11767c478bd9Sstevel@tonic-gate 	Counter32	ipv6IfIcmpOutParmProblems;
11777c478bd9Sstevel@tonic-gate 	Counter32	ipv6IfIcmpOutPktTooBigs;
11787c478bd9Sstevel@tonic-gate 	Counter32	ipv6IfIcmpOutEchos;
11797c478bd9Sstevel@tonic-gate 	Counter32	ipv6IfIcmpOutEchoReplies;
11807c478bd9Sstevel@tonic-gate 	Counter32	ipv6IfIcmpOutRouterSolicits;
11817c478bd9Sstevel@tonic-gate 	Counter32	ipv6IfIcmpOutRouterAdvertisements;
11827c478bd9Sstevel@tonic-gate 	Counter32	ipv6IfIcmpOutNeighborSolicits;
11837c478bd9Sstevel@tonic-gate 	Counter32	ipv6IfIcmpOutNeighborAdvertisements;
11847c478bd9Sstevel@tonic-gate 	Counter32	ipv6IfIcmpOutRedirects;
11857c478bd9Sstevel@tonic-gate 	Counter32	ipv6IfIcmpOutGroupMembQueries;
11867c478bd9Sstevel@tonic-gate 	Counter32	ipv6IfIcmpOutGroupMembResponses;
11877c478bd9Sstevel@tonic-gate 	Counter32	ipv6IfIcmpOutGroupMembReductions;
11887c478bd9Sstevel@tonic-gate /* Additions beyond the MIB */
11897c478bd9Sstevel@tonic-gate 	Counter32	ipv6IfIcmpInOverflows;
11907c478bd9Sstevel@tonic-gate 	/* recv'd "ICMPv6 redirect" msg's that are bad thus ignored */
11917c478bd9Sstevel@tonic-gate 	Counter32	ipv6IfIcmpBadHoplimit;
11927c478bd9Sstevel@tonic-gate 	Counter32	ipv6IfIcmpInBadNeighborAdvertisements;
11937c478bd9Sstevel@tonic-gate 	Counter32	ipv6IfIcmpInBadNeighborSolicitations;
11947c478bd9Sstevel@tonic-gate 	Counter32	ipv6IfIcmpInBadRedirects;
11957c478bd9Sstevel@tonic-gate 	Counter32	ipv6IfIcmpInGroupMembTotal;
11967c478bd9Sstevel@tonic-gate 	Counter32	ipv6IfIcmpInGroupMembBadQueries;
11977c478bd9Sstevel@tonic-gate 	Counter32	ipv6IfIcmpInGroupMembBadReports;
11987c478bd9Sstevel@tonic-gate 	Counter32	ipv6IfIcmpInGroupMembOurReports;
11997c478bd9Sstevel@tonic-gate } mib2_ipv6IfIcmpEntry_t;
12007c478bd9Sstevel@tonic-gate 
12017c478bd9Sstevel@tonic-gate /*
12027c478bd9Sstevel@tonic-gate  * the TCP group
12037c478bd9Sstevel@tonic-gate  *
12047c478bd9Sstevel@tonic-gate  * Note that instances of object types that represent
12057c478bd9Sstevel@tonic-gate  * information about a particular TCP connection are
12067c478bd9Sstevel@tonic-gate  * transient; they persist only as long as the connection
12077c478bd9Sstevel@tonic-gate  * in question.
12087c478bd9Sstevel@tonic-gate  */
12097c478bd9Sstevel@tonic-gate #define	MIB2_TCP_CONN	13	/* tcpConnEntry */
12107c478bd9Sstevel@tonic-gate #define	MIB2_TCP6_CONN	14	/* tcp6ConnEntry */
12117c478bd9Sstevel@tonic-gate 
12127c478bd9Sstevel@tonic-gate /* Old name retained for compatibility */
12137c478bd9Sstevel@tonic-gate #define	MIB2_TCP_13	MIB2_TCP_CONN
12147c478bd9Sstevel@tonic-gate 
12153173664eSapersson /* Pack data in mib2_tcp to make struct size the same for 32- and 64-bits */
12163173664eSapersson #if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4
12173173664eSapersson #pragma pack(4)
12183173664eSapersson #endif
12197c478bd9Sstevel@tonic-gate typedef struct mib2_tcp {
12207c478bd9Sstevel@tonic-gate 		/* algorithm used for transmit timeout value	{ tcp 1 } */
12217c478bd9Sstevel@tonic-gate 	int	tcpRtoAlgorithm;
12227c478bd9Sstevel@tonic-gate 		/* minimum retransmit timeout (ms)		{ tcp 2 } */
12237c478bd9Sstevel@tonic-gate 	int	tcpRtoMin;
12247c478bd9Sstevel@tonic-gate 		/* maximum retransmit timeout (ms)		{ tcp 3 } */
12257c478bd9Sstevel@tonic-gate 	int	tcpRtoMax;
12267c478bd9Sstevel@tonic-gate 		/* maximum # of connections supported		{ tcp 4 } */
12277c478bd9Sstevel@tonic-gate 	int	tcpMaxConn;
12287c478bd9Sstevel@tonic-gate 		/* # of direct transitions CLOSED -> SYN-SENT	{ tcp 5 } */
12297c478bd9Sstevel@tonic-gate 	Counter	tcpActiveOpens;
12307c478bd9Sstevel@tonic-gate 		/* # of direct transitions LISTEN -> SYN-RCVD	{ tcp 6 } */
12317c478bd9Sstevel@tonic-gate 	Counter	tcpPassiveOpens;
12327c478bd9Sstevel@tonic-gate 		/* # of direct SIN-SENT/RCVD -> CLOSED/LISTEN	{ tcp 7 } */
12337c478bd9Sstevel@tonic-gate 	Counter	tcpAttemptFails;
12347c478bd9Sstevel@tonic-gate 		/* # of direct ESTABLISHED/CLOSE-WAIT -> CLOSED	{ tcp 8 } */
12357c478bd9Sstevel@tonic-gate 	Counter	tcpEstabResets;
12367c478bd9Sstevel@tonic-gate 		/* # of connections ESTABLISHED or CLOSE-WAIT	{ tcp 9 } */
12377c478bd9Sstevel@tonic-gate 	Gauge	tcpCurrEstab;
12387c478bd9Sstevel@tonic-gate 		/* total # of segments recv'd			{ tcp 10 } */
12397c478bd9Sstevel@tonic-gate 	Counter	tcpInSegs;
12407c478bd9Sstevel@tonic-gate 		/* total # of segments sent			{ tcp 11 } */
12417c478bd9Sstevel@tonic-gate 	Counter	tcpOutSegs;
12427c478bd9Sstevel@tonic-gate 		/* total # of segments retransmitted		{ tcp 12 } */
12437c478bd9Sstevel@tonic-gate 	Counter	tcpRetransSegs;
12447c478bd9Sstevel@tonic-gate 		/* {tcp 13} */
12457c478bd9Sstevel@tonic-gate 	int	tcpConnTableSize;	/* Size of tcpConnEntry_t */
12467c478bd9Sstevel@tonic-gate 	/* in ip				{tcp 14} */
12477c478bd9Sstevel@tonic-gate 		/* # of segments sent with RST flag		{ tcp 15 } */
12487c478bd9Sstevel@tonic-gate 	Counter	tcpOutRsts;
12497c478bd9Sstevel@tonic-gate /* In addition to MIB-II */
12507c478bd9Sstevel@tonic-gate /* Sender */
12517c478bd9Sstevel@tonic-gate 	/* total # of data segments sent */
12527c478bd9Sstevel@tonic-gate 	Counter tcpOutDataSegs;
12537c478bd9Sstevel@tonic-gate 	/* total # of bytes in data segments sent */
12547c478bd9Sstevel@tonic-gate 	Counter tcpOutDataBytes;
12557c478bd9Sstevel@tonic-gate 	/* total # of bytes in segments retransmitted */
12567c478bd9Sstevel@tonic-gate 	Counter tcpRetransBytes;
12577c478bd9Sstevel@tonic-gate 	/* total # of acks sent */
12587c478bd9Sstevel@tonic-gate 	Counter tcpOutAck;
12597c478bd9Sstevel@tonic-gate 	/* total # of delayed acks sent */
12607c478bd9Sstevel@tonic-gate 	Counter tcpOutAckDelayed;
12617c478bd9Sstevel@tonic-gate 	/* total # of segments sent with the urg flag on */
12627c478bd9Sstevel@tonic-gate 	Counter tcpOutUrg;
12637c478bd9Sstevel@tonic-gate 	/* total # of window updates sent */
12647c478bd9Sstevel@tonic-gate 	Counter tcpOutWinUpdate;
12657c478bd9Sstevel@tonic-gate 	/* total # of zero window probes sent */
12667c478bd9Sstevel@tonic-gate 	Counter tcpOutWinProbe;
12677c478bd9Sstevel@tonic-gate 	/* total # of control segments sent (syn, fin, rst) */
12687c478bd9Sstevel@tonic-gate 	Counter tcpOutControl;
12697c478bd9Sstevel@tonic-gate 	/* total # of segments sent due to "fast retransmit" */
12707c478bd9Sstevel@tonic-gate 	Counter tcpOutFastRetrans;
12717c478bd9Sstevel@tonic-gate /* Receiver */
12727c478bd9Sstevel@tonic-gate 	/* total # of ack segments received */
12737c478bd9Sstevel@tonic-gate 	Counter tcpInAckSegs;
12747c478bd9Sstevel@tonic-gate 	/* total # of bytes acked */
12757c478bd9Sstevel@tonic-gate 	Counter tcpInAckBytes;
12767c478bd9Sstevel@tonic-gate 	/* total # of duplicate acks */
12777c478bd9Sstevel@tonic-gate 	Counter tcpInDupAck;
12787c478bd9Sstevel@tonic-gate 	/* total # of acks acking unsent data */
12797c478bd9Sstevel@tonic-gate 	Counter tcpInAckUnsent;
12807c478bd9Sstevel@tonic-gate 	/* total # of data segments received in order */
12817c478bd9Sstevel@tonic-gate 	Counter tcpInDataInorderSegs;
12827c478bd9Sstevel@tonic-gate 	/* total # of data bytes received in order */
12837c478bd9Sstevel@tonic-gate 	Counter tcpInDataInorderBytes;
12847c478bd9Sstevel@tonic-gate 	/* total # of data segments received out of order */
12857c478bd9Sstevel@tonic-gate 	Counter tcpInDataUnorderSegs;
12867c478bd9Sstevel@tonic-gate 	/* total # of data bytes received out of order */
12877c478bd9Sstevel@tonic-gate 	Counter tcpInDataUnorderBytes;
12887c478bd9Sstevel@tonic-gate 	/* total # of complete duplicate data segments received */
12897c478bd9Sstevel@tonic-gate 	Counter tcpInDataDupSegs;
12907c478bd9Sstevel@tonic-gate 	/* total # of bytes in the complete duplicate data segments received */
12917c478bd9Sstevel@tonic-gate 	Counter tcpInDataDupBytes;
12927c478bd9Sstevel@tonic-gate 	/* total # of partial duplicate data segments received */
12937c478bd9Sstevel@tonic-gate 	Counter tcpInDataPartDupSegs;
12947c478bd9Sstevel@tonic-gate 	/* total # of bytes in the partial duplicate data segments received */
12957c478bd9Sstevel@tonic-gate 	Counter tcpInDataPartDupBytes;
12967c478bd9Sstevel@tonic-gate 	/* total # of data segments received past the window */
12977c478bd9Sstevel@tonic-gate 	Counter tcpInDataPastWinSegs;
12987c478bd9Sstevel@tonic-gate 	/* total # of data bytes received part the window */
12997c478bd9Sstevel@tonic-gate 	Counter tcpInDataPastWinBytes;
13007c478bd9Sstevel@tonic-gate 	/* total # of zero window probes received */
13017c478bd9Sstevel@tonic-gate 	Counter tcpInWinProbe;
13027c478bd9Sstevel@tonic-gate 	/* total # of window updates received */
13037c478bd9Sstevel@tonic-gate 	Counter tcpInWinUpdate;
13047c478bd9Sstevel@tonic-gate 	/* total # of data segments received after the connection has closed */
13057c478bd9Sstevel@tonic-gate 	Counter tcpInClosed;
13067c478bd9Sstevel@tonic-gate /* Others */
13077c478bd9Sstevel@tonic-gate 	/* total # of failed attempts to update the rtt estimate */
13087c478bd9Sstevel@tonic-gate 	Counter tcpRttNoUpdate;
13097c478bd9Sstevel@tonic-gate 	/* total # of successful attempts to update the rtt estimate */
13107c478bd9Sstevel@tonic-gate 	Counter tcpRttUpdate;
13117c478bd9Sstevel@tonic-gate 	/* total # of retransmit timeouts */
13127c478bd9Sstevel@tonic-gate 	Counter tcpTimRetrans;
13137c478bd9Sstevel@tonic-gate 	/* total # of retransmit timeouts dropping the connection */
13147c478bd9Sstevel@tonic-gate 	Counter tcpTimRetransDrop;
13157c478bd9Sstevel@tonic-gate 	/* total # of keepalive timeouts */
13167c478bd9Sstevel@tonic-gate 	Counter tcpTimKeepalive;
13177c478bd9Sstevel@tonic-gate 	/* total # of keepalive timeouts sending a probe */
13187c478bd9Sstevel@tonic-gate 	Counter tcpTimKeepaliveProbe;
13197c478bd9Sstevel@tonic-gate 	/* total # of keepalive timeouts dropping the connection */
13207c478bd9Sstevel@tonic-gate 	Counter tcpTimKeepaliveDrop;
13217c478bd9Sstevel@tonic-gate 	/* total # of connections refused due to backlog full on listen */
13227c478bd9Sstevel@tonic-gate 	Counter tcpListenDrop;
13237c478bd9Sstevel@tonic-gate 	/* total # of connections refused due to half-open queue (q0) full */
13247c478bd9Sstevel@tonic-gate 	Counter tcpListenDropQ0;
13257c478bd9Sstevel@tonic-gate 	/* total # of connections dropped from a full half-open queue (q0) */
13267c478bd9Sstevel@tonic-gate 	Counter tcpHalfOpenDrop;
13277c478bd9Sstevel@tonic-gate 	/* total # of retransmitted segments by SACK retransmission */
13287c478bd9Sstevel@tonic-gate 	Counter	tcpOutSackRetransSegs;
13297c478bd9Sstevel@tonic-gate 
13307c478bd9Sstevel@tonic-gate 	int	tcp6ConnTableSize;	/* Size of tcp6ConnEntry_t */
13313173664eSapersson 
13323173664eSapersson 	/*
13333173664eSapersson 	 * fields from RFC 4022
13343173664eSapersson 	 */
13353173664eSapersson 
13363173664eSapersson 	/* total # of segments recv'd				{ tcp 17 } */
13373173664eSapersson 	Counter64	tcpHCInSegs;
13383173664eSapersson 	/* total # of segments sent				{ tcp 18 } */
13393173664eSapersson 	Counter64	tcpHCOutSegs;
13407c478bd9Sstevel@tonic-gate } mib2_tcp_t;
13416f773e29SBaban Kenkre #define	MIB_FIRST_NEW_ELM_mib2_tcp_t	tcpHCInSegs
13427c478bd9Sstevel@tonic-gate 
13433173664eSapersson #if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4
13443173664eSapersson #pragma pack()
13453173664eSapersson #endif
13463173664eSapersson 
13477c478bd9Sstevel@tonic-gate /*
13487c478bd9Sstevel@tonic-gate  * The TCP/IPv4 connection table {tcp 13} contains information about this
13497c478bd9Sstevel@tonic-gate  * entity's existing TCP connections over IPv4.
13507c478bd9Sstevel@tonic-gate  */
13517c478bd9Sstevel@tonic-gate /* For tcpConnState and tcp6ConnState */
13527c478bd9Sstevel@tonic-gate #define	MIB2_TCP_closed		1
13537c478bd9Sstevel@tonic-gate #define	MIB2_TCP_listen		2
13547c478bd9Sstevel@tonic-gate #define	MIB2_TCP_synSent	3
13557c478bd9Sstevel@tonic-gate #define	MIB2_TCP_synReceived	4
13567c478bd9Sstevel@tonic-gate #define	MIB2_TCP_established	5
13577c478bd9Sstevel@tonic-gate #define	MIB2_TCP_finWait1	6
13587c478bd9Sstevel@tonic-gate #define	MIB2_TCP_finWait2	7
13597c478bd9Sstevel@tonic-gate #define	MIB2_TCP_closeWait	8
13607c478bd9Sstevel@tonic-gate #define	MIB2_TCP_lastAck	9
13617c478bd9Sstevel@tonic-gate #define	MIB2_TCP_closing	10
13627c478bd9Sstevel@tonic-gate #define	MIB2_TCP_timeWait	11
13637c478bd9Sstevel@tonic-gate #define	MIB2_TCP_deleteTCB	12		/* only writeable value */
13647c478bd9Sstevel@tonic-gate 
13653173664eSapersson /* Pack data to make struct size the same for 32- and 64-bits */
13663173664eSapersson #if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4
13673173664eSapersson #pragma pack(4)
13683173664eSapersson #endif
1369*cebe54d9SAlexander Pyhalov 
1370*cebe54d9SAlexander Pyhalov typedef struct tcpConnEntryInfo_s {
1371*cebe54d9SAlexander Pyhalov 	Counter64	ce_in_data_inorder_bytes;
1372*cebe54d9SAlexander Pyhalov 	Counter64	ce_in_data_inorder_segs;
1373*cebe54d9SAlexander Pyhalov 	Counter64	ce_in_data_unorder_bytes;
1374*cebe54d9SAlexander Pyhalov 	Counter64	ce_in_data_unorder_segs;
1375*cebe54d9SAlexander Pyhalov 	Counter64	ce_in_zwnd_probes;
1376*cebe54d9SAlexander Pyhalov 
1377*cebe54d9SAlexander Pyhalov 	Counter64	ce_out_data_bytes;
1378*cebe54d9SAlexander Pyhalov 	Counter64	ce_out_data_segs;
1379*cebe54d9SAlexander Pyhalov 	Counter64	ce_out_retrans_bytes;
1380*cebe54d9SAlexander Pyhalov 	Counter64	ce_out_retrans_segs;
1381*cebe54d9SAlexander Pyhalov 	Counter64	ce_out_zwnd_probes;
1382*cebe54d9SAlexander Pyhalov 	Counter64	ce_rtt_sum;
1383*cebe54d9SAlexander Pyhalov 
1384*cebe54d9SAlexander Pyhalov 			/* seq # of next segment to send */
1385*cebe54d9SAlexander Pyhalov 	Gauge		ce_snxt;
1386*cebe54d9SAlexander Pyhalov 			/* seq # of of last segment unacknowledged */
1387*cebe54d9SAlexander Pyhalov 	Gauge		ce_suna;
1388*cebe54d9SAlexander Pyhalov 			/* current send window size */
1389*cebe54d9SAlexander Pyhalov 	Gauge		ce_swnd;
1390*cebe54d9SAlexander Pyhalov 			/* current congestion window size */
1391*cebe54d9SAlexander Pyhalov 	Gauge		ce_cwnd;
1392*cebe54d9SAlexander Pyhalov 			/* seq # of next expected segment */
1393*cebe54d9SAlexander Pyhalov 	Gauge		ce_rnxt;
1394*cebe54d9SAlexander Pyhalov 			/* seq # of last ack'd segment */
1395*cebe54d9SAlexander Pyhalov 	Gauge		ce_rack;
1396*cebe54d9SAlexander Pyhalov 			/* # of unsent bytes in the xmit queue */
1397*cebe54d9SAlexander Pyhalov 	Gauge		ce_unsent;
1398*cebe54d9SAlexander Pyhalov 			/* current receive window size */
1399*cebe54d9SAlexander Pyhalov 	Gauge		ce_rwnd;
1400*cebe54d9SAlexander Pyhalov 			/* round-trip time smoothed average (us) */
1401*cebe54d9SAlexander Pyhalov 	Gauge		ce_rtt_sa;
1402*cebe54d9SAlexander Pyhalov 			/* current rto (retransmit timeout) */
1403*cebe54d9SAlexander Pyhalov 	Gauge		ce_rto;
1404*cebe54d9SAlexander Pyhalov 			/* round-trip time count */
1405*cebe54d9SAlexander Pyhalov 	Gauge		ce_rtt_cnt;
1406*cebe54d9SAlexander Pyhalov 			/* current max segment size */
1407*cebe54d9SAlexander Pyhalov 	Gauge		ce_mss;
1408*cebe54d9SAlexander Pyhalov 			/* actual internal state */
1409*cebe54d9SAlexander Pyhalov 	int		ce_state;
1410*cebe54d9SAlexander Pyhalov } tcpConnEntryInfo_t;
1411*cebe54d9SAlexander Pyhalov 
14127c478bd9Sstevel@tonic-gate typedef struct mib2_tcpConnEntry {
14137c478bd9Sstevel@tonic-gate 		/* state of tcp connection		{ tcpConnEntry 1} RW */
14147c478bd9Sstevel@tonic-gate 	int		tcpConnState;
14157c478bd9Sstevel@tonic-gate 		/* local ip addr for this connection	{ tcpConnEntry 2 } */
14167c478bd9Sstevel@tonic-gate 	IpAddress	tcpConnLocalAddress;
14177c478bd9Sstevel@tonic-gate 		/* local port for this connection	{ tcpConnEntry 3 } */
14187c478bd9Sstevel@tonic-gate 	int		tcpConnLocalPort;	/* In host byte order */
14197c478bd9Sstevel@tonic-gate 		/* remote ip addr for this connection	{ tcpConnEntry 4 } */
14207c478bd9Sstevel@tonic-gate 	IpAddress	tcpConnRemAddress;
14217c478bd9Sstevel@tonic-gate 		/* remote port for this connection	{ tcpConnEntry 5 } */
14227c478bd9Sstevel@tonic-gate 	int		tcpConnRemPort;		/* In host byte order */
1423*cebe54d9SAlexander Pyhalov 	tcpConnEntryInfo_t tcpConnEntryInfo;
14243173664eSapersson 
14253173664eSapersson 	/* pid of the processes that created this connection */
14263173664eSapersson 	uint32_t	tcpConnCreationProcess;
14273173664eSapersson 	/* system uptime when the connection was created */
14283173664eSapersson 	uint64_t	tcpConnCreationTime;
14297c478bd9Sstevel@tonic-gate } mib2_tcpConnEntry_t;
14306f773e29SBaban Kenkre #define	MIB_FIRST_NEW_ELM_mib2_tcpConnEntry_t	tcpConnCreationProcess
14316f773e29SBaban Kenkre 
14323173664eSapersson #if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4
14333173664eSapersson #pragma pack()
14343173664eSapersson #endif
14357c478bd9Sstevel@tonic-gate 
14367c478bd9Sstevel@tonic-gate 
14377c478bd9Sstevel@tonic-gate /*
14387c478bd9Sstevel@tonic-gate  * The TCP/IPv6 connection table {tcp 14} contains information about this
14397c478bd9Sstevel@tonic-gate  * entity's existing TCP connections over IPv6.
14407c478bd9Sstevel@tonic-gate  */
14417c478bd9Sstevel@tonic-gate 
14423173664eSapersson /* Pack data to make struct size the same for 32- and 64-bits */
14433173664eSapersson #if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4
14443173664eSapersson #pragma pack(4)
14453173664eSapersson #endif
14467c478bd9Sstevel@tonic-gate typedef struct mib2_tcp6ConnEntry {
14477c478bd9Sstevel@tonic-gate 	/* local ip addr for this connection	{ ipv6TcpConnEntry 1 } */
14487c478bd9Sstevel@tonic-gate 	Ip6Address	tcp6ConnLocalAddress;
14497c478bd9Sstevel@tonic-gate 	/* local port for this connection	{ ipv6TcpConnEntry 2 } */
14507c478bd9Sstevel@tonic-gate 	int		tcp6ConnLocalPort;
14517c478bd9Sstevel@tonic-gate 	/* remote ip addr for this connection	{ ipv6TcpConnEntry 3 } */
14527c478bd9Sstevel@tonic-gate 	Ip6Address	tcp6ConnRemAddress;
14537c478bd9Sstevel@tonic-gate 	/* remote port for this connection	{ ipv6TcpConnEntry 4 } */
14547c478bd9Sstevel@tonic-gate 	int		tcp6ConnRemPort;
14557c478bd9Sstevel@tonic-gate 	/* interface index or zero		{ ipv6TcpConnEntry 5 } */
14567c478bd9Sstevel@tonic-gate 	DeviceIndex	tcp6ConnIfIndex;
14577c478bd9Sstevel@tonic-gate 	/* state of tcp6 connection		{ ipv6TcpConnEntry 6 } RW */
14587c478bd9Sstevel@tonic-gate 	int		tcp6ConnState;
1459*cebe54d9SAlexander Pyhalov 	tcpConnEntryInfo_t tcp6ConnEntryInfo;
14603173664eSapersson 
14613173664eSapersson 	/* pid of the processes that created this connection */
14623173664eSapersson 	uint32_t	tcp6ConnCreationProcess;
14633173664eSapersson 	/* system uptime when the connection was created */
14643173664eSapersson 	uint64_t	tcp6ConnCreationTime;
14657c478bd9Sstevel@tonic-gate } mib2_tcp6ConnEntry_t;
14666f773e29SBaban Kenkre #define	MIB_FIRST_NEW_ELM_mib2_tcp6ConnEntry_t	tcp6ConnCreationProcess
14676f773e29SBaban Kenkre 
14683173664eSapersson #if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4
14693173664eSapersson #pragma pack()
14703173664eSapersson #endif
14717c478bd9Sstevel@tonic-gate 
14727c478bd9Sstevel@tonic-gate /*
14737c478bd9Sstevel@tonic-gate  * the UDP group
14747c478bd9Sstevel@tonic-gate  */
14757c478bd9Sstevel@tonic-gate #define	MIB2_UDP_ENTRY	5	/* udpEntry */
14767c478bd9Sstevel@tonic-gate #define	MIB2_UDP6_ENTRY	6	/* udp6Entry */
14777c478bd9Sstevel@tonic-gate 
14787c478bd9Sstevel@tonic-gate /* Old name retained for compatibility */
14797c478bd9Sstevel@tonic-gate #define	MIB2_UDP_5	MIB2_UDP_ENTRY
14807c478bd9Sstevel@tonic-gate 
14813173664eSapersson /* Pack data to make struct size the same for 32- and 64-bits */
14823173664eSapersson #if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4
14833173664eSapersson #pragma pack(4)
14843173664eSapersson #endif
14857c478bd9Sstevel@tonic-gate typedef struct mib2_udp {
14867c478bd9Sstevel@tonic-gate 		/* total # of UDP datagrams sent upstream	{ udp 1 } */
14877c478bd9Sstevel@tonic-gate 	Counter	udpInDatagrams;
14887c478bd9Sstevel@tonic-gate 	/* in ip				{ udp 2 } */
14897c478bd9Sstevel@tonic-gate 		/* # of recv'd dg's not deliverable (other)	{ udp 3 }  */
14907c478bd9Sstevel@tonic-gate 	Counter	udpInErrors;
14917c478bd9Sstevel@tonic-gate 		/* total # of dg's sent				{ udp 4 } */
14927c478bd9Sstevel@tonic-gate 	Counter	udpOutDatagrams;
14937c478bd9Sstevel@tonic-gate 		/* { udp 5 } */
14947c478bd9Sstevel@tonic-gate 	int	udpEntrySize;			/* Size of udpEntry_t */
14957c478bd9Sstevel@tonic-gate 	int	udp6EntrySize;			/* Size of udp6Entry_t */
14967c478bd9Sstevel@tonic-gate 	Counter	udpOutErrors;
14973173664eSapersson 
14983173664eSapersson 	/*
14993173664eSapersson 	 * fields from RFC 4113
15003173664eSapersson 	 */
15013173664eSapersson 
15023173664eSapersson 	/* total # of UDP datagrams sent upstream		{ udp 8 } */
15033173664eSapersson 	Counter64	udpHCInDatagrams;
15043173664eSapersson 	/* total # of dg's sent					{ udp 9 } */
15053173664eSapersson 	Counter64	udpHCOutDatagrams;
15067c478bd9Sstevel@tonic-gate } mib2_udp_t;
15076f773e29SBaban Kenkre #define	MIB_FIRST_NEW_ELM_mib2_udp_t	udpHCInDatagrams
15086f773e29SBaban Kenkre 
15093173664eSapersson #if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4
15103173664eSapersson #pragma pack()
15113173664eSapersson #endif
15127c478bd9Sstevel@tonic-gate 
15137c478bd9Sstevel@tonic-gate /*
15147c478bd9Sstevel@tonic-gate  * The UDP listener table contains information about this entity's UDP
15157c478bd9Sstevel@tonic-gate  * end-points on which a local application is currently accepting datagrams.
15167c478bd9Sstevel@tonic-gate  */
15177c478bd9Sstevel@tonic-gate 
15187c478bd9Sstevel@tonic-gate /* For both IPv4 and IPv6 ue_state: */
15197c478bd9Sstevel@tonic-gate #define	MIB2_UDP_unbound	1
15207c478bd9Sstevel@tonic-gate #define	MIB2_UDP_idle		2
15217c478bd9Sstevel@tonic-gate #define	MIB2_UDP_connected	3
15227c478bd9Sstevel@tonic-gate #define	MIB2_UDP_unknown	4
15237c478bd9Sstevel@tonic-gate 
15243173664eSapersson /* Pack data to make struct size the same for 32- and 64-bits */
15253173664eSapersson #if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4
15263173664eSapersson #pragma pack(4)
15273173664eSapersson #endif
15287c478bd9Sstevel@tonic-gate typedef struct mib2_udpEntry {
15297c478bd9Sstevel@tonic-gate 		/* local ip addr of listener		{ udpEntry 1 } */
15307c478bd9Sstevel@tonic-gate 	IpAddress	udpLocalAddress;
15317c478bd9Sstevel@tonic-gate 		/* local port of listener		{ udpEntry 2 } */
15327c478bd9Sstevel@tonic-gate 	int		udpLocalPort;		/* In host byte order */
15337c478bd9Sstevel@tonic-gate 	struct udpEntryInfo_s {
15347c478bd9Sstevel@tonic-gate 		int		ue_state;
15357c478bd9Sstevel@tonic-gate 		IpAddress	ue_RemoteAddress;
15367c478bd9Sstevel@tonic-gate 		int		ue_RemotePort;	/* In host byte order */
15377c478bd9Sstevel@tonic-gate 	}		udpEntryInfo;
15383173664eSapersson 
15393173664eSapersson 	/*
15403173664eSapersson 	 * RFC 4113
15413173664eSapersson 	 */
15423173664eSapersson 
15433173664eSapersson 	/* Unique id for this 4-tuple		{ udpEndpointEntry 7 } */
15443173664eSapersson 	uint32_t	udpInstance;
15453173664eSapersson 	/* pid of the processes that created this endpoint */
15463173664eSapersson 	uint32_t	udpCreationProcess;
15473173664eSapersson 	/* system uptime when the endpoint was created */
15483173664eSapersson 	uint64_t	udpCreationTime;
15497c478bd9Sstevel@tonic-gate } mib2_udpEntry_t;
15506f773e29SBaban Kenkre #define	MIB_FIRST_NEW_ELM_mib2_udpEntry_t	udpInstance
15516f773e29SBaban Kenkre 
15523173664eSapersson #if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4
15533173664eSapersson #pragma pack()
15543173664eSapersson #endif
15557c478bd9Sstevel@tonic-gate 
15567c478bd9Sstevel@tonic-gate /*
15577c478bd9Sstevel@tonic-gate  * The UDP (for IPv6) listener table contains information about this
15587c478bd9Sstevel@tonic-gate  * entity's UDP end-points on which a local application is
15597c478bd9Sstevel@tonic-gate  * currently accepting datagrams.
15607c478bd9Sstevel@tonic-gate  */
15617c478bd9Sstevel@tonic-gate 
15623173664eSapersson /* Pack data to make struct size the same for 32- and 64-bits */
15633173664eSapersson #if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4
15643173664eSapersson #pragma pack(4)
15653173664eSapersson #endif
15667c478bd9Sstevel@tonic-gate typedef	struct mib2_udp6Entry {
15677c478bd9Sstevel@tonic-gate 		/* local ip addr of listener		{ ipv6UdpEntry 1 } */
15687c478bd9Sstevel@tonic-gate 	Ip6Address	udp6LocalAddress;
15697c478bd9Sstevel@tonic-gate 		/* local port of listener		{ ipv6UdpEntry 2 } */
15707c478bd9Sstevel@tonic-gate 	int		udp6LocalPort;		/* In host byte order */
157178a2e113SAndy Fiddaman 		/* interface index or zero		{ ipv6UdpEntry 3 } */
15727c478bd9Sstevel@tonic-gate 	DeviceIndex	udp6IfIndex;
15737c478bd9Sstevel@tonic-gate 	struct udp6EntryInfo_s {
15747c478bd9Sstevel@tonic-gate 		int	ue_state;
15757c478bd9Sstevel@tonic-gate 		Ip6Address	ue_RemoteAddress;
15767c478bd9Sstevel@tonic-gate 		int		ue_RemotePort;	/* In host byte order */
15777c478bd9Sstevel@tonic-gate 	}		udp6EntryInfo;
15783173664eSapersson 
15793173664eSapersson 	/*
15803173664eSapersson 	 * RFC 4113
15813173664eSapersson 	 */
15823173664eSapersson 
15833173664eSapersson 	/* Unique id for this 4-tuple		{ udpEndpointEntry 7 } */
15843173664eSapersson 	uint32_t	udp6Instance;
15853173664eSapersson 	/* pid of the processes that created this endpoint */
15863173664eSapersson 	uint32_t	udp6CreationProcess;
15873173664eSapersson 	/* system uptime when the endpoint was created */
15883173664eSapersson 	uint64_t	udp6CreationTime;
15897c478bd9Sstevel@tonic-gate } mib2_udp6Entry_t;
15906f773e29SBaban Kenkre #define	MIB_FIRST_NEW_ELM_mib2_udp6Entry_t	udp6Instance
15916f773e29SBaban Kenkre 
15923173664eSapersson #if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4
15933173664eSapersson #pragma pack()
15943173664eSapersson #endif
15957c478bd9Sstevel@tonic-gate 
15967c478bd9Sstevel@tonic-gate /*
15977c478bd9Sstevel@tonic-gate  * the RAWIP group
15987c478bd9Sstevel@tonic-gate  */
15997c478bd9Sstevel@tonic-gate typedef struct mib2_rawip {
16007c478bd9Sstevel@tonic-gate 		/* total # of RAWIP datagrams sent upstream */
16017c478bd9Sstevel@tonic-gate 	Counter	rawipInDatagrams;
16027c478bd9Sstevel@tonic-gate 		/* # of RAWIP packets with bad IPV6_CHECKSUM checksums */
16037c478bd9Sstevel@tonic-gate 	Counter rawipInCksumErrs;
16047c478bd9Sstevel@tonic-gate 		/* # of recv'd dg's not deliverable (other) */
16057c478bd9Sstevel@tonic-gate 	Counter	rawipInErrors;
16067c478bd9Sstevel@tonic-gate 		/* total # of dg's sent */
16077c478bd9Sstevel@tonic-gate 	Counter	rawipOutDatagrams;
16087c478bd9Sstevel@tonic-gate 		/* total # of dg's not sent (e.g. no memory) */
16097c478bd9Sstevel@tonic-gate 	Counter	rawipOutErrors;
16107c478bd9Sstevel@tonic-gate } mib2_rawip_t;
16117c478bd9Sstevel@tonic-gate 
16127c478bd9Sstevel@tonic-gate /* DVMRP group */
16137c478bd9Sstevel@tonic-gate #define	EXPER_DVMRP_VIF		1
16147c478bd9Sstevel@tonic-gate #define	EXPER_DVMRP_MRT		2
16157c478bd9Sstevel@tonic-gate 
16167c478bd9Sstevel@tonic-gate 
16177c478bd9Sstevel@tonic-gate /*
16187c478bd9Sstevel@tonic-gate  * The SCTP group
16197c478bd9Sstevel@tonic-gate  */
16207c478bd9Sstevel@tonic-gate #define	MIB2_SCTP_CONN			15
16217c478bd9Sstevel@tonic-gate #define	MIB2_SCTP_CONN_LOCAL		16
16227c478bd9Sstevel@tonic-gate #define	MIB2_SCTP_CONN_REMOTE		17
16237c478bd9Sstevel@tonic-gate 
16247c478bd9Sstevel@tonic-gate #define	MIB2_SCTP_closed		1
16257c478bd9Sstevel@tonic-gate #define	MIB2_SCTP_cookieWait		2
16267c478bd9Sstevel@tonic-gate #define	MIB2_SCTP_cookieEchoed		3
16277c478bd9Sstevel@tonic-gate #define	MIB2_SCTP_established		4
16287c478bd9Sstevel@tonic-gate #define	MIB2_SCTP_shutdownPending	5
16297c478bd9Sstevel@tonic-gate #define	MIB2_SCTP_shutdownSent		6
16307c478bd9Sstevel@tonic-gate #define	MIB2_SCTP_shutdownReceived	7
16317c478bd9Sstevel@tonic-gate #define	MIB2_SCTP_shutdownAckSent	8
16327c478bd9Sstevel@tonic-gate #define	MIB2_SCTP_deleteTCB		9
16337c478bd9Sstevel@tonic-gate #define	MIB2_SCTP_listen		10	/* Not in the MIB */
16347c478bd9Sstevel@tonic-gate 
16357c478bd9Sstevel@tonic-gate #define	MIB2_SCTP_ACTIVE		1
16367c478bd9Sstevel@tonic-gate #define	MIB2_SCTP_INACTIVE		2
16377c478bd9Sstevel@tonic-gate 
16387c478bd9Sstevel@tonic-gate #define	MIB2_SCTP_ADDR_V4		1
16397c478bd9Sstevel@tonic-gate #define	MIB2_SCTP_ADDR_V6		2
16407c478bd9Sstevel@tonic-gate 
16417c478bd9Sstevel@tonic-gate #define	MIB2_SCTP_RTOALGO_OTHER		1
16427c478bd9Sstevel@tonic-gate #define	MIB2_SCTP_RTOALGO_VANJ		2
16437c478bd9Sstevel@tonic-gate 
16447c478bd9Sstevel@tonic-gate typedef struct mib2_sctpConnEntry {
16457c478bd9Sstevel@tonic-gate 		/* connection identifier	{ sctpAssocEntry 1 } */
16467c478bd9Sstevel@tonic-gate 	uint32_t	sctpAssocId;
16477c478bd9Sstevel@tonic-gate 		/* remote hostname (not used)	{ sctpAssocEntry 2 } */
16487c478bd9Sstevel@tonic-gate 	Octet_t		sctpAssocRemHostName;
16497c478bd9Sstevel@tonic-gate 		/* local port number		{ sctpAssocEntry 3 } */
16507c478bd9Sstevel@tonic-gate 	uint32_t	sctpAssocLocalPort;
16517c478bd9Sstevel@tonic-gate 		/* remote port number		{ sctpAssocEntry 4 } */
16527c478bd9Sstevel@tonic-gate 	uint32_t	sctpAssocRemPort;
16537c478bd9Sstevel@tonic-gate 		/* type of primary remote addr	{ sctpAssocEntry 5 } */
16547c478bd9Sstevel@tonic-gate 	int		sctpAssocRemPrimAddrType;
16557c478bd9Sstevel@tonic-gate 		/* primary remote address	{ sctpAssocEntry 6 } */
16567c478bd9Sstevel@tonic-gate 	Ip6Address	sctpAssocRemPrimAddr;
16577c478bd9Sstevel@tonic-gate 		/* local address */
16587c478bd9Sstevel@tonic-gate 	Ip6Address	sctpAssocLocPrimAddr;
16597c478bd9Sstevel@tonic-gate 		/* current heartbeat interval	{ sctpAssocEntry 7 } */
16607c478bd9Sstevel@tonic-gate 	uint32_t	sctpAssocHeartBeatInterval;
16617c478bd9Sstevel@tonic-gate 		/* state of this association	{ sctpAssocEntry 8 } */
16627c478bd9Sstevel@tonic-gate 	int		sctpAssocState;
16637c478bd9Sstevel@tonic-gate 		/* # of inbound streams		{ sctpAssocEntry 9 } */
16647c478bd9Sstevel@tonic-gate 	uint32_t	sctpAssocInStreams;
16657c478bd9Sstevel@tonic-gate 		/* # of outbound streams	{ sctpAssocEntry 10 } */
16667c478bd9Sstevel@tonic-gate 	uint32_t	sctpAssocOutStreams;
16677c478bd9Sstevel@tonic-gate 		/* max # of data retans		{ sctpAssocEntry 11 } */
16687c478bd9Sstevel@tonic-gate 	uint32_t	sctpAssocMaxRetr;
16697c478bd9Sstevel@tonic-gate 		/* sysId for assoc owner	{ sctpAssocEntry 12 } */
16707c478bd9Sstevel@tonic-gate 	uint32_t	sctpAssocPrimProcess;
16717c478bd9Sstevel@tonic-gate 		/* # of rxmit timeouts during hanshake */
16727c478bd9Sstevel@tonic-gate 	Counter32	sctpAssocT1expired;	/* { sctpAssocEntry 13 } */
16737c478bd9Sstevel@tonic-gate 		/* # of rxmit timeouts during shutdown */
16747c478bd9Sstevel@tonic-gate 	Counter32	sctpAssocT2expired;	/* { sctpAssocEntry 14 } */
16757c478bd9Sstevel@tonic-gate 		/* # of rxmit timeouts during data transfer */
16767c478bd9Sstevel@tonic-gate 	Counter32	sctpAssocRtxChunks;	/* { sctpAssocEntry 15 } */
16777c478bd9Sstevel@tonic-gate 		/* assoc start-up time		{ sctpAssocEntry 16 } */
16787c478bd9Sstevel@tonic-gate 	uint32_t	sctpAssocStartTime;
16797c478bd9Sstevel@tonic-gate 	struct sctpConnEntryInfo_s {
16807c478bd9Sstevel@tonic-gate 				/* amount of data in send Q */
16817c478bd9Sstevel@tonic-gate 		Gauge		ce_sendq;
16827c478bd9Sstevel@tonic-gate 				/* amount of data in recv Q */
16837c478bd9Sstevel@tonic-gate 		Gauge		ce_recvq;
16847c478bd9Sstevel@tonic-gate 				/* currect send window size */
16857c478bd9Sstevel@tonic-gate 		Gauge		ce_swnd;
16867c478bd9Sstevel@tonic-gate 				/* currenct receive window size */
16877c478bd9Sstevel@tonic-gate 		Gauge		ce_rwnd;
16887c478bd9Sstevel@tonic-gate 				/* current max segment size */
16897c478bd9Sstevel@tonic-gate 		Gauge		ce_mss;
16907c478bd9Sstevel@tonic-gate 	} sctpConnEntryInfo;
16917c478bd9Sstevel@tonic-gate } mib2_sctpConnEntry_t;
16927c478bd9Sstevel@tonic-gate 
16937c478bd9Sstevel@tonic-gate typedef struct mib2_sctpConnLocalAddrEntry {
16947c478bd9Sstevel@tonic-gate 		/* connection identifier */
16957c478bd9Sstevel@tonic-gate 	uint32_t	sctpAssocId;
16967c478bd9Sstevel@tonic-gate 		/* type of local addr		{ sctpAssocLocalEntry 1 } */
16977c478bd9Sstevel@tonic-gate 	int		sctpAssocLocalAddrType;
16987c478bd9Sstevel@tonic-gate 		/* local address		{ sctpAssocLocalEntry 2 } */
16997c478bd9Sstevel@tonic-gate 	Ip6Address	sctpAssocLocalAddr;
17007c478bd9Sstevel@tonic-gate } mib2_sctpConnLocalEntry_t;
17017c478bd9Sstevel@tonic-gate 
17027c478bd9Sstevel@tonic-gate typedef struct mib2_sctpConnRemoteAddrEntry {
17037c478bd9Sstevel@tonic-gate 		/* connection identier */
17047c478bd9Sstevel@tonic-gate 	uint32_t	sctpAssocId;
17057c478bd9Sstevel@tonic-gate 		/* remote addr type		{ sctpAssocRemEntry 1 } */
17067c478bd9Sstevel@tonic-gate 	int		sctpAssocRemAddrType;
17077c478bd9Sstevel@tonic-gate 		/* remote address		{ sctpAssocRemEntry 2 } */
17087c478bd9Sstevel@tonic-gate 	Ip6Address	sctpAssocRemAddr;
17097c478bd9Sstevel@tonic-gate 		/* is the address active	{ sctpAssocRemEntry 3 } */
17107c478bd9Sstevel@tonic-gate 	int		sctpAssocRemAddrActive;
17117c478bd9Sstevel@tonic-gate 		/* whether hearbeat is active	{ sctpAssocRemEntry 4 } */
17127c478bd9Sstevel@tonic-gate 	int		sctpAssocRemAddrHBActive;
17137c478bd9Sstevel@tonic-gate 		/* current RTO			{ sctpAssocRemEntry 5 } */
17147c478bd9Sstevel@tonic-gate 	uint32_t	sctpAssocRemAddrRTO;
17157c478bd9Sstevel@tonic-gate 		/* max # of rexmits before becoming inactive */
17167c478bd9Sstevel@tonic-gate 	uint32_t	sctpAssocRemAddrMaxPathRtx; /* {sctpAssocRemEntry 6} */
17177c478bd9Sstevel@tonic-gate 		/* # of rexmits to this dest	{ sctpAssocRemEntry 7 } */
17187c478bd9Sstevel@tonic-gate 	uint32_t	sctpAssocRemAddrRtx;
17197c478bd9Sstevel@tonic-gate } mib2_sctpConnRemoteEntry_t;
17207c478bd9Sstevel@tonic-gate 
17217c478bd9Sstevel@tonic-gate 
17227c478bd9Sstevel@tonic-gate 
17237c478bd9Sstevel@tonic-gate /* Pack data in mib2_sctp to make struct size the same for 32- and 64-bits */
17247c478bd9Sstevel@tonic-gate #if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4
17257c478bd9Sstevel@tonic-gate #pragma pack(4)
17267c478bd9Sstevel@tonic-gate #endif
17277c478bd9Sstevel@tonic-gate 
17287c478bd9Sstevel@tonic-gate typedef struct mib2_sctp {
17297c478bd9Sstevel@tonic-gate 		/* algorithm used to determine rto	{ sctpParams 1 } */
17307c478bd9Sstevel@tonic-gate 	int		sctpRtoAlgorithm;
17317c478bd9Sstevel@tonic-gate 		/* min RTO in msecs			{ sctpParams 2 } */
17327c478bd9Sstevel@tonic-gate 	uint32_t	sctpRtoMin;
17337c478bd9Sstevel@tonic-gate 		/* max RTO in msecs			{ sctpParams 3 } */
17347c478bd9Sstevel@tonic-gate 	uint32_t	sctpRtoMax;
17357c478bd9Sstevel@tonic-gate 		/* initial RTO in msecs			{ sctpParams 4 } */
17367c478bd9Sstevel@tonic-gate 	uint32_t	sctpRtoInitial;
17377c478bd9Sstevel@tonic-gate 		/* max # of assocs			{ sctpParams 5 } */
17387c478bd9Sstevel@tonic-gate 	int32_t		sctpMaxAssocs;
17397c478bd9Sstevel@tonic-gate 		/* cookie lifetime in msecs		{ sctpParams 6 } */
17407c478bd9Sstevel@tonic-gate 	uint32_t	sctpValCookieLife;
17417c478bd9Sstevel@tonic-gate 		/* max # of retrans in startup		{ sctpParams 7 } */
17427c478bd9Sstevel@tonic-gate 	uint32_t	sctpMaxInitRetr;
17437c478bd9Sstevel@tonic-gate 	/* # of conns ESTABLISHED, SHUTDOWN-RECEIVED or SHUTDOWN-PENDING */
17447c478bd9Sstevel@tonic-gate 	Counter32	sctpCurrEstab;		/* { sctpStats 1 } */
17457c478bd9Sstevel@tonic-gate 		/* # of active opens			{ sctpStats 2 } */
17467c478bd9Sstevel@tonic-gate 	Counter32	sctpActiveEstab;
17477c478bd9Sstevel@tonic-gate 		/* # of passive opens			{ sctpStats 3 } */
17487c478bd9Sstevel@tonic-gate 	Counter32	sctpPassiveEstab;
17497c478bd9Sstevel@tonic-gate 		/* # of aborted conns			{ sctpStats 4 } */
17507c478bd9Sstevel@tonic-gate 	Counter32	sctpAborted;
17517c478bd9Sstevel@tonic-gate 		/* # of graceful shutdowns		{ sctpStats 5 } */
17527c478bd9Sstevel@tonic-gate 	Counter32	sctpShutdowns;
17537c478bd9Sstevel@tonic-gate 		/* # of OOB packets			{ sctpStats 6 } */
17547c478bd9Sstevel@tonic-gate 	Counter32	sctpOutOfBlue;
17557c478bd9Sstevel@tonic-gate 		/* # of packets discarded due to cksum	{ sctpStats 7 } */
17567c478bd9Sstevel@tonic-gate 	Counter32	sctpChecksumError;
17577c478bd9Sstevel@tonic-gate 		/* # of control chunks sent		{ sctpStats 8 } */
17587c478bd9Sstevel@tonic-gate 	Counter64	sctpOutCtrlChunks;
17597c478bd9Sstevel@tonic-gate 		/* # of ordered data chunks sent	{ sctpStats 9 } */
17607c478bd9Sstevel@tonic-gate 	Counter64	sctpOutOrderChunks;
17617c478bd9Sstevel@tonic-gate 		/* # of unordered data chunks sent	{ sctpStats 10 } */
17627c478bd9Sstevel@tonic-gate 	Counter64	sctpOutUnorderChunks;
17637c478bd9Sstevel@tonic-gate 		/* # of retransmitted data chunks */
17647c478bd9Sstevel@tonic-gate 	Counter64	sctpRetransChunks;
17657c478bd9Sstevel@tonic-gate 		/* # of SACK chunks sent */
17667c478bd9Sstevel@tonic-gate 	Counter		sctpOutAck;
17677c478bd9Sstevel@tonic-gate 		/* # of delayed ACK timeouts */
17687c478bd9Sstevel@tonic-gate 	Counter		sctpOutAckDelayed;
17697c478bd9Sstevel@tonic-gate 		/* # of SACK chunks sent to update window */
17707c478bd9Sstevel@tonic-gate 	Counter		sctpOutWinUpdate;
17717c478bd9Sstevel@tonic-gate 		/* # of fast retransmits */
17727c478bd9Sstevel@tonic-gate 	Counter		sctpOutFastRetrans;
17737c478bd9Sstevel@tonic-gate 		/* # of window probes sent */
17747c478bd9Sstevel@tonic-gate 	Counter		sctpOutWinProbe;
17757c478bd9Sstevel@tonic-gate 		/* # of control chunks received		{ sctpStats 11 } */
17767c478bd9Sstevel@tonic-gate 	Counter64	sctpInCtrlChunks;
17777c478bd9Sstevel@tonic-gate 		/* # of ordered data chunks rcvd	{ sctpStats 12 } */
17787c478bd9Sstevel@tonic-gate 	Counter64	sctpInOrderChunks;
17797c478bd9Sstevel@tonic-gate 		/* # of unord data chunks rcvd		{ sctpStats 13 } */
17807c478bd9Sstevel@tonic-gate 	Counter64	sctpInUnorderChunks;
17817c478bd9Sstevel@tonic-gate 		/* # of received SACK chunks */
17827c478bd9Sstevel@tonic-gate 	Counter		sctpInAck;
17837c478bd9Sstevel@tonic-gate 		/* # of received SACK chunks with duplicate TSN */
17847c478bd9Sstevel@tonic-gate 	Counter		sctpInDupAck;
17857c478bd9Sstevel@tonic-gate 		/* # of SACK chunks acking unsent data */
178678a2e113SAndy Fiddaman 	Counter		sctpInAckUnsent;
17877c478bd9Sstevel@tonic-gate 		/* # of Fragmented User Messages	{ sctpStats 14 } */
17887c478bd9Sstevel@tonic-gate 	Counter64	sctpFragUsrMsgs;
17897c478bd9Sstevel@tonic-gate 		/* # of Reassembled User Messages	{ sctpStats 15 } */
17907c478bd9Sstevel@tonic-gate 	Counter64	sctpReasmUsrMsgs;
17917c478bd9Sstevel@tonic-gate 		/* # of Sent SCTP Packets		{ sctpStats 16 } */
17927c478bd9Sstevel@tonic-gate 	Counter64	sctpOutSCTPPkts;
17937c478bd9Sstevel@tonic-gate 		/* # of Received SCTP Packets		{ sctpStats 17 } */
17947c478bd9Sstevel@tonic-gate 	Counter64	sctpInSCTPPkts;
17957c478bd9Sstevel@tonic-gate 		/* # of invalid cookies received */
17967c478bd9Sstevel@tonic-gate 	Counter		sctpInInvalidCookie;
17977c478bd9Sstevel@tonic-gate 		/* total # of retransmit timeouts */
17987c478bd9Sstevel@tonic-gate 	Counter		sctpTimRetrans;
17997c478bd9Sstevel@tonic-gate 		/* total # of retransmit timeouts dropping the connection */
18007c478bd9Sstevel@tonic-gate 	Counter		sctpTimRetransDrop;
18017c478bd9Sstevel@tonic-gate 		/* total # of heartbeat probes */
18027c478bd9Sstevel@tonic-gate 	Counter		sctpTimHeartBeatProbe;
18037c478bd9Sstevel@tonic-gate 		/* total # of heartbeat timeouts dropping the connection */
18047c478bd9Sstevel@tonic-gate 	Counter		sctpTimHeartBeatDrop;
18057c478bd9Sstevel@tonic-gate 		/* total # of conns refused due to backlog full on listen */
18067c478bd9Sstevel@tonic-gate 	Counter		sctpListenDrop;
18077c478bd9Sstevel@tonic-gate 		/* total # of pkts received after the association has closed */
18087c478bd9Sstevel@tonic-gate 	Counter		sctpInClosed;
18097c478bd9Sstevel@tonic-gate 	int		sctpEntrySize;
18107c478bd9Sstevel@tonic-gate 	int		sctpLocalEntrySize;
18117c478bd9Sstevel@tonic-gate 	int		sctpRemoteEntrySize;
18127c478bd9Sstevel@tonic-gate } mib2_sctp_t;
18137c478bd9Sstevel@tonic-gate 
18147c478bd9Sstevel@tonic-gate #if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4
18157c478bd9Sstevel@tonic-gate #pragma pack()
18167c478bd9Sstevel@tonic-gate #endif
18177c478bd9Sstevel@tonic-gate 
18187c478bd9Sstevel@tonic-gate 
18197c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
18207c478bd9Sstevel@tonic-gate }
18217c478bd9Sstevel@tonic-gate #endif
18227c478bd9Sstevel@tonic-gate 
18237c478bd9Sstevel@tonic-gate #endif	/* _INET_MIB2_H */
1824