Trait netstack3_ip::gmp::GmpHandler

source ·
pub trait GmpHandler<I: Ip, BC>: DeviceIdContext<AnyDevice> {
    // Required methods
    fn gmp_handle_maybe_enabled(
        &mut self,
        bindings_ctx: &mut BC,
        device: &Self::DeviceId,
    );
    fn gmp_handle_disabled(
        &mut self,
        bindings_ctx: &mut BC,
        device: &Self::DeviceId,
    );
    fn gmp_join_group(
        &mut self,
        bindings_ctx: &mut BC,
        device: &Self::DeviceId,
        group_addr: MulticastAddr<I::Addr>,
    ) -> GroupJoinResult;
    fn gmp_leave_group(
        &mut self,
        bindings_ctx: &mut BC,
        device: &Self::DeviceId,
        group_addr: MulticastAddr<I::Addr>,
    ) -> GroupLeaveResult;
}
Expand description

An implementation of a Group Management Protocol (GMP) such as the Internet Group Management Protocol, Version 2 (IGMPv2) for IPv4 or the Multicast Listener Discovery (MLD) protocol for IPv6.

Required Methods§

source

fn gmp_handle_maybe_enabled( &mut self, bindings_ctx: &mut BC, device: &Self::DeviceId, )

Handles GMP potentially being enabled.

Attempts to transition memberships in the non-member state to a member state. Should be called anytime a configuration change occurs which results in GMP potentially being enabled. E.g. when IP or GMP transitions to being enabled.

source

fn gmp_handle_disabled( &mut self, bindings_ctx: &mut BC, device: &Self::DeviceId, )

Handles GMP being disabled.

All joined groups will transition to the non-member state but still remain locally joined.

source

fn gmp_join_group( &mut self, bindings_ctx: &mut BC, device: &Self::DeviceId, group_addr: MulticastAddr<I::Addr>, ) -> GroupJoinResult

Joins the given multicast group.

source

fn gmp_leave_group( &mut self, bindings_ctx: &mut BC, device: &Self::DeviceId, group_addr: MulticastAddr<I::Addr>, ) -> GroupLeaveResult

Leaves the given multicast group.

Implementors§

source§

impl<I: IpExt, BC: GmpBindingsContext, CC: GmpContext<I, BC>> GmpHandler<I, BC> for CC