aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2011-09-05 11:56:22 +0200
committerMicael Karlberg <[email protected]>2011-09-05 11:56:22 +0200
commit0b77ab1f96be0388b6d69c1ddbc2e73d11e8cd0e (patch)
tree9d98e198a2d21846daf65aec1ae30314541b3b34
parent4a58f611253c6c17e6183c013f2f766d6beb4cca (diff)
parentf907baa3d7a64436b43e404c014669bf3ee67eba (diff)
downloadotp-0b77ab1f96be0388b6d69c1ddbc2e73d11e8cd0e.tar.gz
otp-0b77ab1f96be0388b6d69c1ddbc2e73d11e8cd0e.tar.bz2
otp-0b77ab1f96be0388b6d69c1ddbc2e73d11e8cd0e.zip
Merge branch 'bmk/snmp/agent/debugging_improvements/OTP-9446' into bmk/snmp/snmp4211_integration
Conflicts: lib/snmp/src/app/snmp.appup.src
-rw-r--r--lib/snmp/doc/src/notes.xml9
-rw-r--r--lib/snmp/src/agent/snmp_target_mib.erl23
-rw-r--r--lib/snmp/src/app/snmp.appup.src4
3 files changed, 31 insertions, 5 deletions
diff --git a/lib/snmp/doc/src/notes.xml b/lib/snmp/doc/src/notes.xml
index 4272e02b45..9e1a060dee 100644
--- a/lib/snmp/doc/src/notes.xml
+++ b/lib/snmp/doc/src/notes.xml
@@ -33,8 +33,8 @@
</header>
<section>
- <title>SNMP Development Toolkit 4.21</title>
- <p>Version 4.21 supports code replacement in runtime from/to
+ <title>SNMP Development Toolkit 4.21.1</title>
+ <p>Version 4.21.1 supports code replacement in runtime from/to
version 4.20.1, 4.20 and 4.19. </p>
<section>
@@ -54,6 +54,11 @@
which specifies whether warnings should be treated as errors. </p>
<p>Own Id: OTP-9447</p>
</item>
+
+ <item>
+ <p>[agent] Some very minor debugging improvements. </p>
+ <p>Own Id: OTP-9446</p>
+ </item>
</list>
</section>
diff --git a/lib/snmp/src/agent/snmp_target_mib.erl b/lib/snmp/src/agent/snmp_target_mib.erl
index 77910541a2..60bd3e0912 100644
--- a/lib/snmp/src/agent/snmp_target_mib.erl
+++ b/lib/snmp/src/agent/snmp_target_mib.erl
@@ -383,10 +383,18 @@ is_valid_tag(Tag, TDomain, TAddress) ->
is_valid_tag(TDomain, TAddress, Tag, []).
is_valid_tag(TDomain, TAddress, Tag, Key) ->
+ ?vtrace("is_valid_tag -> entry with"
+ "~n TDomain: ~p"
+ "~n TAddress: ~p"
+ "~n Tag: ~p"
+ "~n Key: ~p", [TDomain, TAddress, Tag, Key]),
case table_next(snmpTargetAddrTable, Key) of
endOfTable ->
+ ?vtrace("is_valid_tag -> endOfTable", []),
false;
NextKey ->
+ ?vtrace("is_valid_tag -> next key found"
+ "~n NextKey: ~p", [NextKey]),
case get(snmpTargetAddrTable, NextKey, [?snmpTargetAddrTDomain,
?snmpTargetAddrTAddress,
?snmpTargetAddrTagList,
@@ -395,6 +403,8 @@ is_valid_tag(TDomain, TAddress, Tag, Key) ->
{value, TAddress}, % RFC2576: chapters 5.2.1 & 5.3
{value, TagList},
{value, []}] ->
+ ?vtrace("is_valid_tag -> found with exact match"
+ "~n TagList: ~p", [TagList]),
case snmp_misc:is_tag_member(Tag, TagList) of
true ->
?vtrace("is_valid_tag -> exact: "
@@ -410,9 +420,14 @@ is_valid_tag(TDomain, TAddress, Tag, Key) ->
{value, TAddress2},
{value, TagList},
{value, TMask}] when TMask =/= [] ->
+ ?vtrace("is_valid_tag -> found with exact match"
+ "~n TagList: ~p"
+ "~n TMask: ~p", [TagList, TMask]),
case snmp_misc:is_tmask_match(TAddress, TAddress2,
TMask) of
true ->
+ ?vtrace("is_valid_tag -> "
+ "tmask match - now check tag member", []),
case snmp_misc:is_tag_member(Tag, TagList) of
true ->
?vtrace("is_valid_tag -> masked: "
@@ -425,10 +440,12 @@ is_valid_tag(TDomain, TAddress, Tag, Key) ->
Tag, NextKey)
end;
false ->
+ ?vtrace("is_valid_tag -> tmask NO match", []),
is_valid_tag(TDomain, TAddress,
Tag, NextKey)
end;
_ ->
+ ?vtrace("is_valid_tag -> not found - try next", []),
is_valid_tag(TDomain, TAddress, Tag, NextKey)
end
end.
@@ -591,9 +608,9 @@ snmpTargetAddrTable(print) ->
[Prefix, element(?snmpTargetAddrName, Row),
Prefix, element(?snmpTargetAddrTDomain, Row),
case element(?snmpTargetAddrTDomain, Row) of
- ?snmpUDPDomain -> udp;
- ?transportDomainUdpIpv4 -> udpIpv4;
- ?transportDomainUdpIpv6 -> udpIpv6;
+ ?snmpUDPDomain -> snmpUDPDomain;
+ ?transportDomainUdpIpv4 -> transportDomainUdpIpv4;
+ ?transportDomainUdpIpv6 -> transportDomainUdpIpv6;
_ -> undefined
end,
Prefix, element(?snmpTargetAddrTAddress, Row),
diff --git a/lib/snmp/src/app/snmp.appup.src b/lib/snmp/src/app/snmp.appup.src
index 22817bc21d..0b6ea93231 100644
--- a/lib/snmp/src/app/snmp.appup.src
+++ b/lib/snmp/src/app/snmp.appup.src
@@ -24,10 +24,12 @@
[
{"4.21",
[
+ {load_module, snmp_target_mib, soft_purge, soft_purge, []}
]
},
{"4.20.1",
[
+ {load_module, snmp_target_mib, soft_purge, soft_purge, []},
{load_module, snmp_view_based_acm_mib, soft_purge, soft_purge, []},
{load_module, snmpm, soft_purge, soft_purge,
[snmpm_server, snmpm_config, snmp_config]},
@@ -115,10 +117,12 @@
[
{"4.21",
[
+ {load_module, snmp_target_mib, soft_purge, soft_purge, []}
]
},
{"4.20.1",
[
+ {load_module, snmp_target_mib, soft_purge, soft_purge, []},
{load_module, snmp_view_based_acm_mib, soft_purge, soft_purge, []},
{load_module, snmpm, soft_purge, soft_purge,
[snmpm_server, snmpm_config, snmp_config]},