Contents

ifnet_remove_multicast

Declaration

errno_t ifnet_remove_multicast(ifmultiaddr_t multicast);

Parameters

  • multicast:

    The multicast to be removed.

Return Value

0 on success otherwise the errno error.

Discussion

Causes the interface to leave the multicast group. The stack keeps track of how many times ifnet_add_multicast has been called for a given multicast address. The multicast will only be removed when the number of times ifnet_remove_multicast has been called matches the number of times ifnet_add_multicast has been called.

The memory for the multicast address is not actually freed until the separate reference count has reached zero. Some parts of the stack may keep a pointer to the multicast even after that multicast has been removed from the interface.

When an interface is detached, all of the multicasts are removed. If the interface of the multicast passed in is no longer attached, this function will gracefully return, performing no work.

It is the callers responsibility to release the multicast address after calling this function.

See Also

Network Kernel Extensions