snmpm_netw...ace_filter(3)
π snmpm_network_interface_filter β the vibe π
okay bestie, welcome to the manual page for snmpm_network_interface_filter</p>, a whole behaviour module for the SNMP manager network-interface filter. yes it's giving big Erlang energy, and yes we're gonna get through it together π«Ά
β¨ NAME β¨
snmpm_network_interface_filter β a behaviour module for the SNMP manager network-interface filter, iykyk π
πΈ DESCRIPTION πΈ
So. This module defines the behaviour of the manager network interface filter. That means if you wanna make a snmpm_network_interface_filter-compliant module (emphasis on compliant, no shortcuts bestie), it must export these four functions:
accept_recv/2accept_send/2accept_recv_pdu/3accept_send_pdu/3
What they actually mean and what their exact signatures look like? Explained below, don't worry, we're getting there π¦
The whole point of the network interface filter is letting you filter messages β accept them or reject them β on receive and on send. And it happens on two levels, periodt:
- Level one: the UDP entry / exit point. That's immediately after a message gets received, before any message processing happens (
accept_recv), and immediately before a message is sent, after all message processing is done (accept_send). - Level two: the MPD entry / exit point. That's immediately after the basic message processing (
accept_recv_pdu), or immediately before the basic message processing (accept_send_pdu).
lowkey important: the network interface filter is a thing that gets used by the network interface implementation provided by the application β that'ssnmpm_net_ifandsnmpm_net_if_mt. And the default filter? It accepts everything. every single message. no cap.
So what's a network interface filter even for? Honestly, it can be used during testing, or for load regulation. very useful, very demure β¨
Okay and now the legacy tea π΅ Legacy network interface filter modules used arguments on the form (IpAddr, PortNumber,...) instead of (Domain, Addr, ...). And if the SNMP manager is run without changing the configuration to use transport domains, the network interface filter will still get the old arguments and work as before. so like, no breaking changes, we love that for them π
π DATA TYPES π
pdu_type() :: snmpm:pdu_type().transportAddressWithPort() :: snmpa_conf:transportAddressWithPort().transportDomain() :: snmpa_conf:transportDomain().
β FUNCTIONS β
π CALLBACKS π
accept_recv(Domain, Addr)β Called at the reception of a message, before any processing has been done. For the message to be rejected, the function must returnfalse.accept_recv_pdu(Domain, Addr, PduType)β Called after the basic message processing (MPD) has been done, but before the pdu is handed over to the server for primary processing. For the pdu to be rejected, the function must returnfalse.accept_send(Domain, Addr)β Called before the sending of a message, after all processing has been done. For the message to be rejected, the function must returnfalse.accept_send_pdu(Domain, Addr, PduType)β Called before the basic message processing (MPD) is done, when a pdu has been received from the master-agent. For the message to be rejected, the function must returnfalse.
and that's the whole page bestie!! bestie check passed, vibes immaculate, behaviour module understood π
this absolute icon of a page was brought to you by Ericsson AB, from the snmp release 5.20.5 β mwah, love that for us π
β¨
π¦ where this page comes from
- ubuntu stonking: erlang-doc 1:29.0.6+dfsg-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms