Print this page
XXXX adding PID information to netstat output


  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  *
  21  * Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved.
  22  */
  23 /* Copyright (c) 1990 Mentat Inc. */
  24 
  25 #ifndef _INET_MIB2_H
  26 #define _INET_MIB2_H
  27 
  28 #include <netinet/in.h>   /* For in6_addr_t */
  29 #include <sys/tsol/label.h> /* For brange_t */
  30 #include <sys/tsol/label_macro.h> /* For brange_t */

  31 
  32 #ifdef  __cplusplus
  33 extern "C" {
  34 #endif
  35 
  36 /*
  37  * The IPv6 parts of this are derived from:
  38  *      RFC 2465
  39  *      RFC 2466
  40  *      RFC 2452
  41  *      RFC 2454
  42  */
  43 
  44 /*
  45  * SNMP set/get via M_PROTO T_OPTMGMT_REQ.  Structure is that used
  46  * for [gs]etsockopt() calls.  get uses T_CURRENT, set uses T_NEOGTIATE
  47  * MGMT_flags value.  The following definition of opthdr is taken from
  48  * socket.h:
  49  *
  50  * An option specification consists of an opthdr, followed by the value of


 168  *  IP group
 169  */
 170 #define MIB2_IP_ADDR            20      /* ipAddrEntry */
 171 #define MIB2_IP_ROUTE           21      /* ipRouteEntry */
 172 #define MIB2_IP_MEDIA           22      /* ipNetToMediaEntry */
 173 #define MIB2_IP6_ROUTE          23      /* ipv6RouteEntry */
 174 #define MIB2_IP6_MEDIA          24      /* ipv6NetToMediaEntry */
 175 #define MIB2_IP6_ADDR           25      /* ipv6AddrEntry */
 176 #define MIB2_IP_TRAFFIC_STATS   31      /* ipIfStatsEntry (IPv4) */
 177 #define EXPER_IP_GROUP_MEMBERSHIP       100
 178 #define EXPER_IP6_GROUP_MEMBERSHIP      101
 179 #define EXPER_IP_GROUP_SOURCES          102
 180 #define EXPER_IP6_GROUP_SOURCES         103
 181 #define EXPER_IP_RTATTR                 104
 182 #define EXPER_IP_DCE                    105
 183 
 184 /*
 185  * There can be one of each of these tables per transport (MIB2_* above).
 186  */
 187 #define EXPER_XPORT_MLP         105     /* transportMLPEntry */

 188 
 189 /* Old names retained for compatibility */
 190 #define MIB2_IP_20      MIB2_IP_ADDR
 191 #define MIB2_IP_21      MIB2_IP_ROUTE
 192 #define MIB2_IP_22      MIB2_IP_MEDIA
 193 
 194 typedef struct mib2_ip {
 195                 /* forwarder?  1 gateway, 2 NOT gateway {ip 1} RW */
 196         int     ipForwarding;
 197                 /* default Time-to-Live for iph         {ip 2} RW */
 198         int     ipDefaultTTL;
 199                 /* # of input datagrams                 {ip 3} */
 200         Counter ipInReceives;
 201                 /* # of dg discards for iph error       {ip 4} */
 202         Counter ipInHdrErrors;
 203                 /* # of dg discards for bad addr        {ip 5} */
 204         Counter ipInAddrErrors;
 205                 /* # of dg being forwarded              {ip 6} */
 206         Counter ipForwDatagrams;
 207                 /* # of dg discards for unk protocol    {ip 7} */




  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  *
  21  * Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved.
  22  */
  23 /* Copyright (c) 1990 Mentat Inc. */
  24 
  25 #ifndef _INET_MIB2_H
  26 #define _INET_MIB2_H
  27 
  28 #include <netinet/in.h>   /* For in6_addr_t */
  29 #include <sys/tsol/label.h> /* For brange_t */
  30 #include <sys/tsol/label_macro.h> /* For brange_t */
  31 #include <sys/pidnode.h>
  32 
  33 #ifdef  __cplusplus
  34 extern "C" {
  35 #endif
  36 
  37 /*
  38  * The IPv6 parts of this are derived from:
  39  *      RFC 2465
  40  *      RFC 2466
  41  *      RFC 2452
  42  *      RFC 2454
  43  */
  44 
  45 /*
  46  * SNMP set/get via M_PROTO T_OPTMGMT_REQ.  Structure is that used
  47  * for [gs]etsockopt() calls.  get uses T_CURRENT, set uses T_NEOGTIATE
  48  * MGMT_flags value.  The following definition of opthdr is taken from
  49  * socket.h:
  50  *
  51  * An option specification consists of an opthdr, followed by the value of


 169  *  IP group
 170  */
 171 #define MIB2_IP_ADDR            20      /* ipAddrEntry */
 172 #define MIB2_IP_ROUTE           21      /* ipRouteEntry */
 173 #define MIB2_IP_MEDIA           22      /* ipNetToMediaEntry */
 174 #define MIB2_IP6_ROUTE          23      /* ipv6RouteEntry */
 175 #define MIB2_IP6_MEDIA          24      /* ipv6NetToMediaEntry */
 176 #define MIB2_IP6_ADDR           25      /* ipv6AddrEntry */
 177 #define MIB2_IP_TRAFFIC_STATS   31      /* ipIfStatsEntry (IPv4) */
 178 #define EXPER_IP_GROUP_MEMBERSHIP       100
 179 #define EXPER_IP6_GROUP_MEMBERSHIP      101
 180 #define EXPER_IP_GROUP_SOURCES          102
 181 #define EXPER_IP6_GROUP_SOURCES         103
 182 #define EXPER_IP_RTATTR                 104
 183 #define EXPER_IP_DCE                    105
 184 
 185 /*
 186  * There can be one of each of these tables per transport (MIB2_* above).
 187  */
 188 #define EXPER_XPORT_MLP         105     /* transportMLPEntry */
 189 #define EXPER_XPORT_PROC_INFO   106     /* conn_pid_node entry */
 190 
 191 /* Old names retained for compatibility */
 192 #define MIB2_IP_20      MIB2_IP_ADDR
 193 #define MIB2_IP_21      MIB2_IP_ROUTE
 194 #define MIB2_IP_22      MIB2_IP_MEDIA
 195 
 196 typedef struct mib2_ip {
 197                 /* forwarder?  1 gateway, 2 NOT gateway {ip 1} RW */
 198         int     ipForwarding;
 199                 /* default Time-to-Live for iph         {ip 2} RW */
 200         int     ipDefaultTTL;
 201                 /* # of input datagrams                 {ip 3} */
 202         Counter ipInReceives;
 203                 /* # of dg discards for iph error       {ip 4} */
 204         Counter ipInHdrErrors;
 205                 /* # of dg discards for bad addr        {ip 5} */
 206         Counter ipInAddrErrors;
 207                 /* # of dg being forwarded              {ip 6} */
 208         Counter ipForwDatagrams;
 209                 /* # of dg discards for unk protocol    {ip 7} */