.TH snmpm_network_interface 3erl "snmp 5.7.3" "Ericsson AB" "Erlang Module Definition" .SH NAME snmpm_network_interface \- Behaviour module for the SNMP manager network interface. .SH DESCRIPTION .LP This module defines the behaviour of the manager network interface\&. A \fIsnmpm_network_interface\fR\& compliant module must export the following functions: .RS 2 .TP 2 * start_link/2 .LP .TP 2 * stop/1 .LP .TP 2 * send_pdu/7 .LP .TP 2 * inform_response/4 .LP .TP 2 * note_store/2 .LP .TP 2 * info/1 .LP .TP 2 * get_log_type/1 .LP .TP 2 * set_log_type/2 .LP .TP 2 * verbosity/2 .LP .RE .LP The semantics of them and their exact signatures are explained below\&. .LP Legacy API function \fIsend_pdu/7\fR\& that has got separate \fIIpAddr\fR\& and \fIPortNumber\fR\& arguments still works as before for backwards compatibility reasons\&. .SH EXPORTS .LP .B start_link(Server, NoteStore) -> {ok, Pid} | {error, Reason} .br .RS .LP Types: .RS 3 Server = pid() .br NoteStore = pid() .br .RE .RE .RS .LP Start-link the network interface process\&. .LP \fIServer\fR\& is the pid of the managing process\&. .LP \fINoteStore\fR\& is the pid of the note-store process\&. .RE .LP .B stop(Pid) -> void() .br .RS .LP Types: .RS 3 Pid = pid() .br .RE .RE .RS .LP Stop the network interface process\&. .RE .LP .B send_pdu(Pid, Pdu, Vsn, MsgData, Domain, Addr, ExtraInfo) -> void() .br .RS .LP Types: .RS 3 Pid = pid() .br Pdu = pdu() .br Vsn = \&'version-1\&' | \&'version-2\&' | \&'version-3\&' .br MsgData = term() .br Domain = transportDomainUdpIpv4 | transportDomainUdpIpv6 .br Addr = {inet:ip_address(), inet:port_number()} .br ExtraInfo = term() .br .RE .RE .RS .LP Request the network interface process (\fIPid\fR\&) to send this pdu (\fIPdu\fR\&)\&. .LP \fIExtraInfo\fR\& is some opaque data that is passed to the net-if process\&. It originates from the \fIExtraInfo\fR\& parameter in the calls to the synchronous get-request, asynchronous get-request, synchronous get-next-request, asynchronous get-next-request, synchronous set-request and asynchronous set-request functions\&. Whether the net-if process chooses to use this is implementation dependent\&. The net-if process included in this application ignores it\&. .RE .LP .B inform_response(Pid, Ref, Addr, Port) -> void() .br .RS .LP Types: .RS 3 Pid = pid() .br Ref = term() .br Addr = address() .br Port = integer() .br .RE .RE .RS .LP Instruct the network interface process to send the response (acknowledgment) to an inform-request\&. .LP \fIRef\fR\& is something that can be used to identify the inform-request, e\&.g\&. request-id of the inform-request\&. .LP \fIAddr\fR\& and \fIPort\fR\& identifies the agent, from which the inform-request originated\&. .RE .LP .B note_store(Pid, NoteStore) -> void() .br .RS .LP Types: .RS 3 Pid = pid() .br NoteStore = pid() .br .RE .RE .RS .LP Change the pid of the note-store process\&. This is used when the server re-starts the note_store (e\&.g\&. after a crach)\&. .RE .LP .B info(Pid) -> [{Key, Value}] .br .RS .LP Types: .RS 3 Pid = pid() .br .RE .RE .RS .LP The info returned is basically up to the implementer to decide\&. The implementation provided by this application provides info about memory allocation and various socket information\&. .LP The info returned by this function is returned together with other info collected by the manager when the info function is called (tagged with the key \fInet_if\fR\&)\&. .RE .LP .B verbosity(Pid, Verbosity) -> void() .br .RS .LP Types: .RS 3 Pid = pid() .br Verbosity = verbosity() .br .RE .RE .RS .LP Change the verbosity of the network interface process\&. .RE .LP .B get_log_type(Pid) -> {ok, LogType} | {error, Reason} .br .RS .LP Types: .RS 3 Pid = pid() .br LogType = atl_type() .br Reason = term() .br .RE .RE .RS .LP The Audit Trail Log is managed by the network interface process\&. So, it is this process that has to return the actual log-type\&. .RE .LP .B set_log_type(Pid, NewType) -> {ok, OldType} | {error, Reason} .br .RS .LP Types: .RS 3 Pid = pid() .br NewType = OldType = atl_type() .br Reason = term() .br .RE .RE .RS .LP The Audit Trail Log is managed by the network interface process\&. So, it is this process that has to do the actual changing of the type\&. .LP See set_log_type for more info\&. .RE