diff options
Diffstat (limited to 'lib/snmp/src')
-rw-r--r-- | lib/snmp/src/compile/snmpc.erl | 6 | ||||
-rw-r--r-- | lib/snmp/src/compile/snmpc.hrl | 15 | ||||
-rw-r--r-- | lib/snmp/src/compile/snmpc_mib_gram.yrl | 25 |
3 files changed, 44 insertions, 2 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, |