aboutsummaryrefslogtreecommitdiffstats
path: root/lib/snmp/test/snmp_manager_user.erl
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2011-04-14 12:27:04 +0200
committerMicael Karlberg <[email protected]>2011-04-14 12:27:04 +0200
commitc733034aa59ee536b166e2c676bb0239ee62b1a6 (patch)
tree9775e5efbd00b1aa2d8e69da6fa8dcb36153fc9e /lib/snmp/test/snmp_manager_user.erl
parent29ac3cf1c1e6620344192944ebeae7ee8f220bb7 (diff)
downloadotp-c733034aa59ee536b166e2c676bb0239ee62b1a6.tar.gz
otp-c733034aa59ee536b166e2c676bb0239ee62b1a6.tar.bz2
otp-c733034aa59ee536b166e2c676bb0239ee62b1a6.zip
First test case for request API version 3.
Diffstat (limited to 'lib/snmp/test/snmp_manager_user.erl')
-rw-r--r--lib/snmp/test/snmp_manager_user.erl16
1 files changed, 15 insertions, 1 deletions
diff --git a/lib/snmp/test/snmp_manager_user.erl b/lib/snmp/test/snmp_manager_user.erl
index 71fdebb67b..af0d7839a8 100644
--- a/lib/snmp/test/snmp_manager_user.erl
+++ b/lib/snmp/test/snmp_manager_user.erl
@@ -50,7 +50,7 @@
update_agent_info/3, update_agent_info/4,
which_all_agents/0, which_own_agents/0,
load_mib/1, unload_mib/1,
- sync_get/1, sync_get/2, sync_get/3,
+ sync_get/1, sync_get/2, sync_get/3, sync_get2/3,
async_get/1, async_get/2, async_get/3,
sync_get_next/1, sync_get_next/2, sync_get_next/3,
async_get_next/1, async_get_next/2, async_get_next/3,
@@ -171,6 +171,10 @@ sync_get(Addr_or_TargetName, Oids) ->
sync_get(Addr, Port, Oids) ->
call({sync_get, Addr, Port, Oids}).
+sync_get2(TargetName, Oids, SendOpts) ->
+ call({sync_get2, TargetName, Oids, SendOpts}).
+
+
%% --
async_get(Oids) ->
@@ -400,6 +404,16 @@ loop(#state{parent = Parent, id = Id} = S) ->
%% -- (sync) get-request --
%%
+ {{sync_get2, TargetName, Oids, SendOpts}, From, Ref}
+ when is_list(TargetName) ->
+ d("loop -> received sync_get2 request with"
+ "~n TargetName: ~p"
+ "~n Oids: ~p"
+ "~n SendOpts: ~p", [TargetName, Oids, SendOpts]),
+ Res = snmpm:sync_get2(Id, TargetName, Oids, SendOpts),
+ reply(From, Res, Ref),
+ loop(S);
+
%% No agent specified, so send it to all of them
{{sync_get, Oids}, From, Ref} ->
d("loop -> received sync_get request "