Trait netstack3_ip::gmp::IgmpContext

source ·
pub trait IgmpContext<BT: IgmpBindingsTypes>: DeviceIdContext<AnyDevice> + IpDeviceSendContext<Ipv4, BT> + IpLayerHandler<Ipv4, BT> {
    // Required methods
    fn with_igmp_state_mut<O, F: FnOnce(GmpStateRef<'_, Ipv4, Self, BT>, &mut IgmpState<BT>) -> O>(
        &mut self,
        device: &Self::DeviceId,
        cb: F,
    ) -> O;
    fn get_ip_addr_subnet(
        &mut self,
        device: &Self::DeviceId,
    ) -> Option<AddrSubnet<Ipv4Addr, Ipv4DeviceAddr>>;
}
Expand description

The execution context for the Internet Group Management Protocol (IGMP).

Required Methods§

source

fn with_igmp_state_mut<O, F: FnOnce(GmpStateRef<'_, Ipv4, Self, BT>, &mut IgmpState<BT>) -> O>( &mut self, device: &Self::DeviceId, cb: F, ) -> O

Calls the function with a mutable reference to the device’s IGMP state and whether or not IGMP is enabled for the device.

source

fn get_ip_addr_subnet( &mut self, device: &Self::DeviceId, ) -> Option<AddrSubnet<Ipv4Addr, Ipv4DeviceAddr>>

Gets an IP address and subnet associated with this device.

Object Safety§

This trait is not object safe.

Implementors§