13
13
compliance with the License. You should have received a copy of the
14
14
Erlang Public License along with this software. If not, it can be
15
15
retrieved online at http://www.erlang.org/.
17
17
Software distributed under the License is distributed on an "AS IS"
18
18
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
19
19
the License for the specific language governing rights and limitations
24
24
<title>snmpa_mpd</title>
66
<name>process_packet(Packet, TDomain, TAddress, State) -> {ok, Vsn, Pdu, PduMS, ACMData} | {discarded, Reason} | {discovery, DiscoPacket}</name>
66
<name>process_packet(Packet, TDomain, TAddress, State, NoteStore, Log) -> {ok, Vsn, Pdu, PduMS, ACMData} | {discarded, Reason} | {discovery, DiscoPacket}</name>
67
<name>process_packet(Packet, TDomain, TAddress, LocalEngineID, State, NoteStore, Log) -> {ok, Vsn, Pdu, PduMS, ACMData} | {discarded, Reason} | {discovery, DiscoPacket}</name>
67
68
<fsummary>Process a packet received from the network</fsummary>
69
70
<v>Packet = binary()</v>
70
71
<v>TDomain = snmpUDPDomain</v>
71
72
<v>TAddress = {Ip, Udp}</v>
73
<v>LocalEngineID = string()</v>
72
74
<v>Ip = {integer(), integer(), integer(), integer()}</v>
73
75
<v>Udp = integer()</v>
74
76
<v>State = mpd_state()</v>
77
<v>NoteStore = pid()</v>
78
<v>Log = snmp_log()</v>
75
79
<v>Vsn = 'version-1' | 'version-2' | 'version-3'</v>
77
81
<v>PduMs = integer()</v>
84
88
decryption as necessary. The return values should be passed the
92
<p>Note that the use of the LocalEngineID argument is only intended
93
for special cases, if the agent is to "emulate" multiple EngineIDs!
94
By default, the agent uses the value of <c>SnmpEngineID</c>
95
(see SNMP-FRAMEWORK-MIB). </p>
87
98
<marker id="generate_response_msg"></marker>
92
<name>generate_response_msg(Vsn, RePdu, Type, ACMData) -> {ok, Packet} | {discarded, Reason}</name>
103
<name>generate_response_msg(Vsn, RePdu, Type, ACMData, Log) -> {ok, Packet} | {discarded, Reason}</name>
104
<name>generate_response_msg(Vsn, RePdu, Type, ACMData, LocalEngineID, Log) -> {ok, Packet} | {discarded, Reason}</name>
93
105
<fsummary>Generate a response packet to be sent to the network</fsummary>
95
107
<v>Vsn = 'version-1' | 'version-2' | 'version-3'</v>
96
108
<v>RePdu = #pdu</v>
97
109
<v>Type = atom()</v>
98
110
<v>ACMData = acm_data()</v>
111
<v>LocalEngineID = string()</v>
99
112
<v>Packet = binary()</v>
103
116
network. <c>Type</c> is the <c>#pdu.type</c> of the original
120
<p>Note that the use of the LocalEngineID argument is only intended
121
for special cases, if the agent is to "emulate" multiple EngineIDs!
122
By default, the agent uses the value of <c>SnmpEngineID</c>
123
(see SNMP-FRAMEWORK-MIB). </p>
106
126
<marker id="generate_msg"></marker>
111
<name>generate_msg(Vsn, Pdu, MsgData, To) -> {ok, PacketsAndAddresses} | {discarded, Reason}</name>
131
<name>generate_msg(Vsn, NoteStore, Pdu, MsgData, To) -> {ok, PacketsAndAddresses} | {discarded, Reason}</name>
132
<name>generate_msg(Vsn, NoteStore, Pdu, MsgData, LocalEngineID, To) -> {ok, PacketsAndAddresses} | {discarded, Reason}</name>
112
133
<fsummary>Generate a request message to be sent to the network</fsummary>
114
135
<v>Vsn = 'version-1' | 'version-2' | 'version-3'</v>
136
<v>NoteStore = pid()</v>
115
137
<v>Pdu = #pdu</v>
116
138
<v>MsgData = msg_data()</v>
139
<v>LocalEngineID = string()</v>
117
140
<v>To = [dest_addrs()]</v>
118
141
<v>PacketsAndAddresses = [{TDomain, TAddress, Packet}]</v>
119
142
<v>TDomain = snmpUDPDomain</v>
136
159
also received from the requests mentioned above.
163
<p>Note that the use of the LocalEngineID argument is only intended
164
for special cases, if the agent is to "emulate" multiple EngineIDs!
165
By default, the agent uses the value of <c>SnmpEngineID</c>
166
(see SNMP-FRAMEWORK-MIB). </p>
139
169
<marker id="discarded_pdu"></marker>