Skip to main content

forwarding_targets

Function forwarding_targets 

Source
pub fn forwarding_targets(
    db: &ObjectDatabase,
    input: &ForwardingInput<'_>,
    skip: &[ObjectIdentifier],
) -> ForwardingTargets
Expand description

Select the forwarders that take input and their destinations, leaving out the forwarders in skip (those that already took this notification earlier in a chain within this device).

Every NOTIFICATION_FORWARDER object in the database is read through its properties, so an application’s own forwarder type takes part as the bundled one does. A forwarder takes a notification when:

  • it is in service;
  • its Process_Identifier_Filter is NULL or equals the notification’s process identifier;
  • its Local_Forwarding_Only is FALSE, or the notification came from one of this device’s own objects;
  • for a notification that arrived through a network port, its Port_Filter enables that port. A forwarder without Port_Filter takes from the one port a device that does not route has.

A forwarder that cannot serve one of these properties as the clause types it takes nothing. Its destinations are the Recipient_List entries whose days, times and transitions admit the notification, filtered as a Notification Class filters its own, and every live Subscribed_Recipients entry. A list that does not decode, or runs past its cap, contributes nothing rather than a part of itself.

The network rules that keep forwarded copies from looping (no copies by global broadcast, none back onto the network a broadcast came from) need each destination’s route, so the server applies them as it sends.