Index: projects/bsnmp-ipv6-mib/etc/bsnmpd.config =================================================================== --- projects/bsnmp-ipv6-mib/etc/bsnmpd.config (revision 316267) +++ projects/bsnmp-ipv6-mib/etc/bsnmpd.config (revision 316268) @@ -1,328 +1,328 @@ # $FreeBSD$ # # Example configuration file for bsnmpd(1). # # # Set some common variables # location := "Room 200" contact := "sysmeister@example.com" system := 1 # FreeBSD traphost := localhost trapport := 162 # # Set the SNMP engine ID. # # The snmpEngineID object required from the SNMPv3 Framework. If not explicitly set via # this configuration file, an ID is assigned based on the value of the # kern.hostid variable # engine := 0x80:0x10:0x08:0x10:0x80:0x25 # snmpEngineID = $(engine) # Change this! read := "public" # Uncomment begemotSnmpdCommunityString.0.2 below that sets the community # string to enable write access. write := "geheim" trap := "mytrap" # # Declarations for SNMP-USER-BASED-SM-MIB authentication and privacy options # NoAuthProtocol := 1.3.6.1.6.3.10.1.1.1 HMACMD5AuthProtocol := 1.3.6.1.6.3.10.1.1.2 HMACSHAAuthProtocol := 1.3.6.1.6.3.10.1.1.3 NoPrivProtocol := 1.3.6.1.6.3.10.1.2.1 DESPrivProtocol := 1.3.6.1.6.3.10.1.2.2 AesCfb128Protocol := 1.3.6.1.6.3.10.1.2.4 # # Enumerations from SNMP-FRAMEWORK-MIB # # Security models securityModelAny := 0 securityModelSNMPv1 := 1 securityModelSNMPv2c := 2 securityModelUSM := 3 # Message Processing models MPmodelSNMPv1 := 0 MPmodelSNMPv2c := 1 MPmodelSNMPv3 := 3 # Security levels noAuthNoPriv := 1 authNoPriv := 2 authPriv := 3 # SNMPv3 USM User definition # # The localized hex password for a user may be obtained by setting SNMPUSER, SNMPPASSWD, # SNMPAUTH and SNMPPRIV environment variables to the desired parameters and invoking # 'bsnmpget -v 3 -D -K -o verbose' against the running bsnmpd(1). For other # usages refer to the bsnmpget(1) manual page. The following lines define a user "bsnmp" # with a private password "bsnmptest", localized for the above engine ID. # #user1 := "bsnmp" #user1passwd := 0x22:0x98:0x1a:0x6e:0x39:0x93:0x16:0x5e:0x6a:0x21:0x1b:0xd8:0xa9:0x81:0x31:0x05:0x16:0x33:0x38:0x60 # # Configuration # %snmpd begemotSnmpdDebugDumpPdus = 2 begemotSnmpdDebugSyslogPri = 7 # # Set the read and write communities. # # The default value of the community strings is NULL (note, that this is # different from the empty string). This disables both read and write access. # To enable read access only the read community string must be set. Setting # the write community string enables both read and write access with that # string. # # Be sure to understand the security implications of SNMPv2 - the community # strings are readable on the wire! # begemotSnmpdCommunityString.0.1 = $(read) # begemotSnmpdCommunityString.0.2 = $(write) begemotSnmpdCommunityDisable = 1 # open standard SNMP ports begemotSnmpdPortStatus.0.0.0.0.161 = 1 # open a unix domain socket begemotSnmpdLocalPortStatus."/var/run/bsnmpd.sock" = 1 begemotSnmpdLocalPortType."/var/run/bsnmpd.sock" = 4 # send traps to the traphost begemotTrapSinkStatus.[$(traphost)].$(trapport) = 4 begemotTrapSinkVersion.[$(traphost)].$(trapport) = 2 begemotTrapSinkComm.[$(traphost)].$(trapport) = $(trap) sysContact = $(contact) sysLocation = $(location) sysObjectId = 1.3.6.1.4.1.12325.1.1.2.1.$(system) snmpEnableAuthenTraps = 2 # Uncomment `begemotSnmpdModulePath.".." = ".."' entries below to enable # modules # # Control configuration for the modules in the module specific sections, e.g. # the "usm" module (begemotSnmpdModulePath."usm") can be controlled in the # %usm specific section. You must uncomment the section specific header in # order to use the enclosed variables, e.g. `usmUserStatus.$(engine).$(user1)` # can only be used if %usm is uncommented. # # Modules are loaded in the order listed, so they must be before any # dependent modules, e.g. "mibII" vs "bridge". # # # MIB-2 module # begemotSnmpdModulePath."mibII" = "/usr/lib/snmp_mibII.so" # # Bridge module # This requires the mibII module. # #begemotSnmpdModulePath."bridge" = "/usr/lib/snmp_bridge.so" # # Host resources module # This requires the mibII module. # #begemotSnmpdModulePath."hostres" = "/usr/lib/snmp_hostres.so" # # IPv6 module # This requires the mibII module. # -#begemotSnmpdModulePath."ipv6mib" = "/usr/lib/snmp_ipv6mib.so" +#begemotSnmpdModulePath."ipv6MIB" = "/usr/lib/snmp_ipv6MIB.so" # # LM75 Sensor module # #begemotSnmpdModulePath."lm75" = "/usr/lib/snmp_lm75.so" # # Netgraph module # #begemotSnmpdModulePath."netgraph" = "/usr/lib/snmp_netgraph.so" # # pf(4) module # #begemotSnmpdModulePath."pf" = "/usr/lib/snmp_pf.so" # # SNMPv3 Notification Targets # # begemotSnmpdModulePath."target" = "/usr/lib/snmp_target.so" # # SNMPv3 User-based security module - must be loaded for SNMPv3 USM # #begemotSnmpdModulePath."usm" = "/usr/lib/snmp_usm.so" # # SNMPv3 View-based Access Control module # #begemotSnmpdModulePath."vacm" = "/usr/lib/snmp_vacm.so" # # Wireless module # This requires the mibII module. # #begemotSnmpdModulePath."wlan" = "/usr/lib/snmp_wlan.so" # # SNMPv3 USM User definition. # #%usm # # The following block creates a user with name "bsnmp" and sets privacy # and encryption options to SHA256 message digests and AES encryption # for this user. # # usmUserStatus.$(engine).$(user1) = 5 # usmUserAuthProtocol.$(engine).$(user1) = $(HMACSHAAuthProtocol) # usmUserAuthKeyChange.$(engine).$(user1) = $(user1passwd) # usmUserPrivProtocol.$(engine).$(user1) = $(AesCfb128Protocol) # usmUserPrivKeyChange.$(engine).$(user1) = $(user1passwd) # usmUserStatus.$(engine).$(user1) = 1 # # # The following block creates a user with name "public" with no authentication # or encryption options. # # usmUserStatus.$(engine).$(read) = 5 # usmUserAuthProtocol.$(engine).$(read) = $(NoAuthProtocol) # usmUserPrivProtocol.$(engine).$(read) = $(NoPrivProtocol) # usmUserStatus.$(engine).$(read) = 1 # # # Definition of view-based access control entries. # #%vacm # Definition of a SNMPv1 group # vacmSecurityToGroupStatus.$(securityModelSNMPv1).$(read) = 4 # vacmGroupName.$(securityModelSNMPv1).$(read) = $(read) # Definition of SNMPv2 group # vacmSecurityToGroupStatus.$(securityModelSNMPv2c).$(write) = 4 # vacmGroupName.$(securityModelSNMPv2c).$(write) = $(write) # Definition of SNMPv3 group with users "bsnmp" and "public" # vacmSecurityToGroupStatus.$(securityModelUSM).$(user1) = 4 # vacmGroupName.$(securityModelUSM).$(user1) = $(write) # vacmSecurityToGroupStatus.$(securityModelUSM).$(read) = 4 # vacmGroupName.$(securityModelUSM).$(read) = $(write) # # The OID of the .iso.org.dod.internet subtree # # internetoid := 1.3.6.1 # internetoidlen := 4 # # Definitions of two views # # vacmViewTreeFamilyStatus."internet".$(internetoidlen).$(internetoid) = 4 # vacmViewTreeFamilyStatus."restricted".$(internetoidlen).$(internetoid) = 4 # # Access control # # # Read-only access for SNMPv1 users # # vacmAccessStatus.$(read)."".$(securityModelSNMPv1).$(noAuthNoPriv) = 4 # vacmAccessReadViewName.$(read)."".$(securityModelSNMPv1).$(noAuthNoPriv) = "internet" # # Read-write access for SNMPv2 users # # vacmAccessStatus.$(write)."".$(securityModelSNMPv2c).$(noAuthNoPriv) = 4 # vacmAccessReadViewName.$(write)."".$(securityModelSNMPv2c).$(noAuthNoPriv) = "internet" # vacmAccessWriteViewName.$(write)."".$(securityModelSNMPv2c).$(noAuthNoPriv) = "internet" # # Read-write-notify access for SNMPv3 USM users with noAuthNoPriv # # vacmAccessStatus.$(write)."".3.$(noAuthNoPriv) = 4 # vacmAccessReadViewName.$(write)."".$(securityModelUSM).$(noAuthNoPriv) = "internet" # vacmAccessWriteViewName.$(write)."".$(securityModelUSM).$(noAuthNoPriv) = "internet" # vacmAccessNotifyViewName.$(write)."".$(securityModelUSM).$(noAuthNoPriv) = "internet" # #Read-write-notify access to restricted for SNMPv3 USM users with authPriv # # vacmAccessStatus.$(write)."".$(securityModelUSM).$(authPriv) = 4 # vacmAccessReadViewName.$(write)."".$(securityModelUSM).$(authPriv) = "restricted" # vacmAccessWriteViewName.$(write)."".$(securityModelUSM).$(authPriv) = "restricted" # vacmAccessNotifyViewName.$(write)."".$(securityModelUSM).$(authPriv) = "restricted" #%target # Send notifications to target tag "test" # tag := "test" # snmpNotifyRowStatus.$(tag) = 4 # snmpNotifyTag.$(tag) = $(tag) # tagremote := "testremote" # snmpNotifyRowStatus.$(tagremote) = 4 # snmpNotifyTag.$(tagremote) = $(tagremote) # # Specify the target parameters for the notifications - send with the credentials # of user "bsnmp" # # snmpTargetParamsRowStatus.$(tag) = 5 # snmpTargetParamsMPModel.$(tag) = $(MPmodelSNMPv3) # snmpTargetParamsSecurityModel.$(tag) = $(securityModelUSM) # snmpTargetParamsSecurityName.$(tag) = $(user1) # snmpTargetParamsSecurityLevel.$(tag) = $(authPriv) # snmpTargetParamsRowStatus.$(tag) = 1 # # Define the notifications' target address - port 162 on localhost # # snmpTargetAddrRowStatus.$(tag) = 5 # snmpTargetAddrTAddress.$(tag) = 0x7f:0x0:0x0:0x1:0x0:0xa2 # snmpTargetAddrTagList.$(tag) = "test notification" # snmpTargetAddrParams.$(tag) = $(tag) # snmpTargetAddrRowStatus.$(tag) = 1 # # Define the notifications' target address - port 162 on 10.0.0.1 # # snmpTargetAddrRowStatus.$(tagremote) = 5 # snmpTargetAddrTAddress.$(tagremote) = 0x0a:0x00:0x00:0x1:0x0:0xa2 # snmpTargetAddrTagList.$(tagremote) = $(tagremote) # snmpTargetAddrParams.$(tagremote) = $(tag) # snmpTargetAddrRowStatus.$(tagremote) = 1 # Force a polling rate for the 64-bit interface counters in case # the automatic computation is wrong (which may be the case if an interface # announces the wrong bit rate via its MIB). #%mibII #begemotIfForcePoll = 2000 #%netgraph #begemotNgControlNodeName = "snmpd" 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 316267) +++ projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/ipv6mib_tree.def (nonexistent) @@ -1,143 +0,0 @@ -#- -# 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 mib_2 - (55 ipv6MIB - (1 ipv6MIBObjects - (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 UNSIGNED32 op_ipv6MIBObjects GET) - (5 ipv6IfTable - (1 ipv6IfEntry : INTEGER op_ipv6IfTable - (1 ipv6IfIndex INTEGER) - (2 ipv6IfDescr OCTETSTRING | DisplayString GET SET) - (3 ipv6IfLowerLayer OID GET) - (4 ipv6IfEffectiveMtu UNSIGNED32 GET) - (5 ipv6IfReasmMaxSize UNSIGNED32 GET) - (6 ipv6IfIdentifier OCTETSTRING | Ipv6AddressIfIdentifier GET SET) - (7 ipv6IfIdentifierLength INTEGER GET SET) - (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 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 | 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 ipv6AddrPrefixAdvValidLifetime UNSIGNED32 GET) - ) - ) - (8 ipv6AddrTable - (1 ipv6AddrEntry : INTEGER OCTETSTRING | Ipv6Address op_ipv6AddrTable - (1 ipv6AddrAddress OCTETSTRING | Ipv6Address) - (2 ipv6AddrPfxLength 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 COUNTER op_ipv6MIBObjects GET) - (11 ipv6RouteTable - (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 ENUM ( 1 true 2 false ) GET SET) - ) - ) - (12 ipv6NetToMediaTable - (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/snmp_ipv6mib.3 =================================================================== --- projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/snmp_ipv6mib.3 (revision 316267) +++ projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/snmp_ipv6mib.3 (nonexistent) @@ -1,62 +0,0 @@ -.\"- -.\" Copyright (C) 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. -.\" -.\" $FreeBSD$ -.\" -.Dd December 28, 2016 -.Dt SNMP_IPV6MIB 3 -.Os -.Sh NAME -.Nm snmp_ipv6MIB -.Nd "ipv6 module for snmpd" -.Sh LIBRARY -.Pq begemotSnmpdModulePath."ipv6MIB" = "/usr/lib/snmp_ipv6MIB.so" -.Sh DESCRIPTION -The -.Nm snmp_ipv6 -module implements the IPV6-MIB as standardized in RFC 2465. -.Sh FILES -.Bl -tag -width "XXXXXXXXX" -.It Pa /usr/share/snmp/defs/ipv6MIB_tree.def -The description of the MIB tree implemented by -.Nm . -.It Pa /usr/share/snmp/mibs/IPV6-MIB.txt -The MIB that is implemented by this module. -.El -.Sh STANDARDS -This module does not completely implement IPV6-MIB as standardized in -RFC 2465 and RFC 4293. -.Sh SEE ALSO -.Xr bsnmpd 1 , -.Xr gensnmptree 1 , -.Xr inet6 4 , -.Xr snmpmod 3 , -.Sh AUTHORS -The module was written by -.An Thor Steingrimsson Aq Mt thor.steingrimsson@isilon.com -and ported to FreeBSD by -.An Ngie Cooper Aq Mt ngie@FreeBSD.org -This manual page was written by -.An Ngie Cooper Aq Mt ngie@FreeBSD.org Property changes on: projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/snmp_ipv6mib.3 ___________________________________________________________________ Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/Makefile =================================================================== --- projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/Makefile (revision 316267) +++ projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/Makefile (revision 316268) @@ -1,25 +1,25 @@ # $FreeBSD$ # -MOD= ipv6mib +MOD= ipv6MIB SRCS+= ipv6.c SRCS+= ipv6_addrPrefixTable.c SRCS+= ipv6_addrTable.c SRCS+= ipv6_ifStatsTable.c SRCS+= ipv6_ifTable.c SRCS+= ipv6_netToMediaTable.c SRCS+= ipv6_routeTable.c SRCS+= ipv6_sys.c -XSYM= ipv6MIB +XSYM= ${MOD} MAN= snmp_${MOD}.3 DEFS= ${MOD}_tree.def #INCS= snmp_${MOD}.h BMIBS= IPV6-MIB.txt CFLAGS+= -DSNMPTREE_TYPES .include Index: projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/ipv6.c =================================================================== --- projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/ipv6.c (revision 316267) +++ projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/ipv6.c (revision 316268) @@ -1,151 +1,151 @@ /* * 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.h" #include "ipv6_sys.h" -#include "ipv6MIB_oid.h" +#include "ipv6mib_oid.h" static struct lmodule *module; -static const struct asn_oid oid_ipv6MIB = OIDX_ipv6MIB; +static const struct asn_oid oid_ipv6mib = OIDX_ipv6MIB; uint32_t mib_ipv6_ipv6Interfaces; uint64_t mib_ipv6_ipv6IfTableLastChange; static u_int ipv6_reg; int op_ipv6MIBObjects(struct snmp_context *ctx __unused, struct snmp_value *value, u_int sub, u_int iidx __unused, enum snmp_op op) { const char *namestr = NULL; int name[] = { CTL_NET, PF_INET6, IPPROTO_IPV6, 0 }; asn_subid_t which; size_t resultsz; int result; result = 0; resultsz = sizeof(result); 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_ipv6Forwarding: name[3] = IPV6CTL_FORWARDING; namestr = "IPV6CTL_FORWARDING"; if (sysctl(name, nitems(name), &result, &resultsz, NULL, 0) < 0) return (SNMP_ERR_GENERR); if (result == 0) value->v.integer = ipv6Forwarding_notForwarding; else value->v.integer = ipv6Forwarding_forwarding; break; case LEAF_ipv6DefaultHopLimit: name[3] = IPV6CTL_DEFHLIM; namestr = "IPV6CTL_DEFHLIM"; if (sysctl(name, nitems(name), &result, &resultsz, NULL, 0) < 0) return (SNMP_ERR_GENERR); value->v.integer = result; break; case LEAF_ipv6IfTableLastChange: mib_ipv6_refresh_interfaces(); if (mib_ipv6_ipv6IfTableLastChange > start_tick) value->v.uint32 = mib_ipv6_ipv6IfTableLastChange - start_tick; else value->v.uint32 = 0; break; case LEAF_ipv6Interfaces: mib_ipv6_refresh_interfaces(); value->v.integer = mib_ipv6_ipv6Interfaces; break; default: return (SNMP_ERR_NOSUCHNAME); } return (SNMP_ERR_NOERROR); } static void -ipv6MIB_start(void) +ipv6mib_start(void) { - ipv6_reg = or_register(&oid_ipv6MIB, + ipv6_reg = or_register(&oid_ipv6mib, "The (incomplete) MIB module for RFC 2465.", module); } static int -ipv6MIB_init(struct lmodule *mod, int argc __unused, char *argv[] __unused) +ipv6mib_init(struct lmodule *mod, int argc __unused, char *argv[] __unused) { module = mod; return (0); } static int -ipv6MIB_fini(void) +ipv6mib_fini(void) { or_unregister(ipv6_reg); return (0); } const struct snmp_module config = { "This module implements RFC 2465.", - ipv6MIB_init, - ipv6MIB_fini, + ipv6mib_init, + ipv6mib_fini, NULL, NULL, NULL, - ipv6MIB_start, + ipv6mib_start, NULL, ipv6MIB_ctree, ipv6MIB_CTREE_SIZE, NULL }; 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 (nonexistent) +++ projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/ipv6MIB_tree.def (revision 316268) @@ -0,0 +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 mib_2 + (55 ipv6MIB + (1 ipv6MIBObjects + (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 UNSIGNED32 op_ipv6MIBObjects GET) + (5 ipv6IfTable + (1 ipv6IfEntry : INTEGER op_ipv6IfTable + (1 ipv6IfIndex INTEGER) + (2 ipv6IfDescr OCTETSTRING | DisplayString GET SET) + (3 ipv6IfLowerLayer OID GET) + (4 ipv6IfEffectiveMtu UNSIGNED32 GET) + (5 ipv6IfReasmMaxSize UNSIGNED32 GET) + (6 ipv6IfIdentifier OCTETSTRING | Ipv6AddressIfIdentifier GET SET) + (7 ipv6IfIdentifierLength INTEGER GET SET) + (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 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 | 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 ipv6AddrPrefixAdvValidLifetime UNSIGNED32 GET) + ) + ) + (8 ipv6AddrTable + (1 ipv6AddrEntry : INTEGER OCTETSTRING | Ipv6Address op_ipv6AddrTable + (1 ipv6AddrAddress OCTETSTRING | Ipv6Address) + (2 ipv6AddrPfxLength 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 COUNTER op_ipv6MIBObjects GET) + (11 ipv6RouteTable + (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 ENUM ( 1 true 2 false ) GET SET) + ) + ) + (12 ipv6NetToMediaTable + (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/snmp_ipv6MIB.3 =================================================================== --- projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/snmp_ipv6MIB.3 (nonexistent) +++ projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/snmp_ipv6MIB.3 (revision 316268) @@ -0,0 +1,62 @@ +.\"- +.\" Copyright (C) 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. +.\" +.\" $FreeBSD$ +.\" +.Dd December 28, 2016 +.Dt SNMP_IPV6MIB 3 +.Os +.Sh NAME +.Nm snmp_ipv6MIB +.Nd "ipv6 module for snmpd" +.Sh LIBRARY +.Pq begemotSnmpdModulePath."ipv6MIB" = "/usr/lib/snmp_ipv6MIB.so" +.Sh DESCRIPTION +The +.Nm snmp_ipv6 +module implements the IPV6-MIB as standardized in RFC 2465. +.Sh FILES +.Bl -tag -width "XXXXXXXXX" +.It Pa /usr/share/snmp/defs/ipv6MIB_tree.def +The description of the MIB tree implemented by +.Nm . +.It Pa /usr/share/snmp/mibs/IPV6-MIB.txt +The MIB that is implemented by this module. +.El +.Sh STANDARDS +This module does not completely implement IPV6-MIB as standardized in +RFC 2465 and RFC 4293. +.Sh SEE ALSO +.Xr bsnmpd 1 , +.Xr gensnmptree 1 , +.Xr inet6 4 , +.Xr snmpmod 3 , +.Sh AUTHORS +The module was written by +.An Thor Steingrimsson Aq Mt thor.steingrimsson@isilon.com +and ported to FreeBSD by +.An Ngie Cooper Aq Mt ngie@FreeBSD.org +This manual page was written by +.An Ngie Cooper Aq Mt ngie@FreeBSD.org Property changes on: projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/snmp_ipv6MIB.3 ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property