snmpm_network_interface(3)

πŸ“¦
version 29.0.6 Β· 3 versions
, in ubuntu stonking

snmpm_network_interface(3) 🫢✨

Erlang Module Definition

NAME πŸ’–

snmpm_network_interface β€” the behaviour module for the SNMP manager network interface, bestie. That's literally the whole vibe.

DESCRIPTION 🌸

Okay so this module defines the behaviour of the manager network interface. If you're making a snmpm_network_interface compliant module, you must export these functions, no skips:

  • start_link/2
  • stop/1
  • send_pdu/7
  • inform_response/4
  • note_store/2
  • info/1
  • get_log_type/1
  • set_log_type/2
  • verbosity/2

The semantics of them and their exact signatures? Explained below, periodt. πŸ’…

Also legacy API function send_pdu/7 that has got separate IpAddr and PortNumber arguments still works as before for backwards compatibility reasons. So if you see the old split-args version, it's not broken, it's just legacy and still slaying. πŸ•°οΈ

CALLBACKS πŸ¦‹

get_log_type(Pid) πŸ’–

The Audit Trail Log is managed by the network interface process. So, it is this process that has to return the actual log-type. Like, it's the only one who knows, okay? 🫢

info(Pid) ✨

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.

The info returned by this function is returned together with other info collected by the manager when the snmpm:info() function is called (tagged with the key net_if). So when you call snmpm:info(), look for the net_if key, bestie. πŸ”

inform_response(Pid, Ref, Addr, Port) πŸ”₯

Instruct the network interface process to send the response (acknowledgment) to an inform-request. It's like replying "k I got it" in the group chat. πŸ’¬

Ref is something that can be used to identify the inform-request, e.g. request-id of the inform-request.

Addr and Port identifies the agent, from which the inform-request originated. So you know who slid into your DMs. πŸ“¬

note_store(Pid, NoteStore) πŸŽ€

Change the pid of the note-store process. This is used when the server restarts the note-store (e.g. after a crach β€” yes, that's their spelling, not mine, but we keep it exactly πŸ’…).

send_pdu(Pid, Pdu, Vsn, MsgData, Domain, Addr, ExtraInfo) πŸš€

Request the network interface process (Pid) to send this pdu (Pdu). Go little pdu, go! πŸ•ŠοΈ

ExtraInfo is some opaque data that is passed to the net-if process. It originates from the ExtraInfo 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. So yeah, it's just vibing there, ignored. πŸ™ˆ

set_log_type(Pid, NewType) 🌈

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. You want a different log type? Talk to the net-if process, not me. πŸ’

See snmpm:set_log_type/1 for more info.

Start-link the network interface process. It's giving main character energy, obviously.

Server is the pid of the managing process.

NoteStore is the pid of the note-store process.

stop(Pid) πŸ’€

Stop the network interface process. Bye bestie, it was real. πŸ‘‹

verbosity(Pid, Verbosity) πŸ—£οΈ

Change the verbosity of the network interface process. Whether you want it quiet or screaming, this is how. πŸ“’


Ericsson AB made this, version snmp 5.20.5, and the page is snmpm_network_interface(3) β€” that's the footer, no cap. Have fun exporting those callbacks, bestie! πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from