// Should we deliver this IPv6 packet locally?
// deliver returns true if:
// - dst_ip is equal to the address set on the device
// - dst_ip is equal to the broadcast address of the subnet set on the device
// - dst_ip is equal to a mutlicast group that `device` joined
Should we deliver this IPv6 packet locally.
deliver returns true if:
dst_ip is equal to the address set on the device
dst_ip is equal to the broadcast address of the subnet set on the device
dst_ip is equal to a mutlicast group that `device` joined
Should we deliver this IPv6 packet locally . deliver returns true if : dst_ip is equal to the address set on the device dst_ip is equal to the broadcast address of the subnet set on the device dst_ip is equal to a mutlicast group that ` device ` joined
fn deliver_ipv6<D: EventDispatcher>(
    ctx: &mut Ctx<D>,
    device: DeviceId,
    dst_ip: SpecifiedAddr<Ipv6Addr>,
) -> bool {
    // TODO(brunodalbo):
    // Along with the host model described above, we need to be able to have
    // multiple IPs per interface, it becomes imperative for IPv6.
    crate::device::get_ip_addr_state(ctx, device, &dst_ip).is_some()
        || dst_ip == Ipv6::ALL_NODES_LINK_LOCAL_MULTICAST_ADDRESS.into_specified()
        || MulticastAddr::new(dst_ip.get())
            .map_or(false, |a| crate::device::is_in_ip_multicast(ctx, device, a))
}
fn deliver_ipv6 < D : EventDispatcher > ( ctx : & mut Ctx < D > , device : DeviceId , dst_ip : SpecifiedAddr < Ipv6Addr > , ) -> bool { // TODO(brunodalbo): // Along with the host model described above, we need to be able to have // multiple IPs per interface, it becomes imperative for IPv6. crate :: device :: get_ip_addr_state ( ctx , device , & dst_ip ) . is_some ( ) || dst_ip == Ipv6 :: ALL_NODES_LINK_LOCAL_MULTICAST_ADDRESS . into_specified ( ) || MulticastAddr :: new ( dst_ip . get ( ) ) . map_or ( false , | a | crate :: device :: is_in_ip_multicast ( ctx , device , a ) ) }
Should we deliver this IPv6 packet locally?
Should we deliver this IPv6 packet locally?
ctx
&mut Ctx<D>
device
DeviceId
dst_ip
SpecifiedAddr<Ipv6Addr>