Index: projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/ipv6MIB_tree.def =================================================================== --- projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/ipv6MIB_tree.def (revision 311509) +++ projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/ipv6MIB_tree.def (revision 311510) @@ -1,126 +1,143 @@ #- # Copyright (C) 2010 The FreeBSD Foundation # All rights reserved. # # This software was developed by Shteryana Sotirova Shopova under # sponsorship from the FreeBSD Foundation. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # # (1 internet (2 mgmt - (1 mib2 + (1 mib_2 (55 ipv6MIB (1 ipv6MIBObjects - (1 ipv6Forwarding INTEGER op_ipv6MIBObjects GET SET) + (1 ipv6Forwarding ENUM ( 1 forwarding 2 notForwarding ) op_ipv6MIBObjects GET SET) (2 ipv6DefaultHopLimit INTEGER op_ipv6MIBObjects GET SET) (3 ipv6Interfaces UNSIGNED32 op_ipv6MIBObjects GET) - (4 ipv6IfTableLastChange TIMETICKS op_ipv6MIBObjects GET) + (4 ipv6IfTableLastChange UNSIGNED32 op_ipv6MIBObjects GET) (5 ipv6IfTable (1 ipv6IfEntry : INTEGER op_ipv6IfTable (1 ipv6IfIndex INTEGER GET) - (2 ipv6IfDescr OCTETSTRING GET SET) + (2 ipv6IfDescr OCTETSTRING | DisplayString GET SET) (3 ipv6IfLowerLayer OID GET) (4 ipv6IfEffectiveMtu UNSIGNED32 GET) (5 ipv6IfReasmMaxSize UNSIGNED32 GET) - (6 ipv6IfIdentifier OCTETSTRING GET SET) + (6 ipv6IfIdentifier OCTETSTRING | Ipv6AddressIfIdentifier GET SET) (7 ipv6IfIdentifierLength INTEGER GET SET) - (8 ipv6IfPhysicalAddress OCTETSTRING GET) - (9 ipv6IfAdminStatus INTEGER GET SET) - (10 ipv6IfOperStatus INTEGER GET) - (11 ipv6IfLastChange TIMETICKS GET) - )) + (8 ipv6IfPhysicalAddress OCTETSTRING | PhysAddress GET) + (9 ipv6IfAdminStatus ENUM ( 1 up 2 down ) GET SET) + (10 ipv6IfOperStatus ENUM ( 1 up 2 down 3 noIfIdentifier 4 unknown 5 notPresent ) GET) + (11 ipv6IfLastChange UNSIGNED32 GET) + ) + ) (6 ipv6IfStatsTable (1 ipv6IfStatsEntry : INTEGER op_ipv6IfStatsTable (1 ipv6IfStatsInReceives COUNTER GET) (2 ipv6IfStatsInHdrErrors COUNTER GET) (3 ipv6IfStatsInTooBigErrors COUNTER GET) (4 ipv6IfStatsInNoRoutes COUNTER GET) (5 ipv6IfStatsInAddrErrors COUNTER GET) (6 ipv6IfStatsInUnknownProtos COUNTER GET) (7 ipv6IfStatsInTruncatedPkts COUNTER GET) (8 ipv6IfStatsInDiscards COUNTER GET) - (9 ipv6IfStatsInDelievers COUNTER GET) + (9 ipv6IfStatsInDelivers COUNTER GET) (10 ipv6IfStatsOutForwDatagrams COUNTER GET) (11 ipv6IfStatsOutRequests COUNTER GET) (12 ipv6IfStatsOutDiscards COUNTER GET) (13 ipv6IfStatsOutFragOKs COUNTER GET) (14 ipv6IfStatsOutFragFails COUNTER GET) (15 ipv6IfStatsOutFragCreates COUNTER GET) (16 ipv6IfStatsReasmReqds COUNTER GET) (17 ipv6IfStatsReasmOKs COUNTER GET) (18 ipv6IfStatsReasmFails COUNTER GET) (19 ipv6IfStatsInMcastPkts COUNTER GET) (20 ipv6IfStatsOutMcastPkts COUNTER GET) - )) + ) + ) (7 ipv6AddrPrefixTable - (1 ipv6AddrPrefixEntry : INTEGER OCTETSTRING INTEGER op_ipv6AddrPrefixTable - (1 ipv6AddrPrefix OCTETSTRING GET) - (2 ipv6AddrPrefixLength INTEGER GET) - (3 ipv6AddrPrefixOnLinkFlag INTEGER GET) - (4 ipv6AddrPrefixAutonomousFlag INTEGER GET) + (1 ipv6AddrPrefixEntry : INTEGER OCTETSTRING | Ipv6AddressPrefix INTEGER op_ipv6AddrPrefixTable + (1 ipv6AddrPrefix OCTETSTRING | Ipv6AddressPrefix) + (2 ipv6AddrPrefixLength INTEGER) + (3 ipv6AddrPrefixOnLinkFlag ENUM ( 1 true 2 false ) GET) + (4 ipv6AddrPrefixAutonomousFlag ENUM ( 1 true 2 false ) GET) (5 ipv6AddrPrefixAdvPreferredLifetime UNSIGNED32 GET) - (6 ipv6AddrPrefixPrefixAdvValidLifetime UNSIGNED32 GET) - )) + (6 ipv6AddrPrefixAdvValidLifetime UNSIGNED32 GET) + ) + ) (8 ipv6AddrTable - (1 ipv6AddrEntry : INTEGER OCTETSTRING op_ipv6AddrTable - (1 ipv6AddrAddress OCTETSTRING GET) + (1 ipv6AddrEntry : INTEGER OCTETSTRING | Ipv6Address op_ipv6AddrTable + (1 ipv6AddrAddress OCTETSTRING | Ipv6Address) (2 ipv6AddrPfxLength INTEGER GET) - (3 ipv6AddrType INTEGER GET) - (4 ipv6AddrAnycastFlag INTEGER GET) - (5 ipv6AddrStatus INTEGER GET) - )) + (3 ipv6AddrType ENUM ( 1 stateless 2 stateful 3 unknown ) GET) + (4 ipv6AddrAnycastFlag ENUM ( 1 true 2 false ) GET) + (5 ipv6AddrStatus ENUM ( 1 preferred 2 deprecated 3 invalid 4 inaccessible 5 unknown ) GET) + ) + ) (9 ipv6RouteNumber GAUGE op_ipv6MIBObjects GET) - (10 ipv6DiscardedRoutes GAUGE op_ipv6MIBObjects GET) + (10 ipv6DiscardedRoutes COUNTER op_ipv6MIBObjects GET) (11 ipv6RouteTable - (1 ipv6RouteEntry : OCTETSTRING INTEGER UNSIGNED32 op_ipv6RouteTable - (1 ipv6RouteDest OCTETSTRING GET) - (2 ipv6RoutePfxLength INTEGER GET) - (3 ipv6RouteIndex UNSIGNED32 GET) - (4 ipv6RouteIfIndex OID GET) - (5 ipv6RouteNextHop OCTETSTRING GET) - (6 ipv6RouteType INTEGER GET) - (7 ipv6RouteProtocol INTEGER GET) - (8 ipv6RoutePolicy INTEGER GET) + (1 ipv6RouteEntry : OCTETSTRING | Ipv6Address INTEGER UNSIGNED32 op_ipv6RouteTable + (1 ipv6RouteDest OCTETSTRING | Ipv6Address) + (2 ipv6RoutePfxLength INTEGER) + (3 ipv6RouteIndex UNSIGNED32) + (4 ipv6RouteIfIndex INTEGER GET) + (5 ipv6RouteNextHop OCTETSTRING | Ipv6Address GET) + (6 ipv6RouteType ENUM ( 1 other 2 discard 3 local 4 remote ) GET) + (7 ipv6RouteProtocol ENUM ( 1 other 2 local 3 netmgmt 4 ndisc 5 rip 6 ospf 7 bgp 8 idrp 9 igrp ) GET) + (8 ipv6RoutePolicy INTEGER32 GET) (9 ipv6RouteAge UNSIGNED32 GET) (10 ipv6RouteNextHopRDI UNSIGNED32 GET) (11 ipv6RouteMetric UNSIGNED32 GET) (12 ipv6RouteWeight UNSIGNED32 GET) (13 ipv6RouteInfo OID GET) - (14 ipv6RouteValid INTEGER GET) - )) + (14 ipv6RouteValid ENUM ( 1 true 2 false ) GET SET) + ) + ) (12 ipv6NetToMediaTable - (1 ipv6NetToMediaEntry : INTEGER OCTETSTRING op_ipv6NetToMediaTable - (1 ipv6NetToMediaAddress OCTETSTRING GET) - (2 ipv6NetToMediaPhysAddress OCTETSTRING GET) - (3 ipv6NetToMediaType INTEGER GET) - (4 ipv6NetToMediaState INTEGER GET) - (5 ipv6NetToMediaLastUpdated UNSIGNED32 GET) - (6 ipv6NetToMediaValid INTEGER GET) - )) + (1 ipv6NetToMediaEntry : INTEGER OCTETSTRING | Ipv6Address op_ipv6NetToMediaTable + (1 ipv6NetToMediaNetAddress OCTETSTRING | Ipv6Address) + (2 ipv6NetToMediaPhysAddress OCTETSTRING | PhysAddress GET) + (3 ipv6NetToMediaType ENUM ( 1 other 2 dynamic 3 static 4 local ) GET) + (4 ipv6IfNetToMediaState ENUM ( 1 reachable 2 stale 3 delay 4 probe 5 invalid 6 unknown ) GET) + (5 ipv6IfNetToMediaLastUpdated UNSIGNED32 GET) + (6 ipv6NetToMediaValid ENUM ( 1 true 2 false ) GET SET) + ) + ) + ) + (2 ipv6Notifications + (0 ipv6NotificationPrefix + (1 ipv6IfStateChange OID op_ipv6IfStateChange) + ) + ) + (3 ipv6Conformance + (1 ipv6Compliances + ) + (2 ipv6Groups + ) ) ) ) ) ) Index: projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/ipv6_addrPrefixTable.c =================================================================== --- projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/ipv6_addrPrefixTable.c (revision 311509) +++ projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/ipv6_addrPrefixTable.c (revision 311510) @@ -1,68 +1,70 @@ /* * Copyright (c) 2017 Dell EMC Isilon * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include __FBSDID("$FreeBSD$"); #include #include #include #include "ipv6_addrPrefixTable.h" int op_ipv6AddrPrefixTable(struct snmp_context *ctx __unused, struct snmp_value *value, u_int sub, u_int iidx __unused, enum snmp_op op) { asn_subid_t which; switch (op) { case SNMP_OP_GETNEXT: case SNMP_OP_GET: break; case SNMP_OP_SET: return (SNMP_ERR_NOT_WRITEABLE); case SNMP_OP_ROLLBACK: case SNMP_OP_COMMIT: return (SNMP_ERR_NOERROR); } which = value->var.subs[sub - 1]; switch (which) { +#if 0 case LEAF_ipv6AddrPrefix: case LEAF_ipv6AddrPrefixLength: +#endif case LEAF_ipv6AddrPrefixOnLinkFlag: case LEAF_ipv6AddrPrefixAutonomousFlag: case LEAF_ipv6AddrPrefixAdvPreferredLifetime: - case LEAF_ipv6AddrPrefixPrefixAdvValidLifetime: + case LEAF_ipv6AddrPrefixAdvValidLifetime: default: return (SNMP_ERR_RES_UNAVAIL); } return (SNMP_ERR_NOERROR); } Index: projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/ipv6_addrTable.c =================================================================== --- projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/ipv6_addrTable.c (revision 311509) +++ projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/ipv6_addrTable.c (revision 311510) @@ -1,66 +1,68 @@ /* * Copyright (c) 2017 Dell EMC Isilon * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include __FBSDID("$FreeBSD$"); #include #include #include "ipv6_addrTable.h" int op_ipv6AddrTable(struct snmp_context *ctx __unused, struct snmp_value *value, u_int sub, u_int iidx __unused, enum snmp_op op) { asn_subid_t which; switch (op) { case SNMP_OP_GETNEXT: case SNMP_OP_GET: break; case SNMP_OP_SET: return (SNMP_ERR_NOT_WRITEABLE); case SNMP_OP_ROLLBACK: case SNMP_OP_COMMIT: return (SNMP_ERR_NOERROR); } which = value->var.subs[sub - 1]; switch (which) { +#if 0 case LEAF_ipv6AddrAddress: +#endif case LEAF_ipv6AddrPfxLength: case LEAF_ipv6AddrType: case LEAF_ipv6AddrAnycastFlag: case LEAF_ipv6AddrStatus: default: return (SNMP_ERR_RES_UNAVAIL); } return (SNMP_ERR_NOERROR); } Index: projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/ipv6_ifStatsTable.c =================================================================== --- projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/ipv6_ifStatsTable.c (revision 311509) +++ projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/ipv6_ifStatsTable.c (revision 311510) @@ -1,81 +1,81 @@ /* * Copyright (c) 2017 Dell EMC Isilon * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include __FBSDID("$FreeBSD$"); #include #include #include "ipv6.h" int op_ipv6IfStatsTable(struct snmp_context *ctx __unused, struct snmp_value *value, u_int sub, u_int iidx __unused, enum snmp_op op) { asn_subid_t which; switch (op) { case SNMP_OP_GETNEXT: case SNMP_OP_GET: break; case SNMP_OP_SET: return (SNMP_ERR_NOT_WRITEABLE); case SNMP_OP_ROLLBACK: case SNMP_OP_COMMIT: return (SNMP_ERR_NOERROR); } which = value->var.subs[sub - 1]; switch (which) { case LEAF_ipv6IfStatsInReceives: case LEAF_ipv6IfStatsInHdrErrors: case LEAF_ipv6IfStatsInTooBigErrors: case LEAF_ipv6IfStatsInNoRoutes: case LEAF_ipv6IfStatsInAddrErrors: case LEAF_ipv6IfStatsInUnknownProtos: case LEAF_ipv6IfStatsInTruncatedPkts: case LEAF_ipv6IfStatsInDiscards: - case LEAF_ipv6IfStatsInDelievers: + case LEAF_ipv6IfStatsInDelivers: case LEAF_ipv6IfStatsOutForwDatagrams: case LEAF_ipv6IfStatsOutRequests: case LEAF_ipv6IfStatsOutDiscards: case LEAF_ipv6IfStatsOutFragOKs: case LEAF_ipv6IfStatsOutFragFails: case LEAF_ipv6IfStatsOutFragCreates: case LEAF_ipv6IfStatsReasmReqds: case LEAF_ipv6IfStatsReasmOKs: case LEAF_ipv6IfStatsReasmFails: case LEAF_ipv6IfStatsInMcastPkts: case LEAF_ipv6IfStatsOutMcastPkts: default: return (SNMP_ERR_RES_UNAVAIL); } return (SNMP_ERR_NOERROR); } Index: projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/ipv6_netToMediaTable.c =================================================================== --- projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/ipv6_netToMediaTable.c (revision 311509) +++ projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/ipv6_netToMediaTable.c (revision 311510) @@ -1,67 +1,71 @@ /* * Copyright (c) 2017 Dell EMC Isilon * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include __FBSDID("$FreeBSD$"); #include #include #include "ipv6.h" int op_ipv6NetToMediaTable(struct snmp_context *ctx __unused, struct snmp_value *value, u_int sub, u_int iidx __unused, enum snmp_op op) { asn_subid_t which; switch (op) { case SNMP_OP_GETNEXT: case SNMP_OP_GET: break; case SNMP_OP_SET: return (SNMP_ERR_NOT_WRITEABLE); case SNMP_OP_ROLLBACK: case SNMP_OP_COMMIT: return (SNMP_ERR_NOERROR); } which = value->var.subs[sub - 1]; switch (which) { +#if 0 case LEAF_ipv6NetToMediaAddress: +#endif case LEAF_ipv6NetToMediaPhysAddress: case LEAF_ipv6NetToMediaType: +#if 0 case LEAF_ipv6NetToMediaState: case LEAF_ipv6NetToMediaLastUpdated: +#endif case LEAF_ipv6NetToMediaValid: default: return (SNMP_ERR_RES_UNAVAIL); } return (SNMP_ERR_NOERROR); } Index: projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/ipv6_routeTable.c =================================================================== --- projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/ipv6_routeTable.c (revision 311509) +++ projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/ipv6_routeTable.c (revision 311510) @@ -1,75 +1,77 @@ /* * Copyright (c) 2017 Dell EMC Isilon * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include __FBSDID("$FreeBSD$"); #include #include #include "ipv6_routeTable.h" int op_ipv6RouteTable(struct snmp_context *ctx __unused, struct snmp_value *value, u_int sub, u_int iidx __unused, enum snmp_op op) { asn_subid_t which; switch (op) { case SNMP_OP_GETNEXT: case SNMP_OP_GET: break; case SNMP_OP_SET: return (SNMP_ERR_NOT_WRITEABLE); case SNMP_OP_ROLLBACK: case SNMP_OP_COMMIT: return (SNMP_ERR_NOERROR); } which = value->var.subs[sub - 1]; switch (which) { +#if 0 case LEAF_ipv6RouteDest: case LEAF_ipv6RoutePfxLength: case LEAF_ipv6RouteIndex: +#endif case LEAF_ipv6RouteIfIndex: case LEAF_ipv6RouteNextHop: case LEAF_ipv6RouteType: case LEAF_ipv6RouteProtocol: case LEAF_ipv6RoutePolicy: case LEAF_ipv6RouteAge: case LEAF_ipv6RouteNextHopRDI: case LEAF_ipv6RouteMetric: case LEAF_ipv6RouteWeight: case LEAF_ipv6RouteInfo: case LEAF_ipv6RouteValid: default: return (SNMP_ERR_RES_UNAVAIL); } return (SNMP_ERR_NOERROR); }