File: snmpm_mpd.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 (189 lines) | stat: -rw-r--r-- 5,369 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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- This document was generated using DocBuilder 3.3.3 -->
<HTML>
<HEAD>
  <TITLE>snmpm_mpd</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_mpd</H1>
</CENTER>

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

<H3>MODULE SUMMARY</H3>
<DIV CLASS=REFBODY>
 Message Processing and Dispatch module for the SNMP manager

</DIV>

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

<P>The module <CODE>snmpm_mpd</CODE> implements the version independent
Message Processing and Dispatch functionality in SNMP for the manager. 
It is supposed to be used from a Network Interface process 
(<A HREF="snmp_manager_netif.html">Definition of Manager Net if</A>).


</DIV>

<H3>EXPORTS</H3>

<P><A NAME="init_mpd/1"><STRONG><CODE>init_mpd(Vsns) -&#62; mpd_state()</CODE></STRONG></A><BR>

<DIV CLASS=REFBODY><P>Types:
  <DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>Vsns = [Vsn]</CODE></STRONG><BR>
<STRONG><CODE>Vsn = v1 | v2 | v3</CODE></STRONG><BR>

  </DIV>
</DIV>

<DIV CLASS=REFBODY>

<P>This function can be called from the net_if process at startup.
         The options list defines which versions to use.
         
        
<P>It also initializes some SNMP counters.
         
         <A NAME="process_msg"><!-- Empty --></A> 

</DIV>

<P><A NAME="process_msg/7"><STRONG><CODE>process_msg(Msg, TDomain, Addr, Port, State, NoteStore, Logger) -&#62;
{ok, Vsn, Pdu, PduMS, MsgData} | {discarded, Reason}</CODE></STRONG></A><BR>

<DIV CLASS=REFBODY><P>Types:
  <DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>Msg = binary()</CODE></STRONG><BR>
<STRONG><CODE>TDomain = snmpUDPDomain</CODE></STRONG><BR>
<STRONG><CODE>Addr = {integer(), integer(), integer(), integer()}</CODE></STRONG><BR>
<STRONG><CODE>Port = integer()</CODE></STRONG><BR>
<STRONG><CODE>State = mpd_state()</CODE></STRONG><BR>
<STRONG><CODE>NoteStore = pid()</CODE></STRONG><BR>
<STRONG><CODE>Logger = function()</CODE></STRONG><BR>
<STRONG><CODE>Vsn = 'version-1' | 'version-2' | 'version-3'</CODE></STRONG><BR>
<STRONG><CODE>Pdu = #pdu</CODE></STRONG><BR>
<STRONG><CODE>PduMs = integer()</CODE></STRONG><BR>
<STRONG><CODE>MsgData = term()</CODE></STRONG><BR>

  </DIV>
</DIV>

<DIV CLASS=REFBODY>

<P>Processes an incoming message. Performs authentication and 
         decryption as necessary. The return values should be passed the
         manager server.

        
<P><CODE>NoteStore</CODE> is the <CODE>pid()</CODE> of the note-store process.
        
<P><CODE>Logger</CODE> is the function used for audit trail logging.

        
<P>In the case when the pdu type is <CODE>report</CODE>, <CODE>MsgData</CODE> is 
         either <CODE>ok</CODE> or <CODE>{error, ReqId, Reason}</CODE>.


</DIV>

<P><A NAME="generate_msg/5"><STRONG><CODE>generate_msg(Vsn, NoteStore, Pdu, MsgData, Logger) -&#62;
{ok, Packet} | {discarded, Reason}</CODE></STRONG></A><BR>

<DIV CLASS=REFBODY><P>Types:
  <DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>Vsn = 'version-1' | 'version-2' | 'version-3'</CODE></STRONG><BR>
<STRONG><CODE>NoteStore = pid()</CODE></STRONG><BR>
<STRONG><CODE>Pdu = #pdu</CODE></STRONG><BR>
<STRONG><CODE>MsgData = term()</CODE></STRONG><BR>
<STRONG><CODE>Logger = function()</CODE></STRONG><BR>
<STRONG><CODE>Packet = binary()</CODE></STRONG><BR>
<STRONG><CODE>Reason = term()</CODE></STRONG><BR>

  </DIV>
</DIV>

<DIV CLASS=REFBODY>

<P>Generates a possibly encrypted packet to be sent to the network.

        
<P><CODE>NoteStore</CODE> is the <CODE>pid()</CODE> of the note-store process.

        
<P><CODE>MsgData</CODE> is the message specific data used in the SNMP 
         message. In SNMPv1 and SNMPv2c, this message data is the community 
         string. In SNMPv3, it is the context information.
         
        
<P><CODE>Logger</CODE> is the function used for audit trail logging.


</DIV>

<P><A NAME="generate_response_msg/4"><STRONG><CODE>generate_response_msg(Vsn, Pdu, MsgData, Logger) -&#62;
{ok, Packet} | {discarded, Reason}</CODE></STRONG></A><BR>

<DIV CLASS=REFBODY><P>Types:
  <DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>Vsn = 'version-1' | 'version-2' | 'version-3'</CODE></STRONG><BR>
<STRONG><CODE>Pdu = #pdu</CODE></STRONG><BR>
<STRONG><CODE>MsgData = term()</CODE></STRONG><BR>
<STRONG><CODE>Logger = function()</CODE></STRONG><BR>
<STRONG><CODE>Packet = binary()</CODE></STRONG><BR>
<STRONG><CODE>Reason = term()</CODE></STRONG><BR>

  </DIV>
</DIV>

<DIV CLASS=REFBODY>

<P>Generates a possibly encrypted response packet to be sent to the
         network.

        
<P><CODE>MsgData</CODE> is the message specific data used in the SNMP 
         message. Thes value is received from the 
         <A HREF="snmpm_mpd.html#process_msg">process_msg</A> 
         function.
         

</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>