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

« back to all changes in this revision

Viewing changes to lib/snmp/doc/src/snmp_pdus.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 erlref SYSTEM "erlref.dtd">
 
3
 
 
4
<erlref>
 
5
  <header>
 
6
    <copyright>
 
7
      <year>1996</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>snmp_pdus</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_pdus.xml</file>
 
33
  </header>
 
34
  <module>snmp_pdus</module>
 
35
  <modulesummary>Encode and Decode Functions for SNMP PDUs</modulesummary>
 
36
  <description>
 
37
    <p>RFC1157, RFC1905 and/or RFC2272 should be studied carefully
 
38
      before using this module, <c>snmp_pdus</c>.
 
39
      </p>
 
40
    <p>The module <c>snmp_pdus</c> contains functions for encoding 
 
41
      and decoding of
 
42
      SNMP protocol data units (PDUs).  In short, this module converts a
 
43
      list of bytes to Erlang record representations and vice versa.
 
44
      The record definitions can be found in the file
 
45
      <c>snmp/include/snmp_types.hrl</c>.  If snmpv3 is used, the module
 
46
      that includes <c>snmp_types.hrl</c> must define the constant
 
47
      <c>SNMP_USE_V3</c> before the header file is included.  Example:</p>
 
48
    <pre>
 
49
-define(SNMP_USE_V3, true).
 
50
-include_lib("snmp/include/snmp_types.hrl").    </pre>
 
51
    <p>Encoding and decoding must be done explicitly when writing your
 
52
      own Net if process.
 
53
      </p>
 
54
  </description>
 
55
  <funcs>
 
56
    <func>
 
57
      <name>dec_message([byte()]) -> Message</name>
 
58
      <fsummary>Decode an SNMP Message</fsummary>
 
59
      <type>
 
60
        <v>Message = #message</v>
 
61
      </type>
 
62
      <desc>
 
63
        <p>Decodes a list of bytes into an SNMP Message.  Note, if there
 
64
          is a v3 message, the <c>msgSecurityParameters</c> are not
 
65
          decoded.  They must be explicitly decoded by a call to a
 
66
          security model specific decoding function,
 
67
          e.g. <c>dec_usm_security_parameters/1</c>.  Also note, if
 
68
          the <c>scopedPDU</c> is encrypted, the OCTET STRING encoded
 
69
          <c>encryptedPDU</c> will be present in the <c>data</c> field.</p>
 
70
      </desc>
 
71
    </func>
 
72
    <func>
 
73
      <name>dec_message_only([byte()]) -> Message</name>
 
74
      <fsummary>Decode an SNMP Message, but not the data part</fsummary>
 
75
      <type>
 
76
        <v>Message = #message</v>
 
77
      </type>
 
78
      <desc>
 
79
        <p>Decodes a list of bytes into an SNMP Message, but does not
 
80
          decode the data part of the Message. That means, data is still
 
81
          a list of bytes, normally an encoded <c>PDU</c> (v1 and V2) or an
 
82
          encoded and possibly encrypted <c>scopedPDU</c> (v3).</p>
 
83
      </desc>
 
84
    </func>
 
85
    <func>
 
86
      <name>dec_pdu([byte()]) -> Pdu</name>
 
87
      <fsummary>Decode an SNMP Pdu</fsummary>
 
88
      <type>
 
89
        <v>Pdu = #pdu</v>
 
90
      </type>
 
91
      <desc>
 
92
        <p>Decodes a list of bytes into an SNMP Pdu.</p>
 
93
      </desc>
 
94
    </func>
 
95
    <func>
 
96
      <name>dec_scoped_pdu([byte()]) -> ScopedPdu</name>
 
97
      <fsummary>Decode an SNMP ScopedPdu</fsummary>
 
98
      <type>
 
99
        <v>ScopedPdu = #scoped_pdu</v>
 
100
      </type>
 
101
      <desc>
 
102
        <p>Decodes a list of bytes into an SNMP ScopedPdu.</p>
 
103
      </desc>
 
104
    </func>
 
105
    <func>
 
106
      <name>dec_scoped_pdu_data([byte()]) -> ScopedPduData</name>
 
107
      <fsummary>Decode an SNMP ScopedPduData</fsummary>
 
108
      <type>
 
109
        <v>ScopedPduData = #scoped_pdu | EncryptedPDU</v>
 
110
        <v>EncryptedPDU = [byte()]</v>
 
111
      </type>
 
112
      <desc>
 
113
        <p>Decodes a list of bytes into either a scoped pdu record, or
 
114
          - if the scoped pdu was encrypted - to a list of bytes.</p>
 
115
      </desc>
 
116
    </func>
 
117
    <func>
 
118
      <name>dec_usm_security_parameters([byte()]) -> UsmSecParams</name>
 
119
      <fsummary>Decode SNMP UsmSecurityParameters</fsummary>
 
120
      <type>
 
121
        <v>UsmSecParams = #usmSecurityParameters</v>
 
122
      </type>
 
123
      <desc>
 
124
        <p>Decodes a list of bytes into an SNMP UsmSecurityParameters</p>
 
125
      </desc>
 
126
    </func>
 
127
    <func>
 
128
      <name>enc_encrypted_scoped_pdu(EncryptedScopedPdu) -> [byte()]</name>
 
129
      <fsummary>Encode an encrypted SNMP scopedPDU</fsummary>
 
130
      <type>
 
131
        <v>EncryptedScopedPdu = [byte()]</v>
 
132
      </type>
 
133
      <desc>
 
134
        <p>Encodes an encrypted SNMP ScopedPdu into an OCTET STRING
 
135
          that can be used as the <c>data</c> field in a
 
136
          <c>message</c> record, that later can be encoded with a call
 
137
          to <c>enc_message_only/1</c>. 
 
138
          </p>
 
139
        <p>This function should be used whenever the <c>ScopedPDU</c>
 
140
          is encrypted.</p>
 
141
      </desc>
 
142
    </func>
 
143
    <func>
 
144
      <name>enc_message(Message) -> [byte()]</name>
 
145
      <fsummary>Encode an SNMP Message</fsummary>
 
146
      <type>
 
147
        <v>Message = #message</v>
 
148
      </type>
 
149
      <desc>
 
150
        <p>Encodes a message record to a list of bytes.</p>
 
151
      </desc>
 
152
    </func>
 
153
    <func>
 
154
      <name>enc_message_only(Message) -> [byte()]</name>
 
155
      <fsummary>Encode an SNMP Message, but not the data part</fsummary>
 
156
      <type>
 
157
        <v>Message = #message</v>
 
158
      </type>
 
159
      <desc>
 
160
        <p><c>Message</c> is a record where the <c>data</c> field is
 
161
          assumed to be encoded (a list of bytes).  If there is a v1 or v2
 
162
          message, the <c>data</c> field is an encoded <c>PDU</c>, and if
 
163
          there is a v3 message, <c>data</c> is an encoded and possibly
 
164
          encrypted <c>scopedPDU</c>.</p>
 
165
      </desc>
 
166
    </func>
 
167
    <func>
 
168
      <name>enc_pdu(Pd) -> [byte()]</name>
 
169
      <fsummary>Encode an SNMP Pdu</fsummary>
 
170
      <type>
 
171
        <v>Pdu = #pdu</v>
 
172
      </type>
 
173
      <desc>
 
174
        <p>Encodes an SNMP Pdu into a list of bytes.</p>
 
175
      </desc>
 
176
    </func>
 
177
    <func>
 
178
      <name>enc_scoped_pdu(ScopedPdu) -> [byte()]</name>
 
179
      <fsummary>Encode an SNMP scopedPDU</fsummary>
 
180
      <type>
 
181
        <v>ScopedPdu = #scoped_pdu</v>
 
182
      </type>
 
183
      <desc>
 
184
        <p>Encodes an SNMP ScopedPdu into a list of bytes, which can be
 
185
          encrypted, and after encryption, encoded with
 
186
          a call to <c>enc_encrypted_scoped_pdu/1</c>; or it can be
 
187
          used as the <c>data</c> field in a <c>message</c> record, which
 
188
          then can be encoded with <c>enc_message_only/1</c>.</p>
 
189
      </desc>
 
190
    </func>
 
191
    <func>
 
192
      <name>enc_usm_security_parameters(UsmSecParams) -> [byte()]</name>
 
193
      <fsummary>Encode SNMP UsmSecurityParameters</fsummary>
 
194
      <type>
 
195
        <v>UsmSecParams = #usmSecurityParameters</v>
 
196
      </type>
 
197
      <desc>
 
198
        <p>Encodes SNMP UsmSecurityParameters into a list of bytes.</p>
 
199
      </desc>
 
200
    </func>
 
201
  </funcs>
 
202
  
 
203
</erlref>
 
204