~statik/ubuntu/maverick/erlang/erlang-merge-testing

« back to all changes in this revision

Viewing changes to lib/snmp/doc/src/snmp_manager_netif.xml

  • Committer: Bazaar Package Importer
  • Author(s): Sergei Golovan
  • Date: 2009-05-01 10:14:38 UTC
  • mfrom: (3.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20090501101438-6qlr6rsdxgyzrg2z
Tags: 1:13.b-dfsg-2
* Cleaned up patches: removed unneeded patch which helped to support
  different SCTP library versions, made sure that changes for m68k
  architecture applied only when building on this architecture.
* Removed duplicated information from binary packages descriptions.
* Don't require libsctp-dev build-dependency on solaris-i386 architecture
  which allows to build Erlang on Nexenta (thanks to Tim Spriggs for
  the suggestion).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="latin1" ?>
 
2
<!DOCTYPE chapter SYSTEM "chapter.dtd">
 
3
 
 
4
<chapter>
 
5
  <header>
 
6
    <copyright>
 
7
      <year>2004</year><year>2009</year>
 
8
      <holder>Ericsson AB. All Rights Reserved.</holder>
 
9
    </copyright>
 
10
    <legalnotice>
 
11
      The contents of this file are subject to the Erlang Public License,
 
12
      Version 1.1, (the "License"); you may not use this file except in
 
13
      compliance with the License. You should have received a copy of the
 
14
      Erlang Public License along with this software. If not, it can be
 
15
      retrieved online at http://www.erlang.org/.
 
16
    
 
17
      Software distributed under the License is distributed on an "AS IS"
 
18
      basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
 
19
      the License for the specific language governing rights and limitations
 
20
      under the License.
 
21
    
 
22
    </legalnotice>
 
23
 
 
24
    <title>Definition of Manager Net if</title>
 
25
    <prepared></prepared>
 
26
    <responsible></responsible>
 
27
    <docno></docno>
 
28
    <approved></approved>
 
29
    <checked></checked>
 
30
    <date></date>
 
31
    <rev></rev>
 
32
    <file>snmp_manager_netif.xml</file>
 
33
  </header>
 
34
  <p></p>
 
35
  <image file="snmp_manager_netif_1">
 
36
    <icaption>The Purpose of Manager Net if</icaption>
 
37
  </image>
 
38
  <p>The Network Interface (Net if) process delivers SNMP PDUs to the
 
39
    manager server, and receives SNMP PDUs from the manager server. 
 
40
    The most common behaviour of a Net if process is that is receives 
 
41
    request PDU from the manager server, encodes the PDU into bytes
 
42
    and transmits the bytes onto the network to an agent. When the 
 
43
    reply from the agent is received by the Net if process, which it
 
44
    decodes into an SNMP PDU, which it sends to the manager server.
 
45
    </p>
 
46
  <p>However, that simple behaviour can be modified in numerous
 
47
    ways. For example, the Net if process can apply some kind of
 
48
    encrypting/decrypting scheme on the bytes.
 
49
    </p>
 
50
  <p>It is also possible to write your own Net if process. The default
 
51
    Net if process is implemented in the module <c>snmpm_net_if</c> and
 
52
    it uses UDP as the transport protocol.
 
53
    </p>
 
54
  <p>This section describes how to write a Net if process.
 
55
    </p>
 
56
 
 
57
  <section>
 
58
    <marker id="mandatory_functions"></marker>
 
59
    <title>Mandatory Functions</title>
 
60
    <p>A Net if process must implement the SNMP manager 
 
61
      <seealso marker="snmpm_network_interface">network interface behaviour</seealso>.
 
62
      </p>
 
63
  </section>
 
64
 
 
65
  <section>
 
66
    <title>Messages</title>
 
67
    <p>The section <em>Messages</em> describes mandatory messages, which
 
68
      Net if must send to the manager server process.     
 
69
      </p>
 
70
    <p>Net if must send the following message when it receives an
 
71
      SNMP PDU from the network that is aimed for the MasterAgent:
 
72
      </p>
 
73
    <pre>
 
74
Server ! {snmp_pdu, Pdu, Addr, Port}
 
75
    </pre>
 
76
    <list type="bulleted">
 
77
      <item>
 
78
        <p><c>Pdu</c> is an SNMP PDU record, as defined in
 
79
          <c>snmp_types.hrl</c>, with the SNMP request.</p>
 
80
      </item>
 
81
      <item>
 
82
        <p><c>Addr</c> is the source address. </p>
 
83
      </item>
 
84
      <item>
 
85
        <p><c>Port</c> is port number of the sender.</p>
 
86
      </item>
 
87
    </list>
 
88
    <pre>
 
89
Server ! {snmp_trap, Trap, Addr, Port}
 
90
    </pre>
 
91
    <list type="bulleted">
 
92
      <item>
 
93
        <p><c>Trap</c> is either an SNMP pdu record or an trappdu record, 
 
94
          as defined in <c>snmp_types.hrl</c>, with the SNMP request.</p>
 
95
      </item>
 
96
      <item>
 
97
        <p><c>Addr</c> is the source address. </p>
 
98
      </item>
 
99
      <item>
 
100
        <p><c>Port</c> is port number of the sender.</p>
 
101
      </item>
 
102
    </list>
 
103
    <pre>
 
104
Server ! {snmp_inform, Ref, Pdu, PduMS, Addr, Port}
 
105
    </pre>
 
106
    <list type="bulleted">
 
107
      <item>
 
108
        <p><c>Ref</c> is either the atom <c>ignore</c> or something
 
109
          that can be used to identify the inform-request (e.g. request-id).
 
110
          <c>ignore</c> is used if the response (acknowledgment) to the
 
111
          inform-request has already been sent (this means that the server 
 
112
          will not make the call to the 
 
113
          <seealso marker="snmpm_network_interface#inform_response">inform_response</seealso> 
 
114
          function). See the 
 
115
          <seealso marker="snmp_app">inform request behaviour</seealso> 
 
116
          configuration option for more info.</p>
 
117
      </item>
 
118
      <item>
 
119
        <p><c>Pdu</c> is an SNMP PDU record, as defined in
 
120
          <c>snmp_types.hrl</c>, with the SNMP request.</p>
 
121
      </item>
 
122
      <item>
 
123
        <p><c>Addr</c> is the source address. </p>
 
124
      </item>
 
125
      <item>
 
126
        <p><c>Port</c> is port number of the sender.</p>
 
127
      </item>
 
128
    </list>
 
129
    <pre>
 
130
Server ! {snmp_report, Data, Addr, Port}
 
131
    </pre>
 
132
    <list type="bulleted">
 
133
      <item>
 
134
        <p><c>Data</c> is either <c>{ok, Pdu}</c> or 
 
135
          <c>{error, ReqId, ReasonInfo, Pdu}</c>. Which one is used depends 
 
136
          on the return value from the MPD 
 
137
          <seealso marker="snmpm_mpd#process_msg">process_msg</seealso> function. If the MsgData is <c>ok</c>, 
 
138
          the first is used, and if it is <c>{error, ReqId, Reason}</c>
 
139
          the latter is used.</p>
 
140
      </item>
 
141
      <item>
 
142
        <p><c>Pdu</c> is an SNMP PDU record, as defined in
 
143
          <c>snmp_types.hrl</c>, with the SNMP request.</p>
 
144
      </item>
 
145
      <item>
 
146
        <p><c>ReqId</c> is an integer.</p>
 
147
      </item>
 
148
      <item>
 
149
        <p><c>ReasonInfo</c> is a term().</p>
 
150
      </item>
 
151
      <item>
 
152
        <p><c>Addr</c> is the source address. </p>
 
153
      </item>
 
154
      <item>
 
155
        <p><c>Port</c> is port number of the sender.</p>
 
156
      </item>
 
157
    </list>
 
158
 
 
159
    <section>
 
160
      <title>Notes</title>
 
161
      <p>Since the Net if process is responsible for encoding and
 
162
        decoding of SNMP messages, it must also update the relevant
 
163
        counters in the SNMP group in MIB-II.  It can use the functions
 
164
        in the module <c>snmpm_mpd</c> for this purpose (refer to the 
 
165
        Reference Manual, section <c>snmp</c>, module <c>snmpm_mpd</c>
 
166
        for more details).
 
167
        </p>
 
168
      <p>There are also some useful functions for encoding and
 
169
        decoding of SNMP messages in the module <c>snmp_pdus</c>.
 
170
        </p>
 
171
    </section>
 
172
  </section>
 
173
</chapter>
 
174