1\section{SLAACV4 Module}
2
3% Short description/overview of module functions
4
5
6\subsection{pico\_slaacv4\_claimip}
7
8\subsubsection*{Description}
9This function starts the ip claiming process for a device. It will generate first the local link ip using
10as seed the mac address of the device. Then it will start the claim procedure described in RFC3927. 
11In case of success the IP is registered to the IP layer and returned using the callback function. 
12In case of error, code SLAACV4\_ERROR is returned. Errors occur when the maximum number of conflicts is reached. 
13Use the IP returned only if the return code is SLAACV4\_SUCCESS.
14
15\subsubsection*{Function prototype}
16\texttt{pico\_slaacv4\_claimip(struct pico\_device *dev, void (*cb)(struct pico\_ip4 *ip,  uint8\_t code));}
17
18\subsubsection*{Parameters}
19\begin{itemize}[noitemsep]
20\item \texttt{dev} - a pointer to a struct \texttt{pico\_device}
21\item \texttt{*cb} - a callback function returning the ip claimed and a return code (SLAACV4\_ERROR | SLAACV4\_SUCCESS)
22\end{itemize}
23
24\subsubsection*{Return value}
250 returned if the claiming has started successfully
26
27\subsubsection*{Example}
28\begin{verbatim}
29
30dev = pico_get_device(sdev);
31
32ret = pico_slaacv4_claimip(dev, slaacv4_cb);
33
34\end{verbatim}
35
36\subsection{pico\_slaacv4\_unregisterip}
37
38\subsubsection*{Description}
39This function allows to unregister the local link ip in usage. The function will remove from the route table
40the local link ip and will reset the internal state of the SLAACV4 module
41
42\subsubsection*{Function prototype}
43\texttt{void pico\_slaacv4\_unregisterip(void);}
44
45