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
|
.TH snmpa_mpd 3 "snmp 4.11" "Ericsson AB" "ERLANG MODULE DEFINITION"
.SH MODULE
snmpa_mpd \- Message Processing and Dispatch module for the SNMP agent
.SH DESCRIPTION
.LP
The module \fIsnmpa_mpd\fR implements the version independent Message Processing and Dispatch functionality in SNMP for the agent\&. It is supposed to be used from a Network Interface process (Definition of Agent Net if)\&.
.SH EXPORTS
.LP
.B
init(Vsns) -> mpd_state()
.br
.RS
.TP
Types
Vsns = [Vsn]
.br
Vsn = v1 | v2 | v3
.br
.RE
.RS
.LP
This function can be called from the net_if process at start-up\&. The options list defines which versions to use\&.
.LP
It also initializes some SNMP counters\&.
.RE
.LP
.B
process_packet(Packet, TDomain, TAddress, State) -> {ok, Vsn, Pdu, PduMS, ACMData} | {discarded, Reason}
.br
.RS
.TP
Types
Packet = binary()
.br
TDomain = snmpUDPDomain
.br
TAddress = {Ip, Udp}
.br
Ip = {integer(), integer(), integer(), integer()}
.br
Udp = integer()
.br
State = mpd_state()
.br
Vsn = \&'version-1\&' | \&'version-2\&' | \&'version-3\&'
.br
Pdu = #pdu
.br
PduMs = integer()
.br
ACMData = acm_data()
.br
.RE
.RS
.LP
Processes an incoming packet\&. Performs authentication and decryption as necessary\&. The return values should be passed the agent\&.
.RE
.LP
.B
generate_response_msg(Vsn, RePdu, Type, ACMData) -> {ok, Packet} | {discarded, Reason}
.br
.RS
.TP
Types
Vsn = \&'version-1\&' | \&'version-2\&' | \&'version-3\&'
.br
RePdu = #pdu
.br
Type = atom()
.br
ACMData = acm_data()
.br
Packet = binary()
.br
.RE
.RS
.LP
Generates a possibly encrypted response packet to be sent to the network\&. \fIType\fR is the \fI#pdu\&.type\fR of the original request\&.
.RE
.LP
.B
generate_msg(Vsn, Pdu, MsgData, To) -> {ok, PacketsAndAddresses} | {discarded, Reason}
.br
.RS
.TP
Types
Vsn = \&'version-1\&' | \&'version-2\&' | \&'version-3\&'
.br
Pdu = #pdu
.br
MsgData = msg_data()
.br
To = [dest_addrs()]
.br
PacketsAndAddresses = [{TDomain, TAddress, Packet}]
.br
TDomain = snmpUDPDomain
.br
TAddress = {Ip, Udp}
.br
Ip = {integer(), integer(), integer(), integer()}
.br
Udp = integer()
.br
Packet = binary()
.br
.RE
.RS
.LP
Generates a possibly encrypted request packet to be sent to the network\&.
.LP
\fIMsgData\fR is the message specific data used in the SNMP message\&. This value is received in a \fIsend_pdu\fR or \fIsend_pdu_req\fR message from the agent\&. In SNMPv1 and SNMPv2c, this message data is the community string\&. In SNMPv3, it is the context information\&. \fITo\fR is a list of the destination addresses and their corresponding security parameters\&. This value is also received from the requests mentioned above\&.
.RE
.LP
.B
discarded_pdu(Variable) -> void()
.br
.RS
.TP
Types
Variable = atom()
.br
.RE
.RS
.LP
Increments the variable associated with a discarded pdu\&. This function can be used when the net_if process receives a \fIdiscarded_pdu\fR message from the agent\&.
.RE
|