mib2.h revision 5f9878b0212a5bc5924a85d227160bf7f43712f1
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1990 Mentat Inc. */
#ifndef _INET_MIB2_H
#define _INET_MIB2_H
#ifdef __cplusplus
extern "C" {
#endif
/*
* The IPv6 parts of this are derived from:
* RFC 2465
* RFC 2466
* RFC 2452
* RFC 2454
*/
/*
* for [gs]etsockopt() calls. get uses T_CURRENT, set uses T_NEOGTIATE
* MGMT_flags value. The following definition of opthdr is taken from
* socket.h:
*
* An option specification consists of an opthdr, followed by the value of
* the option. An options buffer contains one or more options. The len
* field of opthdr specifies the length of the option value in bytes. This
* length must be a multiple of sizeof(long) (use OPTLEN macro).
*
* struct opthdr {
* long level; protocol level affected
* long name; option to modify
* long len; length of option value
* };
*
* #define OPTLEN(x) ((((x) + sizeof(long) - 1) / sizeof(long)) * sizeof(long))
* #define OPTVAL(opt) ((char *)(opt + 1))
*
* For get requests (T_CURRENT), any MIB2_xxx value can be used (only
* "get all" is supported, so all modules get a copy of the request to
* return everything it knows. In general, we use MIB2_IP. There is
* one exception: in general, IP will not report information related to
* IRE_MARK_TESTHIDDEN routes (e.g., in the MIB2_IP_ROUTE table).
* However, using the special value EXPER_IP_AND_TESTHIDDEN will cause
* all information to be reported. This special value should only be
* used by IPMP-aware low-level utilities (e.g. in.mpathd).
*
* IMPORTANT: some fields are grouped in a different structure than
* suggested by MIB-II, e.g., checksum error counts. The original MIB-2
* field name has been retained. Field names beginning with "mi" are not
* defined in the MIB but contain important & useful information maintained
* by the corresponding module.
*/
#ifndef IPPROTO_MAX
#define IPPROTO_MAX 256
#endif
/*
* Define range of levels for use with MIB2_*
*/
/*
* Define range of levels for experimental use
*/
#define BUMP_MIB(s, x) { \
extern void __dtrace_probe___mib_##x(int, void *); \
void *stataddr = &((s)->x); \
(s)->x++; \
}
#define UPDATE_MIB(s, x, y) { \
extern void __dtrace_probe___mib_##x(int, void *); \
void *stataddr = &((s)->x); \
__dtrace_probe___mib_##x(y, stataddr); \
(s)->x += (y); \
}
#define SET_MIB(x, y) x = y
#define BUMP_LOCAL(x) (x)++
#define UPDATE_LOCAL(x, y) (x) += (y)
typedef struct Octet_s {
int o_length;
char o_bytes[OCTET_LENGTH];
} Octet_t;
typedef struct in6_addr Ip6Address;
typedef Octet_t DeviceName;
typedef Octet_t PhysAddress;
#define MIB2_UNKNOWN_INTERFACE 0
#define MIB2_UNKNOWN_PROCESS 0
/*
* IP group
*/
#define EXPER_IP_GROUP_MEMBERSHIP 100
#define EXPER_IP6_GROUP_MEMBERSHIP 101
#define EXPER_IP_GROUP_SOURCES 102
#define EXPER_IP6_GROUP_SOURCES 103
#define EXPER_IP_RTATTR 104
/*
* There can be one of each of these tables per transport (MIB2_* above).
*/
/* Old names retained for compatibility */
#define MIB2_IP_20 MIB2_IP_ADDR
#define MIB2_IP_21 MIB2_IP_ROUTE
#define MIB2_IP_22 MIB2_IP_MEDIA
typedef struct mib2_ip {
/* forwarder? 1 gateway, 2 NOT gateway {ip 1} RW */
int ipForwarding;
/* default Time-to-Live for iph {ip 2} RW */
int ipDefaultTTL;
/* # of input datagrams {ip 3} */
/* # of dg discards for iph error {ip 4} */
/* # of dg discards for bad addr {ip 5} */
/* # of dg being forwarded {ip 6} */
/* # of dg discards for unk protocol {ip 7} */
/* # of dg discards of good dg's {ip 8} */
/* # of dg sent upstream {ip 9} */
/* # of outdgs recv'd from upstream {ip 10} */
/* # of good outdgs discarded {ip 11} */
/* # of outdg discards: no route found {ip 12} */
/* sec's recv'd frags held for reass. {ip 13} */
int ipReasmTimeout;
/* # of ip frags needing reassembly {ip 14} */
/* # of dg's reassembled {ip 15} */
/* # of reassembly failures (not dg cnt){ip 16} */
/* # of dg's fragged {ip 17} */
/* # of dg discards for no frag set {ip 18} */
/* # of dg frags from fragmentation {ip 19} */
/* {ip 20} */
int ipAddrEntrySize;
/* {ip 21} */
int ipRouteEntrySize;
/* {ip 22} */
/* # of valid route entries discarded {ip 23} */
/*
* following defined in MIB-II as part of TCP & UDP groups:
*/
/* total # of segments recv'd with error { tcp 14 } */
/* # of recv'd dg's not deliverable (no appl.) { udp 2 } */
/*
* In addition to MIB-II
*/
/* # of bad IP header checksums */
/* # of complete duplicates in reassembly */
/* # of partial duplicates in reassembly */
/* # of packets not forwarded due to adminstrative reasons */
/* # of UDP packets with bad UDP checksums */
/* # of UDP packets droped due to queue overflow */
/*
* # of RAW IP packets (all IP protocols except UDP, TCP
* and ICMP) droped due to queue overflow
*/
/*
* Folowing are private IPSEC MIB.
*/
/* # of incoming packets that succeeded policy checks */
/* # of incoming packets that failed policy checks */
/* Compatible extensions added here */
int ipMemberEntrySize; /* Size of ip_member_t */
int ipGroupSourceEntrySize; /* Size of ip_grpsrc_t */
/* # of IPv6 packets received by IPv4 and dropped */
/* # of IPv6 packets transmitted by ip_wput */
/* # of times ip_wput has switched to become ip_wput_v6 */
int ipRouteAttributeSize; /* Size of mib2_ipAttributeEntry_t */
int transportMLPSize; /* Size of mib2_transportMLPEntry_t */
} mib2_ip_t;
/*
* ipv6IfStatsEntry OBJECT-TYPE
* SYNTAX Ipv6IfStatsEntry
* MAX-ACCESS not-accessible
* STATUS current
* DESCRIPTION
* "An interface statistics entry containing objects
* at a particular IPv6 interface."
* AUGMENTS { ipv6IfEntry }
* ::= { ipv6IfStatsTable 1 }
*
* Per-interface IPv6 statistics table
*/
typedef struct mib2_ipv6IfStatsEntry {
/* Local ifindex to identify the interface */
/* forwarder? 1 gateway, 2 NOT gateway {ipv6MIBObjects 1} RW */
int ipv6Forwarding;
/* default Hoplimit for IPv6 {ipv6MIBObjects 2} RW */
int ipv6DefaultHopLimit;
int ipv6IfStatsEntrySize;
int ipv6AddrEntrySize;
int ipv6RouteEntrySize;
int ipv6MemberEntrySize; /* Size of ipv6_member_t */
int ipv6GroupSourceEntrySize; /* Size of ipv6_grpsrc_t */
/* # input datagrams (incl errors) { ipv6IfStatsEntry 1 } */
/* # errors in IPv6 headers and options { ipv6IfStatsEntry 2 } */
/* # exceeds outgoing link MTU { ipv6IfStatsEntry 3 } */
/* # discarded due to no route to dest { ipv6IfStatsEntry 4 } */
/* # invalid or unsupported addresses { ipv6IfStatsEntry 5 } */
/* # unknown next header { ipv6IfStatsEntry 6 } */
/* # too short packets { ipv6IfStatsEntry 7 } */
/* # discarded e.g. due to no buffers { ipv6IfStatsEntry 8 } */
/* # delivered to upper layer protocols { ipv6IfStatsEntry 9 } */
/* # forwarded out interface { ipv6IfStatsEntry 10 } */
/* # originated out interface { ipv6IfStatsEntry 11 } */
/* # discarded e.g. due to no buffers { ipv6IfStatsEntry 12 } */
/* # sucessfully fragmented packets { ipv6IfStatsEntry 13 } */
/* # fragmentation failed { ipv6IfStatsEntry 14 } */
/* # fragments created { ipv6IfStatsEntry 15 } */
/* # fragments to reassemble { ipv6IfStatsEntry 16 } */
/* # packets after reassembly { ipv6IfStatsEntry 17 } */
/* # reassembly failed { ipv6IfStatsEntry 18 } */
/* # received multicast packets { ipv6IfStatsEntry 19 } */
/* # transmitted multicast packets { ipv6IfStatsEntry 20 } */
/*
* In addition to defined MIBs
*/
/* # discarded due to no route to dest */
/* # of complete duplicates in reassembly */
/* # of partial duplicates in reassembly */
/* # of packets not forwarded due to adminstrative reasons */
/* # of UDP packets with bad UDP checksums */
/* # of UDP packets droped due to queue overflow */
/*
* # of RAW IPv6 packets (all IPv6 protocols except UDP, TCP
* and ICMPv6) droped due to queue overflow
*/
/* # of IPv4 packets received by IPv6 and dropped */
/* # of IPv4 packets transmitted by ip_wput_wput */
/* # of times ip_wput_v6 has switched to become ip_wput */
/*
* Per interface IP statistics, both v4 and v6.
*
* Some applications expect to get mib2_ipv6IfStatsEntry_t structs back when
* making a request. To ensure backwards compatability, the first
* sizeof(mib2_ipv6IfStatsEntry_t) bytes of the structure is identical to
* mib2_ipv6IfStatsEntry_t. This should work as long the application is
* written correctly (i.e., using ipv6IfStatsEntrySize to get the size of
* the struct)
*
* RFC4293 introduces several new counters, as well as defining 64-bit
* versions of existing counters. For a new counters, if they have both 32-
* and 64-bit versions, then we only added the latter. However, for already
* existing counters, we have added the 64-bit versions without removing the
* old (32-bit) ones. The 64- and 32-bit counters will only be synchronized
* when the structure contains IPv6 statistics, which is done to ensure
* backwards compatibility.
*/
/* The following are defined in RFC 4001 and are used for ipIfStatsIPVersion */
#define MIB2_INETADDRESSTYPE_unknown 0
#define MIB2_INETADDRESSTYPE_ipv4 1
#define MIB2_INETADDRESSTYPE_ipv6 2
/*
* On amd64, the alignment requirements for long long's is different for
* 32 and 64 bits. If we have a struct containing long long's that is being
* passed between a 64-bit kernel to a 32-bit application, then it is very
* likely that the size of the struct will differ due to padding. Therefore, we
* pack the data to ensure that the struct size is the same for 32- and
* 64-bits.
*/
#pragma pack(4)
#endif
typedef struct mib2_ipIfStatsEntry {
/* Local ifindex to identify the interface */
/* forwarder? 1 gateway, 2 NOT gateway { ipv6MIBObjects 1} RW */
int ipIfStatsForwarding;
/* default Hoplimit for IPv6 { ipv6MIBObjects 2} RW */
int ipIfStatsEntrySize;
/* # input datagrams (incl errors) { ipIfStatsEntry 3 } */
/* # errors in IP headers and options { ipIfStatsEntry 7 } */
/* # exceeds outgoing link MTU(v6 only) { ipv6IfStatsEntry 3 } */
/* # discarded due to no route to dest { ipIfStatsEntry 8 } */
/* # invalid or unsupported addresses { ipIfStatsEntry 9 } */
/* # unknown next header { ipIfStatsEntry 10 } */
/* # too short packets { ipIfStatsEntry 11 } */
/* # discarded e.g. due to no buffers { ipIfStatsEntry 17 } */
/* # delivered to upper layer protocols { ipIfStatsEntry 18 } */
/* # forwarded out interface { ipIfStatsEntry 23 } */
/* # originated out interface { ipIfStatsEntry 20 } */
/* # discarded e.g. due to no buffers { ipIfStatsEntry 25 } */
/* # sucessfully fragmented packets { ipIfStatsEntry 27 } */
/* # fragmentation failed { ipIfStatsEntry 28 } */
/* # fragments created { ipIfStatsEntry 29 } */
/* # fragments to reassemble { ipIfStatsEntry 14 } */
/* # packets after reassembly { ipIfStatsEntry 15 } */
/* # reassembly failed { ipIfStatsEntry 16 } */
/* # received multicast packets { ipIfStatsEntry 34 } */
/* # transmitted multicast packets { ipIfStatsEntry 38 } */
/*
* In addition to defined MIBs
*/
/* # discarded due to no route to dest { ipSystemStatsEntry 22 } */
/* # of complete duplicates in reassembly */
/* # of partial duplicates in reassembly */
/* # of packets not forwarded due to adminstrative reasons */
/* # of UDP packets with bad UDP checksums */
#define udpIfStatsInCksumErrs udpInCksumErrs
/* # of UDP packets droped due to queue overflow */
#define udpIfStatsInOverflows udpInOverflows
/*
* # of RAW IP packets (all IP protocols except UDP, TCP
* and ICMP) droped due to queue overflow
*/
/*
* # of IP packets received with the wrong version (i.e., not equal
* to ipIfStatsIPVersion) and that were dropped.
*/
/*
* Depending on the value of ipIfStatsIPVersion, this counter tracks
* v4: # of IPv6 packets transmitted by ip_wput or,
* v6: # of IPv4 packets transmitted by ip_wput_v6.
*/
/*
* Depending on the value of ipIfStatsIPVersion, this counter tracks
* # of times ip_wput has switched to become ip_wput_v6, or vice versa.
*/
/*
* Fields defined in RFC 4293
*/
/* ip version { ipIfStatsEntry 1 } */
int ipIfStatsIPVersion;
/* # input datagrams (incl errors) { ipIfStatsEntry 4 } */
/* # input octets (incl errors) { ipIfStatsEntry 6 } */
/*
* { ipIfStatsEntry 13 }
* # input datagrams for which a forwarding attempt was made
*/
/* # delivered to upper layer protocols { ipIfStatsEntry 19 } */
/* # originated out interface { ipIfStatsEntry 21 } */
/* # forwarded out interface { ipIfStatsEntry 23 } */
/* # dg's requiring fragmentation { ipIfStatsEntry 26 } */
/* # output datagrams { ipIfStatsEntry 31 } */
/* # output octets { ipIfStatsEntry 33 } */
/* # received multicast datagrams { ipIfStatsEntry 35 } */
/* # received multicast octets { ipIfStatsEntry 37 } */
/* # transmitted multicast datagrams { ipIfStatsEntry 39 } */
/* # transmitted multicast octets { ipIfStatsEntry 41 } */
/* # received broadcast datagrams { ipIfStatsEntry 43 } */
/* # transmitted broadcast datagrams { ipIfStatsEntry 45 } */
/*
* Fields defined in mib2_ip_t
*/
/* # of incoming packets that succeeded policy checks */
/* # of incoming packets that failed policy checks */
#define ipsecIfStatsInFailed ipsecInFailed
/* # of bad IP header checksums */
#define ipIfStatsInCksumErrs ipInCksumErrs
/* total # of segments recv'd with error { tcp 14 } */
#define tcpIfStatsInErrs tcpInErrs
/* # of recv'd dg's not deliverable (no appl.) { udp 2 } */
#define udpIfStatsNoPorts udpNoPorts
#pragma pack()
#endif
/*
* The IP address table contains this entity's IP addressing information.
*
* ipAddrTable OBJECT-TYPE
* SYNTAX SEQUENCE OF IpAddrEntry
* ACCESS not-accessible
* STATUS mandatory
* DESCRIPTION
* "The table of addressing information relevant to
* this entity's IP addresses."
* ::= { ip 20 }
*/
typedef struct mib2_ipAddrEntry {
/* IP address of this entry {ipAddrEntry 1} */
/* Unique interface index {ipAddrEntry 2} */
/* Subnet mask for this IP addr {ipAddrEntry 3} */
/* 2^lsb of IP broadcast addr {ipAddrEntry 4} */
int ipAdEntBcastAddr;
/* max size for dg reassembly {ipAddrEntry 5} */
int ipAdEntReasmMaxSize;
/* additional ipif_t fields */
struct ipAdEntInfo_s {
/* BSD if metric */
int ae_metric;
/* ipif broadcast addr. relation to above?? */
/* point-point dest addr */
int ae_subnet_len; /* Subnet prefix length */
} ipAdEntInfo;
/*
* ipv6AddrTable OBJECT-TYPE
* SYNTAX SEQUENCE OF Ipv6AddrEntry
* MAX-ACCESS not-accessible
* STATUS current
* DESCRIPTION
* "The table of addressing information relevant to
* this node's interface addresses."
* ::= { ipv6MIBObjects 8 }
*/
typedef struct mib2_ipv6AddrEntry {
/* Unique interface index { Part of INDEX } */
/* IPv6 address of this entry { ipv6AddrEntry 1 } */
/* Prefix length { ipv6AddrEntry 2 } */
/* Type: stateless(1), stateful(2), unknown(3) { ipv6AddrEntry 3 } */
/* Anycast: true(1), false(2) { ipv6AddrEntry 4 } */
/*
* Address status: preferred(1), deprecated(2), invalid(3),
* inaccessible(4), unknown(5) { ipv6AddrEntry 5 }
*/
struct ipv6AddrInfo_s {
/* BSD if metric */
int ae_metric;
/* point-point dest addr */
int ae_subnet_len; /* Subnet prefix length */
} ipv6AddrInfo;
/*
* The IP routing table contains an entry for each route presently known to
* this entity. (for IPv4 routes)
*
* ipRouteTable OBJECT-TYPE
* SYNTAX SEQUENCE OF IpRouteEntry
* ACCESS not-accessible
* STATUS mandatory
* DESCRIPTION
* "This entity's IP Routing table."
* ::= { ip 21 }
*/
typedef struct mib2_ipRouteEntry {
/* dest ip addr for this route {ipRouteEntry 1 } RW */
/* unique interface index for this hop {ipRouteEntry 2 } RW */
/* primary route metric {ipRouteEntry 3 } RW */
int ipRouteMetric1;
/* alternate route metric {ipRouteEntry 4 } RW */
int ipRouteMetric2;
/* alternate route metric {ipRouteEntry 5 } RW */
int ipRouteMetric3;
/* alternate route metric {ipRouteEntry 6 } RW */
int ipRouteMetric4;
/* ip addr of next hop on this route {ipRouteEntry 7 } RW */
/* other(1), inval(2), dir(3), indir(4) {ipRouteEntry 8 } RW */
int ipRouteType;
/* mechanism by which route was learned {ipRouteEntry 9 } */
int ipRouteProto;
/* sec's since last update of route {ipRouteEntry 10} RW */
int ipRouteAge;
/* {ipRouteEntry 11} RW */
/* alternate route metric {ipRouteEntry 12} RW */
int ipRouteMetric5;
/* additional info from ire's {ipRouteEntry 13 } */
struct ipRouteInfo_s {
int re_frag_flag;
int re_ire_type;
int re_flags;
} ipRouteInfo;
/*
* The IPv6 routing table contains an entry for each route presently known to
* this entity.
*
* ipv6RouteTable OBJECT-TYPE
* SYNTAX SEQUENCE OF IpRouteEntry
* ACCESS not-accessible
* STATUS current
* DESCRIPTION
* "IPv6 Routing table. This table contains
* an entry for each valid IPv6 unicast route
* that can be used for packet forwarding
* determination."
* ::= { ipv6MIBObjects 11 }
*/
typedef struct mib2_ipv6RouteEntry {
/* dest ip addr for this route { ipv6RouteEntry 1 } */
/* prefix length { ipv6RouteEntry 2 } */
int ipv6RoutePfxLength;
/* unique route index { ipv6RouteEntry 3 } */
unsigned ipv6RouteIndex;
/* unique interface index for this hop { ipv6RouteEntry 4 } */
/* IPv6 addr of next hop on this route { ipv6RouteEntry 5 } */
/* other(1), discard(2), local(3), remote(4) */
/* { ipv6RouteEntry 6 } */
int ipv6RouteType;
/* mechanism by which route was learned { ipv6RouteEntry 7 } */
/*
* other(1), local(2), netmgmt(3), ndisc(4), rip(5), ospf(6),
* bgp(7), idrp(8), igrp(9)
*/
int ipv6RouteProtocol;
/* policy hook or traffic class { ipv6RouteEntry 8 } */
unsigned ipv6RoutePolicy;
/* sec's since last update of route { ipv6RouteEntry 9} */
int ipv6RouteAge;
/* Routing domain ID of the next hop { ipv6RouteEntry 10 } */
unsigned ipv6RouteNextHopRDI;
/* route metric { ipv6RouteEntry 11 } */
unsigned ipv6RouteMetric;
/* preference (impl specific) { ipv6RouteEntry 12 } */
unsigned ipv6RouteWeight;
/* additional info from ire's { } */
struct ipv6RouteInfo_s {
int re_frag_flag;
int re_ire_type;
int re_flags;
/*
* The IPv4 and IPv6 routing table entries on a trusted system also have
* security attributes in the form of label ranges. This experimental
* interface provides information about these labels.
*
* Each entry in this table contains a label range and an index that refers
* back to the entry in the routing table to which it applies. There may be 0,
* 1, or many label ranges for each routing table entry.
*
* (opthdr.level is set to MIB2_IP for IPv4 entries and MIB2_IP6 for IPv6.
* opthdr.name is set to EXPER_IP_GWATTR.)
*
* ipRouteAttributeTable OBJECT-TYPE
* SYNTAX SEQUENCE OF IpAttributeEntry
* ACCESS not-accessible
* STATUS current
* DESCRIPTION
* "IPv4 routing attributes table. This table contains
* an entry for each valid trusted label attached to a
* route in the system."
* ::= { ip 102 }
*
* ipv6RouteAttributeTable OBJECT-TYPE
* SYNTAX SEQUENCE OF IpAttributeEntry
* ACCESS not-accessible
* STATUS current
* DESCRIPTION
* "IPv6 routing attributes table. This table contains
* an entry for each valid trusted label attached to a
* route in the system."
* ::= { ip6 102 }
*/
typedef struct mib2_ipAttributeEntry {
int iae_doi;
/*
* The IP address translation table contain the IpAddress to
* `physical' address equivalences. Some interfaces do not
* use translation tables for determining address
* equivalences (e.g., DDN-X.25 has an algorithmic method);
* if all interfaces are of this type, then the Address
* Translation table is empty, i.e., has zero entries.
*
* ipNetToMediaTable OBJECT-TYPE
* SYNTAX SEQUENCE OF IpNetToMediaEntry
* ACCESS not-accessible
* STATUS mandatory
* DESCRIPTION
* "The IP Address Translation table used for mapping
* from IP addresses to physical addresses."
* ::= { ip 22 }
*/
typedef struct mib2_ipNetToMediaEntry {
/* Unique interface index { ipNetToMediaEntry 1 } RW */
/* Media dependent physical addr { ipNetToMediaEntry 2 } RW */
/* ip addr for this physical addr { ipNetToMediaEntry 3 } RW */
/* other(1), inval(2), dyn(3), stat(4) { ipNetToMediaEntry 4 } RW */
int ipNetToMediaType;
struct ipNetToMediaInfo_s {
/*
* ipv6NetToMediaTable OBJECT-TYPE
* SYNTAX SEQUENCE OF Ipv6NetToMediaEntry
* MAX-ACCESS not-accessible
* STATUS current
* DESCRIPTION
* "The IPv6 Address Translation table used for
* mapping from IPv6 addresses to physical addresses.
*
* The IPv6 address translation table contain the
* Ipv6Address to `physical' address equivalencies.
* Some interfaces do not use translation tables
* for determining address equivalencies; if all
* interfaces are of this type, then the Address
* Translation table is empty, i.e., has zero
* entries."
* ::= { ipv6MIBObjects 12 }
*/
typedef struct mib2_ipv6NetToMediaEntry {
/* Unique interface index { Part of INDEX } */
/* ip addr for this physical addr { ipv6NetToMediaEntry 1 } */
/* Media dependent physical addr { ipv6NetToMediaEntry 2 } */
/*
* Type of mapping
* other(1), dynamic(2), static(3), local(4)
* { ipv6NetToMediaEntry 3 }
*/
int ipv6NetToMediaType;
/*
* NUD state
* reachable(1), stale(2), delay(3), probe(4), invalid(5), unknown(6)
* Note: The kernel returns ND_* states.
* { ipv6NetToMediaEntry 4 }
*/
int ipv6NetToMediaState;
/* sysUpTime last time entry was updated { ipv6NetToMediaEntry 5 } */
/*
* List of group members per interface
*/
typedef struct ip_member {
/* Interface index */
/* IP Multicast address */
/* Number of member sockets */
/* Filter mode: 1 => include, 2 => exclude */
} ip_member_t;
/*
* List of IPv6 group members per interface
*/
typedef struct ipv6_member {
/* Interface index */
/* IP Multicast address */
/* Number of member sockets */
/* Filter mode: 1 => include, 2 => exclude */
/*
* This is used to mark transport layer entities (e.g., TCP connections) that
* are capable of receiving packets from a range of labels. 'level' is set to
* the protocol of interest (e.g., MIB2_TCP), and 'name' is set to
* EXPER_XPORT_MLP. The tme_connidx refers back to the entry in MIB2_TCP_CONN,
* MIB2_TCP6_CONN, or MIB2_SCTP_CONN.
*
* It is also used to report connections that receive packets at a single label
* that's other than the zone's label. This is the case when a TCP connection
* is accepted from a particular peer using an MLP listener.
*/
typedef struct mib2_transportMLPEntry {
int tme_doi;
/*
* List of IPv4 source addresses being filtered per interface
*/
typedef struct ip_grpsrc {
/* Interface index */
/* IP Multicast address */
/* IP Source address */
} ip_grpsrc_t;
/*
* List of IPv6 source addresses being filtered per interface
*/
typedef struct ipv6_grpsrc {
/* Interface index */
/* IP Multicast address */
/* IP Source address */
/*
* ICMP Group
*/
typedef struct mib2_icmp {
/* total # of recv'd ICMP msgs { icmp 1 } */
/* recv'd ICMP msgs with errors { icmp 2 } */
/* recv'd "dest unreachable" msg's { icmp 3 } */
/* recv'd "time exceeded" msg's { icmp 4 } */
/* recv'd "parameter problem" msg's { icmp 5 } */
/* recv'd "source quench" msg's { icmp 6 } */
/* recv'd "ICMP redirect" msg's { icmp 7 } */
/* recv'd "echo request" msg's { icmp 8 } */
/* recv'd "echo reply" msg's { icmp 9 } */
/* recv'd "timestamp" msg's { icmp 10 } */
/* recv'd "timestamp reply" msg's { icmp 11 } */
/* recv'd "address mask request" msg's { icmp 12 } */
/* recv'd "address mask reply" msg's { icmp 13 } */
/* total # of sent ICMP msg's { icmp 14 } */
/* # of msg's not sent for internal icmp errors { icmp 15 } */
/* # of "dest unreachable" msg's sent { icmp 16 } */
/* # of "time exceeded" msg's sent { icmp 17 } */
/* # of "parameter problme" msg's sent { icmp 18 } */
/* # of "source quench" msg's sent { icmp 19 } */
/* # of "ICMP redirect" msg's sent { icmp 20 } */
/* # of "Echo request" msg's sent { icmp 21 } */
/* # of "Echo reply" msg's sent { icmp 22 } */
/* # of "timestamp request" msg's sent { icmp 23 } */
/* # of "timestamp reply" msg's sent { icmp 24 } */
/* # of "address mask request" msg's sent { icmp 25 } */
/* # of "address mask reply" msg's sent { icmp 26 } */
/*
* In addition to MIB-II
*/
/* # of received packets with checksum errors */
/* # of received packets with unknow codes */
/* # of received unreachables with "fragmentation needed" */
/* # of sent unreachables with "fragmentation needed" */
/*
* or an ICMP error packet
*/
/* # of ICMP packets droped due to queue overflow */
/* recv'd "ICMP redirect" msg's that are bad thus ignored */
} mib2_icmp_t;
/*
* ipv6IfIcmpEntry OBJECT-TYPE
* SYNTAX Ipv6IfIcmpEntry
* MAX-ACCESS not-accessible
* STATUS current
* DESCRIPTION
* "An ICMPv6 statistics entry containing
* objects at a particular IPv6 interface.
*
* Note that a receiving interface is
* the interface to which a given ICMPv6 message
* is addressed which may not be necessarily
* the input interface for the message.
*
* Similarly, the sending interface is
* the interface that sources a given
* ICMP message which is usually but not
* necessarily the output interface for the message."
* AUGMENTS { ipv6IfEntry }
* ::= { ipv6IfIcmpTable 1 }
*
* Per-interface ICMPv6 statistics table
*/
typedef struct mib2_ipv6IfIcmpEntry {
/* Local ifindex to identify the interface */
int ipv6IfIcmpEntrySize; /* Size of ipv6IfIcmpEntry */
/* The total # ICMP msgs rcvd includes ipv6IfIcmpInErrors */
/* # ICMP with ICMP-specific errors (bad checkum, length, etc) */
/* # ICMP Destination Unreachable */
/* # ICMP destination unreachable/communication admin prohibited */
/* Total # ICMP messages attempted to send (includes OutErrors) */
/* # ICMP messages not sent due to ICMP problems (e.g. no buffers) */
/* Additions beyond the MIB */
/* recv'd "ICMPv6 redirect" msg's that are bad thus ignored */
/*
* the TCP group
*
* Note that instances of object types that represent
* information about a particular TCP connection are
* transient; they persist only as long as the connection
* in question.
*/
/* Old name retained for compatibility */
#define MIB2_TCP_13 MIB2_TCP_CONN
/* Pack data in mib2_tcp to make struct size the same for 32- and 64-bits */
#pragma pack(4)
#endif
typedef struct mib2_tcp {
/* algorithm used for transmit timeout value { tcp 1 } */
int tcpRtoAlgorithm;
/* minimum retransmit timeout (ms) { tcp 2 } */
int tcpRtoMin;
/* maximum retransmit timeout (ms) { tcp 3 } */
int tcpRtoMax;
/* maximum # of connections supported { tcp 4 } */
int tcpMaxConn;
/* # of direct transitions CLOSED -> SYN-SENT { tcp 5 } */
/* # of direct transitions LISTEN -> SYN-RCVD { tcp 6 } */
/* # of direct ESTABLISHED/CLOSE-WAIT -> CLOSED { tcp 8 } */
/* # of connections ESTABLISHED or CLOSE-WAIT { tcp 9 } */
/* total # of segments recv'd { tcp 10 } */
/* total # of segments sent { tcp 11 } */
/* total # of segments retransmitted { tcp 12 } */
/* {tcp 13} */
int tcpConnTableSize; /* Size of tcpConnEntry_t */
/* in ip {tcp 14} */
/* # of segments sent with RST flag { tcp 15 } */
/* In addition to MIB-II */
/* Sender */
/* total # of data segments sent */
/* total # of bytes in data segments sent */
/* total # of bytes in segments retransmitted */
/* total # of acks sent */
/* total # of delayed acks sent */
/* total # of segments sent with the urg flag on */
/* total # of window updates sent */
/* total # of zero window probes sent */
/* total # of control segments sent (syn, fin, rst) */
/* total # of segments sent due to "fast retransmit" */
/* Receiver */
/* total # of ack segments received */
/* total # of bytes acked */
/* total # of duplicate acks */
/* total # of acks acking unsent data */
/* total # of data segments received in order */
/* total # of data bytes received in order */
/* total # of data segments received out of order */
/* total # of data bytes received out of order */
/* total # of complete duplicate data segments received */
/* total # of bytes in the complete duplicate data segments received */
/* total # of partial duplicate data segments received */
/* total # of bytes in the partial duplicate data segments received */
/* total # of data segments received past the window */
/* total # of data bytes received part the window */
/* total # of zero window probes received */
/* total # of window updates received */
/* total # of data segments received after the connection has closed */
/* Others */
/* total # of failed attempts to update the rtt estimate */
/* total # of successful attempts to update the rtt estimate */
/* total # of retransmit timeouts */
/* total # of retransmit timeouts dropping the connection */
/* total # of keepalive timeouts */
/* total # of keepalive timeouts sending a probe */
/* total # of keepalive timeouts dropping the connection */
/* total # of connections refused due to backlog full on listen */
/* total # of connections refused due to half-open queue (q0) full */
/* total # of connections dropped from a full half-open queue (q0) */
/* total # of retransmitted segments by SACK retransmission */
int tcp6ConnTableSize; /* Size of tcp6ConnEntry_t */
/*
* fields from RFC 4022
*/
/* total # of segments recv'd { tcp 17 } */
/* total # of segments sent { tcp 18 } */
} mib2_tcp_t;
#pragma pack()
#endif
/*
* entity's existing TCP connections over IPv4.
*/
/* For tcpConnState and tcp6ConnState */
#define MIB2_TCP_closed 1
#define MIB2_TCP_listen 2
#define MIB2_TCP_synSent 3
#define MIB2_TCP_synReceived 4
#define MIB2_TCP_established 5
#define MIB2_TCP_finWait1 6
#define MIB2_TCP_finWait2 7
#define MIB2_TCP_closeWait 8
#define MIB2_TCP_lastAck 9
#define MIB2_TCP_closing 10
#define MIB2_TCP_timeWait 11
/* Pack data to make struct size the same for 32- and 64-bits */
#pragma pack(4)
#endif
typedef struct mib2_tcpConnEntry {
/* state of tcp connection { tcpConnEntry 1} RW */
int tcpConnState;
/* local ip addr for this connection { tcpConnEntry 2 } */
/* local port for this connection { tcpConnEntry 3 } */
int tcpConnLocalPort; /* In host byte order */
/* remote ip addr for this connection { tcpConnEntry 4 } */
/* remote port for this connection { tcpConnEntry 5 } */
int tcpConnRemPort; /* In host byte order */
struct tcpConnEntryInfo_s {
/* seq # of next segment to send */
/* seq # of of last segment unacknowledged */
/* currect send window size */
/* seq # of next expected segment */
/* seq # of last ack'd segment */
/* currenct receive window size */
/* current rto (retransmit timeout) */
/* current max segment size */
/* actual internal state */
int ce_state;
/* pid of the processes that created this connection */
/* system uptime when the connection was created */
#pragma pack()
#endif
/*
* entity's existing TCP connections over IPv6.
*/
/* Pack data to make struct size the same for 32- and 64-bits */
#pragma pack(4)
#endif
typedef struct mib2_tcp6ConnEntry {
/* local ip addr for this connection { ipv6TcpConnEntry 1 } */
/* local port for this connection { ipv6TcpConnEntry 2 } */
int tcp6ConnLocalPort;
/* remote ip addr for this connection { ipv6TcpConnEntry 3 } */
/* remote port for this connection { ipv6TcpConnEntry 4 } */
int tcp6ConnRemPort;
/* interface index or zero { ipv6TcpConnEntry 5 } */
/* state of tcp6 connection { ipv6TcpConnEntry 6 } RW */
int tcp6ConnState;
struct tcp6ConnEntryInfo_s {
/* seq # of next segment to send */
/* seq # of of last segment unacknowledged */
/* currect send window size */
/* seq # of next expected segment */
/* seq # of last ack'd segment */
/* currenct receive window size */
/* current rto (retransmit timeout) */
/* current max segment size */
/* actual internal state */
int ce_state;
/* pid of the processes that created this connection */
/* system uptime when the connection was created */
#pragma pack()
#endif
/*
* the UDP group
*/
/* Old name retained for compatibility */
#define MIB2_UDP_5 MIB2_UDP_ENTRY
/* Pack data to make struct size the same for 32- and 64-bits */
#pragma pack(4)
#endif
typedef struct mib2_udp {
/* total # of UDP datagrams sent upstream { udp 1 } */
/* in ip { udp 2 } */
/* # of recv'd dg's not deliverable (other) { udp 3 } */
/* total # of dg's sent { udp 4 } */
/* { udp 5 } */
int udpEntrySize; /* Size of udpEntry_t */
int udp6EntrySize; /* Size of udp6Entry_t */
/*
* fields from RFC 4113
*/
/* total # of UDP datagrams sent upstream { udp 8 } */
/* total # of dg's sent { udp 9 } */
} mib2_udp_t;
#pragma pack()
#endif
/*
* The UDP listener table contains information about this entity's UDP
* end-points on which a local application is currently accepting datagrams.
*/
/* For both IPv4 and IPv6 ue_state: */
#define MIB2_UDP_unbound 1
#define MIB2_UDP_idle 2
#define MIB2_UDP_connected 3
#define MIB2_UDP_unknown 4
/* Pack data to make struct size the same for 32- and 64-bits */
#pragma pack(4)
#endif
typedef struct mib2_udpEntry {
/* local ip addr of listener { udpEntry 1 } */
/* local port of listener { udpEntry 2 } */
int udpLocalPort; /* In host byte order */
struct udpEntryInfo_s {
int ue_state;
int ue_RemotePort; /* In host byte order */
} udpEntryInfo;
/*
* RFC 4113
*/
/* Unique id for this 4-tuple { udpEndpointEntry 7 } */
/* pid of the processes that created this endpoint */
/* system uptime when the endpoint was created */
#pragma pack()
#endif
/*
* The UDP (for IPv6) listener table contains information about this
* entity's UDP end-points on which a local application is
* currently accepting datagrams.
*/
/* Pack data to make struct size the same for 32- and 64-bits */
#pragma pack(4)
#endif
typedef struct mib2_udp6Entry {
/* local ip addr of listener { ipv6UdpEntry 1 } */
/* local port of listener { ipv6UdpEntry 2 } */
int udp6LocalPort; /* In host byte order */
/* interface index or zero { ipv6UdpEntry 3 } */
struct udp6EntryInfo_s {
int ue_state;
int ue_RemotePort; /* In host byte order */
/*
* RFC 4113
*/
/* Unique id for this 4-tuple { udpEndpointEntry 7 } */
/* pid of the processes that created this endpoint */
/* system uptime when the endpoint was created */
#pragma pack()
#endif
/*
* the RAWIP group
*/
typedef struct mib2_rawip {
/* total # of RAWIP datagrams sent upstream */
/* # of RAWIP packets with bad IPV6_CHECKSUM checksums */
/* # of recv'd dg's not deliverable (other) */
/* total # of dg's sent */
/* total # of dg's not sent (e.g. no memory) */
} mib2_rawip_t;
/* DVMRP group */
#define EXPER_DVMRP_VIF 1
#define EXPER_DVMRP_MRT 2
/*
* The SCTP group
*/
#define MIB2_SCTP_CONN 15
#define MIB2_SCTP_CONN_LOCAL 16
#define MIB2_SCTP_CONN_REMOTE 17
#define MIB2_SCTP_closed 1
#define MIB2_SCTP_cookieWait 2
#define MIB2_SCTP_cookieEchoed 3
#define MIB2_SCTP_established 4
#define MIB2_SCTP_shutdownPending 5
#define MIB2_SCTP_shutdownSent 6
#define MIB2_SCTP_shutdownReceived 7
#define MIB2_SCTP_shutdownAckSent 8
#define MIB2_SCTP_deleteTCB 9
#define MIB2_SCTP_ACTIVE 1
#define MIB2_SCTP_INACTIVE 2
#define MIB2_SCTP_ADDR_V4 1
#define MIB2_SCTP_ADDR_V6 2
#define MIB2_SCTP_RTOALGO_OTHER 1
#define MIB2_SCTP_RTOALGO_VANJ 2
typedef struct mib2_sctpConnEntry {
/* connection identifier { sctpAssocEntry 1 } */
/* remote hostname (not used) { sctpAssocEntry 2 } */
/* local port number { sctpAssocEntry 3 } */
/* remote port number { sctpAssocEntry 4 } */
/* type of primary remote addr { sctpAssocEntry 5 } */
/* primary remote address { sctpAssocEntry 6 } */
/* local address */
/* current heartbeat interval { sctpAssocEntry 7 } */
/* state of this association { sctpAssocEntry 8 } */
int sctpAssocState;
/* # of inbound streams { sctpAssocEntry 9 } */
/* # of outbound streams { sctpAssocEntry 10 } */
/* max # of data retans { sctpAssocEntry 11 } */
/* sysId for assoc owner { sctpAssocEntry 12 } */
/* # of rxmit timeouts during hanshake */
/* # of rxmit timeouts during shutdown */
/* # of rxmit timeouts during data transfer */
/* assoc start-up time { sctpAssocEntry 16 } */
struct sctpConnEntryInfo_s {
/* amount of data in send Q */
/* amount of data in recv Q */
/* currect send window size */
/* currenct receive window size */
/* current max segment size */
typedef struct mib2_sctpConnLocalAddrEntry {
/* connection identifier */
/* type of local addr { sctpAssocLocalEntry 1 } */
/* local address { sctpAssocLocalEntry 2 } */
typedef struct mib2_sctpConnRemoteAddrEntry {
/* connection identier */
/* remote addr type { sctpAssocRemEntry 1 } */
int sctpAssocRemAddrType;
/* remote address { sctpAssocRemEntry 2 } */
/* is the address active { sctpAssocRemEntry 3 } */
/* whether hearbeat is active { sctpAssocRemEntry 4 } */
/* current RTO { sctpAssocRemEntry 5 } */
/* max # of rexmits before becoming inactive */
/* # of rexmits to this dest { sctpAssocRemEntry 7 } */
/* Pack data in mib2_sctp to make struct size the same for 32- and 64-bits */
#pragma pack(4)
#endif
typedef struct mib2_sctp {
/* algorithm used to determine rto { sctpParams 1 } */
int sctpRtoAlgorithm;
/* min RTO in msecs { sctpParams 2 } */
/* max RTO in msecs { sctpParams 3 } */
/* initial RTO in msecs { sctpParams 4 } */
/* max # of assocs { sctpParams 5 } */
/* cookie lifetime in msecs { sctpParams 6 } */
/* max # of retrans in startup { sctpParams 7 } */
/* # of conns ESTABLISHED, SHUTDOWN-RECEIVED or SHUTDOWN-PENDING */
/* # of active opens { sctpStats 2 } */
/* # of passive opens { sctpStats 3 } */
/* # of aborted conns { sctpStats 4 } */
/* # of graceful shutdowns { sctpStats 5 } */
/* # of OOB packets { sctpStats 6 } */
/* # of packets discarded due to cksum { sctpStats 7 } */
/* # of control chunks sent { sctpStats 8 } */
/* # of ordered data chunks sent { sctpStats 9 } */
/* # of unordered data chunks sent { sctpStats 10 } */
/* # of retransmitted data chunks */
/* # of SACK chunks sent */
/* # of delayed ACK timeouts */
/* # of SACK chunks sent to update window */
/* # of fast retransmits */
/* # of window probes sent */
/* # of control chunks received { sctpStats 11 } */
/* # of ordered data chunks rcvd { sctpStats 12 } */
/* # of unord data chunks rcvd { sctpStats 13 } */
/* # of received SACK chunks */
/* # of received SACK chunks with duplicate TSN */
/* # of SACK chunks acking unsent data */
/* # of Fragmented User Messages { sctpStats 14 } */
/* # of Reassembled User Messages { sctpStats 15 } */
/* # of Sent SCTP Packets { sctpStats 16 } */
/* # of Received SCTP Packets { sctpStats 17 } */
/* # of invalid cookies received */
/* total # of retransmit timeouts */
/* total # of retransmit timeouts dropping the connection */
/* total # of heartbeat probes */
/* total # of heartbeat timeouts dropping the connection */
/* total # of conns refused due to backlog full on listen */
/* total # of pkts received after the association has closed */
int sctpEntrySize;
int sctpLocalEntrySize;
int sctpRemoteEntrySize;
} mib2_sctp_t;
#pragma pack()
#endif
#ifdef __cplusplus
}
#endif
#endif /* _INET_MIB2_H */