diff options
author | Micael Karlberg <[email protected]> | 2013-02-05 15:12:52 +0100 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2013-02-05 15:12:52 +0100 |
commit | d4c5e795b916485362e5aee780ffe99fee150c89 (patch) | |
tree | 9c02dfdf06b5a4dc55a7dcb4cd9d8f56d418b40a /lib/snmp/src | |
parent | 1cbd897c43f0dab1275392a3736e4629c1f80243 (diff) | |
parent | c4425da5b7cf880b8ca76158e0bfecbf5202a333 (diff) | |
download | otp-d4c5e795b916485362e5aee780ffe99fee150c89.tar.gz otp-d4c5e795b916485362e5aee780ffe99fee150c89.tar.bz2 otp-d4c5e795b916485362e5aee780ffe99fee150c89.zip |
Merge branch 'bmk/snmp/compiler/handling_import_of_BITS_in_mibs/r15/OTP-10799' into bmk/snmp/snmp4222_integration/r15
Diffstat (limited to 'lib/snmp/src')
-rw-r--r-- | lib/snmp/src/app/snmp.appup.src | 8 | ||||
-rw-r--r-- | lib/snmp/src/compile/snmpc_lib.erl | 7 | ||||
-rw-r--r-- | lib/snmp/src/compile/snmpc_mib_gram.yrl | 48 |
3 files changed, 48 insertions, 15 deletions
diff --git a/lib/snmp/src/app/snmp.appup.src b/lib/snmp/src/app/snmp.appup.src index 593ddd82bd..39e154d463 100644 --- a/lib/snmp/src/app/snmp.appup.src +++ b/lib/snmp/src/app/snmp.appup.src @@ -22,6 +22,10 @@ %% ----- U p g r a d e ------------------------------------------------------- [ + {"4.22.1", + [ + ] + }, {"4.22", [ {load_module, snmpm, soft_purge, soft_purge, []}, @@ -312,6 +316,10 @@ %% ------D o w n g r a d e --------------------------------------------------- [ + {"4.22.1", + [ + ] + }, {"4.22", [ {load_module, snmpm, soft_purge, soft_purge, []}, diff --git a/lib/snmp/src/compile/snmpc_lib.erl b/lib/snmp/src/compile/snmpc_lib.erl index c7eae307e8..3652054298 100644 --- a/lib/snmp/src/compile/snmpc_lib.erl +++ b/lib/snmp/src/compile/snmpc_lib.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2012. All Rights Reserved. +%% Copyright Ericsson AB 1997-2013. 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 @@ -240,7 +240,10 @@ import_mib({{'SNMPv2-SMI', ImportsFromMib},Line}) -> aliasname = 'Opaque'}, #asn1_type{bertype = 'Counter64', aliasname = 'Counter64', - lo = 0, hi = 18446744073709551615}], + lo = 0, hi = 18446744073709551615}, + #asn1_type{bertype = 'BITS', + aliasname = 'BITS'} + ], Macros = ['MODULE-IDENTITY','OBJECT-IDENTITY','OBJECT-TYPE', 'NOTIFICATION-TYPE'], import_built_in_loop(ImportsFromMib,Nodes,Types,Macros,'SNMPv2-SMI',Line); diff --git a/lib/snmp/src/compile/snmpc_mib_gram.yrl b/lib/snmp/src/compile/snmpc_mib_gram.yrl index 74b9ddaa25..4fd504e34b 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-2011. All Rights Reserved. +%% Copyright Ericsson AB 1996-2013. 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 @@ -244,16 +244,36 @@ listofdefinitions -> definition : ['$1'] . listofdefinitions -> listofdefinitions definition : ['$2' | '$1']. import -> '$empty' : []. -import -> 'IMPORTS' imports ';' : '$2'. - -imports -> imports_from_one_mib : ['$1']. -imports -> imports_from_one_mib imports : ['$1' | '$2']. +import -> 'IMPORTS' imports ';' : +%% i("import ->" +%% "~n imports: ~p", ['$2']), + '$2'. + +imports -> imports_from_one_mib : +%% i("imports ->" +%% "~n imports_from_one_mib: ~p", ['$1']), + ['$1']. +imports -> imports_from_one_mib imports : +%% i("imports ->" +%% "~n imports_from_one_mib: ~p" +%% "~n imports: ~p", ['$1', '$2']), + ['$1' | '$2']. imports_from_one_mib -> listofimports 'FROM' variable : +%% i("imports_from_one_mib ->" +%% "~n listofimports: ~p" +%% "~n variable: ~p", ['$1', '$3']), {{val('$3'), lreverse(imports_from_one_mib, '$1')}, line_of('$2')}. -listofimports -> import_stuff : ['$1']. -listofimports -> listofimports ',' import_stuff : ['$3' | '$1']. +listofimports -> import_stuff : +%% i("listofimports ->" +%% "~n import_stuff: ~p", ['$1']), + ['$1']. +listofimports -> listofimports ',' import_stuff : +%% i("listofimports ->" +%% "~n listofimports: ~p" +%% "~n import_stuff: ~p", ['$1', '$3']), + ['$3' | '$1']. import_stuff -> 'OBJECT-TYPE' : {builtin, 'OBJECT-TYPE'}. import_stuff -> 'TRAP-TYPE' : {builtin, 'TRAP-TYPE'}. @@ -314,6 +334,8 @@ import_stuff -> 'TDomain' : ensure_ver(2,'$1'), {builtin, 'TDomain'}. import_stuff -> 'TAddress' : ensure_ver(2,'$1'), {builtin, 'TAddress'}. +import_stuff -> 'BITS' + : ensure_ver(2,'$1'), {builtin, 'BITS'}. traptype -> objectname 'TRAP-TYPE' 'ENTERPRISE' objectname varpart description referpart implies integer : @@ -748,7 +770,7 @@ statusv1(Tok) -> obsolete -> obsolete; deprecated -> deprecated; Else -> return_error(line_of(Tok), - "syntax error before: " ++ atom_to_list(Else)) + "(statusv1) syntax error before: " ++ atom_to_list(Else)) end. statusv2(Tok) -> @@ -757,7 +779,7 @@ statusv2(Tok) -> deprecated -> deprecated; obsolete -> obsolete; Else -> return_error(line_of(Tok), - "syntax error before: " ++ atom_to_list(Else)) + "(statusv2) syntax error before: " ++ atom_to_list(Else)) end. ac_status(Tok) -> @@ -765,7 +787,7 @@ ac_status(Tok) -> current -> current; obsolete -> obsolete; Else -> return_error(line_of(Tok), - "syntax error before: " ++ atom_to_list(Else)) + "(ac_status) syntax error before: " ++ atom_to_list(Else)) end. accessv1(Tok) -> @@ -775,7 +797,7 @@ accessv1(Tok) -> 'write-only' -> 'write-only'; 'not-accessible' -> 'not-accessible'; Else -> return_error(line_of(Tok), - "syntax error before: " ++ atom_to_list(Else)) + "(accessv1) syntax error before: " ++ atom_to_list(Else)) end. accessv2(Tok) -> @@ -786,7 +808,7 @@ accessv2(Tok) -> 'read-write' -> 'read-write'; 'read-create' -> 'read-create'; Else -> return_error(line_of(Tok), - "syntax error before: " ++ atom_to_list(Else)) + "(accessv2) syntax error before: " ++ atom_to_list(Else)) end. ac_access(Tok) -> @@ -798,7 +820,7 @@ ac_access(Tok) -> 'read-create' -> 'read-create'; 'write-only' -> 'write-only'; % for backward-compatibility only Else -> return_error(line_of(Tok), - "syntax error before: " ++ atom_to_list(Else)) + "(ac_access) syntax error before: " ++ atom_to_list(Else)) end. %% --------------------------------------------------------------------- |