aboutsummaryrefslogtreecommitdiffstats
path: root/lib/snmp
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2010-11-30 18:36:39 +0100
committerMicael Karlberg <[email protected]>2010-11-30 18:36:39 +0100
commitbd7410308177659ad15c770d6d4700219bbe6978 (patch)
treef8a25fddb2ed84f7085fe8e345ca273de569e763 /lib/snmp
parentc4f7618bc0275b5eb8787edb527714d16f512f44 (diff)
downloadotp-bd7410308177659ad15c770d6d4700219bbe6978.tar.gz
otp-bd7410308177659ad15c770d6d4700219bbe6978.tar.bz2
otp-bd7410308177659ad15c770d6d4700219bbe6978.zip
First version. No documentation and no testing.
Diffstat (limited to 'lib/snmp')
-rw-r--r--lib/snmp/src/compile/snmpc.erl6
-rw-r--r--lib/snmp/src/compile/snmpc.hrl15
-rw-r--r--lib/snmp/src/compile/snmpc_mib_gram.yrl25
-rw-r--r--lib/snmp/vsn.mk21
4 files changed, 64 insertions, 3 deletions
diff --git a/lib/snmp/src/compile/snmpc.erl b/lib/snmp/src/compile/snmpc.erl
index a7f2cdc2bc..0f90d541e8 100644
--- a/lib/snmp/src/compile/snmpc.erl
+++ b/lib/snmp/src/compile/snmpc.erl
@@ -921,6 +921,12 @@ definitions_loop([{#mc_notification{name = TrapName,
snmpc_lib:add_cdata(#cdata.traps, [Notif]),
definitions_loop(T, Data);
+definitions_loop([{#mc_agent_capabilities{name = Name},Line}|T], Data) ->
+ ?vlog2("defloop -> agent_capabilities:"
+ "~n Name: ~p", [Name], Line),
+ ensure_macro_imported('AGENT-CAPABILITIES', Line),
+ definitions_loop(T, Data);
+
definitions_loop([{#mc_module_compliance{name = Name},Line}|T], Data) ->
?vlog2("defloop -> module_compliance:"
"~n Name: ~p", [Name], Line),
diff --git a/lib/snmp/src/compile/snmpc.hrl b/lib/snmp/src/compile/snmpc.hrl
index eb896cde6b..5dd8d9a139 100644
--- a/lib/snmp/src/compile/snmpc.hrl
+++ b/lib/snmp/src/compile/snmpc.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -103,6 +103,19 @@
).
+-record(mc_agent_capabilities,
+ {name,
+ product_release,
+ status,
+ description,
+ reference,
+ module,
+ name_assign
+ }
+ ).
+
+
+
-record(mc_module_compliance,
{name,
status,
diff --git a/lib/snmp/src/compile/snmpc_mib_gram.yrl b/lib/snmp/src/compile/snmpc_mib_gram.yrl
index 1957f52936..3536b538df 100644
--- a/lib/snmp/src/compile/snmpc_mib_gram.yrl
+++ b/lib/snmp/src/compile/snmpc_mib_gram.yrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2009. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2010. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -59,6 +59,7 @@ newtypename
objectidentifier
objectname
objecttypev1
+prodrelpart
range_num
referpart
size
@@ -101,6 +102,7 @@ textualconvention
objectgroup
notificationgroup
modulecompliance
+agentcapabilities
modulepart
modules
module
@@ -161,6 +163,8 @@ integer variable atom string quote '{' '}' '::=' ':' '=' ',' '.' '(' ')' ';' '|'
'CONTACT-INFO'
'MODULE-IDENTITY'
'NOTIFICATION-TYPE'
+'PRODUCT-RELEASE'
+'AGENT-CAPABILITIES'
'MODULE-COMPLIANCE'
'OBJECT-GROUP'
'NOTIFICATION-GROUP'
@@ -505,6 +509,7 @@ definitionv2 -> notification : '$1'.
definitionv2 -> objectgroup : '$1'.
definitionv2 -> notificationgroup : '$1'.
definitionv2 -> modulecompliance : '$1'.
+definitionv2 -> agentcapabilities : '$1'.
listofdefinitionsv2 -> '$empty' : [] .
listofdefinitionsv2 -> listofdefinitionsv2 definitionv2 : ['$2' | '$1'].
@@ -540,6 +545,15 @@ modulecompliance -> objectname 'MODULE-COMPLIANCE' 'STATUS' statusv2
'$7', '$8'),
{MC, line_of('$2')}.
+agentcapabilities -> objectname 'AGENT-CAPABILITIES'
+ 'PRODUCT-RELEASE' prodrelpart 'STATUS' statusv2
+ description referpart modulepart nameassign :
+ MC = make_agent_capabilities('$1', '$4', '$6', '$7',
+ '$8', '$9', '$10'),
+ {MC, line_of('$2')}.
+
+prodrelpart -> string : $1.
+
modulepart -> '$empty'.
modulepart -> modules.
@@ -744,6 +758,15 @@ make_notification(Name, Vars, Status, Desc, Ref, NA) ->
reference = Ref,
name_assign = NA}.
+make_agent_capabilities(Name, ProdRel, Status, Desc, Ref, Mod, NA) ->
+ #mc_agent_capabilities{name = Name,
+ product_release = ProdRel,
+ status = Status,
+ description = Desc,
+ reference = Ref,
+ module = Mod,
+ name_assign = NA}.
+
make_module_compliance(Name, Status, Desc, Ref, Mod, NA) ->
#mc_module_compliance{name = Name,
status = Status,
diff --git a/lib/snmp/vsn.mk b/lib/snmp/vsn.mk
index 1229b12ae2..12a9d8ed3c 100644
--- a/lib/snmp/vsn.mk
+++ b/lib/snmp/vsn.mk
@@ -1,3 +1,22 @@
-SNMP_VSN = 4.18
+#-*-makefile-*- ; force emacs to enter makefile-mode
+
+# %CopyrightBegin%
+#
+# Copyright Ericsson AB 1997-2010. All Rights Reserved.
+#
+# The contents of this file are subject to the Erlang Public License,
+# Version 1.1, (the "License"); you may not use this file except in
+# compliance with the License. You should have received a copy of the
+# Erlang Public License along with this software. If not, it can be
+# retrieved online at http://www.erlang.org/.
+#
+# Software distributed under the License is distributed on an "AS IS"
+# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+# the License for the specific language governing rights and limitations
+# under the License.
+#
+# %CopyrightEnd%
+
+SNMP_VSN = 4.19
PRE_VSN =
APP_VSN = "snmp-$(SNMP_VSN)$(PRE_VSN)"