\hypertarget{group__Eeze__Net}{}\section{Net}
\label{group__Eeze__Net}\index{Net@{Net}}


Gather information about network devices.  


\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{group__Eeze__Net_ga85488f286f8e7df46eddee1b6eca49eb}\label{group__Eeze__Net_ga85488f286f8e7df46eddee1b6eca49eb}} 
typedef struct Eeze\+\_\+\+Net {\bfseries Eeze\+\_\+\+Net}
\end{DoxyCompactItemize}
\subsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{group__Eeze__Net_gad16d50b27c7b5eb751578c205fa77ce8}\label{group__Eeze__Net_gad16d50b27c7b5eb751578c205fa77ce8}} 
enum {\bfseries Eeze\+\_\+\+Net\+\_\+\+Addr\+\_\+\+Type} \{ \newline
{\bfseries E\+E\+Z\+E\+\_\+\+N\+E\+T\+\_\+\+A\+D\+D\+R\+\_\+\+T\+Y\+P\+E\+\_\+\+IP}, 
\newline
{\bfseries E\+E\+Z\+E\+\_\+\+N\+E\+T\+\_\+\+A\+D\+D\+R\+\_\+\+T\+Y\+P\+E\+\_\+\+I\+P6}, 
\newline
{\bfseries E\+E\+Z\+E\+\_\+\+N\+E\+T\+\_\+\+A\+D\+D\+R\+\_\+\+T\+Y\+P\+E\+\_\+\+B\+R\+O\+A\+D\+C\+A\+ST}, 
\newline
{\bfseries E\+E\+Z\+E\+\_\+\+N\+E\+T\+\_\+\+A\+D\+D\+R\+\_\+\+T\+Y\+P\+E\+\_\+\+B\+R\+O\+A\+D\+C\+A\+S\+T6}, 
\newline
{\bfseries E\+E\+Z\+E\+\_\+\+N\+E\+T\+\_\+\+A\+D\+D\+R\+\_\+\+T\+Y\+P\+E\+\_\+\+N\+E\+T\+M\+A\+SK}, 
\newline
{\bfseries E\+E\+Z\+E\+\_\+\+N\+E\+T\+\_\+\+A\+D\+D\+R\+\_\+\+T\+Y\+P\+E\+\_\+\+N\+E\+T\+M\+A\+S\+K6}
 \}
\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
Eeze\+\_\+\+Net $\ast$ \mbox{\hyperlink{group__Eeze__Net_ga334024e69b8e278ce812f1efac2cd261}{eeze\+\_\+net\+\_\+new}} (const char $\ast$name)
\begin{DoxyCompactList}\small\item\em Create a new net object. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__Eeze__Net_ga192cd8aa41b6ddf98bd497e5a00d36e3}{eeze\+\_\+net\+\_\+free}} (Eeze\+\_\+\+Net $\ast$net)
\begin{DoxyCompactList}\small\item\em Free a net object. \end{DoxyCompactList}\item 
const char $\ast$ \mbox{\hyperlink{group__Eeze__Net_ga0e6960f363b7f2a39b9590b0ff7a6a38}{eeze\+\_\+net\+\_\+mac\+\_\+get}} (Eeze\+\_\+\+Net $\ast$net)
\begin{DoxyCompactList}\small\item\em Get the M\+AC address of a net object. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{group__Eeze__Net_ga76085270ab356a62cd29fdd4d7f9ed3f}{eeze\+\_\+net\+\_\+idx\+\_\+get}} (Eeze\+\_\+\+Net $\ast$net)
\begin{DoxyCompactList}\small\item\em Get the index of a net object. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eeze__Net_ga1a25e7606769746457c81af13a253e50}{eeze\+\_\+net\+\_\+scan}} (Eeze\+\_\+\+Net $\ast$net)
\begin{DoxyCompactList}\small\item\em Scan an interface to cache its network addresses. \end{DoxyCompactList}\item 
const char $\ast$ \mbox{\hyperlink{group__Eeze__Net_gaa6d1b02d58081a3fc13f4641f0f7bbb1}{eeze\+\_\+net\+\_\+addr\+\_\+get}} (Eeze\+\_\+\+Net $\ast$net, Eeze\+\_\+\+Net\+\_\+\+Addr\+\_\+\+Type type)
\begin{DoxyCompactList}\small\item\em Get the address of a net object. \end{DoxyCompactList}\item 
const char $\ast$ \mbox{\hyperlink{group__Eeze__Net_ga76d7ff9fc682b2643f190f18f6ae87bd}{eeze\+\_\+net\+\_\+attribute\+\_\+get}} (Eeze\+\_\+\+Net $\ast$net, const char $\ast$attr)
\begin{DoxyCompactList}\small\item\em Get a system attribute of a net object. \end{DoxyCompactList}\item 
const char $\ast$ \mbox{\hyperlink{group__Eeze__Net_gac723140a5362c1e6dba767b304beb07d}{eeze\+\_\+net\+\_\+syspath\+\_\+get}} (Eeze\+\_\+\+Net $\ast$net)
\begin{DoxyCompactList}\small\item\em Get the /sys/ path of a net object. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__List__Group_ga3295e1210efea1fb0fd6acbf3cbc1f29}{Eina\+\_\+\+List}} $\ast$ \mbox{\hyperlink{group__Eeze__Net_gae5571ef4f00ee346c89f3a9cf7a1657f}{eeze\+\_\+net\+\_\+list}} (void)
\begin{DoxyCompactList}\small\item\em Get a list of all the network interfaces available. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Gather information about network devices. 



\subsection{Function Documentation}
\mbox{\Hypertarget{group__Eeze__Net_ga334024e69b8e278ce812f1efac2cd261}\label{group__Eeze__Net_ga334024e69b8e278ce812f1efac2cd261}} 
\index{Net@{Net}!eeze\+\_\+net\+\_\+new@{eeze\+\_\+net\+\_\+new}}
\index{eeze\+\_\+net\+\_\+new@{eeze\+\_\+net\+\_\+new}!Net@{Net}}
\subsubsection{\texorpdfstring{eeze\+\_\+net\+\_\+new()}{eeze\_net\_new()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} Eeze\+\_\+\+Net $\ast$ eeze\+\_\+net\+\_\+new (\begin{DoxyParamCaption}\item[{const char $\ast$}]{name }\end{DoxyParamCaption})}



Create a new net object. 


\begin{DoxyParams}{Parameters}
{\em name} & The name of the underlying device (eth0, br1, etc) \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A newly allocated net object, or N\+U\+LL on failure
\end{DoxyReturn}
This function creates a new net object based on {\ttfamily name}. Only the most minimal lookups are performed at creation in order to save memory. 

References eina\+\_\+hash\+\_\+add(), eina\+\_\+hash\+\_\+find(), E\+I\+N\+A\+\_\+\+R\+E\+F\+C\+O\+U\+N\+T\+\_\+\+I\+N\+IT, E\+I\+N\+A\+\_\+\+R\+E\+F\+C\+O\+U\+N\+T\+\_\+\+R\+EF, eina\+\_\+stringshare\+\_\+add(), and eina\+\_\+stringshare\+\_\+del().



Referenced by eeze\+\_\+net\+\_\+list().

\mbox{\Hypertarget{group__Eeze__Net_ga192cd8aa41b6ddf98bd497e5a00d36e3}\label{group__Eeze__Net_ga192cd8aa41b6ddf98bd497e5a00d36e3}} 
\index{Net@{Net}!eeze\+\_\+net\+\_\+free@{eeze\+\_\+net\+\_\+free}}
\index{eeze\+\_\+net\+\_\+free@{eeze\+\_\+net\+\_\+free}!Net@{Net}}
\subsubsection{\texorpdfstring{eeze\+\_\+net\+\_\+free()}{eeze\_net\_free()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} void eeze\+\_\+net\+\_\+free (\begin{DoxyParamCaption}\item[{Eeze\+\_\+\+Net $\ast$}]{net }\end{DoxyParamCaption})}



Free a net object. 


\begin{DoxyParams}{Parameters}
{\em net} & The object to free\\
\hline
\end{DoxyParams}
Use this function to free a net object. \begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eeze__Net_ga334024e69b8e278ce812f1efac2cd261}{eeze\+\_\+net\+\_\+new()}} 

\mbox{\hyperlink{group__Eeze__Net_gae5571ef4f00ee346c89f3a9cf7a1657f}{eeze\+\_\+net\+\_\+list()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__Eeze__Net_ga0e6960f363b7f2a39b9590b0ff7a6a38}\label{group__Eeze__Net_ga0e6960f363b7f2a39b9590b0ff7a6a38}} 
\index{Net@{Net}!eeze\+\_\+net\+\_\+mac\+\_\+get@{eeze\+\_\+net\+\_\+mac\+\_\+get}}
\index{eeze\+\_\+net\+\_\+mac\+\_\+get@{eeze\+\_\+net\+\_\+mac\+\_\+get}!Net@{Net}}
\subsubsection{\texorpdfstring{eeze\+\_\+net\+\_\+mac\+\_\+get()}{eeze\_net\_mac\_get()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} const char $\ast$ eeze\+\_\+net\+\_\+mac\+\_\+get (\begin{DoxyParamCaption}\item[{Eeze\+\_\+\+Net $\ast$}]{net }\end{DoxyParamCaption})}



Get the M\+AC address of a net object. 


\begin{DoxyParams}{Parameters}
{\em net} & The net object \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The M\+AC address, N\+U\+LL on failure Use this function to retrieve the non-\/stringshared M\+AC address of {\ttfamily net}. 
\end{DoxyReturn}
\mbox{\Hypertarget{group__Eeze__Net_ga76085270ab356a62cd29fdd4d7f9ed3f}\label{group__Eeze__Net_ga76085270ab356a62cd29fdd4d7f9ed3f}} 
\index{Net@{Net}!eeze\+\_\+net\+\_\+idx\+\_\+get@{eeze\+\_\+net\+\_\+idx\+\_\+get}}
\index{eeze\+\_\+net\+\_\+idx\+\_\+get@{eeze\+\_\+net\+\_\+idx\+\_\+get}!Net@{Net}}
\subsubsection{\texorpdfstring{eeze\+\_\+net\+\_\+idx\+\_\+get()}{eeze\_net\_idx\_get()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} int eeze\+\_\+net\+\_\+idx\+\_\+get (\begin{DoxyParamCaption}\item[{Eeze\+\_\+\+Net $\ast$}]{net }\end{DoxyParamCaption})}



Get the index of a net object. 


\begin{DoxyParams}{Parameters}
{\em net} & The net object \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The ifindex of the object, -\/1 on failure Use this function to get the hardware index of {\ttfamily net} 
\end{DoxyReturn}
\mbox{\Hypertarget{group__Eeze__Net_ga1a25e7606769746457c81af13a253e50}\label{group__Eeze__Net_ga1a25e7606769746457c81af13a253e50}} 
\index{Net@{Net}!eeze\+\_\+net\+\_\+scan@{eeze\+\_\+net\+\_\+scan}}
\index{eeze\+\_\+net\+\_\+scan@{eeze\+\_\+net\+\_\+scan}!Net@{Net}}
\subsubsection{\texorpdfstring{eeze\+\_\+net\+\_\+scan()}{eeze\_net\_scan()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} eeze\+\_\+net\+\_\+scan (\begin{DoxyParamCaption}\item[{Eeze\+\_\+\+Net $\ast$}]{net }\end{DoxyParamCaption})}



Scan an interface to cache its network addresses. 


\begin{DoxyParams}{Parameters}
{\em net} & The net object to scan \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
E\+I\+N\+A\+\_\+\+T\+R\+UE on success, E\+I\+N\+A\+\_\+\+F\+A\+L\+SE on failure Use this function to scan and cache the ip address, netmask, and broadcast address for an interface. This function will perform a full scan every time it is called, and I\+Pv6 addresses will be cached if Eeze was compiled with I\+Pv6 support was enabled at compile time. 
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eeze__Net_gaa6d1b02d58081a3fc13f4641f0f7bbb1}{eeze\+\_\+net\+\_\+addr\+\_\+get()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__Eeze__Net_gaa6d1b02d58081a3fc13f4641f0f7bbb1}\label{group__Eeze__Net_gaa6d1b02d58081a3fc13f4641f0f7bbb1}} 
\index{Net@{Net}!eeze\+\_\+net\+\_\+addr\+\_\+get@{eeze\+\_\+net\+\_\+addr\+\_\+get}}
\index{eeze\+\_\+net\+\_\+addr\+\_\+get@{eeze\+\_\+net\+\_\+addr\+\_\+get}!Net@{Net}}
\subsubsection{\texorpdfstring{eeze\+\_\+net\+\_\+addr\+\_\+get()}{eeze\_net\_addr\_get()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} const char $\ast$ eeze\+\_\+net\+\_\+addr\+\_\+get (\begin{DoxyParamCaption}\item[{Eeze\+\_\+\+Net $\ast$}]{net,  }\item[{Eeze\+\_\+\+Net\+\_\+\+Addr\+\_\+\+Type}]{type }\end{DoxyParamCaption})}



Get the address of a net object. 


\begin{DoxyParams}{Parameters}
{\em net} & The net object \\
\hline
{\em type} & The type of address to retrieve \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The stringshared address for {\ttfamily net} corresponding to {\ttfamily type}, N\+U\+LL on failure This function returns a value previously cached. 
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eeze__Net_ga1a25e7606769746457c81af13a253e50}{eeze\+\_\+net\+\_\+scan()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__Eeze__Net_ga76d7ff9fc682b2643f190f18f6ae87bd}\label{group__Eeze__Net_ga76d7ff9fc682b2643f190f18f6ae87bd}} 
\index{Net@{Net}!eeze\+\_\+net\+\_\+attribute\+\_\+get@{eeze\+\_\+net\+\_\+attribute\+\_\+get}}
\index{eeze\+\_\+net\+\_\+attribute\+\_\+get@{eeze\+\_\+net\+\_\+attribute\+\_\+get}!Net@{Net}}
\subsubsection{\texorpdfstring{eeze\+\_\+net\+\_\+attribute\+\_\+get()}{eeze\_net\_attribute\_get()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} const char $\ast$ eeze\+\_\+net\+\_\+attribute\+\_\+get (\begin{DoxyParamCaption}\item[{Eeze\+\_\+\+Net $\ast$}]{net,  }\item[{const char $\ast$}]{attr }\end{DoxyParamCaption})}



Get a system attribute of a net object. 


\begin{DoxyParams}{Parameters}
{\em net} & The net object \\
\hline
{\em attr} & The attribute to retrieve \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The non-\/stringshared value of the attribute, N\+U\+LL on failure Use this function to perform a udev sysattr lookup on the underlying device of {\ttfamily net} 
\end{DoxyReturn}
\mbox{\Hypertarget{group__Eeze__Net_gac723140a5362c1e6dba767b304beb07d}\label{group__Eeze__Net_gac723140a5362c1e6dba767b304beb07d}} 
\index{Net@{Net}!eeze\+\_\+net\+\_\+syspath\+\_\+get@{eeze\+\_\+net\+\_\+syspath\+\_\+get}}
\index{eeze\+\_\+net\+\_\+syspath\+\_\+get@{eeze\+\_\+net\+\_\+syspath\+\_\+get}!Net@{Net}}
\subsubsection{\texorpdfstring{eeze\+\_\+net\+\_\+syspath\+\_\+get()}{eeze\_net\_syspath\_get()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} const char $\ast$ eeze\+\_\+net\+\_\+syspath\+\_\+get (\begin{DoxyParamCaption}\item[{Eeze\+\_\+\+Net $\ast$}]{net }\end{DoxyParamCaption})}



Get the /sys/ path of a net object. 


\begin{DoxyParams}{Parameters}
{\em net} & The net object \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The stringshared /sys/ path of the interface, N\+U\+LL on failure 
\end{DoxyReturn}
\mbox{\Hypertarget{group__Eeze__Net_gae5571ef4f00ee346c89f3a9cf7a1657f}\label{group__Eeze__Net_gae5571ef4f00ee346c89f3a9cf7a1657f}} 
\index{Net@{Net}!eeze\+\_\+net\+\_\+list@{eeze\+\_\+net\+\_\+list}}
\index{eeze\+\_\+net\+\_\+list@{eeze\+\_\+net\+\_\+list}!Net@{Net}}
\subsubsection{\texorpdfstring{eeze\+\_\+net\+\_\+list()}{eeze\_net\_list()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} \mbox{\hyperlink{group__Eina__List__Group_ga3295e1210efea1fb0fd6acbf3cbc1f29}{Eina\+\_\+\+List}} $\ast$ eeze\+\_\+net\+\_\+list (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



Get a list of all the network interfaces available. 

\begin{DoxyReturn}{Returns}
A list of Eeze\+\_\+\+Net objects Use this function to get all network interfaces available to the application. This list must be freed by the user. 
\end{DoxyReturn}


References eeze\+\_\+net\+\_\+new(), and eina\+\_\+list\+\_\+append().

