SNMPA_NOTIFICATION_DELIVERY_INFO_RECEIVER(3)

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

πŸ’– snmpa_notification_delivery_info_receiver πŸ’–

okay so bestie, this one lives in the snmp manual, section 3, and it's literally the behaviour module for the SNMP agent notification delivery information receiver. yes the name is a whole paragraph, we don't make the rules πŸ’…


✨ NAME ✨

snmpa_notification_delivery_info_receiver β€” the behaviour module for the SNMP agent notification delivery information receiver. that's it, that's the name, say it three times fast i dare you πŸŽ€


🌸 DESCRIPTION 🌸

so this module defines the behaviour of the notification delivery information receiver. sounds fancy, it's actually so useful.

when the user sends a notification (peep snmpa:send_notification2/3), the user can optionally choose to receive delivery information β€” meaning, was the message received and acknowledged by the target(s)? was it ghosted? 😭 This behaviour literally describes a way for the user to get such (delivery) information. no cap.

a snmpa_notification_delivery_info_receiver compliant module must export these functions:

  • delivery_targets/3
  • delivery_info/4

the semantics of them and their exact signatures are explained below, so keep scrolling πŸ“œ

πŸ’‘ legacy tea: legacy notification delivery information receiver modules used a target argument of the form {IpAddr, PortNumber} instead of {Domain, Addr}, and if the SNMP Agent is run without changing the configuration to use transport domains, the notification delivery information receiver will still get the old arguments and work as before. so no panic, the old stuff still eats πŸ“

🌈 DATA TYPES 🌈

notification_delivery_info() :: #snmpa_notification_delivery_info{}.

how shall (notification) delivery info be reported? good question bestie πŸ’­

this record defines the info related to inform delivery info. that is, when sending an inform, info about the delivery (such if it was acknowledged) will be delivered using the info in this record. it's giving receipts ✨

the delivery will be performed according to:

Mod:delivery_targets(Tag, Addresses, Extra)
Mod:delivery_info(Tag, Address, DeliveryResult, Extra)

the Extra is any term, provided by the user. yes, ANY term, go feral.

the fields of this record has the following meaning:

  • tag = term() β€” value selected by the user to identify this sending πŸ‘‘
  • mod = module() β€” a module implementing the snmpa_notification_delivery_info_receiver behaviour
  • extra = term() β€” this is any extra info the user wants to have supplied when the functions in the callback module is called. provided when calling the send function

transportAddressWithPort() :: snmpa_conf:transportAddressWithPort().

just a lil type alias, slay πŸ¦‹

transportDomain() :: snmpa_conf:transportDomain().

another lil type alias, equally iconic πŸ’œ


πŸ’… FUNCTIONS πŸ’…

(yeah this heading is here with nothing under it in the original and we respect the layout, bestie β€” the actual goods live in the callbacks below πŸ‘‡)

πŸŽ€ CALLBACKS πŸŽ€

delivery_info(Tag, Targets, DeliveryResult, Extra)

inform about delivery result. πŸ’Œ

this function is called for each target in the Targets argument of the delivery_targets/3 function, see above.

the purpose is to inform the receiver of the result of the delivery (was the notification acknowledged or not) for each target. basically the "hey girlie, here's the verdict" callback 🌟

delivery_targets(Tag, Targets, Extra)

inform about target addresses. πŸ“¬

this is the first function called when a notification delivery is in progress. it informs the receiver which targets will get the notification. the result of the delivery will be provided via successive calls to delivery_info/4 function, see below.

so delivery_targets is the "here's who we're sending to" moment and delivery_info is the "here's how each one went" moment. dynamic duo, fr fr 🫢


and that's the whole page, bestie!! every flag, every field, every callback, accounted for. we ate and left absolutely no crumbs πŸ’€βœ¨

this masterpiece was brought to you by Ericsson AB, from snmp 5.20.5, and it's the snmpa_noti...fo_receiver(3) page β€” yeah the header got truncated, the full name was too powerful for one line 😌 mwah, go write your callbacks πŸ’–

πŸ“¦ where this page comes from