\section{MLD} % Short description/overview of module functions This module allows the user to join and leave ipv6 multicast groups. The module is based on the MLD version 2 protocol and it's backwards compatible with version 1. The MLD module is completly driven from socket calls (\ref{socket:setoption}) and non of the MLD application interface functions should be called by the user. If however, by any reason, it's necessary for the user to do this, the following function call is provided: \subsection{pico\_mld\_state\_change} \subsubsection*{Description} Change the state of the host to Non-listener, Idle listener or Delaying listener. \subsubsection*{Function prototype} \begin{verbatim} int pico_mld_state_change(struct pico_ip6 *mcast_link, struct pico_ip6 *mcast_group, uint8_t filter_mode, struct pico_tree *_MCASTFilter, uint8_t state) \end{verbatim} \subsubsection*{Parameters} \begin{itemize}[noitemsep] \item \texttt{mcast\_link} - the link on which that multicast group should be joined. \item \texttt{mcast\_group} - the address of the multicast group you want to join. \item \texttt{filter\_mode} - the kind of source filtering, if applied. \item \texttt{\_MCASTFilter} - list of multicast sources on which source filtering might be applied. \item \texttt{state} - the prefered new state. \end{itemize} \subsubsection*{Errors} In case of failure, -1 is returned, and the value of pico$\_$err is set as follows: \begin{itemize}[noitemsep] \item \texttt{PICO$\_$ERR$\_$EINVAL} - Invalid argument provided \item \texttt{PICO$\_$ERR$\_$ENOMEM} - Not enough space \item \texttt{PICO$\_$ERR$\_$EPROTONOSUPPORT} - Invalid protocol (or protocol version) found on the link \item \texttt{PICO$\_$ERR$\_$EFAULT} - Internal error \end{itemize} %\subsubsection*{Example} %\subsubsection*{Errors} %\subsubsection*{Example}