aboutsummaryrefslogtreecommitdiffstats
path: root/lib/snmp/src/agent
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2010-12-06 18:38:10 +0100
committerMicael Karlberg <[email protected]>2010-12-06 18:38:10 +0100
commit9401854175279040d3138b474226ceb4596f4aab (patch)
tree4487f123384dabc6d927b0a38ea1bef036d70acb /lib/snmp/src/agent
parent52140da6cf766ce65a12e6de529f5eafdde0b91a (diff)
downloadotp-9401854175279040d3138b474226ceb4596f4aab.tar.gz
otp-9401854175279040d3138b474226ceb4596f4aab.tar.bz2
otp-9401854175279040d3138b474226ceb4596f4aab.zip
Segmenting the printout using the mib names.
Diffstat (limited to 'lib/snmp/src/agent')
-rw-r--r--lib/snmp/src/agent/snmpa.erl16
1 files changed, 14 insertions, 2 deletions
diff --git a/lib/snmp/src/agent/snmpa.erl b/lib/snmp/src/agent/snmpa.erl
index ce208d870b..ca6c02aabc 100644
--- a/lib/snmp/src/agent/snmpa.erl
+++ b/lib/snmp/src/agent/snmpa.erl
@@ -296,12 +296,24 @@ print_tables() ->
print_tables([]) ->
ok;
-print_tables([{Mod, Tables}|MibTables]) ->
- [(catch Mod:Table(print)) || Table <- Tables],
+print_tables([{Mod, Tables}|MibTables]) when is_atom(Mod) andalso is_list(Tables) ->
+ print_tables(Mod, Tables),
print_tables(MibTables);
print_tables([_|MibTables]) ->
print_tables(MibTables).
+print_tables(Mod, Tables) ->
+ io:format("~n** ~s ** ~n~n", [make_pretty_mib(Mod)]),
+ [(catch Mod:Table(print)) || Table <- Tables].
+
+
+make_pretty_mib(snmp_view_based_acm_mib) ->
+ "SNMP-VIEW-BASED-ACM-MIB";
+make_pretty_mib(snmp_target_mib) ->
+ "SNMP-TARGET-MIB";
+make_pretty_mib(Mod) ->
+ atom_to_list(Mod).
+
%% -