diff options
Diffstat (limited to 'lib/snmp')
-rw-r--r-- | lib/snmp/mibs/Makefile.in | 36 | ||||
-rw-r--r-- | lib/snmp/mibs/OTP-REG.mib | 103 | ||||
-rw-r--r-- | lib/snmp/mibs/OTP-TC.mib | 93 | ||||
-rw-r--r-- | lib/snmp/test/snmp_compiler_test.erl | 6 | ||||
-rw-r--r-- | lib/snmp/vsn.mk | 2 |
5 files changed, 209 insertions, 31 deletions
diff --git a/lib/snmp/mibs/Makefile.in b/lib/snmp/mibs/Makefile.in index 2350194077..77893cbdc8 100644 --- a/lib/snmp/mibs/Makefile.in +++ b/lib/snmp/mibs/Makefile.in @@ -41,14 +41,7 @@ RELSYSDIR = $(RELEASE_PATH)/lib/snmp-$(VSN) # Common macros # ---------------------------------------------------- -# NOTE: -# The OTP-REG mib actually belongs to another -# application (otp_mibs), and is exported by this -# app. But since that app is built later, we have -# to built it here in order to be able to build -# OTP-SNMPEA-MIB (that needs otpModules and -# otpApplications). -MIBS_A = \ +MIBS = \ RFC1213-MIB \ STANDARD-MIB \ SNMPv2-TM \ @@ -62,16 +55,10 @@ MIBS_A = \ SNMP-VIEW-BASED-ACM-MIB \ SNMP-USM-AES-MIB \ INET-ADDRESS-MIB \ - TRANSPORT-ADDRESS-MIB - -MIBS_B = OTP-SNMPEA-MIB - -BUILD_MIBS = \ - $(MIBS_A) \ + TRANSPORT-ADDRESS-MIB \ OTP-REG \ - $(MIBS_B) - -MIBS = $(MIBS_A) $(MIBS_B) + OTP-TC \ + OTP-SNMPEA-MIB STD_v1_MIB_FILES = \ RFC1155-SMI.mib \ @@ -100,8 +87,8 @@ HRL_FILES = $(SNMP_HRL_TARGET_DIR)/SNMPv2-TC.hrl \ TARGET_FILES = \ $(ERL_TOP)/lib/snmp/bin/snmp-v2tov1 \ - $(BUILD_MIBS:%=$(SNMP_BIN_TARGET_DIR)/%.bin) \ - $(HRL_TARGETS) \ + $(MIBS:%=$(SNMP_BIN_TARGET_DIR)/%.bin) \ + $(HRL_TARGETS) \ $(V1_MIB_FILES) @@ -136,21 +123,18 @@ endif # Targets # ---------------------------------------------------- -OTP_MIBDIR = $(shell if test -d ../../otp_mibs; then echo otp_mibs; \ - else echo sasl; fi) - debug opt: $(TARGET_FILES) $(ERL_TOP)/lib/snmp/bin/snmp-v2tov1: $(ERL_TOP)/lib/snmp/bin/snmp-v2tov1.src $(gen_verbose)$(PERL) -p -e 's?%PERL%?$(PERL)? ' < $< > $@ $(V_at)chmod 755 $@ -$(SNMP_BIN_TARGET_DIR)/OTP-REG.bin: $(ERL_TOP)/lib/$(OTP_MIBDIR)/mibs/OTP-REG.mib - $(snmp_verbose)$(ERLC) -pa $(SNMP_TOOLKIT)/ebin -I $(SNMP_TOOLKIT)/priv/mibs $(SNMP_FLAGS) -o $(SNMP_BIN_TARGET_DIR) $< - # To support parallel make, we'll need explicit dependencies # to ensure that an imported MIB has been compiled when it's needed. +$(SNMP_BIN_TARGET_DIR)/OTP-TC.bin: \ + $(SNMP_BIN_TARGET_DIR)/OTP-REG.bin + $(SNMP_BIN_TARGET_DIR)/STANDARD-MIB.bin: \ $(SNMP_BIN_TARGET_DIR)/RFC1213-MIB.bin @@ -208,8 +192,6 @@ info: @echo "" @echo "TARGET_FILES = $(TARGET_FILES)" @echo "" - @echo "OTP_MIBDIR = $(OTP_MIBDIR)" - @echo "" @echo "SNMP_VSN = $(SNMP_VSN)" @echo "VSN = $(VSN)" @echo "RELSYSDIR = "$(RELSYSDIR)"" diff --git a/lib/snmp/mibs/OTP-REG.mib b/lib/snmp/mibs/OTP-REG.mib new file mode 100644 index 0000000000..bf1585061c --- /dev/null +++ b/lib/snmp/mibs/OTP-REG.mib @@ -0,0 +1,103 @@ +-- +-- %CopyrightBegin% +-- +-- Copyright Ericsson AB 1997-2016. All Rights Reserved. +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- +-- %CopyrightEnd% +-- + +OTP-REG DEFINITIONS ::= BEGIN + +IMPORTS + MODULE-IDENTITY, enterprises + FROM SNMPv2-SMI + ; + +otpRegModule MODULE-IDENTITY + LAST-UPDATED "200305090900Z" + ORGANIZATION "Ericsson" + CONTACT-INFO + "Contact: Erlang Support see license agreement for Erlang/OTP." + DESCRIPTION + "The root MIB module for OTP." + + REVISION "200305090900Z" + DESCRIPTION + "Changed CONTACT-INFO as it was outdated, made it more generic + to avoid such changes in the future." + + REVISION "199902020900Z" + DESCRIPTION + "Cleaned up OBJECT IDENTIFIER registration. Changed the name + of the MODULE-IDENTITY of this module to non-conflicting name + otpRegModule." + + REVISION "199712010900Z" + DESCRIPTION + "The initial revision of MIB module OTP-REG." + ::= { otpModules 1 } + +ericsson OBJECT IDENTIFIER ::= {enterprises 193} +otp OBJECT IDENTIFIER ::= {ericsson 19} + +-- sub-tree for registraions, including Modules +otpReg OBJECT IDENTIFIER ::= {otp 1} +otpModules OBJECT IDENTIFIER ::= {otpReg 1} +-- otpTcModule 2 +-- otpModule 3 +-- otpOsMonModule 4 +-- otpSnmpeaModule 5 +-- otpEvaModule 6 +-- otpLogModule 7 +-- otpEvaLogModule 8 +-- otpSnmpeaLogModule 9 +-- otpMeshModule 10 + + +-- sub-tree for OTP-wide objects and events +otpGeneric OBJECT IDENTIFIER ::= {otp 2} + +-- sub-tree for product specific objects and events +otpApplications + OBJECT IDENTIFIER ::= {otp 3} +-- otpMib 1 +-- otpOsMonMib 2 +-- otpSnmpeaMib 3 +-- otpEvaMib 4 +-- otpLogMib 5 +-- otpMeshMib 6 + + +-- sub-tree for agent implementation capabilites +otpCaps OBJECT IDENTIFIER ::= {otp 4} +-- otpMibImplV10 1 (vsn of mib implementation, e.g. otp_mib) +-- otpOsMonMibImplV10 2 +-- otpSnmpeaMibImplV10 3 +-- otpEvaMibImplV10 4 +-- otpLogMibImplV10 5 + + +-- sub-tree for requirement specifications +otpReqs OBJECT IDENTIFIER ::= {otp 5} + +-- sub-tree for experimental modules within OTP +otpExpr OBJECT IDENTIFIER ::= {otp 6} + +-- sub-tree for SSL within OTP +-- Note that this subtree is not MIB related, but it +-- is defined in this MIB file to avoid clashes. +ssl OBJECT IDENTIFIER ::= {otp 10} + +END diff --git a/lib/snmp/mibs/OTP-TC.mib b/lib/snmp/mibs/OTP-TC.mib new file mode 100644 index 0000000000..efe5451f0c --- /dev/null +++ b/lib/snmp/mibs/OTP-TC.mib @@ -0,0 +1,93 @@ +-- +-- %CopyrightBegin% +-- +-- Copyright Ericsson AB 1997-2016. All Rights Reserved. +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- +-- %CopyrightEnd% +-- + +OTP-TC DEFINITIONS ::= BEGIN + +IMPORTS + MODULE-IDENTITY + FROM SNMPv2-SMI + TEXTUAL-CONVENTION, DisplayString + FROM SNMPv2-TC + otpModules + FROM OTP-REG + ; + +otpTcModule MODULE-IDENTITY + LAST-UPDATED "200305090900Z" + ORGANIZATION "Ericsson" + CONTACT-INFO + "Contact: Erlang Support see license agreement for Erlang/OTP." + DESCRIPTION + "This MIB is part of the OTP MIB. It defines common + Textual Conventions used in other OTP mib modules." + + REVISION "200305090900Z" + DESCRIPTION + "Changed CONTACT-INFO as it was outdated, made it more generic + to avoid such changes in the future." + + + REVISION "199712010900Z" + DESCRIPTION + "The initial version of this module." + ::= { otpModules 2 } + +OwnerString ::= TEXTUAL-CONVENTION + DISPLAY-HINT "255a" + STATUS current + DESCRIPTION + "An OwnerString identifies the initiator or owner of a row + in a table. This label is set by the initiator to provide + for the following possibilities: + + o A management station may recognize resources it owns + and no longer needs. + o A network operator can find the management station that + owns the resource and negotiate for it to be freed. + o A network operator may decide to unilaterally free + resources another network operator has reserved. + o Upon initialization, a management station may recognize + resources it had reserved in the past. With this + information it may free the resources if it no longer + needs them. + + Management stations and agent systems should support any format + of the OwnerString dictated by the local policy of the + organization. It is suggested that this name contain one or + more of the following: IP address, management station name, + network manager's name, location, or phone number. This + information will help users to share the resources more + effectively. + + There is often default functionality that the device or the + administrator of the agent (often the network administrator) wishes + to set up. The resources associated with this functionality are then + owned by the device itself or by the network administrator, and are + intended to be long-lived. In this case, the device or the + administrator will set the relevant owner object to a string starting + with 'local'. Indiscriminate modification of the local + configuration by network management stations is discouraged. In + fact, a network management station should only modify these objects + under the direction of the administrator of the agent system." + REFERENCE + "RFC1757, RMON-MIB" + SYNTAX DisplayString (SIZE (0..127)) + +END diff --git a/lib/snmp/test/snmp_compiler_test.erl b/lib/snmp/test/snmp_compiler_test.erl index 0a7b729d1f..2e48d5134d 100644 --- a/lib/snmp/test/snmp_compiler_test.erl +++ b/lib/snmp/test/snmp_compiler_test.erl @@ -234,14 +234,14 @@ agent_capabilities(Config) when is_list(Config) -> AcMib = join(Dir,"AC-TEST-MIB.mib"), ?line {ok, MibFile1} = snmpc:compile(AcMib, [options, version, - {i, [SnmpMibsDir, OtpMibsMibsDir]}, + {i, [SnmpMibsDir]}, {outdir, Dir}, {verbosity, trace}]), ?line {ok, Mib1} = snmp_misc:read_mib(MibFile1), ?line {ok, MibFile2} = snmpc:compile(AcMib, [options, version, agent_capabilities, - {i, [SnmpMibsDir, OtpMibsMibsDir]}, + {i, [SnmpMibsDir]}, {outdir, Dir}, {verbosity, trace}]), ?line {ok, Mib2} = snmp_misc:read_mib(MibFile2), @@ -290,7 +290,7 @@ module_compliance(Config) when is_list(Config) -> ?line {ok, Mib2} = snmp_misc:read_mib(MibFile2), MEDiff = Mib2#mib.mes -- Mib1#mib.mes, %% This is a rather pathetic test, but it is somthing... - io:format("agent_capabilities -> " + io:format("module_compliance -> " "~n MEDiff: ~p" "~n Mib1: ~p" "~n Mib2: ~p" diff --git a/lib/snmp/vsn.mk b/lib/snmp/vsn.mk index 4d5a0fbce8..f305497cd3 100644 --- a/lib/snmp/vsn.mk +++ b/lib/snmp/vsn.mk @@ -19,6 +19,6 @@ # %CopyrightEnd% APPLICATION = snmp -SNMP_VSN = 5.2.12 +SNMP_VSN = 5.3 PRE_VSN = APP_VSN = "$(APPLICATION)-$(SNMP_VSN)$(PRE_VSN)" |