diff options
author | apersson <none@none> | 2006-12-19 17:33:00 -0800 |
---|---|---|
committer | apersson <none@none> | 2006-12-19 17:33:00 -0800 |
commit | 3173664e967186de0a5f0e61548c25996fa6d37f (patch) | |
tree | 8ecbca3fbb92ed52c2102d0d7a21302f61ae09d1 /usr/src/head | |
parent | 2568f901e23df0fb67939d5e72ef503eca7376d7 (diff) | |
download | illumos-gate-3173664e967186de0a5f0e61548c25996fa6d37f.tar.gz |
PSARC 2006/314 Updated MIBs
6501024 Add support for new IP/TCP/UDP MIBs
Diffstat (limited to 'usr/src/head')
-rw-r--r-- | usr/src/head/Makefile | 2 | ||||
-rw-r--r-- | usr/src/head/protocols/ndpd.h | 148 | ||||
-rw-r--r-- | usr/src/head/protocols/routed.h | 28 |
3 files changed, 177 insertions, 1 deletions
diff --git a/usr/src/head/Makefile b/usr/src/head/Makefile index 2d111dd9b3..f4cc4e82e0 100644 --- a/usr/src/head/Makefile +++ b/usr/src/head/Makefile @@ -307,7 +307,7 @@ $(LVMRPCHDRS:%.h=%.x) RPCSVCHDRS= $(RPCSVC_SRC_HDRS) $(RPCSVC_GEN_HDRS) -PROTOHDRS= dumprestore.h routed.h ripngd.h rwhod.h timed.h +PROTOHDRS= dumprestore.h ndpd.h routed.h ripngd.h rwhod.h timed.h ROOTHDRS= $(HDRS:%=$(ROOT)/usr/include/%) \ $(KRB5HDRS:%=$(ROOT)/usr/include/kerberosv5/%) \ diff --git a/usr/src/head/protocols/ndpd.h b/usr/src/head/protocols/ndpd.h new file mode 100644 index 0000000000..f2e5d168f4 --- /dev/null +++ b/usr/src/head/protocols/ndpd.h @@ -0,0 +1,148 @@ +/* + * 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 + * or http://www.opensolaris.org/os/licensing. + * 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 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#ifndef _NDPD_H +#define _NDPD_H + +#pragma ident "%Z%%M% %I% %E% SMI" + +#ifdef __cplusplus +extern "C" { +#endif + +#define NDPD_SNMP_SOCKET "/var/run/in.ndpd_mib" +#define NDPD_SNMP_INFO_REQ 1 +#define NDPD_SNMP_INFO_RESPONSE 2 +#define NDPD_PHYINT_INFO 3 +#define NDPD_PREFIX_INFO 4 +#define NDPD_ROUTER_INFO 5 + +#define NDPD_SNMP_INFO_VER 1 +#define NDPD_PHYINT_INFO_VER 1 +#define NDPD_PREFIX_INFO_VER 1 +#define NDPD_ROUTER_INFO_VER 1 + +/* + * Data structures used to handle configuration variables set in ndpd.conf. + * cf_notdefault is set for variables explicitly set in ndpd.conf. + */ +struct confvar { + uint_t cf_value; + boolean_t cf_notdefault; +}; + +extern struct confvar ifdefaults[]; + +/* + * Interfaces configuration variable indicies + */ +#define I_DupAddrDetectTransmits 0 /* From RFC 2462 */ +#define I_AdvSendAdvertisements 1 +#define I_MaxRtrAdvInterval 2 /* In seconds */ +#define I_MinRtrAdvInterval 3 /* In seconds */ +#define I_AdvManagedFlag 4 +#define I_AdvOtherConfigFlag 5 +#define I_AdvLinkMTU 6 +#define I_AdvReachableTime 7 /* In milliseconds */ +#define I_AdvRetransTimer 8 /* In milliseconds */ +#define I_AdvCurHopLimit 9 +#define I_AdvDefaultLifetime 10 /* In seconds */ +#define I_StatelessAddrConf 11 +#define I_TmpAddrsEnabled 12 /* From RFC 3041 */ +#define I_TmpValidLifetime 13 /* In seconds */ +#define I_TmpPreferredLifetime 14 /* In seconds */ +#define I_TmpRegenAdvance 15 /* In seconds */ +#define I_TmpMaxDesyncFactor 16 /* In seconds */ +#define I_IFSIZE 17 /* # of variables */ + +typedef struct ndpd_info_s { + uint_t info_type; + uint_t info_version; + uint_t info_num_of_phyints; +} ndpd_info_t; + +typedef struct ndpd_prefix_info_s { + uint_t prefix_info_type; + uint_t prefix_info_version; + struct in6_addr prefix_prefix; /* Used to indentify prefix */ + uint_t prefix_len; /* Num bits valid */ + uint_t prefix_flags; /* IFF_ flags */ + uint_t prefix_phyint_index; + uint_t prefix_ValidLifetime; /* In ms w/ 2 hour rule */ + uint_t prefix_PreferredLifetime; /* In millseconds */ + uint_t prefix_OnLinkLifetime; /* ms valid w/o 2 hour rule */ + boolean_t prefix_OnLinkFlag; + boolean_t prefix_AutonomousFlag; +} ndpd_prefix_info_t; + +typedef struct ndpd_router_info_s { + uint_t router_info_type; + uint_t router_info_version; + struct in6_addr router_address; /* Used to identify router */ + uint_t router_lifetime; /* In milliseconds */ + uint_t router_phyint_index; +} ndpd_router_info_t; + + +typedef struct ndpd_phyint_info_s { + uint_t phyint_info_type; + uint_t phyint_info_version; + int phyint_index; + struct confvar phyint_config[I_IFSIZE]; +#define phyint_DupAddrDetectTransmits \ + phyint_config[I_DupAddrDetectTransmits].cf_value +#define phyint_AdvSendAdvertisements \ + phyint_config[I_AdvSendAdvertisements].cf_value +#define phyint_MaxRtrAdvInterval \ + phyint_config[I_MaxRtrAdvInterval].cf_value +#define phyint_MinRtrAdvInterval \ + phyint_config[I_MinRtrAdvInterval].cf_value +#define phyint_AdvManagedFlag phyint_config[I_AdvManagedFlag].cf_value +#define phyint_AdvOtherConfigFlag \ + phyint_config[I_AdvOtherConfigFlag].cf_value +#define phyint_AdvLinkMTU phyint_config[I_AdvLinkMTU].cf_value +#define phyint_AdvReachableTime phyint_config[I_AdvReachableTime].cf_value +#define phyint_AdvRetransTimer phyint_config[I_AdvRetransTimer].cf_value +#define phyint_AdvCurHopLimit phyint_config[I_AdvCurHopLimit].cf_value +#define phyint_AdvDefaultLifetime \ + phyint_config[I_AdvDefaultLifetime].cf_value +#define phyint_StatelessAddrConf \ + phyint_config[I_StatelessAddrConf].cf_value +#define phyint_TmpAddrsEnabled phyint_config[I_TmpAddrsEnabled].cf_value +#define phyint_TmpValidLifetime phyint_config[I_TmpValidLifetime].cf_value +#define phyint_TmpPreferredLifetime \ + phyint_config[I_TmpPreferredLifetime].cf_value +#define phyint_TmpRegenAdvance phyint_config[I_TmpRegenAdvance].cf_value +#define phyint_TmpMaxDesyncFactor \ + phyint_config[I_TmpMaxDesyncFactor].cf_value + uint_t phyint_num_of_prefixes; + uint_t phyint_num_of_routers; +} ndpd_phyint_info_t; + +#ifdef __cplusplus +} +#endif + +#endif /* _NDPD_H */ diff --git a/usr/src/head/protocols/routed.h b/usr/src/head/protocols/routed.h index db58d9a406..58d0781ccc 100644 --- a/usr/src/head/protocols/routed.h +++ b/usr/src/head/protocols/routed.h @@ -150,6 +150,25 @@ struct entryinfo { char int_name[16]; }; +typedef struct rdisc_info_s { + uint_t info_type; + uint_t info_version; + uint_t info_num_of_routers; +} rdisc_info_t; + +/* + * Structure that is returned with the default router info. + */ +typedef struct defr_s { + uint32_t defr_info_type; + uint32_t defr_version; + struct in_addr defr_addr; + uint32_t defr_index; + uint32_t defr_life; + uint32_t defr_pref; +} defr_t; + + /* * Packet types. */ @@ -171,6 +190,15 @@ struct entryinfo { #define RIPCMD_MAX 7 +#define RDISC_SNMP_SOCKET "/var/run/in.rdisc_mib" + +#define RDISC_SNMP_INFO_REQ 1 +#define RDISC_SNMP_INFO_RESPONSE 2 +#define RDISC_DEF_ROUTER_INFO 3 + +#define RDISC_SNMP_INFO_VER 1 +#define RDISC_DEF_ROUTER_VER 1 + #define HOPCNT_INFINITY 16 /* per Xerox NS */ #define MAXPACKETSIZE 512 /* max broadcast size */ #define NETS_LEN ((MAXPACKETSIZE - sizeof (struct rip)) \ |