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


Gather information about network devices.  


\doxysubsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{group__Eeze__Net_ga85488f286f8e7df46eddee1b6eca49eb}\label{group__Eeze__Net_ga85488f286f8e7df46eddee1b6eca49eb}} 
typedef struct Eeze\+\_\+\+Net {\bfseries Eeze\+\_\+\+Net}
\end{DoxyCompactItemize}
\doxysubsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{group__Eeze__Net_gad16d50b27c7b5eb751578c205fa77ce8}\label{group__Eeze__Net_gad16d50b27c7b5eb751578c205fa77ce8}} 
enum {\bfseries Eeze\+\_\+\+Net\+\_\+\+Addr\+\_\+\+Type} \{ \newline
{\bfseries EEZE\+\_\+\+NET\+\_\+\+ADDR\+\_\+\+TYPE\+\_\+\+IP}
, \newline
{\bfseries EEZE\+\_\+\+NET\+\_\+\+ADDR\+\_\+\+TYPE\+\_\+\+IP6}
, \newline
{\bfseries EEZE\+\_\+\+NET\+\_\+\+ADDR\+\_\+\+TYPE\+\_\+\+BROADCAST}
, \newline
{\bfseries EEZE\+\_\+\+NET\+\_\+\+ADDR\+\_\+\+TYPE\+\_\+\+BROADCAST6}
, \newline
{\bfseries EEZE\+\_\+\+NET\+\_\+\+ADDR\+\_\+\+TYPE\+\_\+\+NETMASK}
, \newline
{\bfseries EEZE\+\_\+\+NET\+\_\+\+ADDR\+\_\+\+TYPE\+\_\+\+NETMASK6}
 \}
\end{DoxyCompactItemize}
\doxysubsection*{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 MAC 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}


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



\doxysubsection{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}}
\doxysubsubsection{\texorpdfstring{eeze\_net\_new()}{eeze\_net\_new()}}
{\footnotesize\ttfamily EAPI 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 NULL 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 \mbox{\hyperlink{group__Eina__Hash__Group_ga5e72d0c5397936512407ce8cd66e98d6}{eina\+\_\+hash\+\_\+add()}}, \mbox{\hyperlink{group__Eina__Hash__Group_ga6e9dc02a249e1fcdb64e38e7dc47afb3}{eina\+\_\+hash\+\_\+find()}}, \mbox{\hyperlink{group__Eina__Refcount_gae7cbb849fe94000305dd344b98344a95}{EINA\+\_\+\+REFCOUNT\+\_\+\+INIT}}, \mbox{\hyperlink{group__Eina__Refcount_ga1303550c19416335a5e4d012f3f5ded0}{EINA\+\_\+\+REFCOUNT\+\_\+\+REF}}, \mbox{\hyperlink{group__Eina__Stringshare__Group_ga4e3ce40744291c1fb8574e26883c0bf2}{eina\+\_\+stringshare\+\_\+add()}}, and \mbox{\hyperlink{group__Eina__Stringshare__Group_ga5538b4a134987b8a01744fad1a845ba4}{eina\+\_\+stringshare\+\_\+del()}}.



Referenced by \mbox{\hyperlink{group__Eeze__Net_gae5571ef4f00ee346c89f3a9cf7a1657f}{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}}
\doxysubsubsection{\texorpdfstring{eeze\_net\_free()}{eeze\_net\_free()}}
{\footnotesize\ttfamily EAPI 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}


References \mbox{\hyperlink{group__Eina__Hash__Group_gadcb1a5cd7604dd23c8c9c1d3c4b773b5}{eina\+\_\+hash\+\_\+del\+\_\+by\+\_\+key()}}, \mbox{\hyperlink{group__Eina__Refcount_ga85c005aaee53141665fb5ea88e10f5e0}{EINA\+\_\+\+REFCOUNT\+\_\+\+UNREF}}, \mbox{\hyperlink{group__Eina__Safety__Checks__Group_ga1ccf8538d0015b3801ff642e6156843a}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+RETURN}}, and \mbox{\hyperlink{group__Eina__Stringshare__Group_ga5538b4a134987b8a01744fad1a845ba4}{eina\+\_\+stringshare\+\_\+del()}}.

\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}}
\doxysubsubsection{\texorpdfstring{eeze\_net\_mac\_get()}{eeze\_net\_mac\_get()}}
{\footnotesize\ttfamily EAPI const char $\ast$ eeze\+\_\+net\+\_\+mac\+\_\+get (\begin{DoxyParamCaption}\item[{Eeze\+\_\+\+Net $\ast$}]{net }\end{DoxyParamCaption})}



Get the MAC address of a net object. 


\begin{DoxyParams}{Parameters}
{\em net} & The net object \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The MAC address, NULL on failure Use this function to retrieve the non-\/stringshared MAC address of {\ttfamily net}. 
\end{DoxyReturn}


References \mbox{\hyperlink{group__Eina__Safety__Checks__Group_gab2b07061fc6500dedd9cd41c8d16f95d}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+RETURN\+\_\+\+VAL}}.

\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}}
\doxysubsubsection{\texorpdfstring{eeze\_net\_idx\_get()}{eeze\_net\_idx\_get()}}
{\footnotesize\ttfamily EAPI 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}


References \mbox{\hyperlink{group__Eina__Safety__Checks__Group_gab2b07061fc6500dedd9cd41c8d16f95d}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+RETURN\+\_\+\+VAL}}.

\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}}
\doxysubsubsection{\texorpdfstring{eeze\_net\_scan()}{eeze\_net\_scan()}}
{\footnotesize\ttfamily EAPI \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}
EINA\+\_\+\+TRUE on success, EINA\+\_\+\+FALSE 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 IPv6 addresses will be cached if Eeze was compiled with IPv6 support was enabled at compile time. 
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eeze__Net_gaa6d1b02d58081a3fc13f4641f0f7bbb1}{eeze\+\_\+net\+\_\+addr\+\_\+get()}} 
\end{DoxySeeAlso}


References \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\+\_\+\+FALSE}}, \mbox{\hyperlink{group__Eina__Safety__Checks__Group_gab2b07061fc6500dedd9cd41c8d16f95d}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+RETURN\+\_\+\+VAL}}, \mbox{\hyperlink{group__Eina__Stringshare__Group_ga8a159ee804ef7c7a190a37f455ec16c2}{eina\+\_\+stringshare\+\_\+replace\+\_\+length()}}, and \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\+\_\+\+TRUE}}.

\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}}
\doxysubsubsection{\texorpdfstring{eeze\_net\_addr\_get()}{eeze\_net\_addr\_get()}}
{\footnotesize\ttfamily EAPI 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}, NULL 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}


References \mbox{\hyperlink{group__Eina__Safety__Checks__Group_gab2b07061fc6500dedd9cd41c8d16f95d}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+RETURN\+\_\+\+VAL}}.

\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}}
\doxysubsubsection{\texorpdfstring{eeze\_net\_attribute\_get()}{eeze\_net\_attribute\_get()}}
{\footnotesize\ttfamily EAPI 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, NULL on failure Use this function to perform a udev sysattr lookup on the underlying device of {\ttfamily net} 
\end{DoxyReturn}


References \mbox{\hyperlink{group__Eina__Safety__Checks__Group_gab2b07061fc6500dedd9cd41c8d16f95d}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+RETURN\+\_\+\+VAL}}, and \mbox{\hyperlink{group__Eina__Safety__Checks__Group_ga1dbe0d7e3c6b10f4bd49a2a132d73269}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+TRUE\+\_\+\+RETURN\+\_\+\+VAL}}.

\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}}
\doxysubsubsection{\texorpdfstring{eeze\_net\_syspath\_get()}{eeze\_net\_syspath\_get()}}
{\footnotesize\ttfamily EAPI 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, NULL on failure 
\end{DoxyReturn}


References \mbox{\hyperlink{group__Eina__Safety__Checks__Group_gab2b07061fc6500dedd9cd41c8d16f95d}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+RETURN\+\_\+\+VAL}}.

\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}}
\doxysubsubsection{\texorpdfstring{eeze\_net\_list()}{eeze\_net\_list()}}
{\footnotesize\ttfamily EAPI \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 \mbox{\hyperlink{group__Eeze__Net_ga334024e69b8e278ce812f1efac2cd261}{eeze\+\_\+net\+\_\+new()}}, and \mbox{\hyperlink{group__Eina__List__Group_ga625698a383dda8fc0db245a1c7608c49}{eina\+\_\+list\+\_\+append()}}.

