File: snmpm.html

package info (click to toggle)
erlang-doc-html 1%3A11.b.2-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 23,284 kB
  • ctags: 10,724
  • sloc: erlang: 505; ansic: 323; makefile: 62; perl: 61; sh: 45
file content (1187 lines) | stat: -rw-r--r-- 47,441 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- This document was generated using DocBuilder 3.3.3 -->
<HTML>
<HEAD>
  <TITLE>snmpm</TITLE>
  <SCRIPT type="text/javascript" src="../../../../doc/erlresolvelinks.js">
</SCRIPT>
  <STYLE TYPE="text/css">
<!--
    .REFBODY     { margin-left: 13mm }
    .REFTYPES    { margin-left: 8mm }
-->
  </STYLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#FF00FF"
      ALINK="#FF0000">
<!-- refpage -->
<CENTER>
<A HREF="http://www.erlang.se">
  <IMG BORDER=0 ALT="[Ericsson AB]" SRC="min_head.gif">
</A>
<H1>snmpm</H1>
</CENTER>

<H3>MODULE</H3>
<DIV CLASS=REFBODY>
snmpm
</DIV>

<H3>MODULE SUMMARY</H3>
<DIV CLASS=REFBODY>
 Interface functions to the SNMP toolkit manager

</DIV>

<H3>DESCRIPTION</H3>
<DIV CLASS=REFBODY>

<P>The module <CODE>snmpm</CODE> contains interface functions to the 
SNMP manager. 
</DIV>

<H3>Common Data Types</H3>
<DIV CLASS=REFBODY>

<P>The following datatypes are used in the functions below:


<P>
<UL>

<LI>
        <CODE>oid() = [byte()]</CODE>
<BR>

</LI>


<LI>
        <CODE>snmp_reply() = {error_status(), error_index(), varbinds()}</CODE>
<BR>

</LI>


<LI>
        <CODE>error_status() = noError | atom()</CODE>
<BR>

</LI>


<LI>
        <CODE>error_index() = integer()</CODE>
<BR>

</LI>


<LI>
        <CODE>varbinds() = [varbind()]</CODE>
<BR>

</LI>


</UL>

<P>The <CODE>oid()</CODE> type is used to represent an ASN.1 OBJECT
IDENTIFIER.

<A NAME="monitor"><!-- Empty --></A> 

</DIV>

<H3>EXPORTS</H3>

<P><A NAME="monitor/0"><STRONG><CODE>monitor() -&#62; Ref</CODE></STRONG></A><BR>

<DIV CLASS=REFBODY><P>Types:
  <DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>Ref = reference()</CODE></STRONG><BR>

  </DIV>
</DIV>

<DIV CLASS=REFBODY>

<P>Monitor the SNMP manager. In case of a crash, the calling 
         (monitoring) process will get a 'DOWN' message (see the erlang 
         module for more info).
        
        <A NAME="demonitor"><!-- Empty --></A> 

</DIV>

<P><A NAME="demonitor/1"><STRONG><CODE>demonitor(Ref) -&#62; void()</CODE></STRONG></A><BR>

<DIV CLASS=REFBODY><P>Types:
  <DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>Ref = reference()</CODE></STRONG><BR>

  </DIV>
</DIV>

<DIV CLASS=REFBODY>

<P>Turn off monitoring of the SNMP manager.
        
<A NAME="notify_started"><!-- Empty --></A> 

</DIV>

<P><A NAME="notify_started/1"><STRONG><CODE>notify_started(Timeout) -&#62; Pid</CODE></STRONG></A><BR>

<DIV CLASS=REFBODY><P>Types:
  <DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>Timeout = integer()</CODE></STRONG><BR>
<STRONG><CODE>Pid = pid()</CODE></STRONG><BR>

  </DIV>
</DIV>

<DIV CLASS=REFBODY>

<P>Request a notification (message) when the SNMP manager has 
started. 
<P>The <CODE>Timeout</CODE> is the time the request is valid. The 
value has to be greater then zero. 
<P>The <CODE>Pid</CODE> is the process handling the supervision of the 
SNMP manager start. When the manager has started a completion
message will be sent to the client from this process: 
<CODE>{snmpm_started, Pid}</CODE>. If the SNMP manager was not started 
in time, a timeout message will be sent to the client: 
<CODE>{snmpm_start_timeout, Pid}</CODE>. 
<P>A client application that is dependent on the SNMP manager 
will use this function in order to be notified of when the
manager has started. There are two situtations when this 
is useful:
<P>
<UL>

<LI>
 During the start of a system, when a client application 
<STRONG>could</STRONG> start prior to the SNMP manager but is dependent
upon it, and therefor has to wait for it to start.<BR>


</LI>


<LI>
 When the SNMP manager has crashed, the dependent client 
application has to wait for the SNMP manager to be restarted
before it can <STRONG>reconnect</STRONG>.<BR>


</LI>


</UL>

<P>The function returnes the pid() of a handler process, that does
the supervision on behalf of the client application. Note that the 
client application is linked to this handler. 
<P>This function is used in conjuction with the monitor function.<A NAME="cancel_notify_started"><!-- Empty --></A>
</DIV>

<P><A NAME="cancel_notify_started/1"><STRONG><CODE>cancel_notify_started(Pid) -&#62; void()</CODE></STRONG></A><BR>

<DIV CLASS=REFBODY><P>Types:
  <DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>Pid = pid()</CODE></STRONG><BR>

  </DIV>
</DIV>

<DIV CLASS=REFBODY>

<P>Cancel a previous request to be notified of SNMP manager start.<A NAME="register_user"><!-- Empty --></A>
</DIV>

<P><A NAME="register_user/3"><STRONG><CODE>register_user(Id, Module, Data) -&#62; ok | {error, Reason}</CODE></STRONG></A><BR>

<DIV CLASS=REFBODY><P>Types:
  <DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>Id = term()</CODE></STRONG><BR>
<STRONG><CODE>Module = snmpm_user()</CODE></STRONG><BR>
<STRONG><CODE>Data = term()</CODE></STRONG><BR>
<STRONG><CODE>Reason = term()</CODE></STRONG><BR>
<STRONG><CODE>snmpm_user() = Module implementing the snmpm_user behaviour</CODE></STRONG><BR>

  </DIV>
</DIV>

<DIV CLASS=REFBODY>

<P>Register the manager entity (=user) responsible for specific 
         agent(s). 
<P><CODE>Module</CODE> is the callback module (snmpm_user behaviour) which 
         will be called whenever something happens (detected 
         agent, incomming reply or incomming trap/notification).
         Note that this could have already been done as a 
         consequence of the node config. (see users.conf).<A NAME="register_user_monitor"><!-- Empty --></A>
</DIV>

<P><A NAME="register_user_monitor/3"><STRONG><CODE>register_user_monitor(Id, Module, Data) -&#62; ok | {error, Reason}</CODE></STRONG></A><BR>

<DIV CLASS=REFBODY><P>Types:
  <DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>Id = term()</CODE></STRONG><BR>
<STRONG><CODE>Module = snmpm_user()</CODE></STRONG><BR>
<STRONG><CODE>Data = term()</CODE></STRONG><BR>
<STRONG><CODE>Reason = term()</CODE></STRONG><BR>
<STRONG><CODE>snmpm_user() = Module implementing the snmpm_user behaviour</CODE></STRONG><BR>

  </DIV>
</DIV>

<DIV CLASS=REFBODY>

<P>Register the monitored manager entity (=user) responsible 
         for specific agent(s). 
<P>The process performing the registration will be monitored. 
         Which means that if that process should die, all agents 
         registered by that user process will be unregistered. All 
         outstanding requsts will be canceled. 
<P><CODE>Module</CODE> is the callback module (snmpm_user behaviour) which 
         will be called whenever something happens (detected 
         agent, incomming reply or incomming trap/notification).
         Note that this could have already been done as a 
         consequence of the node config. (see users.conf).<A NAME="unregister_user"><!-- Empty --></A>
</DIV>

<P><A NAME="unregister_user/1"><STRONG><CODE>unregister_user(Id) -&#62; ok | {error, Reason}</CODE></STRONG></A><BR>

<DIV CLASS=REFBODY><P>Types:
  <DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>Id = term()</CODE></STRONG><BR>

  </DIV>
</DIV>

<DIV CLASS=REFBODY>

<P>Unregister the user.<A NAME="which_users"><!-- Empty --></A>
</DIV>

<P><A NAME="which_users/0"><STRONG><CODE>which_users() -&#62; Users</CODE></STRONG></A><BR>

<DIV CLASS=REFBODY><P>Types:
  <DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>Users = [UserId]</CODE></STRONG><BR>
<STRONG><CODE>UserId = term()</CODE></STRONG><BR>

  </DIV>
</DIV>

<DIV CLASS=REFBODY>

<P>Get a list of the identities of all registered users.<A NAME="register_agent"><!-- Empty --></A>
</DIV>

<P><A NAME="register_agent/2"><STRONG><CODE>register_agent(UserId, Addr) -&#62; ok | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="register_agent/3"><STRONG><CODE>register_agent(UserId, Addr, Port) -&#62; ok | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="register_agent/3"><STRONG><CODE>register_agent(UserId, Addr, Config) -&#62; ok | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="register_agent/4"><STRONG><CODE>register_agent(UserId, Addr, Port, Config) -&#62; ok | {error, Reason}</CODE></STRONG></A><BR>

<DIV CLASS=REFBODY><P>Types:
  <DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>UserId = term()</CODE></STRONG><BR>
<STRONG><CODE>Addr = ip_address()</CODE></STRONG><BR>
<STRONG><CODE>Port = integer()</CODE></STRONG><BR>
<STRONG><CODE>Config = [agent_config()]</CODE></STRONG><BR>
<STRONG><CODE>agent_config() = {Item, Val}</CODE></STRONG><BR>
<STRONG><CODE>Item = target_name | community | engine_id | timeout | max_message_size | version | sec_model | sec_name | sec_level</CODE></STRONG><BR>
<STRONG><CODE>Val = term()</CODE></STRONG><BR>
<STRONG><CODE>Reason = term()</CODE></STRONG><BR>

  </DIV>
</DIV>

<DIV CLASS=REFBODY>

<P>Explicitly instruct the manager to handle this agent, with
         <CODE>UserId</CODE> as the responsible user.
         Called to instruct the manager that this agent 
         shall be handled. These functions is used when
         the user know's in advance which agents the
         manager shall handle.
         Note that there is an alternate way to do the same thing:
         Add the agent to the manager config files (see agents.conf).
<P>The type of <CODE>Val</CODE> depends on <CODE>Item</CODE>: 
<P><CODE>target_name = string() </CODE>
<BR>
<CODE>community = string() </CODE>
<BR>
<CODE>engine_id = string() </CODE>
<BR>
<CODE>timeout = integer() | snmp_timer()</CODE>
<BR>
<CODE>max_message_size = integer()</CODE>
<BR>
<CODE>version = v1 | v2 | v3 </CODE>
<BR>
<CODE>sec_model = any | v1 | v2c | usm </CODE>
         <BR>
<CODE>sec_name = string() </CODE>
         <BR>
<CODE>sec_level = noAuthNoPriv | authNoPriv | authPriv</CODE>
        
<P>Note that if no <CODE>Port</CODE> is given, the agent default is
         used.<A NAME="unregister_agent"><!-- Empty --></A>
</DIV>

<P><A NAME="unregister_agent/2"><STRONG><CODE>unregister_agent(UserId, Addr) -&#62; ok | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="unregister_agent/3"><STRONG><CODE>unregister_agent(UserId, Addr, Port) -&#62; ok | {error, Reason}</CODE></STRONG></A><BR>

<DIV CLASS=REFBODY><P>Types:
  <DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>UserId = term()</CODE></STRONG><BR>
<STRONG><CODE>Addr = ip_address()</CODE></STRONG><BR>
<STRONG><CODE>Port = integer()</CODE></STRONG><BR>

  </DIV>
</DIV>

<DIV CLASS=REFBODY>

<P>Unregister the agent.<A NAME="agent_info"><!-- Empty --></A>
</DIV>

<P><A NAME="agent_info/3"><STRONG><CODE>agent_info(Addr, Port, Item) -&#62; {ok, Val} | {error, Reason}</CODE></STRONG></A><BR>

<DIV CLASS=REFBODY><P>Types:
  <DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>Addr = ip_address()</CODE></STRONG><BR>
<STRONG><CODE>Port = integer()</CODE></STRONG><BR>
<STRONG><CODE>Item = atom()</CODE></STRONG><BR>
<STRONG><CODE>Reason = term()</CODE></STRONG><BR>

  </DIV>
</DIV>

<DIV CLASS=REFBODY>

<P>Retrieve agent config.<A NAME="update_agent_info"><!-- Empty --></A>
</DIV>

<P><A NAME="update_agent_info/5"><STRONG><CODE>update_agent_info(UserId, Addr, Port, Item, Val) -&#62; ok | {error, Reason}</CODE></STRONG></A><BR>

<DIV CLASS=REFBODY><P>Types:
  <DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>UserId = term()</CODE></STRONG><BR>
<STRONG><CODE>Addr = ip_address()</CODE></STRONG><BR>
<STRONG><CODE>Port = integer()</CODE></STRONG><BR>
<STRONG><CODE>Item = atom()</CODE></STRONG><BR>
<STRONG><CODE>Val = term()</CODE></STRONG><BR>
<STRONG><CODE>Reason = term()</CODE></STRONG><BR>

  </DIV>
</DIV>

<DIV CLASS=REFBODY>

<P>Update agent config.<A NAME="which_agents"><!-- Empty --></A>
</DIV>

<P><A NAME="which_agents/0"><STRONG><CODE>which_agents() -&#62; Agents</CODE></STRONG></A><BR>
<A NAME="which_agents/1"><STRONG><CODE>which_agents(UserId) -&#62; Agents</CODE></STRONG></A><BR>

<DIV CLASS=REFBODY><P>Types:
  <DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>UserId = term()</CODE></STRONG><BR>
<STRONG><CODE>Agents = [{Addr,Port}]</CODE></STRONG><BR>
<STRONG><CODE>Addr = ip_address()</CODE></STRONG><BR>
<STRONG><CODE>Port = integer()</CODE></STRONG><BR>

  </DIV>
</DIV>

<DIV CLASS=REFBODY>

<P>Get a list of all registered agents or all agents registerd
         by a specific user.<A NAME="register_usm_user"><!-- Empty --></A>
</DIV>

<P><A NAME="register_usm_user/3"><STRONG><CODE>register_usm_user(EngineID, UserName, Conf) -&#62; ok | {error, Reason}</CODE></STRONG></A><BR>

<DIV CLASS=REFBODY><P>Types:
  <DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>EngineID = string()</CODE></STRONG><BR>
<STRONG><CODE>UserName = string()</CODE></STRONG><BR>
<STRONG><CODE>Conf = [usm_config()]</CODE></STRONG><BR>
<STRONG><CODE>usm_config() = {Item, Val}</CODE></STRONG><BR>
<STRONG><CODE>Item = sec_name | auth | auth_key | priv | priv_key</CODE></STRONG><BR>
<STRONG><CODE>Val = term()</CODE></STRONG><BR>
<STRONG><CODE>Reason = term()</CODE></STRONG><BR>

  </DIV>
</DIV>

<DIV CLASS=REFBODY>

<P>Explicitly instruct the manager to handle this USM user.
         Note that there is an alternate way to do the same thing:
         Add the usm user to the manager config files (see 
         <A HREF="snmp_manager_config_files.html#usm_user">usm.conf</A>).
<P>The type of <CODE>Val</CODE> depends on <CODE>Item</CODE>: 
<P><CODE>sec_name = string(),</CODE> 
         <BR>
<CODE>auth = usmNoAuthProtocol | usmHMACMD5AuthProtocol | usmHMACSHAAuthProtocoltimeout</CODE>
         <BR>
<CODE>auth_key = [integer()]</CODE> (length 16 if auth = usmHMACMD5AuthProtocol, length 20 if auth = usmHMACSHAAuthProtocol),
         <BR>
<CODE>priv = usmNoPrivProtocol | usmDESPrivProtocol | usmAesCfb128Protocol</CODE>,
         <BR>
<CODE>priv_key = [integer()]</CODE> (length is 16 if priv = usmDESPrivProtocol | usmAesCfb128Protocol).<A NAME="unregister_usm_user"><!-- Empty --></A>
</DIV>

<P><A NAME="unregister_usm_user/2"><STRONG><CODE>unregister_usm_user(EngineID, UserName) -&#62; ok | {error, Reason}</CODE></STRONG></A><BR>

<DIV CLASS=REFBODY><P>Types:
  <DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>EngineID = string()</CODE></STRONG><BR>
<STRONG><CODE>UserName = string()</CODE></STRONG><BR>
<STRONG><CODE>Reason = term()</CODE></STRONG><BR>

  </DIV>
</DIV>

<DIV CLASS=REFBODY>

<P>Unregister this USM user.<A NAME="which_usm_users1"><!-- Empty --></A>
</DIV>

<P><A NAME="usm_user_info/3"><STRONG><CODE>usm_user_info(EngineID, UserName, Item) -&#62; {ok, Val} | {error, Reason}</CODE></STRONG></A><BR>

<DIV CLASS=REFBODY><P>Types:
  <DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>EngineID = string()</CODE></STRONG><BR>
<STRONG><CODE>UsmName = string()</CODE></STRONG><BR>
<STRONG><CODE>Item = sec_name | auth | auth_key | priv | priv_key</CODE></STRONG><BR>
<STRONG><CODE>Reason = term()</CODE></STRONG><BR>

  </DIV>
</DIV>

<DIV CLASS=REFBODY>

<P>Retrieve usm user config.<A NAME="update_usm_user_info"><!-- Empty --></A>
</DIV>

<P><A NAME="update_usm_user_info/4"><STRONG><CODE>update_usm_user_info(EngineID, UserName, Item, Val) -&#62; ok | {error, Reason}</CODE></STRONG></A><BR>

<DIV CLASS=REFBODY><P>Types:
  <DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>EngineID = string()</CODE></STRONG><BR>
<STRONG><CODE>UsmName = string()</CODE></STRONG><BR>
<STRONG><CODE>Item = sec_name | auth | auth_key | priv | priv_key</CODE></STRONG><BR>
<STRONG><CODE>Val = term()</CODE></STRONG><BR>
<STRONG><CODE>Reason = term()</CODE></STRONG><BR>

  </DIV>
</DIV>

<DIV CLASS=REFBODY>

<P>Update usm user config.<A NAME="which_usm_users"><!-- Empty --></A>
</DIV>

<P><A NAME="which_usm_users/0"><STRONG><CODE>which_usm_users() -&#62; UsmUsers</CODE></STRONG></A><BR>

<DIV CLASS=REFBODY><P>Types:
  <DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>UsmUsers = [{EngineID,UserName}]</CODE></STRONG><BR>
<STRONG><CODE>EngineID = string()</CODE></STRONG><BR>
<STRONG><CODE>UsmName = string()</CODE></STRONG><BR>

  </DIV>
</DIV>

<DIV CLASS=REFBODY>

<P>Get a list of all registered usm users.<A NAME="which_usm_users2"><!-- Empty --></A>
</DIV>

<P><A NAME="which_usm_users/1"><STRONG><CODE>which_usm_users(EngineID) -&#62; UsmUsers</CODE></STRONG></A><BR>

<DIV CLASS=REFBODY><P>Types:
  <DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>UsmUsers = [UserName]</CODE></STRONG><BR>
<STRONG><CODE>UserName = string()</CODE></STRONG><BR>

  </DIV>
</DIV>

<DIV CLASS=REFBODY>

<P>Get a list of all registered usm users with engine-id 
         <CODE>EngineID</CODE>.<A NAME="g"><!-- Empty --></A>
</DIV>

<P><A NAME="g/3"><STRONG><CODE>g(UserId, Addr, Oids) -&#62; {ok, SnmpReply, Remaining} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="g/4"><STRONG><CODE>g(UserId, Addr, Port, Oids) -&#62; {ok, SnmpReply, Remaining} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="g/4"><STRONG><CODE>g(UserId, Addr, ContextName, Oids) -&#62; {ok, SnmpReply, Remaining} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="g/4"><STRONG><CODE>g(UserId, Addr, Oids, Timeout) -&#62; {ok, SnmpReply, Remaining} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="g/5"><STRONG><CODE>g(UserId, Addr, Port, ContextName, Oids) -&#62; {ok, SnmpReply, Remaining} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="g/5"><STRONG><CODE>g(UserId, Addr, Port, Oids, Timeout) -&#62; {ok, SnmpReply, Remaining} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="g/5"><STRONG><CODE>g(UserId, Addr, ContextName, Oids, Timeout) -&#62; {ok, SnmpReply, Remaining} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="g/6"><STRONG><CODE>g(UserId, Addr, Port, ContextName, Oids, Timeout) -&#62; {ok, SnmpReply, Remaining} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="g/7"><STRONG><CODE>g(UserId, Addr, Port, ContextName, Oids, Timeout, ExtraInfo) -&#62; {ok, SnmpReply, Remaining} | {error, Reason}</CODE></STRONG></A><BR>

<DIV CLASS=REFBODY><P>Types:
  <DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>UserId = term()</CODE></STRONG><BR>
<STRONG><CODE>Addr = ip_address()</CODE></STRONG><BR>
<STRONG><CODE>Port = integer()</CODE></STRONG><BR>
<STRONG><CODE>ContextName = string()</CODE></STRONG><BR>
<STRONG><CODE>Oids = [oid()]</CODE></STRONG><BR>
<STRONG><CODE>Timeout = integer()</CODE></STRONG><BR>
<STRONG><CODE>ExtraInfo = term()</CODE></STRONG><BR>
<STRONG><CODE>SnmpReply = snmp_reply()</CODE></STRONG><BR>
<STRONG><CODE>Remaining = integer()</CODE></STRONG><BR>
<STRONG><CODE>Reason = {send_failed, ReqId, R} | {invalid_sec_info, SecInfo, SnmpInfo} | term()</CODE></STRONG><BR>
<STRONG><CODE>R = term()</CODE></STRONG><BR>
<STRONG><CODE>SecInfo = [sec_info()]</CODE></STRONG><BR>
<STRONG><CODE>sec_info() = {sec_tag(), ExpectedValue, ReceivedValue}</CODE></STRONG><BR>
<STRONG><CODE>sec_tag() = atom()</CODE></STRONG><BR>
<STRONG><CODE>ExpectedValue = ReceivedValue = term()</CODE></STRONG><BR>
<STRONG><CODE>SnmpInfo = term()</CODE></STRONG><BR>

  </DIV>
</DIV>

<DIV CLASS=REFBODY>

<P>Synchronous <CODE>get-request</CODE>. 
<P><CODE>Remaining</CODE> is the remaining time of the given or 
         default timeout time.
<P>When <STRONG>Reason</STRONG> is <STRONG>{send_failed, ...}</STRONG> it means that
         the net_if process failed to send the message. This could happen
         because of any number of reasons, i.e. encoding error. <STRONG>R</STRONG> 
         is the actual reason in this case. 
<P><CODE>ExtraInfo</CODE> is an opaque data structure passed on to
         the net-if process. The net-if process included in this
         application makes no use of this info, so the only use for it
         in such a configuration (when using the built in net-if) would
         be tracing.
<P>For <CODE>SnmpInfo</CODE>, see the user callback function 
         <A HREF="snmpm_user.html#handle_report">handle_report</A>.<A NAME="ag"><!-- Empty --></A>
</DIV>

<P><A NAME="ag/3"><STRONG><CODE>ag(UserId, Addr, Oids) -&#62; {ok, ReqId} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="ag/4"><STRONG><CODE>ag(UserId, Addr, Port, Oids) -&#62; {ok, ReqId} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="ag/4"><STRONG><CODE>ag(UserId, Addr, ContextName, Oids) -&#62; {ok, ReqId} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="ag/4"><STRONG><CODE>ag(UserId, Addr, Oids, Expire) -&#62; {ok, ReqId} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="ag/5"><STRONG><CODE>ag(UserId, Addr, Port, ContextName, Oids) -&#62; {ok, ReqId} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="ag/5"><STRONG><CODE>ag(UserId, Addr, Port, Oids, Expire) -&#62; {ok, ReqId} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="ag/5"><STRONG><CODE>ag(UserId, Addr, ContextName, Oids, Expire) -&#62; {ok, ReqId} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="ag/6"><STRONG><CODE>ag(UserId, Addr, Port, ContextName, Oids, Expire) -&#62; {ok, ReqId} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="ag/7"><STRONG><CODE>ag(UserId, Addr, Port, ContextName, Oids, Expire, ExtraInfo) -&#62; {ok, ReqId} | {error, Reason}</CODE></STRONG></A><BR>

<DIV CLASS=REFBODY><P>Types:
  <DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>UserId = term()</CODE></STRONG><BR>
<STRONG><CODE>Addr = ip_address()</CODE></STRONG><BR>
<STRONG><CODE>Port = integer()</CODE></STRONG><BR>
<STRONG><CODE>ContextName = string()</CODE></STRONG><BR>
<STRONG><CODE>Oids = [oid()]</CODE></STRONG><BR>
<STRONG><CODE>Expire = integer()</CODE></STRONG><BR>
<STRONG><CODE>ExtraInfo = term()</CODE></STRONG><BR>
<STRONG><CODE>ReqId = term()</CODE></STRONG><BR>
<STRONG><CODE>Reason = term()</CODE></STRONG><BR>

  </DIV>
</DIV>

<DIV CLASS=REFBODY>

<P>Asynchronous <CODE>get-request</CODE>.
<P>The reply, if it arrives, will be delivered to the user 
         through a call to the snmpm_user callback function 
         <CODE>handle_pdu</CODE>.
<P>The <CODE>Expire</CODE> time indicates for how long the request is 
         valid (after which the manager is free to delete it).
<P><CODE>ExtraInfo</CODE> is an opaque data structure passed on to
         the net-if process. The net-if process included in this
         application makes no use of this info, so the only use for it
         in such a configuration (when using the built in net-if) would
         be tracing.<A NAME="gn"><!-- Empty --></A>
</DIV>

<P><A NAME="gn/3"><STRONG><CODE>gn(UserId, Addr, Oids) -&#62; {ok, SnmpReply, Remaining} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="gn/4"><STRONG><CODE>gn(UserId, Addr, Port, Oids) -&#62; {ok, SnmpReply, Remaining} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="gn/4"><STRONG><CODE>gn(UserId, Addr, ContextName, Oids) -&#62; {ok, SnmpReply, Remaining} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="gn/4"><STRONG><CODE>gn(UserId, Addr, Oids, Timeout) -&#62; {ok, SnmpReply, Remaining} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="gn/5"><STRONG><CODE>gn(UserId, Addr, Port, ContextName, Oids) -&#62; {ok, SnmpReply, Remaining} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="gn/5"><STRONG><CODE>gn(UserId, Addr, Port, Oids, Timeout) -&#62; {ok, SnmpReply, Remaining} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="gn/5"><STRONG><CODE>gn(UserId, Addr, ContextName, Oids, Timeout) -&#62; {ok, SnmpReply, Remaining} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="gn/6"><STRONG><CODE>gn(UserId, Addr, Port, ContextName, Oids, Timeout) -&#62; {ok, SnmpReply, Remaining} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="gn/7"><STRONG><CODE>gn(UserId, Addr, Port, ContextName, Oids, Timeout, ExtraInfo) -&#62; {ok, SnmpReply, Remaining} | {error, Reason}</CODE></STRONG></A><BR>

<DIV CLASS=REFBODY><P>Types:
  <DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>UserId = term()</CODE></STRONG><BR>
<STRONG><CODE>Addr = ip_address()</CODE></STRONG><BR>
<STRONG><CODE>Port = integer()</CODE></STRONG><BR>
<STRONG><CODE>ContextName = string()</CODE></STRONG><BR>
<STRONG><CODE>Oids = [oid()]</CODE></STRONG><BR>
<STRONG><CODE>Timeout = integer()</CODE></STRONG><BR>
<STRONG><CODE>ExtraInfo = term()</CODE></STRONG><BR>
<STRONG><CODE>SnmpReply = snmp_reply()</CODE></STRONG><BR>
<STRONG><CODE>Remaining = integer()</CODE></STRONG><BR>
<STRONG><CODE>Reason = {send_failed, ReqId, R} | {invalid_sec_info, SecInfo, SnmpInfo} | term()</CODE></STRONG><BR>
<STRONG><CODE>R = term()</CODE></STRONG><BR>

  </DIV>
</DIV>

<DIV CLASS=REFBODY>

<P>Synchronous <CODE>get-next-request</CODE>. 
<P><CODE>Remaining</CODE> time of the given or default timeout time.
<P>When <STRONG>Reason</STRONG> is <STRONG>{send_failed, ...}</STRONG> it means that
         the net_if process failed to send the message. This could happen
         because of any number of reasons, i.e. encoding error. <STRONG>R</STRONG> 
         is the actual reason in this case. 
<P><CODE>ExtraInfo</CODE> is an opaque data structure passed on to
         the net-if process. The net-if process included in this
         application makes no use of this info, so the only use for it
         in such a configuration (when using the built in net-if) would
         be tracing.<A NAME="agn"><!-- Empty --></A>
</DIV>

<P><A NAME="agn/3"><STRONG><CODE>agn(UserId, Addr, Oids) -&#62; {ok, ReqId} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="agn/4"><STRONG><CODE>agn(UserId, Addr, Port, Oids) -&#62; {ok, ReqId} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="agn/4"><STRONG><CODE>agn(UserId, Addr, ContextName, Oids) -&#62; {ok, ReqId} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="agn/4"><STRONG><CODE>agn(UserId, Addr, Oids, Expire) -&#62; {ok, ReqId} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="agn/5"><STRONG><CODE>agn(UserId, Addr, Port, ContextName, Oids) -&#62; {ok, ReqId} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="agn/5"><STRONG><CODE>agn(UserId, Addr, Port, Oids, Expire) -&#62; {ok, ReqId} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="agn/5"><STRONG><CODE>agn(UserId, Addr, ContextName, Oids, Expire) -&#62; {ok, ReqId} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="agn/6"><STRONG><CODE>agn(UserId, Addr, Port, ContextName, Oids, Expire) -&#62; {ok, ReqId} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="agn/7"><STRONG><CODE>agn(UserId, Addr, Port, ContextName, Oids, Expire, ExtraInfo) -&#62; {ok, ReqId} | {error, Reason}</CODE></STRONG></A><BR>

<DIV CLASS=REFBODY><P>Types:
  <DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>UserId = term()</CODE></STRONG><BR>
<STRONG><CODE>Addr = ip_address()</CODE></STRONG><BR>
<STRONG><CODE>Port = integer()</CODE></STRONG><BR>
<STRONG><CODE>ContextName = string()</CODE></STRONG><BR>
<STRONG><CODE>Oids = [oid()]</CODE></STRONG><BR>
<STRONG><CODE>Expire = integer()</CODE></STRONG><BR>
<STRONG><CODE>ExtraInfo = term()</CODE></STRONG><BR>
<STRONG><CODE>ReqId = integer()</CODE></STRONG><BR>
<STRONG><CODE>Reason = term()</CODE></STRONG><BR>

  </DIV>
</DIV>

<DIV CLASS=REFBODY>

<P>Asynchronous <CODE>get-next-request</CODE>. 
<P>The reply will be delivered to the user through a call
to the snmpm_user callback function <CODE>handle_pdu</CODE>.
<P>The <CODE>Expire</CODE> time indicates for how long the request is 
         valid (after which the manager is free to delete it).<A NAME="s"><!-- Empty --></A>
</DIV>

<P><A NAME="s/3"><STRONG><CODE>s(UserId, Addr, VarsAndVals) -&#62; {ok, SnmpReply, Remaining} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="s/4"><STRONG><CODE>s(UserId, Addr, Port, VarsAndVals) -&#62; {ok, SnmpReply, Remaining} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="s/4"><STRONG><CODE>s(UserId, Addr, ContextName, VarsAndVals) -&#62; {ok, SnmpReply, Remaining} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="s/4"><STRONG><CODE>s(UserId, Addr, VarsAndVals, Timeout) -&#62; {ok, SnmpReply, Remaining} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="s/5"><STRONG><CODE>s(UserId, Addr, Port, ContextName, VarsAndVals) -&#62; {ok, SnmpReply, Remaining} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="s/5"><STRONG><CODE>s(UserId, Addr, Port, VarsAndVals, Timeout) -&#62; {ok, SnmpReply, Remaining} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="s/5"><STRONG><CODE>s(UserId, Addr, ContextName, VarsAndVals, Timeout) -&#62; {ok, SnmpReply, Remaining} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="s/6"><STRONG><CODE>s(UserId, Addr, Port, ContextName, VarsAndVals, Timeout) -&#62; {ok, SnmpReply, Remaining} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="s/7"><STRONG><CODE>s(UserId, Addr, Port, ContextName, VarsAndVals, Timeout, ExtraInfo) -&#62; {ok, SnmpReply, Remaining} | {error, Reason}</CODE></STRONG></A><BR>

<DIV CLASS=REFBODY><P>Types:
  <DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>UserId = term()</CODE></STRONG><BR>
<STRONG><CODE>Addr = ip_address()</CODE></STRONG><BR>
<STRONG><CODE>Port = integer()</CODE></STRONG><BR>
<STRONG><CODE>ContextName = string()</CODE></STRONG><BR>
<STRONG><CODE>VarsAndVals = [var_and_val()]</CODE></STRONG><BR>
<STRONG><CODE>var_and_val() = {oid(), value_type(), value()} | {oid(), value()}</CODE></STRONG><BR>
<STRONG><CODE>value_type() = o ('OBJECT IDENTIFIER') | i ('INTEGER') | u ('Unsigned32') | g ('Unsigned32') | s ('OCTET SRING') | b ('BITS') | ip ('IpAddress') | op ('Opaque') | c32 ('Counter32') | c64 ('Counter64') | tt ('TimeTicks') </CODE></STRONG><BR>
<STRONG><CODE>value() = term() </CODE></STRONG><BR>
<STRONG><CODE>Timeout = integer()</CODE></STRONG><BR>
<STRONG><CODE>ExtraInfo = term()</CODE></STRONG><BR>
<STRONG><CODE>SnmpReply = snmp_reply()</CODE></STRONG><BR>
<STRONG><CODE>Remaining = integer()</CODE></STRONG><BR>
<STRONG><CODE>Reason = {send_failed, ReqId, R} | {invalid_sec_info, SecInfo, SnmpInfo} | term()</CODE></STRONG><BR>
<STRONG><CODE>R = term()</CODE></STRONG><BR>

  </DIV>
</DIV>

<DIV CLASS=REFBODY>

<P>Synchronous <CODE>set-request</CODE>. 
<P><CODE>Remaining</CODE> time of the given or default timeout time.
<P>When <STRONG>Reason</STRONG> is <STRONG>{send_failed, ...}</STRONG> it means that
         the net_if process failed to send the message. This could happen
         because of any number of reasons, i.e. encoding error. <STRONG>R</STRONG> 
         is the actual reason in this case. 
<P>When <STRONG>var_and_val()</STRONG> is <STRONG>{oid(), value()}</STRONG>, the
         manager makes an educated guess based on the loaded mibs. 
<P><CODE>ExtraInfo</CODE> is an opaque data structure passed on to
         the net-if process. The net-if process included in this
         application makes no use of this info, so the only use for it
         in such a configuration (when using the built in net-if) would
         be tracing.<A NAME="as"><!-- Empty --></A>
</DIV>

<P><A NAME="as/3"><STRONG><CODE>as(UserId, Addr, VarsAndVals) -&#62; {ok, ReqId} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="as/4"><STRONG><CODE>as(UserId, Addr, Port, VarsAndVals) -&#62; {ok, ReqId} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="as/4"><STRONG><CODE>as(UserId, Addr, ContextName, VarsAndVals) -&#62; {ok, ReqId} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="as/4"><STRONG><CODE>as(UserId, Addr, VarsAndVals, Expire) -&#62; {ok, ReqId} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="as/5"><STRONG><CODE>as(UserId, Addr, Port, ContextName, VarsAndVals) -&#62; {ok, ReqId} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="as/5"><STRONG><CODE>as(UserId, Addr, Port, VarsAndVals, Expire) -&#62; {ok, ReqId} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="as/5"><STRONG><CODE>as(UserId, Addr, ContextName, VarsAndVals, Expire) -&#62; {ok, ReqId} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="as/6"><STRONG><CODE>as(UserId, Addr, Port, ContextName, VarsAndVals, Expire) -&#62; {ok, ReqId} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="as/7"><STRONG><CODE>as(UserId, Addr, Port, ContextName, VarsAndVals, Expire, ExtraInfo) -&#62; {ok, ReqId} | {error, Reason}</CODE></STRONG></A><BR>

<DIV CLASS=REFBODY><P>Types:
  <DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>UserId = term()</CODE></STRONG><BR>
<STRONG><CODE>Addr = ip_address()</CODE></STRONG><BR>
<STRONG><CODE>Port = integer()</CODE></STRONG><BR>
<STRONG><CODE>VarsAndVals = [var_and_val()]</CODE></STRONG><BR>
<STRONG><CODE>var_and_val() = {oid(), value_type(), value() | {oid(), value()}</CODE></STRONG><BR>
<STRONG><CODE>value_type() = o ('OBJECT IDENTIFIER') | i ('INTEGER') | u ('Unsigned32') | g ('Unsigned32') | s ('OCTET SRING') | b ('BITS') | ip ('IpAddress') | op ('Opaque') | c32 ('Counter32') | c64 ('Counter64') | tt ('TimeTicks') </CODE></STRONG><BR>
<STRONG><CODE>value() = term() </CODE></STRONG><BR>
<STRONG><CODE>Expire = integer()</CODE></STRONG><BR>
<STRONG><CODE>ExtraInfo = term()</CODE></STRONG><BR>
<STRONG><CODE>ReqId = term()</CODE></STRONG><BR>
<STRONG><CODE>Reason = term()</CODE></STRONG><BR>

  </DIV>
</DIV>

<DIV CLASS=REFBODY>

<P>Asynchronous <CODE>set-request</CODE>. 
<P>The reply will be delivered to the user through a call
to the snmpm_user callback function <CODE>handle_pdu</CODE>.
<P>The <CODE>Expire</CODE> time indicates for how long the request is 
         valid (after which the manager is free to delete it).
<P>When <STRONG>var_and_val()</STRONG> is <STRONG>{oid(), value()}</STRONG>, the
         manager makes an educated guess based on the loaded mibs. 
<P><CODE>ExtraInfo</CODE> is an opaque data structure passed on to
         the net-if process. The net-if process included in this
         application makes no use of this info, so the only use for it
         in such a configuration (when using the built in net-if) would
         be tracing.<A NAME="gb"><!-- Empty --></A>
</DIV>

<P><A NAME="gb/5"><STRONG><CODE>gb(UserId, Addr, NonRep, MaxRep, Oids) -&#62; {ok, SnmpReply, Remaining} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="gb/6"><STRONG><CODE>gb(UserId, Addr, Port, NonRep, MaxRep, Oids) -&#62; {ok, SnmpReply, Remaining} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="gb/6"><STRONG><CODE>gb(UserId, Addr, NonRep, MaxRep, ContextName, Oids) -&#62; {ok, SnmpReply, Remaining} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="gb/6"><STRONG><CODE>gb(UserId, Addr, NonRep, MaxRep, Oids, Timeout) -&#62; {ok, SnmpReply, Remaining} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="gb/7"><STRONG><CODE>gb(UserId, Addr, Port, NonRep, MaxRep, ContextName, Oids) -&#62; {ok, SnmpReply, Remaining} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="gb/7"><STRONG><CODE>gb(UserId, Addr, Port, NonRep, MaxRep, Oids, Timeout) -&#62; {ok, SnmpReply, Remaining} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="gb/7"><STRONG><CODE>gb(UserId, Addr, NonRep, MaxRep, ContextName, Oids, Timeout) -&#62; {ok, SnmpReply, Remaining} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="gb/8"><STRONG><CODE>gb(UserId, Addr, Port, NonRep, MaxRep, ContextName, Oids, Timeout) -&#62; {ok, SnmpReply, Remaining} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="gb/9"><STRONG><CODE>gb(UserId, Addr, Port, NonRep, MaxRep, ContextName, Oids, Timeout, ExtraInfo) -&#62; {ok, SnmpReply, Remaining} | {error, Reason}</CODE></STRONG></A><BR>

<DIV CLASS=REFBODY><P>Types:
  <DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>UserId = term()</CODE></STRONG><BR>
<STRONG><CODE>Addr = ip_address()</CODE></STRONG><BR>
<STRONG><CODE>Port = integer()</CODE></STRONG><BR>
<STRONG><CODE>NonRep = integer()</CODE></STRONG><BR>
<STRONG><CODE>MaxRep = integer()</CODE></STRONG><BR>
<STRONG><CODE>ContextName = string()</CODE></STRONG><BR>
<STRONG><CODE>Oids = [oid()]</CODE></STRONG><BR>
<STRONG><CODE>Timeout = integer()</CODE></STRONG><BR>
<STRONG><CODE>ExtraInfo = term()</CODE></STRONG><BR>
<STRONG><CODE>SnmpReply = snmp_reply()</CODE></STRONG><BR>
<STRONG><CODE>Remaining = integer()</CODE></STRONG><BR>
<STRONG><CODE>Reason = {send_failed, ReqId, R} | {invalid_sec_info, SecInfo, SnmpInfo} | term()</CODE></STRONG><BR>

  </DIV>
</DIV>

<DIV CLASS=REFBODY>

<P>Synchronous <CODE>get-bulk-request</CODE> (See RFC1905).
        
<P><CODE>Remaining</CODE> time of the given or default timeout time.
<P>When <STRONG>Reason</STRONG> is <STRONG>{send_failed, ...}</STRONG> it means that
         the net_if process failed to send the message. This could happen
         because of any number of reasons, i.e. encoding error. <STRONG>R</STRONG> 
         is the actual reason in this case. 
<P><CODE>ExtraInfo</CODE> is an opaque data structure passed on to
         the net-if process. The net-if process included in this
         application makes no use of this info, so the only use for it
         in such a configuration (when using the built in net-if) would
         be tracing.<A NAME="agb"><!-- Empty --></A>
</DIV>

<P><A NAME="agb/5"><STRONG><CODE>agb(UserId, Addr, NonRep, MaxRep, Oids) -&#62; {ok, ReqId} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="agb/6"><STRONG><CODE>agb(UserId, Addr, Port, NonRep, MaxRep, Oids) -&#62; {ok, ReqId} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="agb/6"><STRONG><CODE>agb(UserId, Addr, NonRep, MaxRep, ContextName, Oids) -&#62; {ok, ReqId} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="agb/6"><STRONG><CODE>agb(UserId, Addr, NonRep, MaxRep, Oids, Expire) -&#62; {ok, ReqId} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="agb/7"><STRONG><CODE>agb(UserId, Addr, Port, NonRep, MaxRep, ContextName, Oids) -&#62; {ok, ReqId} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="agb/7"><STRONG><CODE>agb(UserId, Addr, Port, NonRep, MaxRep, Oids, Expire) -&#62; {ok, ReqId} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="agb/7"><STRONG><CODE>agb(UserId, Addr, NonRep, MaxRep, ContextName, Oids, Expire) -&#62; {ok, ReqId} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="agb/8"><STRONG><CODE>agb(UserId, Addr, Port, NonRep, MaxRep, ContextName, Oids, Expire) -&#62; {ok, ReqId} | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="agb/9"><STRONG><CODE>agb(UserId, Addr, Port, NonRep, MaxRep, ContextName, Oids, Expire, ExtraInfo) -&#62; {ok, ReqId} | {error, Reason}</CODE></STRONG></A><BR>

<DIV CLASS=REFBODY><P>Types:
  <DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>UserId = term()</CODE></STRONG><BR>
<STRONG><CODE>Addr = ip_address()</CODE></STRONG><BR>
<STRONG><CODE>Port = integer()</CODE></STRONG><BR>
<STRONG><CODE>NonRep = integer()</CODE></STRONG><BR>
<STRONG><CODE>MaxRep = integer()</CODE></STRONG><BR>
<STRONG><CODE>ContextName = string()</CODE></STRONG><BR>
<STRONG><CODE>Oids = [oid()]</CODE></STRONG><BR>
<STRONG><CODE>Expire = integer()</CODE></STRONG><BR>
<STRONG><CODE>ExtraInfo = term()</CODE></STRONG><BR>
<STRONG><CODE>ReqId = integer()</CODE></STRONG><BR>
<STRONG><CODE>Reason = term()</CODE></STRONG><BR>

  </DIV>
</DIV>

<DIV CLASS=REFBODY>

<P>Asynchronous <CODE>get-bulk-request</CODE> (See RFC1905).
        
<P>The reply will be delivered to the user through a call
to the snmpm_user callback function <CODE>handle_pdu</CODE>.
<P>The <CODE>Expire</CODE> time indicates for how long the request is 
         valid (after which the manager is free to delete it).<A NAME="cancel_async_request"><!-- Empty --></A>
</DIV>

<P><A NAME="cancel_async_request/2"><STRONG><CODE>cancel_async_request(UserId, ReqId) -&#62; ok | {error, Reason}</CODE></STRONG></A><BR>

<DIV CLASS=REFBODY><P>Types:
  <DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>UserId = term()</CODE></STRONG><BR>
<STRONG><CODE>ReqId = term()</CODE></STRONG><BR>
<STRONG><CODE>Reason = term()</CODE></STRONG><BR>

  </DIV>
</DIV>

<DIV CLASS=REFBODY>

<P>Cancel a preious asynchronous request.<A NAME="log_to_txt"><!-- Empty --></A>
</DIV>

<P><A NAME="log_to_txt/2"><STRONG><CODE>log_to_txt(LogDir, Mibs)</CODE></STRONG></A><BR>
<A NAME="log_to_txt/3"><STRONG><CODE>log_to_txt(LogDir, Mibs, OutFile) -&#62; ok | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="log_to_txt/4"><STRONG><CODE>log_to_txt(LogDir, Mibs, OutFile, LogName) -&#62; 
        ok | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="log_to_txt/5"><STRONG><CODE>log_to_txt(LogDir, Mibs, OutFile, LogName, LogFile) -&#62; 
        ok | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="log_to_txt/6"><STRONG><CODE>log_to_txt(LogDir, Mibs, OutFile, LogName, LogFile, Start) -&#62; 
        ok | {error, Reason}</CODE></STRONG></A><BR>
<A NAME="log_to_txt/7"><STRONG><CODE>log_to_txt(LogDir, Mibs, OutFile, LogName, LogFile, Start, Stop) 
        -&#62; ok | {error, Reason}</CODE></STRONG></A><BR>

<DIV CLASS=REFBODY><P>Types:
  <DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>LogDir = string()</CODE></STRONG><BR>
<STRONG><CODE>Mibs = [MibName]</CODE></STRONG><BR>
<STRONG><CODE>MibName = string()</CODE></STRONG><BR>
<STRONG><CODE>OutFile = string()</CODE></STRONG><BR>
<STRONG><CODE>LogName = string()</CODE></STRONG><BR>
<STRONG><CODE>LogFile = string()</CODE></STRONG><BR>
<STRONG><CODE>Start = Stop = null | datetime() | {local_time,datetime()} | 
{universal_time,datetime()} </CODE></STRONG><BR>
<STRONG><CODE>Reason = disk_log_open_error() | file_open_error() | term()</CODE></STRONG><BR>
<STRONG><CODE>disk_log_open_error() = {LogName, term()}</CODE></STRONG><BR>
<STRONG><CODE>file_open_error() = {OutFile, term()}</CODE></STRONG><BR>

  </DIV>
</DIV>

<DIV CLASS=REFBODY>

<P>Converts an Audit Trail Log to a readable text file. 
         <CODE>OutFile</CODE> defaults to &#34;./snmpm_log.txt&#34;. 
         <CODE>LogName</CODE> defaults to &#34;snmpm_log&#34;. 
         <CODE>LogFile</CODE> defaults to &#34;snmpm.log&#34;. 
See <A HREF="snmp.html#log_to_txt">snmp:log_to_txt</A> 
for more info.
</DIV>

<P><A NAME="change_log_size/1"><STRONG><CODE>change_log_size(NewSize) -&#62; ok | {error, Reason}</CODE></STRONG></A><BR>

<DIV CLASS=REFBODY><P>Types:
  <DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>NewSize = {MaxBytes, MaxFiles}</CODE></STRONG><BR>
<STRONG><CODE>MaxBytes = integer()</CODE></STRONG><BR>
<STRONG><CODE>MaxFiles = integer()</CODE></STRONG><BR>
<STRONG><CODE>Reason = term()</CODE></STRONG><BR>

  </DIV>
</DIV>

<DIV CLASS=REFBODY>

<P>Changes the log size of the Audit Trail Log. The application must 
         be configured to use the audit trail log function. Please refer to 
         disk_log(3) in Kernel Reference Manual for a description of how to 
         change the log size.

        
<P>The change is permanent, as long as the log is not deleted. 
         That means, the log size is remebered across reboots.<A NAME="load_mib"><!-- Empty --></A>
</DIV>

<P><A NAME="load_mib/1"><STRONG><CODE>load_mib(Mib) -&#62; ok | {error, Reason}</CODE></STRONG></A><BR>

<DIV CLASS=REFBODY><P>Types:
  <DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>Mib = MibName</CODE></STRONG><BR>
<STRONG><CODE>MibName = string()</CODE></STRONG><BR>
<STRONG><CODE>Reason = term()</CODE></STRONG><BR>

  </DIV>
</DIV>

<DIV CLASS=REFBODY>

<P>Load a <CODE>Mib</CODE> into the manager. The <CODE>MibName</CODE> is the 
         name of the Mib, including the path to where the compiled mib is 
         found. For example,
        
<PRE>
          Dir = code:priv_dir(my_app) ++ &#34;/mibs/&#34;,
          snmpm:load_mib(Dir ++ &#34;MY-MIB&#34;).
        
</PRE>
<A NAME="unload_mib"><!-- Empty --></A>
</DIV>

<P><A NAME="unload_mib/1"><STRONG><CODE>unload_mib(Mib) -&#62; ok | {error, Reason}</CODE></STRONG></A><BR>

<DIV CLASS=REFBODY><P>Types:
  <DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>Mib = MibName</CODE></STRONG><BR>
<STRONG><CODE>MibName = string()</CODE></STRONG><BR>
<STRONG><CODE>Reason = term()</CODE></STRONG><BR>

  </DIV>
</DIV>

<DIV CLASS=REFBODY>

<P>Unload a <CODE>Mib</CODE> from the manager. The <CODE>MibName</CODE> is the 
         name of the Mib, including the path to where the compiled mib is 
         found. For example,
        
<PRE>
          Dir = code:priv_dir(my_app) ++ &#34;/mibs/&#34;,
          snmpm:unload_mib(Dir ++ &#34;MY-MIB&#34;).
        
</PRE>
<A NAME="which_mibs"><!-- Empty --></A>
</DIV>

<P><A NAME="which_mibs/0"><STRONG><CODE>which_mibs() -&#62; Mibs</CODE></STRONG></A><BR>

<DIV CLASS=REFBODY><P>Types:
  <DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>Mibs = [{MibName, MibFile}]</CODE></STRONG><BR>
<STRONG><CODE>MibName = atom()</CODE></STRONG><BR>
<STRONG><CODE>MibFile = string()</CODE></STRONG><BR>

  </DIV>
</DIV>

<DIV CLASS=REFBODY>

<P>Get a list of all the mib's loaded into the manager.<A NAME="name_to_oid"><!-- Empty --></A>
</DIV>

<P><A NAME="name_to_oid/1"><STRONG><CODE>name_to_oid(Name) -&#62; {ok, Oids} | {error, Reason}</CODE></STRONG></A><BR>

<DIV CLASS=REFBODY><P>Types:
  <DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>Name = atom()</CODE></STRONG><BR>
<STRONG><CODE>Oids = [oid()]</CODE></STRONG><BR>

  </DIV>
</DIV>

<DIV CLASS=REFBODY>

<P>Transform a aliasname to it's oid.
<P>Note that an aliasname is only unique within the mib, so
         when loading several mib's into a manager, there might be
         several instances of the same aliasname.<A NAME="oid_to_name"><!-- Empty --></A>
</DIV>

<P><A NAME="oid_to_name/1"><STRONG><CODE>oid_to_name(Oid) -&#62; {ok, Name} | {error, Reason}</CODE></STRONG></A><BR>

<DIV CLASS=REFBODY><P>Types:
  <DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>Oid = oid()</CODE></STRONG><BR>
<STRONG><CODE>Name = atom()</CODE></STRONG><BR>
<STRONG><CODE>Reason = term()</CODE></STRONG><BR>

  </DIV>
</DIV>

<DIV CLASS=REFBODY>

<P>Transform a oid to it's aliasname.<A NAME="backup"><!-- Empty --></A>
</DIV>

<P><A NAME="backup/1"><STRONG><CODE>backup(BackupDir) -&#62; ok | {error, Reason}</CODE></STRONG></A><BR>

<DIV CLASS=REFBODY><P>Types:
  <DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>BackupDir = string()</CODE></STRONG><BR>

  </DIV>
</DIV>

<DIV CLASS=REFBODY>

<P>Backup persistent/permanent data handled by the manager. 
<P>BackupDir cannot be identical to DbDir. <A NAME="info"><!-- Empty --></A>
</DIV>

<P><A NAME="info/0"><STRONG><CODE>info() -&#62; [{Key, Value}]</CODE></STRONG></A><BR>

<DIV CLASS=REFBODY><P>Types:
  <DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>Key = atom()</CODE></STRONG><BR>
<STRONG><CODE>Value = term()</CODE></STRONG><BR>

  </DIV>
</DIV>

<DIV CLASS=REFBODY>

<P>Returns a list (a dictionary) containing information about
         the manager. Information includes statistics counters, 
miscellaneous info about each process (e.g. memory allocation), 
and so on.<A NAME="verbosity"><!-- Empty --></A>
</DIV>

<P><A NAME="verbosity/2"><STRONG><CODE>verbosity(Ref, Verbosuity) -&#62; void()</CODE></STRONG></A><BR>

<DIV CLASS=REFBODY><P>Types:
  <DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>Ref = server | config | net_if | note_store | all</CODE></STRONG><BR>
<STRONG><CODE>Verbosity = verbosity()</CODE></STRONG><BR>
<STRONG><CODE>verbosity() = silence | info | log | debug | trace </CODE></STRONG><BR>

  </DIV>
</DIV>

<DIV CLASS=REFBODY>

<P>Sets verbosity for the designated process. For the lowest 
         verbosity <CODE>silence</CODE>, nothing is printed. The higher the
         verbosity, the more is printed.<A NAME="format_reason"><!-- Empty --></A>
</DIV>

<P><A NAME="format_reason/1"><STRONG><CODE>format_reason(Reason) -&#62; string()</CODE></STRONG></A><BR>
<A NAME="format_reason/2"><STRONG><CODE>format_reason(Prefix, Reason) -&#62; string()</CODE></STRONG></A><BR>

<DIV CLASS=REFBODY><P>Types:
  <DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>Reason = term()</CODE></STRONG><BR>
<STRONG><CODE>Prefix = integer() | string()</CODE></STRONG><BR>

  </DIV>
</DIV>

<DIV CLASS=REFBODY>

<P>This utility function is used to create a formatted 
(pretty printable) string of the error reason received
from either:


<P>
<UL>

<LI>
         The <CODE>Reason</CODE> returned value if any of the 
sync/async get/get-next/set/get-bulk
functions returnes <CODE>{error, Reason}</CODE>
<BR>

</LI>


<LI>
         The <CODE>Reason</CODE> parameter in the 
<A HREF="snmpm_user.html#handle_error"> handle_error</A> user callback function.
<BR>

</LI>


</UL>

<P><CODE>Prefix</CODE> should either be an indention string
(e.g. a list of spaces) or a positive integer (wich will be used
to create the indention string of that length).
</DIV>

<H3>AUTHORS</H3>
<DIV CLASS=REFBODY>
Micael Karlberg - support@erlang.ericsson.se<BR>

</DIV>
<CENTER>
<HR>
<SMALL>snmp 4.8.2<BR>
Copyright &copy; 1991-2006
<A HREF="http://www.erlang.se">Ericsson AB</A><BR>
</SMALL>
</CENTER>
</BODY>
</HTML>