Index: projects/bsnmp-ipv6-mib/etc/snmpd.config =================================================================== --- projects/bsnmp-ipv6-mib/etc/snmpd.config (revision 311277) +++ projects/bsnmp-ipv6-mib/etc/snmpd.config (revision 311278) @@ -1,319 +1,324 @@ # $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/snmpd.sock" = 1 begemotSnmpdLocalPortType."/var/run/snmpd.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. # # # 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 +# +#begemotSnmpdModulePath."ipv6MIB" = "/usr/lib/snmp_ipv6MIB.so" + +# # LM75 Sensor module # #begemotSnmpdModulePath."lm75" = "/usr/lib/snmp_lm75.so" # # MIB-2 module # begemotSnmpdModulePath."mibII" = "/usr/lib/snmp_mibII.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/Makefile =================================================================== --- projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/Makefile (revision 311277) +++ projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/Makefile (revision 311278) @@ -1,39 +1,43 @@ # $FreeBSD$ .include .PATH: ${.CURDIR}/../../../contrib/bsnmp/snmpd .if ${MK_ATM} != "no" _snmp_atm= snmp_atm .endif SUBDIR= ${_snmp_atm} \ snmp_bridge \ snmp_hostres \ snmp_lm75 \ snmp_mibII \ snmp_target \ snmp_usm \ snmp_vacm \ .if ${MK_HAST} != "no" SUBDIR+=snmp_hast .endif +.if ${MK_INET6} != "no" +SUBDIR+=snmp_ipv6 +.endif + .if ${MK_PF} != "no" SUBDIR+=snmp_pf .endif .if ${MK_NETGRAPH_SUPPORT} != "no" SUBDIR+=snmp_netgraph .endif .if ${MK_WIRELESS} != "no" SUBDIR+=snmp_wlan .endif INCS= snmpmod.h INCSDIR= ${INCLUDEDIR}/bsnmp .include Index: projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/IPV6-MIB.txt =================================================================== --- projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/IPV6-MIB.txt (nonexistent) +++ projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/IPV6-MIB.txt (revision 311278) @@ -0,0 +1,1443 @@ + IPV6-MIB DEFINITIONS ::= BEGIN + + IMPORTS + MODULE-IDENTITY, OBJECT-TYPE, NOTIFICATION-TYPE, + mib-2, Counter32, Unsigned32, Integer32, + Gauge32 FROM SNMPv2-SMI + DisplayString, PhysAddress, TruthValue, TimeStamp, + VariablePointer, RowPointer FROM SNMPv2-TC + MODULE-COMPLIANCE, OBJECT-GROUP, + NOTIFICATION-GROUP FROM SNMPv2-CONF + Ipv6IfIndex, Ipv6Address, Ipv6AddressPrefix, + Ipv6AddressIfIdentifier, + Ipv6IfIndexOrZero FROM IPV6-TC; + + ipv6MIB MODULE-IDENTITY + LAST-UPDATED "9802052155Z" + ORGANIZATION "IETF IPv6 Working Group" + CONTACT-INFO + " Dimitry Haskin + + Postal: Bay Networks, Inc. + 660 Techology Park Drive. + Billerica, MA 01821 + + US + + Tel: +1-978-916-8124 + E-mail: dhaskin@baynetworks.com + + Steve Onishi + + Postal: Bay Networks, Inc. + 3 Federal Street + Billerica, MA 01821 + US + + Tel: +1-978-916-3816 + E-mail: sonishi@baynetworks.com" + DESCRIPTION + "The MIB module for entities implementing the IPv6 + protocol." + ::= { mib-2 55 } + + -- the IPv6 general group + + ipv6MIBObjects OBJECT IDENTIFIER ::= { ipv6MIB 1 } + + ipv6Forwarding OBJECT-TYPE + SYNTAX INTEGER { + forwarding(1), -- acting as a router + + -- NOT acting as + notForwarding(2) -- a router + } + MAX-ACCESS read-write + STATUS current + DESCRIPTION + "The indication of whether this entity is acting + as an IPv6 router in respect to the forwarding of + datagrams received by, but not addressed to, this + entity. IPv6 routers forward datagrams. IPv6 + hosts do not (except those source-routed via the + host). + + Note that for some managed nodes, this object may + take on only a subset of the values possible. + Accordingly, it is appropriate for an agent to + return a `wrongValue' response if a management + station attempts to change this object to an + inappropriate value." + ::= { ipv6MIBObjects 1 } + + ipv6DefaultHopLimit OBJECT-TYPE + SYNTAX INTEGER(0..255) + MAX-ACCESS read-write + STATUS current + DESCRIPTION + "The default value inserted into the Hop Limit + field of the IPv6 header of datagrams originated + at this entity, whenever a Hop Limit value is not + supplied by the transport layer protocol." + DEFVAL { 64 } + ::= { ipv6MIBObjects 2 } + +ipv6Interfaces OBJECT-TYPE + SYNTAX Unsigned32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The number of IPv6 interfaces (regardless of + their current state) present on this system." + ::= { ipv6MIBObjects 3 } + +ipv6IfTableLastChange OBJECT-TYPE + SYNTAX TimeStamp + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The value of sysUpTime at the time of the last + insertion or removal of an entry in the + ipv6IfTable. If the number of entries has been + unchanged since the last re-initialization of + the local network management subsystem, then this + object contains a zero value." + ::= { ipv6MIBObjects 4 } + +-- the IPv6 Interfaces table + +ipv6IfTable OBJECT-TYPE + SYNTAX SEQUENCE OF Ipv6IfEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "The IPv6 Interfaces table contains information + on the entity's internetwork-layer interfaces. + An IPv6 interface constitutes a logical network + layer attachment to the layer immediately below + + IPv6 including internet layer 'tunnels', such as + tunnels over IPv4 or IPv6 itself." + ::= { ipv6MIBObjects 5 } + + ipv6IfEntry OBJECT-TYPE + SYNTAX Ipv6IfEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "An interface entry containing objects + about a particular IPv6 interface." + INDEX { ipv6IfIndex } + ::= { ipv6IfTable 1 } + + Ipv6IfEntry ::= SEQUENCE { + ipv6IfIndex Ipv6IfIndex, + ipv6IfDescr DisplayString, + ipv6IfLowerLayer VariablePointer, + ipv6IfEffectiveMtu Unsigned32, + ipv6IfReasmMaxSize Unsigned32, + ipv6IfIdentifier Ipv6AddressIfIdentifier, + ipv6IfIdentifierLength INTEGER, + ipv6IfPhysicalAddress PhysAddress, + ipv6IfAdminStatus INTEGER, + ipv6IfOperStatus INTEGER, + ipv6IfLastChange TimeStamp + } + + ipv6IfIndex OBJECT-TYPE + SYNTAX Ipv6IfIndex + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "A unique non-zero value identifying + the particular IPv6 interface." + ::= { ipv6IfEntry 1 } + + ipv6IfDescr OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-write + STATUS current + DESCRIPTION + "A textual string containing information about the + interface. This string may be set by the network + management system." + ::= { ipv6IfEntry 2 } + + ipv6IfLowerLayer OBJECT-TYPE + SYNTAX VariablePointer + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "This object identifies the protocol layer over + which this network interface operates. If this + network interface operates over the data-link + layer, then the value of this object refers to an + instance of ifIndex [6]. If this network interface + operates over an IPv4 interface, the value of this + object refers to an instance of ipAdEntAddr [3]. + + If this network interface operates over another + IPv6 interface, the value of this object refers to + an instance of ipv6IfIndex. If this network + interface is not currently operating over an active + protocol layer, then the value of this object + should be set to the OBJECT ID { 0 0 }." + ::= { ipv6IfEntry 3 } + + ipv6IfEffectiveMtu OBJECT-TYPE + SYNTAX Unsigned32 + UNITS "octets" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The size of the largest IPv6 packet which can be + sent/received on the interface, specified in + octets." + ::= { ipv6IfEntry 4 } + + ipv6IfReasmMaxSize OBJECT-TYPE + SYNTAX Unsigned32 (0..65535) + UNITS "octets" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The size of the largest IPv6 datagram which this + entity can re-assemble from incoming IPv6 fragmented + datagrams received on this interface." + ::= { ipv6IfEntry 5 } + + ipv6IfIdentifier OBJECT-TYPE + SYNTAX Ipv6AddressIfIdentifier + MAX-ACCESS read-write + STATUS current + DESCRIPTION + "The Interface Identifier for this interface that + + is (at least) unique on the link this interface is + attached to. The Interface Identifier is combined + with an address prefix to form an interface address. + + By default, the Interface Identifier is autoconfigured + according to the rules of the link type this + interface is attached to." + ::= { ipv6IfEntry 6 } + + ipv6IfIdentifierLength OBJECT-TYPE + SYNTAX INTEGER (0..64) + UNITS "bits" + MAX-ACCESS read-write + STATUS current + DESCRIPTION + "The length of the Interface Identifier in bits." + ::= { ipv6IfEntry 7 } + + ipv6IfPhysicalAddress OBJECT-TYPE + SYNTAX PhysAddress + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The interface's physical address. For example, for + an IPv6 interface attached to an 802.x link, this + object normally contains a MAC address. Note that + in some cases this address may differ from the + address of the interface's protocol sub-layer. The + interface's media-specific MIB must define the bit + and byte ordering and the format of the value of + this object. For interfaces which do not have such + an address (e.g., a serial line), this object should + contain an octet string of zero length." + ::= { ipv6IfEntry 8 } + +ipv6IfAdminStatus OBJECT-TYPE + SYNTAX INTEGER { + up(1), -- ready to pass packets + down(2) + } + MAX-ACCESS read-write + STATUS current + DESCRIPTION + "The desired state of the interface. When a managed + system initializes, all IPv6 interfaces start with + ipv6IfAdminStatus in the down(2) state. As a result + of either explicit management action or per + configuration information retained by the managed + + system, ipv6IfAdminStatus is then changed to + the up(1) state (or remains in the down(2) state)." + ::= { ipv6IfEntry 9 } + +ipv6IfOperStatus OBJECT-TYPE + SYNTAX INTEGER { + up(1), -- ready to pass packets + + down(2), + noIfIdentifier(3), -- no interface identifier + + -- status can not be + -- determined for some + unknown(4), -- reason + + -- some component is + notPresent(5) -- missing + } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The current operational state of the interface. + The noIfIdentifier(3) state indicates that no valid + Interface Identifier is assigned to the interface. + This state usually indicates that the link-local + interface address failed Duplicate Address Detection. + If ipv6IfAdminStatus is down(2) then ipv6IfOperStatus + should be down(2). If ipv6IfAdminStatus is changed + to up(1) then ipv6IfOperStatus should change to up(1) + if the interface is ready to transmit and receive + network traffic; it should remain in the down(2) or + noIfIdentifier(3) state if and only if there is a + fault that prevents it from going to the up(1) state; + it should remain in the notPresent(5) state if + the interface has missing (typically, lower layer) + components." + ::= { ipv6IfEntry 10 } + +ipv6IfLastChange OBJECT-TYPE + SYNTAX TimeStamp + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The value of sysUpTime at the time the interface + entered its current operational state. If the + current state was entered prior to the last + re-initialization of the local network management + + subsystem, then this object contains a zero + value." + ::= { ipv6IfEntry 11 } + + -- IPv6 Interface Statistics table + + ipv6IfStatsTable OBJECT-TYPE + SYNTAX SEQUENCE OF Ipv6IfStatsEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "IPv6 interface traffic statistics." + ::= { ipv6MIBObjects 6 } + + 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 } + + Ipv6IfStatsEntry ::= SEQUENCE { + ipv6IfStatsInReceives + Counter32, + ipv6IfStatsInHdrErrors + Counter32, + ipv6IfStatsInTooBigErrors + Counter32, + ipv6IfStatsInNoRoutes + Counter32, + ipv6IfStatsInAddrErrors + Counter32, + ipv6IfStatsInUnknownProtos + Counter32, + ipv6IfStatsInTruncatedPkts + Counter32, + ipv6IfStatsInDiscards + Counter32, + ipv6IfStatsInDelivers + Counter32, + ipv6IfStatsOutForwDatagrams + Counter32, + ipv6IfStatsOutRequests + Counter32, + ipv6IfStatsOutDiscards + + Counter32, + ipv6IfStatsOutFragOKs + Counter32, + ipv6IfStatsOutFragFails + Counter32, + ipv6IfStatsOutFragCreates + Counter32, + ipv6IfStatsReasmReqds + Counter32, + ipv6IfStatsReasmOKs + Counter32, + ipv6IfStatsReasmFails + Counter32, + ipv6IfStatsInMcastPkts + Counter32, + ipv6IfStatsOutMcastPkts + Counter32 + } + + ipv6IfStatsInReceives OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The total number of input datagrams received by + the interface, including those received in error." + ::= { ipv6IfStatsEntry 1 } + + ipv6IfStatsInHdrErrors OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The number of input datagrams discarded due to + errors in their IPv6 headers, including version + number mismatch, other format errors, hop count + exceeded, errors discovered in processing their + IPv6 options, etc." + ::= { ipv6IfStatsEntry 2 } + + ipv6IfStatsInTooBigErrors OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The number of input datagrams that could not be + forwarded because their size exceeded the link MTU + of outgoing interface." + ::= { ipv6IfStatsEntry 3 } + + ipv6IfStatsInNoRoutes OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The number of input datagrams discarded because no + route could be found to transmit them to their + destination." + ::= { ipv6IfStatsEntry 4 } + + ipv6IfStatsInAddrErrors OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The number of input datagrams discarded because + the IPv6 address in their IPv6 header's destination + field was not a valid address to be received at + this entity. This count includes invalid + addresses (e.g., ::0) and unsupported addresses + (e.g., addresses with unallocated prefixes). For + entities which are not IPv6 routers and therefore + do not forward datagrams, this counter includes + datagrams discarded because the destination address + was not a local address." + ::= { ipv6IfStatsEntry 5 } + + ipv6IfStatsInUnknownProtos OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The number of locally-addressed datagrams + received successfully but discarded because of an + unknown or unsupported protocol. This counter is + incremented at the interface to which these + datagrams were addressed which might not be + necessarily the input interface for some of + the datagrams." + ::= { ipv6IfStatsEntry 6 } + + ipv6IfStatsInTruncatedPkts OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The number of input datagrams discarded because + datagram frame didn't carry enough data." + ::= { ipv6IfStatsEntry 7 } + + ipv6IfStatsInDiscards OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The number of input IPv6 datagrams for which no + problems were encountered to prevent their + continued processing, but which were discarded + (e.g., for lack of buffer space). Note that this + counter does not include any datagrams discarded + while awaiting re-assembly." + ::= { ipv6IfStatsEntry 8 } + + ipv6IfStatsInDelivers OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The total number of datagrams successfully + delivered to IPv6 user-protocols (including ICMP). + This counter is incremented at the interface to + which these datagrams were addressed which might + not be necessarily the input interface for some of + the datagrams." + ::= { ipv6IfStatsEntry 9 } + + ipv6IfStatsOutForwDatagrams OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The number of output datagrams which this + entity received and forwarded to their final + destinations. In entities which do not act + as IPv6 routers, this counter will include + only those packets which were Source-Routed + via this entity, and the Source-Route + processing was successful. Note that for + a successfully forwarded datagram the counter + of the outgoing interface is incremented." + ::= { ipv6IfStatsEntry 10 } + + ipv6IfStatsOutRequests OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The total number of IPv6 datagrams which local IPv6 + user-protocols (including ICMP) supplied to IPv6 in + requests for transmission. Note that this counter + does not include any datagrams counted in + ipv6IfStatsOutForwDatagrams." + ::= { ipv6IfStatsEntry 11 } + + ipv6IfStatsOutDiscards OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The number of output IPv6 datagrams for which no + problem was encountered to prevent their + transmission to their destination, but which were + discarded (e.g., for lack of buffer space). Note + that this counter would include datagrams counted + in ipv6IfStatsOutForwDatagrams if any such packets + met this (discretionary) discard criterion." + ::= { ipv6IfStatsEntry 12 } + + ipv6IfStatsOutFragOKs OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The number of IPv6 datagrams that have been + successfully fragmented at this output interface." + ::= { ipv6IfStatsEntry 13 } + + ipv6IfStatsOutFragFails OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The number of IPv6 datagrams that have been + discarded because they needed to be fragmented + at this output interface but could not be." + ::= { ipv6IfStatsEntry 14 } + + ipv6IfStatsOutFragCreates OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The number of output datagram fragments that have + been generated as a result of fragmentation at + this output interface." + ::= { ipv6IfStatsEntry 15 } + + ipv6IfStatsReasmReqds OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The number of IPv6 fragments received which needed + to be reassembled at this interface. Note that this + counter is incremented at the interface to which + these fragments were addressed which might not + be necessarily the input interface for some of + the fragments." + ::= { ipv6IfStatsEntry 16 } + + ipv6IfStatsReasmOKs OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The number of IPv6 datagrams successfully + reassembled. Note that this counter is incremented + at the interface to which these datagrams were + addressed which might not be necessarily the input + interface for some of the fragments." + ::= { ipv6IfStatsEntry 17 } + + ipv6IfStatsReasmFails OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The number of failures detected by the IPv6 re- + assembly algorithm (for whatever reason: timed + out, errors, etc.). Note that this is not + necessarily a count of discarded IPv6 fragments + since some algorithms (notably the algorithm in + RFC 815) can lose track of the number of fragments + by combining them as they are received. + This counter is incremented at the interface to which + these fragments were addressed which might not be + necessarily the input interface for some of the + fragments." + ::= { ipv6IfStatsEntry 18 } + + ipv6IfStatsInMcastPkts OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The number of multicast packets received + by the interface" + ::= { ipv6IfStatsEntry 19 } + + ipv6IfStatsOutMcastPkts OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The number of multicast packets transmitted + by the interface" + ::= { ipv6IfStatsEntry 20 } + + -- Address Prefix table + + -- The IPv6 Address Prefix table contains information on + -- the entity's IPv6 Address Prefixes that are associated + -- with IPv6 interfaces. + + ipv6AddrPrefixTable OBJECT-TYPE + SYNTAX SEQUENCE OF Ipv6AddrPrefixEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "The list of IPv6 address prefixes of + IPv6 interfaces." + ::= { ipv6MIBObjects 7 } + + ipv6AddrPrefixEntry OBJECT-TYPE + SYNTAX Ipv6AddrPrefixEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "An interface entry containing objects of + a particular IPv6 address prefix." + INDEX { ipv6IfIndex, + ipv6AddrPrefix, + ipv6AddrPrefixLength } + ::= { ipv6AddrPrefixTable 1 } + + Ipv6AddrPrefixEntry ::= SEQUENCE { + + ipv6AddrPrefix Ipv6AddressPrefix, + ipv6AddrPrefixLength INTEGER (0..128), + ipv6AddrPrefixOnLinkFlag TruthValue, + ipv6AddrPrefixAutonomousFlag TruthValue, + ipv6AddrPrefixAdvPreferredLifetime Unsigned32, + ipv6AddrPrefixAdvValidLifetime Unsigned32 + } + + ipv6AddrPrefix OBJECT-TYPE + SYNTAX Ipv6AddressPrefix + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "The prefix associated with the this interface." + ::= { ipv6AddrPrefixEntry 1 } + + ipv6AddrPrefixLength OBJECT-TYPE + SYNTAX INTEGER (0..128) + UNITS "bits" + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "The length of the prefix (in bits)." + ::= { ipv6AddrPrefixEntry 2 } + + ipv6AddrPrefixOnLinkFlag OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "This object has the value 'true(1)', if this + prefix can be used for on-link determination + and the value 'false(2)' otherwise." + ::= { ipv6AddrPrefixEntry 3 } + + ipv6AddrPrefixAutonomousFlag OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Autonomous address configuration flag. When + true(1), indicates that this prefix can be used + for autonomous address configuration (i.e. can + be used to form a local interface address). + If false(2), it is not used to autoconfigure + a local interface address." + ::= { ipv6AddrPrefixEntry 4 } + + ipv6AddrPrefixAdvPreferredLifetime OBJECT-TYPE + SYNTAX Unsigned32 + UNITS "seconds" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "It is the length of time in seconds that this + prefix will remain preferred, i.e. time until + deprecation. A value of 4,294,967,295 represents + infinity. + + The address generated from a deprecated prefix + should no longer be used as a source address in + new communications, but packets received on such + an interface are processed as expected." + ::= { ipv6AddrPrefixEntry 5 } + + ipv6AddrPrefixAdvValidLifetime OBJECT-TYPE + SYNTAX Unsigned32 + UNITS "seconds" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "It is the length of time in seconds that this + prefix will remain valid, i.e. time until + invalidation. A value of 4,294,967,295 represents + infinity. + + The address generated from an invalidated prefix + should not appear as the destination or source + address of a packet." + ::= { ipv6AddrPrefixEntry 6 } + + -- the IPv6 Address table + + -- The IPv6 address table contains this node's IPv6 + -- addressing information. + + 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 } + + ipv6AddrEntry OBJECT-TYPE + SYNTAX Ipv6AddrEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "The addressing information for one of this + node's interface addresses." + INDEX { ipv6IfIndex, ipv6AddrAddress } + ::= { ipv6AddrTable 1 } + + Ipv6AddrEntry ::= + SEQUENCE { + ipv6AddrAddress Ipv6Address, + ipv6AddrPfxLength INTEGER, + ipv6AddrType INTEGER, + ipv6AddrAnycastFlag TruthValue, + ipv6AddrStatus INTEGER + } + + ipv6AddrAddress OBJECT-TYPE + SYNTAX Ipv6Address + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "The IPv6 address to which this entry's addressing + information pertains." + ::= { ipv6AddrEntry 1 } + + ipv6AddrPfxLength OBJECT-TYPE + SYNTAX INTEGER(0..128) + UNITS "bits" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The length of the prefix (in bits) associated with + the IPv6 address of this entry." + ::= { ipv6AddrEntry 2 } + + ipv6AddrType OBJECT-TYPE + SYNTAX INTEGER { + -- address has been formed + -- using stateless + stateless(1), -- autoconfiguration + + -- address has been acquired + -- by stateful means + -- (e.g. DHCPv6, manual + stateful(2), -- configuration) + + -- type can not be determined + unknown(3) -- for some reason. + } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The type of address. Note that 'stateless(1)' + refers to an address that was statelessly + autoconfigured; 'stateful(2)' refers to a address + which was acquired by via a stateful protocol + (e.g. DHCPv6, manual configuration)." + ::= { ipv6AddrEntry 3 } + + ipv6AddrAnycastFlag OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "This object has the value 'true(1)', if this + address is an anycast address and the value + 'false(2)' otherwise." + ::= { ipv6AddrEntry 4 } + + ipv6AddrStatus OBJECT-TYPE + SYNTAX INTEGER { + preferred(1), + deprecated(2), + invalid(3), + inaccessible(4), + unknown(5) -- status can not be determined + -- for some reason. + } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Address status. The preferred(1) state indicates + that this is a valid address that can appear as + the destination or source address of a packet. + The deprecated(2) state indicates that this is + a valid but deprecated address that should no longer + be used as a source address in new communications, + but packets addressed to such an address are + processed as expected. The invalid(3) state indicates + that this is not valid address which should not + + appear as the destination or source address of + a packet. The inaccessible(4) state indicates that + the address is not accessible because the interface + to which this address is assigned is not operational." + ::= { ipv6AddrEntry 5 } + + -- IPv6 Routing objects + + ipv6RouteNumber OBJECT-TYPE + SYNTAX Gauge32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The number of current ipv6RouteTable entries. + This is primarily to avoid having to read + the table in order to determine this number." + ::= { ipv6MIBObjects 9 } + + ipv6DiscardedRoutes OBJECT-TYPE + SYNTAX Counter32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The number of routing entries which were chosen + to be discarded even though they are valid. One + possible reason for discarding such an entry could + be to free-up buffer space for other routing + entries." + ::= { ipv6MIBObjects 10 } + + -- IPv6 Routing table + + ipv6RouteTable OBJECT-TYPE + SYNTAX SEQUENCE OF Ipv6RouteEntry + MAX-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 } + + ipv6RouteEntry OBJECT-TYPE + SYNTAX Ipv6RouteEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "A routing entry." + INDEX { ipv6RouteDest, + ipv6RoutePfxLength, + ipv6RouteIndex } + ::= { ipv6RouteTable 1 } + + Ipv6RouteEntry ::= SEQUENCE { + ipv6RouteDest Ipv6Address, + ipv6RoutePfxLength INTEGER, + ipv6RouteIndex Unsigned32, + ipv6RouteIfIndex Ipv6IfIndexOrZero, + ipv6RouteNextHop Ipv6Address, + ipv6RouteType INTEGER, + ipv6RouteProtocol INTEGER, + ipv6RoutePolicy Integer32, + ipv6RouteAge Unsigned32, + ipv6RouteNextHopRDI Unsigned32, + ipv6RouteMetric Unsigned32, + ipv6RouteWeight Unsigned32, + ipv6RouteInfo RowPointer, + ipv6RouteValid TruthValue + } + + ipv6RouteDest OBJECT-TYPE + SYNTAX Ipv6Address + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "The destination IPv6 address of this route. + This object may not take a Multicast address + value." + ::= { ipv6RouteEntry 1 } + + ipv6RoutePfxLength OBJECT-TYPE + SYNTAX INTEGER(0..128) + UNITS "bits" + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Indicates the prefix length of the destination + address." + ::= { ipv6RouteEntry 2 } + + ipv6RouteIndex OBJECT-TYPE + SYNTAX Unsigned32 + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "The value which uniquely identifies the route + among the routes to the same network layer + destination. The way this value is chosen is + implementation specific but it must be unique for + ipv6RouteDest/ipv6RoutePfxLength pair and remain + constant for the life of the route." + ::= { ipv6RouteEntry 3 } + + ipv6RouteIfIndex OBJECT-TYPE + SYNTAX Ipv6IfIndexOrZero + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The index value which uniquely identifies the local + interface through which the next hop of this + route should be reached. The interface identified + by a particular value of this index is the same + interface as identified by the same value of + ipv6IfIndex. For routes of the discard type this + value can be zero." + ::= { ipv6RouteEntry 4 } + + ipv6RouteNextHop OBJECT-TYPE + SYNTAX Ipv6Address + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "On remote routes, the address of the next + system en route; otherwise, ::0 + ('00000000000000000000000000000000'H in ASN.1 + string representation)." + ::= { ipv6RouteEntry 5 } + + ipv6RouteType OBJECT-TYPE + SYNTAX INTEGER { + other(1), -- none of the following + + -- an route indicating that + -- packets to destinations + -- matching this route are + discard(2), -- to be discarded + + -- route to directly + local(3), -- connected (sub-)network + + -- route to a remote + + remote(4) -- destination + + } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The type of route. Note that 'local(3)' refers + to a route for which the next hop is the final + destination; 'remote(4)' refers to a route for + which the next hop is not the final + destination; 'discard(2)' refers to a route + indicating that packets to destinations matching + this route are to be discarded (sometimes called + black-hole route)." + ::= { ipv6RouteEntry 6 } + + ipv6RouteProtocol OBJECT-TYPE + SYNTAX INTEGER { + other(1), -- none of the following + + -- non-protocol information, + -- e.g., manually configured + local(2), -- entries + + netmgmt(3), -- static route + + -- obtained via Neighbor + -- Discovery protocol, + ndisc(4), -- e.g., result of Redirect + + -- the following are all + -- dynamic routing protocols + rip(5), -- RIPng + ospf(6), -- Open Shortest Path First + bgp(7), -- Border Gateway Protocol + idrp(8), -- InterDomain Routing Protocol + igrp(9) -- InterGateway Routing Protocol + } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The routing mechanism via which this route was + learned." + ::= { ipv6RouteEntry 7 } + + ipv6RoutePolicy OBJECT-TYPE + SYNTAX Integer32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The general set of conditions that would cause the + selection of one multipath route (set of next hops + for a given destination) is referred to as 'policy'. + Unless the mechanism indicated by ipv6RouteProtocol + specified otherwise, the policy specifier is the + 8-bit Traffic Class field of the IPv6 packet header + that is zero extended at the left to a 32-bit value. + + Protocols defining 'policy' otherwise must either + define a set of values which are valid for + this object or must implement an integer- + instanced policy table for which this object's + value acts as an index." + ::= { ipv6RouteEntry 8 } + + ipv6RouteAge OBJECT-TYPE + SYNTAX Unsigned32 + UNITS "seconds" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The number of seconds since this route was last + updated or otherwise determined to be correct. + Note that no semantics of `too old' can be implied + except through knowledge of the routing protocol + by which the route was learned." + ::= { ipv6RouteEntry 9 } + + ipv6RouteNextHopRDI OBJECT-TYPE + SYNTAX Unsigned32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The Routing Domain ID of the Next Hop. + The semantics of this object are determined by + the routing-protocol specified in the route's + ipv6RouteProtocol value. When this object is + unknown or not relevant its value should be set + to zero." + ::= { ipv6RouteEntry 10 } + + ipv6RouteMetric OBJECT-TYPE + SYNTAX Unsigned32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The routing metric for this route. The + semantics of this metric are determined by the + routing protocol specified in the route's + ipv6RouteProtocol value. When this is unknown + or not relevant to the protocol indicated by + ipv6RouteProtocol, the object value should be + set to its maximum value (4,294,967,295)." + ::= { ipv6RouteEntry 11 } + + ipv6RouteWeight OBJECT-TYPE + SYNTAX Unsigned32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The system internal weight value for this route. + The semantics of this value are determined by + the implementation specific rules. Generally, + within routes with the same ipv6RoutePolicy value, + the lower the weight value the more preferred is + the route." + ::= { ipv6RouteEntry 12 } + + ipv6RouteInfo OBJECT-TYPE + SYNTAX RowPointer + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "A reference to MIB definitions specific to the + particular routing protocol which is responsible + for this route, as determined by the value + specified in the route's ipv6RouteProto value. + If this information is not present, its value + should be set to the OBJECT ID { 0 0 }, + which is a syntactically valid object identifier, + and any implementation conforming to ASN.1 + and the Basic Encoding Rules must be able to + generate and recognize this value." + ::= { ipv6RouteEntry 13 } + + ipv6RouteValid OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-write + STATUS current + DESCRIPTION + "Setting this object to the value 'false(2)' has + the effect of invalidating the corresponding entry + in the ipv6RouteTable object. That is, it + effectively disassociates the destination + + identified with said entry from the route + identified with said entry. It is an + implementation-specific matter as to whether the + agent removes an invalidated entry from the table. + Accordingly, management stations must be prepared + to receive tabular information from agents that + corresponds to entries not currently in use. + Proper interpretation of such entries requires + examination of the relevant ipv6RouteValid + object." + DEFVAL { true } + ::= { ipv6RouteEntry 14 } + + -- IPv6 Address Translation table + + 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 } + + ipv6NetToMediaEntry OBJECT-TYPE + SYNTAX Ipv6NetToMediaEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Each entry contains one IPv6 address to `physical' + address equivalence." + INDEX { ipv6IfIndex, + ipv6NetToMediaNetAddress } + ::= { ipv6NetToMediaTable 1 } + + Ipv6NetToMediaEntry ::= SEQUENCE { + ipv6NetToMediaNetAddress + Ipv6Address, + ipv6NetToMediaPhysAddress + + PhysAddress, + ipv6NetToMediaType + INTEGER, + ipv6IfNetToMediaState + INTEGER, + ipv6IfNetToMediaLastUpdated + TimeStamp, + ipv6NetToMediaValid + TruthValue + } + + ipv6NetToMediaNetAddress OBJECT-TYPE + SYNTAX Ipv6Address + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "The IPv6 Address corresponding to + the media-dependent `physical' address." + ::= { ipv6NetToMediaEntry 1 } + + ipv6NetToMediaPhysAddress OBJECT-TYPE + SYNTAX PhysAddress + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The media-dependent `physical' address." + ::= { ipv6NetToMediaEntry 2 } + + ipv6NetToMediaType OBJECT-TYPE + SYNTAX INTEGER { + other(1), -- none of the following + dynamic(2), -- dynamically resolved + static(3), -- statically configured + local(4) -- local interface + } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The type of the mapping. The 'dynamic(2)' type + indicates that the IPv6 address to physical + addresses mapping has been dynamically + resolved using the IPv6 Neighbor Discovery + protocol. The static(3)' types indicates that + the mapping has been statically configured. + The local(4) indicates that the mapping is + provided for an entity's own interface address." + ::= { ipv6NetToMediaEntry 3 } + +ipv6IfNetToMediaState OBJECT-TYPE + SYNTAX INTEGER { + reachable(1), -- confirmed reachability + + stale(2), -- unconfirmed reachability + + delay(3), -- waiting for reachability + -- confirmation before entering + -- the probe state + + probe(4), -- actively probing + + invalid(5), -- an invalidated mapping + + unknown(6) -- state can not be determined + -- for some reason. + } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The Neighbor Unreachability Detection [8] state + for the interface when the address mapping in + this entry is used." + ::= { ipv6NetToMediaEntry 4 } + +ipv6IfNetToMediaLastUpdated OBJECT-TYPE + SYNTAX TimeStamp + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The value of sysUpTime at the time this entry + was last updated. If this entry was updated prior + to the last re-initialization of the local network + management subsystem, then this object contains + a zero value." + ::= { ipv6NetToMediaEntry 5 } + + ipv6NetToMediaValid OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-write + STATUS current + DESCRIPTION + "Setting this object to the value 'false(2)' has + the effect of invalidating the corresponding entry + in the ipv6NetToMediaTable. That is, it effectively + disassociates the interface identified with said + entry from the mapping identified with said entry. + It is an implementation-specific matter as to + + whether the agent removes an invalidated entry + from the table. Accordingly, management stations + must be prepared to receive tabular information + from agents that corresponds to entries not + currently in use. Proper interpretation of such + entries requires examination of the relevant + ipv6NetToMediaValid object." + DEFVAL { true } + ::= { ipv6NetToMediaEntry 6 } + +-- definition of IPv6-related notifications. +-- Note that we need ipv6NotificationPrefix with the 0 +-- sub-identifier to make this MIB to translate to +-- an SNMPv1 format in a reversible way. For example +-- it is needed for proxies that convert SNMPv1 traps +-- to SNMPv2 notifications without MIB knowledge. + +ipv6Notifications OBJECT IDENTIFIER + ::= { ipv6MIB 2 } +ipv6NotificationPrefix OBJECT IDENTIFIER + ::= { ipv6Notifications 0 } + +ipv6IfStateChange NOTIFICATION-TYPE + OBJECTS { + ipv6IfDescr, + ipv6IfOperStatus -- the new state of the If. + } + STATUS current + DESCRIPTION + "An ipv6IfStateChange notification signifies + that there has been a change in the state of + an ipv6 interface. This notification should + be generated when the interface's operational + status transitions to or from the up(1) state." + ::= { ipv6NotificationPrefix 1 } + +-- conformance information + +ipv6Conformance OBJECT IDENTIFIER ::= { ipv6MIB 3 } + +ipv6Compliances OBJECT IDENTIFIER ::= { ipv6Conformance 1 } +ipv6Groups OBJECT IDENTIFIER ::= { ipv6Conformance 2 } + +-- compliance statements + +ipv6Compliance MODULE-COMPLIANCE + STATUS current + DESCRIPTION + "The compliance statement for SNMPv2 entities which + implement ipv6 MIB." + MODULE -- this module + MANDATORY-GROUPS { ipv6GeneralGroup, + ipv6NotificationGroup } + OBJECT ipv6Forwarding + MIN-ACCESS read-only + DESCRIPTION + "An agent is not required to provide write + access to this object" + OBJECT ipv6DefaultHopLimit + MIN-ACCESS read-only + DESCRIPTION + "An agent is not required to provide write + access to this object" + OBJECT ipv6IfDescr + MIN-ACCESS read-only + DESCRIPTION + "An agent is not required to provide write + access to this object" + OBJECT ipv6IfIdentifier + MIN-ACCESS read-only + DESCRIPTION + "An agent is not required to provide write + access to this object" + OBJECT ipv6IfIdentifierLength + MIN-ACCESS read-only + DESCRIPTION + "An agent is not required to provide write + access to this object" + + OBJECT ipv6IfAdminStatus + MIN-ACCESS read-only + DESCRIPTION + "An agent is not required to provide write + access to this object" + OBJECT ipv6RouteValid + MIN-ACCESS read-only + DESCRIPTION + "An agent is not required to provide write + access to this object" + OBJECT ipv6NetToMediaValid + MIN-ACCESS read-only + DESCRIPTION + "An agent is not required to provide write + + access to this object" + ::= { ipv6Compliances 1 } + +ipv6GeneralGroup OBJECT-GROUP + OBJECTS { ipv6Forwarding, + ipv6DefaultHopLimit, + ipv6Interfaces, + ipv6IfTableLastChange, + ipv6IfDescr, + ipv6IfLowerLayer, + ipv6IfEffectiveMtu, + ipv6IfReasmMaxSize, + ipv6IfIdentifier, + ipv6IfIdentifierLength, + ipv6IfPhysicalAddress, + ipv6IfAdminStatus, + ipv6IfOperStatus, + ipv6IfLastChange, + ipv6IfStatsInReceives, + ipv6IfStatsInHdrErrors, + ipv6IfStatsInTooBigErrors, + ipv6IfStatsInNoRoutes, + ipv6IfStatsInAddrErrors, + ipv6IfStatsInUnknownProtos, + ipv6IfStatsInTruncatedPkts, + ipv6IfStatsInDiscards, + ipv6IfStatsInDelivers, + ipv6IfStatsOutForwDatagrams, + ipv6IfStatsOutRequests, + ipv6IfStatsOutDiscards, + ipv6IfStatsOutFragOKs, + ipv6IfStatsOutFragFails, + ipv6IfStatsOutFragCreates, + ipv6IfStatsReasmReqds, + ipv6IfStatsReasmOKs, + ipv6IfStatsReasmFails, + ipv6IfStatsInMcastPkts, + ipv6IfStatsOutMcastPkts, + ipv6AddrPrefixOnLinkFlag, + ipv6AddrPrefixAutonomousFlag, + ipv6AddrPrefixAdvPreferredLifetime, + ipv6AddrPrefixAdvValidLifetime, + ipv6AddrPfxLength, + ipv6AddrType, + ipv6AddrAnycastFlag, + ipv6AddrStatus, + ipv6RouteNumber, + ipv6DiscardedRoutes, + ipv6RouteIfIndex, + ipv6RouteNextHop, + ipv6RouteType, + ipv6RouteProtocol, + ipv6RoutePolicy, + ipv6RouteAge, + ipv6RouteNextHopRDI, + ipv6RouteMetric, + ipv6RouteWeight, + ipv6RouteInfo, + ipv6RouteValid, + ipv6NetToMediaPhysAddress, + ipv6NetToMediaType, + ipv6IfNetToMediaState, + ipv6IfNetToMediaLastUpdated, + ipv6NetToMediaValid } + STATUS current + DESCRIPTION + "The IPv6 group of objects providing for basic + management of IPv6 entities." + ::= { ipv6Groups 1 } + +ipv6NotificationGroup NOTIFICATION-GROUP + NOTIFICATIONS { ipv6IfStateChange } + STATUS current + DESCRIPTION + "The notification that an IPv6 entity is required + to implement." + ::= { ipv6Groups 2 } + + END Property changes on: projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/IPV6-MIB.txt ___________________________________________________________________ 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 Index: projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/Makefile =================================================================== --- projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/Makefile (nonexistent) +++ projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/Makefile (revision 311278) @@ -0,0 +1,23 @@ +# $FreeBSD$ +# + +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+= util.c + +XSYM= ${MOD} + +BMIBS= IPV6-MIB.txt +MAN= snmp_${MOD}.3 +DEFS= ${MOD}_tree.def + +CFLAGS+= -DSNMPTREE_TYPES + +.include Property changes on: projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/Makefile ___________________________________________________________________ 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 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 (nonexistent) +++ projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/ipv6.c (revision 311278) @@ -0,0 +1,206 @@ +/* + * Copyright (c) 2016 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 "ipv6.h" +#include "ipv6MIB_oid.h" + +/* + * XXX (ngie): mibII implements a lot of this already. Probably should + * converge the two modules. + */ + +static struct lmodule *module; + +struct ipv6_interface_list ipv6_interfaces = + TAILQ_HEAD_INITIALIZER(ipv6_interfaces); + +static const struct asn_oid oid_ipv6MIB = OIDX_ipv6MIB; + +static u_int ipv6_reg; + +int +load_ipv6_interface_table(void) +{ + struct ipv6_interface *ip = NULL; + struct if_nameindex *p = NULL, *ifnames = NULL; + + ifnames = if_nameindex(); + + for (p = ifnames; p != NULL && p->if_index; p++) { + ip = calloc(1, sizeof(struct ipv6_interface)); + if (ip == NULL) { + free_ipv6_interface_table(); + if_freenameindex(ifnames); + return (-1); + } + + ip->index = p->if_index; + + if ((ip->name = strdup(p->if_name)) == NULL) { + free_ipv6_interface_table(); + if_freenameindex(ifnames); + return (-1); + } + + INSERT_OBJECT_INT(ip, &ipv6_interfaces); + } + + if_freenameindex(ifnames); + + return (0); +} + +void +free_ipv6_interface_table(void) +{ + struct ipv6_interface *ip; + + /* + * XXX (ngie): TAILQ_FOREACH_SAFE would be better, but using mibII + * would be the best + */ + while ((ip = TAILQ_FIRST(&ipv6_interfaces)) != NULL) { + TAILQ_REMOVE(&ipv6_interfaces, ip, link); + free(ip->name); + free(ip); + ip = NULL; + } +} + +static int +if_countifindex(void) +{ + struct ipv6_interface *ip; + int count = 0; + + TAILQ_FOREACH(ip, &ipv6_interfaces, link) { + count++; + } + return count; +} + +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 }; + int result = 0; + size_t resultsiz = sizeof(result); + + switch (op) { + case SNMP_OP_GETNEXT: + case SNMP_OP_GET: + break; + case SNMP_OP_SET: + /* XXX (ngie): this is a lie. It's not implemented. */ + return (SNMP_ERR_NOT_WRITEABLE); + case SNMP_OP_ROLLBACK: + case SNMP_OP_COMMIT: + return (SNMP_ERR_NOERROR); + } + + switch (value->var.subs[sub - 1]) { + case LEAF_ipv6Forwarding: + name[3] = IPV6CTL_FORWARDING; + namestr = "IPV6CTL_FORWARDING"; + if (sysctl(name, nitems(name), &result, &resultsiz, NULL, + 0) < 0) + return (SNMP_ERR_GENERR); + /* XXX (ngie): hardcoded value. */ + value->v.integer = (result) ? 1 : 2; + break; + case LEAF_ipv6DefaultHopLimit: + name[3] = IPV6CTL_DEFHLIM; + namestr = "IPV6CTL_DEFHLIM"; + if (sysctl(name, nitems(name), &result, &resultsiz, NULL, + 0) < 0) + return (SNMP_ERR_GENERR); + value->v.integer = result; + break; + case LEAF_ipv6IfTableLastChange: + { + /* XXX (ngie): this needs to be implemented */ + value->v.uint32 = 0; + break; + } + case LEAF_ipv6Interfaces: + /* + * XXX (ngie): this incorrectly assumes that all interfaces + * are IPv6 enabled. + */ + value->v.integer = if_countifindex(); + break; + default: + return (SNMP_ERR_NOSUCHNAME); + } + return (SNMP_ERR_NOERROR); +} + +static void +ipv6MIB_start(void) +{ + load_ipv6_interface_table(); + + 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) +{ + module = mod; + + return (0); +} + +static int +ipv6MIB_fini(void) +{ + free_ipv6_interface_table(); + + or_unregister(ipv6_reg); + + return (0); +} + +const struct snmp_module config = { + "This module implements RFC 2465.", + ipv6MIB_init, + ipv6MIB_fini, + NULL, + NULL, + NULL, + ipv6MIB_start, + NULL, + ipv6MIB_ctree, + ipv6MIB_CTREE_SIZE, + NULL +}; Property changes on: projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/ipv6.c ___________________________________________________________________ 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 Index: projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/ipv6.h =================================================================== --- projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/ipv6.h (nonexistent) +++ projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/ipv6.h (revision 311278) @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2016 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. + */ + +#ifndef __SNMP_IPV6__IPV6_H__ +#define __SNMP_IPV6__IPV6_H__ + +#include + +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "ipv6MIB_tree.h" + +struct ipv6_interface { + TAILQ_ENTRY(ipv6_interface) link; + + char *name; /* The interface name */ + int index; /* The interface number */ +}; +TAILQ_HEAD(ipv6_interface_list, ipv6_interface); + +extern struct ipv6_interface_list ipv6_interfaces; + +int load_ipv6_interface_table(void); +void free_ipv6_interface_table(void); + +#endif Property changes on: projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/ipv6.h ___________________________________________________________________ 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 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 311278) @@ -0,0 +1,126 @@ +#- +# 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 + (55 ipv6MIB + (1 ipv6MIBObjects + (1 ipv6Forwarding INTEGER op_ipv6MIBObjects GET SET) + (2 ipv6DefaultHopLimit INTEGER op_ipv6MIBObjects GET SET) + (3 ipv6Interfaces UNSIGNED32 op_ipv6MIBObjects GET) + (4 ipv6IfTableLastChange TIMETICKS op_ipv6MIBObjects GET) + (5 ipv6IfTable + (1 ipv6IfEntry : INTEGER op_ipv6IfTable + (1 ipv6IfIndex INTEGER) # lookup + (2 ipv6IfDescr OCTETSTRING GET SET) + (3 ipv6IfLowerLayer OID GET) + (4 ipv6IfEffectiveMtu UNSIGNED32 GET) + (5 ipv6IfReasmMaxSize UNSIGNED32 GET) + (6 ipv6IfIdentifier OCTETSTRING GET SET) # lookup + (7 ipv6IfIdentifierLength INTEGER GET SET) + (8 ipv6IfPhysicalAddress OCTETSTRING GET) # lookup + (9 ipv6IfAdminStatus INTEGER GET SET) + (10 ipv6IfOperStatus INTEGER GET) + (11 ipv6IfLastChange TIMETICKS 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) + (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) # lookup + (2 ipv6AddrPrefixLength INTEGER) + (3 ipv6AddrPrefixOnLinkFlag INTEGER GET) + (4 ipv6AddrPrefixAutonomousFlag INTEGER GET) + (5 ipv6AddrPrefixAdvPreferredLifetime UNSIGNED32 GET) + (6 ipv6AddrPrefixPrefixAdvValidLifetime UNSIGNED32 GET) + )) + (8 ipv6AddrTable + (1 ipv6AddrEntry : INTEGER OCTETSTRING op_ipv6AddrTable + (1 ipv6AddrAddress OCTETSTRING) # lookup + (2 ipv6AddrPfxLength INTEGER GET) + (3 ipv6AddrType INTEGER GET) + (4 ipv6AddrAnycastFlag INTEGER GET) + (5 ipv6AddrStatus INTEGER GET) + )) + (9 ipv6RouteNumber GAUGE op_ipv6MIBObjects GET) + (10 ipv6DiscardedRoutes GAUGE op_ipv6MIBObjects GET) + (11 ipv6RouteTable + (1 ipv6RouteEntry : OCTETSTRING INTEGER UNSIGNED32 op_ipv6RouteTable + (1 ipv6RouteDest OCTETSTRING) # lookup + (2 ipv6RoutePfxLength INTEGER) + (3 ipv6RouteIndex UNSIGNED32) + (4 ipv6RouteIfIndex OID GET) # lookup + (5 ipv6RouteNextHop OCTETSTRING GET) # lookup + (6 ipv6RouteType INTEGER GET) + (7 ipv6RouteProtocol INTEGER GET) + (8 ipv6RoutePolicy INTEGER GET) + (9 ipv6RouteAge UNSIGNED32 GET) + (10 ipv6RouteNextHopRDI UNSIGNED32 GET) + (11 ipv6RouteMetric UNSIGNED32 GET) + (12 ipv6RouteWeight UNSIGNED32 GET) + (13 ipv6RouteInfo OID GET) # lookup + (14 ipv6RouteValid INTEGER GET) + )) + (12 ipv6NetToMediaTable + (1 ipv6NetToMediaEntry : INTEGER OCTETSTRING op_ipv6NetToMediaTable + (1 ipv6NetToMediaAddress OCTETSTRING) # lookup + (2 ipv6NetToMediaPhysAddress OCTETSTRING GET) # lookup + (3 ipv6NetToMediaType INTEGER GET) + (4 ipv6NetToMediaState INTEGER GET) + (5 ipv6NetToMediaLastUpdated UNSIGNED32 GET) + (6 ipv6NetToMediaValid INTEGER GET) + )) + ) + ) + ) + ) +) 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 (nonexistent) +++ projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/ipv6_addrPrefixTable.c (revision 311278) @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2016 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 "ipv6.h" + +int +op_ipv6AddrPrefixTable(struct snmp_context *ctx __unused, + struct snmp_value *value __unused, u_int sub __unused, + u_int iidx __unused, enum snmp_op op __unused) +{ + /* Not implemented */ + return (SNMP_ERR_NOSUCHNAME); +} Property changes on: projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/ipv6_addrPrefixTable.c ___________________________________________________________________ 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 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 (nonexistent) +++ projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/ipv6_addrTable.c (revision 311278) @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2016 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 "ipv6.h" + +int +op_ipv6AddrTable(struct snmp_context *ctx __unused, struct snmp_value *value __unused, + u_int sub __unused, u_int iidx __unused, enum snmp_op op __unused) +{ + /* Not implemented */ + return (SNMP_ERR_NOSUCHNAME); +} Property changes on: projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/ipv6_addrTable.c ___________________________________________________________________ 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 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 (nonexistent) +++ projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/ipv6_ifStatsTable.c (revision 311278) @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2016 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 "ipv6.h" + +int +op_ipv6IfStatsTable(struct snmp_context *ctx __unused, struct snmp_value *value __unused, + u_int sub __unused, u_int iidx __unused, enum snmp_op op __unused) +{ + + /* Not yet implemented */ + return (SNMP_ERR_NOSUCHNAME); +} Property changes on: projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/ipv6_ifStatsTable.c ___________________________________________________________________ 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 Index: projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/ipv6_ifTable.c =================================================================== --- projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/ipv6_ifTable.c (nonexistent) +++ projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/ipv6_ifTable.c (revision 311278) @@ -0,0 +1,233 @@ +/*- + * Copyright (c) 2016 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 "util.h" + +int +op_ipv6IfTable(struct snmp_context *ctx __unused, struct snmp_value *value, + u_int sub, u_int iidx __unused, enum snmp_op op) +{ + struct ipv6_interface *ip; + asn_subid_t which; + + switch (op) { + case SNMP_OP_GETNEXT: + ip = NEXT_OBJECT_INT(&ipv6_interfaces, &value->var, sub); + if (ip == NULL) + return SNMP_ERR_NOSUCHNAME; + value->var.len = sub + 1; + value->var.subs[sub] = ip->index; + break; + case SNMP_OP_GET: + ip = FIND_OBJECT_INT(&ipv6_interfaces, &value->var, sub); + if (ip == NULL) + return (SNMP_ERR_NOSUCHNAME); + break; + case SNMP_OP_SET: + case SNMP_OP_COMMIT: + case SNMP_OP_ROLLBACK: + return (SNMP_ERR_NOERROR); + default: + return (SNMP_ERR_RES_UNAVAIL); + } + + which = value->var.subs[sub - 1]; + + switch (which) { + case LEAF_ipv6IfDescr: + string_get(value, ip->name, strlen(ip->name)); + break; + case LEAF_ipv6IfLowerLayer: + /* + * TODO: return nullOID until the proper way is figured out. + * For now, use `oid_zeroDotZero`. + */ + oid_get(value, &oid_zeroDotZero); + break; + case LEAF_ipv6IfReasmMaxSize: + value->v.uint32 = IPV6_MAXPACKET; + break; + case LEAF_ipv6IfEffectiveMtu: + { + struct ifreq ifr; + int s; + + memset(&ifr, 0, sizeof(ifr)); + ifr.ifr_addr.sa_family = AF_INET6; + strncpy(ifr.ifr_name, ip->name, sizeof(ifr.ifr_name)); + + if ((s = socket(ifr.ifr_addr.sa_family, SOCK_DGRAM, 0)) < 0) + return (SNMP_ERR_RES_UNAVAIL); + + if (ioctl(s, SIOCGIFMTU, (caddr_t) &ifr) != -1) + value->v.uint32 = ifr.ifr_mtu; + + close(s); + break; + } + case LEAF_ipv6IfIdentifier: + string_get(value, "", 0); + break; + case LEAF_ipv6IfIdentifierLength: + /* XXX (ngie): get the length of LEAF_ipv6IfIdentifier */ + value->v.integer = 0; + break; + case LEAF_ipv6IfPhysicalAddress: + { + char *c, *tmp = NULL; + struct ifaddrs *ifap, *ifa; + struct sockaddr_dl sdl; + + if (getifaddrs(&ifap) == -1) { + string_get(value, "", 0); + break; + } + + for (ifa = ifap; ifa != NULL; ifa = ifa->ifa_next) { + + if (strcmp(ifa->ifa_name, ip->name) != 0) + continue; + + if (ifa->ifa_addr->sa_family != AF_LINK) + continue; + + /* + * XXX (ngie): the following string manipulation seems + * really hacky. This should emulate what ifconfig(8) + * does by opening a socket and throbbing a few ioctls + * to get the MAC address for an interface. + */ + memcpy(&sdl, ifa->ifa_addr, + sizeof(*(ifa->ifa_addr))); + + tmp = link_ntoa(&sdl); + + /* + * link_ntoa returns a string with the follow format + * :, + * e.g. "em0:0.50.56.30.1.26". + * + * We need the MAC address in colon-separated octet + * format. + */ + tmp = strchr(tmp, ':'); + if (tmp == NULL) + break; + tmp++; + /* convert the '.' to ':' */ + while ((c = strchr(tmp, '.')) != NULL) + *c = ':'; + /* now tmp == "0:50:56:30:1:26" */ + break; + } + if (tmp == NULL) + string_get(value, "", 0); + else + string_get(value, tmp, strlen(tmp)); + + freeifaddrs(ifap); + break; + } + case LEAF_ipv6IfAdminStatus: + { + struct ifaddrs *ifap, *ifa; + + if (getifaddrs(&ifap) == -1) { + value->v.integer = 4; /* Unknown */ + break; + } + + value->v.integer = 2; + for (ifa = ifap; ifa != NULL; ifa = ifa->ifa_next) { + if (strcmp(ifa->ifa_name, ip->name) != 0) + continue; + if (ifa->ifa_addr->sa_family != AF_INET6) + continue; + value->v.integer = + (ifa->ifa_flags & IFF_RUNNING) ? 1 : 2; + break; + } + freeifaddrs(ifap); + break; + } + case LEAF_ipv6IfOperStatus: + { + struct ifaddrs *ifap, *ifa; + if (getifaddrs(&ifap) == -1) { + value->v.integer = 4; /* Unknown */ + break; + } + + value->v.integer = 2; + + for (ifa = ifap; ifa != NULL; ifa = ifa->ifa_next) { + if (strcmp(ifa->ifa_name, ip->name) != 0) + continue; + if (ifa->ifa_addr->sa_family != AF_INET6) + continue; + value->v.integer = (ifa->ifa_flags & IFF_UP) ? 1 : 2; + break; + } + freeifaddrs(ifap); + break; + } + case LEAF_ipv6IfLastChange: + { + /* + * XXX (ngie): not checking for error code from + * gettimeofday(2). + */ + struct timeval lastchange, now; + struct ifmibdata ifmd; + + if (if_getifmibdata(ip->index, &ifmd) != 0) { + value->v.uint32 = 0; + break; + } + lastchange = ifmd.ifmd_data.ifi_lastchange; + + gettimeofday(&now, (struct timezone*)NULL); + value->v.uint32 = + (uint32_t)((now.tv_sec - lastchange.tv_sec) * 100); + value->v.uint32 += + (uint32_t)((now.tv_usec - lastchange.tv_usec) / 10000); + break; + } + default: + return (SNMP_ERR_RES_UNAVAIL); + } + + return (SNMP_ERR_NOERROR); +} Property changes on: projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/ipv6_ifTable.c ___________________________________________________________________ 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 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 (nonexistent) +++ projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/ipv6_netToMediaTable.c (revision 311278) @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2016 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 "ipv6.h" + +int +op_ipv6NetToMediaTable(struct snmp_context *ctx __unused, + struct snmp_value *value __unused, u_int sub __unused, u_int iidx __unused, + enum snmp_op op __unused) +{ + + /* Not implemented */ + return (SNMP_ERR_NOSUCHNAME); +} Property changes on: projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/ipv6_netToMediaTable.c ___________________________________________________________________ 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 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 (nonexistent) +++ projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/ipv6_routeTable.c (revision 311278) @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2016 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 "ipv6.h" + +int +op_ipv6RouteTable(struct snmp_context *ctx __unused, struct snmp_value *value __unused, + u_int sub __unused, u_int iidx __unused, enum snmp_op op __unused) +{ + + /* Not implemented */ + return (SNMP_ERR_NOSUCHNAME); +} Property changes on: projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/ipv6_routeTable.c ___________________________________________________________________ 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 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 311278) @@ -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 Index: projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/util.c =================================================================== --- projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/util.c (nonexistent) +++ projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/util.c (revision 311278) @@ -0,0 +1,70 @@ +/* + * + * Copyright 1989, 1991, 1992 by Carnegie Mellon University + * + * Derivative Work - 1996, 1998-2000 + * Copyright 1996, 1998-2000 The Regents of the University of California + * + * All Rights Reserved + * + * Permission to use, copy, modify and distribute this software and its + * documentation for any purpose and without fee is hereby granted, + * provided that the above copyright notice appears in all copies and + * that both that copyright notice and this permission notice appear in + * supporting documentation, and that the name of CMU and The Regents of + * the University of California not be used in advertising or publicity + * pertaining to distribution of the software without specific written + * permission. + * + * CMU AND THE REGENTS OF THE UNIVERSITY OF CALIFORNIA DISCLAIM ALL + * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL CMU OR + * THE REGENTS OF THE UNIVERSITY OF CALIFORNIA BE LIABLE FOR ANY SPECIAL, + * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING + * FROM THE LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF + * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + */ + +#include + +__FBSDID("$FreeBSD$"); + +/* + * From /agent/mibgroup/mibII/ipv6.c, and maybe originally from the + * Kame project + */ + +/* + * TODO (ngie): replace with network_get_interfaces(..) from + * snmp_hostres/hostres_network_tbl.c so we can ditch this completely. + */ + +/* $FreeBSD$ */ + +#include + +#include "util.h" + +int +if_getifmibdata(int idx, struct ifmibdata *result) +{ + int mib[] = { + CTL_NET, + PF_LINK, + NETLINK_GENERIC, + IFMIB_IFDATA, + 0, + IFDATA_GENERAL + }; + size_t len; + struct ifmibdata tmp; + + mib[4] = idx; + len = sizeof(struct ifmibdata); + if (sysctl(mib, sizeof(mib)/sizeof(mib[0]), &tmp, &len, 0, 0) < 0) + return -1; + memcpy(result, &tmp, sizeof(tmp)); + return 0; +} Property changes on: projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/util.c ___________________________________________________________________ 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 Index: projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/util.h =================================================================== --- projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/util.h (nonexistent) +++ projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/util.h (revision 311278) @@ -0,0 +1,46 @@ +/* + * + * Copyright 1989, 1991, 1992 by Carnegie Mellon University + * + * Derivative Work - 1996, 1998-2000 + * Copyright 1996, 1998-2000 The Regents of the University of California + * + * All Rights Reserved + * + * Permission to use, copy, modify and distribute this software and its + * documentation for any purpose and without fee is hereby granted, + * provided that the above copyright notice appears in all copies and + * that both that copyright notice and this permission notice appear in + * supporting documentation, and that the name of CMU and The Regents of + * the University of California not be used in advertising or publicity + * pertaining to distribution of the software without specific written + * permission. + * + * CMU AND THE REGENTS OF THE UNIVERSITY OF CALIFORNIA DISCLAIM ALL + * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL CMU OR + * THE REGENTS OF THE UNIVERSITY OF CALIFORNIA BE LIABLE FOR ANY SPECIAL, + * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING + * FROM THE LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF + * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + */ + +/* See util.c for comments about licensing */ + +#ifndef __SNMP_IPV6__UTIL_H__ +#define __SNMP_IPV6__UTIL_H__ + +#include + +__FBSDID("$FreeBSD$"); + +#include "ipv6.h" + +#include +#include + +int if_getifmibdata(int idx, struct ifmibdata *result); + +#endif Property changes on: projects/bsnmp-ipv6-mib/usr.sbin/bsnmpd/modules/snmp_ipv6/util.h ___________________________________________________________________ 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