aboutsummaryrefslogtreecommitdiffstats
path: root/lib/snmp/test/snmp_manager_user.erl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/snmp/test/snmp_manager_user.erl')
-rw-r--r--lib/snmp/test/snmp_manager_user.erl21
1 files changed, 17 insertions, 4 deletions
diff --git a/lib/snmp/test/snmp_manager_user.erl b/lib/snmp/test/snmp_manager_user.erl
index cb3f57ad1c..7c4bdbfb0a 100644
--- a/lib/snmp/test/snmp_manager_user.erl
+++ b/lib/snmp/test/snmp_manager_user.erl
@@ -54,7 +54,7 @@
async_get/1, async_get/2, async_get/3, async_get2/3,
sync_get_next/1, sync_get_next/2, sync_get_next/3, sync_get_next2/3,
async_get_next/1, async_get_next/2, async_get_next/3, async_get_next2/3,
- sync_set/1, sync_set/2, sync_set/3,
+ sync_set/1, sync_set/2, sync_set/3, sync_set2/3,
async_set/1, async_set/2, async_set/3,
sync_get_bulk/3, sync_get_bulk/4, sync_get_bulk/5,
async_get_bulk/3, async_get_bulk/4, async_get_bulk/5,
@@ -228,6 +228,9 @@ sync_set(Addr_or_TargetName, VAV) ->
sync_set(Addr, Port, VAV) ->
call({sync_set, Addr, Port, VAV}).
+sync_set2(TargetName, VAV, SendOpts) ->
+ call({sync_set2, TargetName, VAV, SendOpts}).
+
%% --
async_set(VAV) ->
@@ -464,7 +467,7 @@ loop(#state{parent = Parent, id = Id} = S) ->
{{async_get2, TargetName, Oids, SendOpts}, From, Ref}
when is_list(TargetName) ->
- d("loop -> received async_get request with"
+ d("loop -> received async_get2 request with"
"~n TargetName: ~p"
"~n Oids: ~p"
"~n SendOpts: ~p", [TargetName, Oids, SendOpts]),
@@ -507,7 +510,7 @@ loop(#state{parent = Parent, id = Id} = S) ->
{{sync_get_next2, TargetName, Oids, SendOpts}, From, Ref}
when is_list(TargetName) ->
- d("loop -> received sync_get_next request with"
+ d("loop -> received sync_get_next2 request with"
"~n TargetName: ~p"
"~n Oids: ~p"
"~n SendOpts: ~p", [TargetName, Oids, SendOpts]),
@@ -550,7 +553,7 @@ loop(#state{parent = Parent, id = Id} = S) ->
{{async_get_next2, TargetName, Oids, SendOpts}, From, Ref}
when is_list(TargetName) ->
- d("loop -> received async_get_next request with"
+ d("loop -> received async_get_next2 request with"
"~n TargetName: ~p"
"~n Oids: ~p"
"~n SendOpts: ~p", [TargetName, Oids, SendOpts]),
@@ -591,6 +594,16 @@ loop(#state{parent = Parent, id = Id} = S) ->
%% -- (sync) set-request --
%%
+ {{sync_set2, TargetName, VAV, SendOpts}, From, Ref}
+ when is_list(TargetName) ->
+ d("loop -> received sync_set2 request with"
+ "~n TargetName: ~p"
+ "~n VAV: ~p"
+ "~n SendOpts: ~p", [TargetName, VAV, SendOpts]),
+ Res = snmpm:sync_set2(Id, TargetName, VAV, SendOpts),
+ reply(From, Res, Ref),
+ loop(S);
+
{{sync_set, VAV}, From, Ref} ->
d("loop -> received sync_set request"),
Res = [snmpm:sync_set(Id, TargetName, VAV) ||