\hypertarget{class_network_discovery}{
\section{NetworkDiscovery Class Reference}
\label{class_network_discovery}\index{NetworkDiscovery@{NetworkDiscovery}}
}


the logic behind the \hyperlink{class_network_discovery}{NetworkDiscovery}.  




{\ttfamily \#include $<$networkdiscovery.h$>$}



Collaboration diagram for NetworkDiscovery:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=207pt]{class_network_discovery__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Slots}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{class_network_discovery_a924c043d6f90d66eeef469f2917d377f}{handleNewConnection} ()
\item 
void \hyperlink{class_network_discovery_a97c7fe67a7105d47b7494f0d27939010}{handleNewInput} ()
\item 
void \hyperlink{class_network_discovery_a8904e455a24735e772662b57f9602e1a}{handleNewInputLine} (QLocalSocket $\ast$client, QString data)
\item 
void \hyperlink{class_network_discovery_a177f49af5b6562480ad1029c7634accf}{handleProcessFinished} (int exitCode, QProcess::ExitStatus exitStatus)
\item 
void \hyperlink{class_network_discovery_aa159f567d54c046e3775e7489b5bba80}{handleProcessStarted} ()
\item 
void \hyperlink{class_network_discovery_a10568f7ba2530f4fe44ef1825b5222d6}{handleClientDisconnect} ()
\item 
void \hyperlink{class_network_discovery_a577a6a5ab12695f99f275aaec06e00ed}{slotReadyForRun} ()
\item 
void \hyperlink{class_network_discovery_a8e48da2ad10414defff044072185e1a3}{checkForIsRunning} ()
\end{DoxyCompactItemize}
\subsection*{Signals}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{class_network_discovery_a870a859fff0c439c05df26164f595fbe}{addInterface} (const QString \&ifName)
\item 
void \hyperlink{class_network_discovery_aea9048c6f308e703fb403e45b9649fce}{changeProgressBarValue} (const QString \&ifName, const int \$newValue)
\item 
void \hyperlink{class_network_discovery_a4d2cfc0508510f707597ad509fced2d3}{connectionEstablished} (QString ifName)
\item 
void \hyperlink{class_network_discovery_abb121eeb177f0e1a614e3c149efb57f3}{abortBoot} (QString msg)
\item 
void \hyperlink{class_network_discovery_a06538e99b8068c931f4291f706b81da6}{updateIfStatus} (QString ifName, QString status)
\item 
void \hyperlink{class_network_discovery_ae5b592be793529c8a4ff23bdd8aed9a4}{updateStatus} (QString status)
\item 
void \hyperlink{class_network_discovery_a7b072466df0ef8881192c1ac8055b0b3}{allProcessesFinished} ()
\item 
void \hyperlink{class_network_discovery_a32e2855d7c71af9d3ebec8583fa84642}{continueBoot} (QString ifName)
\item 
void \hyperlink{class_network_discovery_a06fd0c6fa5e3a3ddae378824e15a11c8}{continueBootWithoutCheck} (QString ifName)
\item 
void \hyperlink{class_network_discovery_a9b0d8c83cd1f5772eca77a76a66d2fa1}{setManualConfInterfaces} (QString jsonArr)
\item 
void \hyperlink{class_network_discovery_abadea517ae1d1532b1f403e179297a6e}{readyForRun} ()
\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_network_discovery_ae01ad09fd2ae265495c1b5593e339613}{NetworkDiscovery} (QObject $\ast$parent=0)
\item 
\hyperlink{class_network_discovery_ae53034016020044456476083d2702a68}{$\sim$NetworkDiscovery} ()
\item 
void \hyperlink{class_network_discovery_a1f59948503efa95c22ba18e3281d21e5}{initAndRun} (QString serverIp, bool userChoice, bool autoUp, QString pathToLogFile, QString serverPath=DEFAULT\_\-QTSOCKETADDRESS, QString pathToExe=DEFAULT\_\-PATHTODHCPCDEXE, QStringList $\ast$args=NULL)
\item 
int \hyperlink{class_network_discovery_a48d4d370e393015c7b419460b3e4c2ac}{ip4\_\-replaceDefaultRoute} (QString ifName, QString gateway, int mss)
\item 
QString \hyperlink{class_network_discovery_a0b659e654a3a519663384ef001618446}{getGatewayForInterface} (QString ifName)
\item 
int \hyperlink{class_network_discovery_ab10e785b28cd3509d62c66f1b270102a}{ip4\_\-setManualConfiguration} (QVariantMap result)
\item 
QString \hyperlink{class_network_discovery_a06270b66a54222683243055594af8e6d}{readLogFile} ()
\item 
void \hyperlink{class_network_discovery_aef5c609b5a1e3db85c6b99e44611acd3}{tryAgain} ()
\item 
void \hyperlink{class_network_discovery_a467e2649b80aa7628c7b8a7bdd0be4f0}{prepareTryAgain} ()
\item 
bool \hyperlink{class_network_discovery_a3d9ea4838405d593280c527c90a401d4}{checkConnectivity} (QString ifName)
\item 
bool \hyperlink{class_network_discovery_a192628e526888293c2cbd3f40bb86b9c}{checkConnectivityViaTcp} ()
\item 
QVariantMap \hyperlink{class_network_discovery_ab863df7ce4311ceba4f6a7f747f25ae3}{getInterfaceConfig} (QString ifName)
\item 
QString \hyperlink{class_network_discovery_ad6808c78ab6f0aa8d55a043036502699}{GetErrorStr} ()
\end{DoxyCompactItemize}


\subsection{Detailed Description}
the logic behind the \hyperlink{class_network_discovery}{NetworkDiscovery}. This class holds all the logic of the \hyperlink{class_network_discovery}{NetworkDiscovery}. It's main task is to search for usable interfaces, check if they are wired (in Running state) and start a cdhcpcd process for each interface. It also sends signals to the ndgui class for presenting notifications to the user. 

\subsection{Constructor \& Destructor Documentation}
\hypertarget{class_network_discovery_ae01ad09fd2ae265495c1b5593e339613}{
\index{NetworkDiscovery@{NetworkDiscovery}!NetworkDiscovery@{NetworkDiscovery}}
\index{NetworkDiscovery@{NetworkDiscovery}!NetworkDiscovery@{NetworkDiscovery}}
\subsubsection[{NetworkDiscovery}]{\setlength{\rightskip}{0pt plus 5cm}NetworkDiscovery::NetworkDiscovery (
\begin{DoxyParamCaption}
\item[{QObject $\ast$}]{parent = {\ttfamily 0}}
\end{DoxyParamCaption}
)}}
\label{class_network_discovery_ae01ad09fd2ae265495c1b5593e339613}
constructor \hypertarget{class_network_discovery_ae53034016020044456476083d2702a68}{
\index{NetworkDiscovery@{NetworkDiscovery}!$\sim$NetworkDiscovery@{$\sim$NetworkDiscovery}}
\index{$\sim$NetworkDiscovery@{$\sim$NetworkDiscovery}!NetworkDiscovery@{NetworkDiscovery}}
\subsubsection[{$\sim$NetworkDiscovery}]{\setlength{\rightskip}{0pt plus 5cm}NetworkDiscovery::$\sim$NetworkDiscovery (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{class_network_discovery_ae53034016020044456476083d2702a68}
destructor 

\subsection{Member Function Documentation}
\hypertarget{class_network_discovery_abb121eeb177f0e1a614e3c149efb57f3}{
\index{NetworkDiscovery@{NetworkDiscovery}!abortBoot@{abortBoot}}
\index{abortBoot@{abortBoot}!NetworkDiscovery@{NetworkDiscovery}}
\subsubsection[{abortBoot}]{\setlength{\rightskip}{0pt plus 5cm}void NetworkDiscovery::abortBoot (
\begin{DoxyParamCaption}
\item[{QString}]{msg}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}signal\mbox{]}}}}
\label{class_network_discovery_abb121eeb177f0e1a614e3c149efb57f3}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_network_discovery_abb121eeb177f0e1a614e3c149efb57f3_icgraph}
\end{center}
\end{figure}


\hypertarget{class_network_discovery_a870a859fff0c439c05df26164f595fbe}{
\index{NetworkDiscovery@{NetworkDiscovery}!addInterface@{addInterface}}
\index{addInterface@{addInterface}!NetworkDiscovery@{NetworkDiscovery}}
\subsubsection[{addInterface}]{\setlength{\rightskip}{0pt plus 5cm}void NetworkDiscovery::addInterface (
\begin{DoxyParamCaption}
\item[{const QString \&}]{ifName}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}signal\mbox{]}}}}
\label{class_network_discovery_a870a859fff0c439c05df26164f595fbe}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_network_discovery_a870a859fff0c439c05df26164f595fbe_icgraph}
\end{center}
\end{figure}


\hypertarget{class_network_discovery_a7b072466df0ef8881192c1ac8055b0b3}{
\index{NetworkDiscovery@{NetworkDiscovery}!allProcessesFinished@{allProcessesFinished}}
\index{allProcessesFinished@{allProcessesFinished}!NetworkDiscovery@{NetworkDiscovery}}
\subsubsection[{allProcessesFinished}]{\setlength{\rightskip}{0pt plus 5cm}void NetworkDiscovery::allProcessesFinished (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}signal\mbox{]}}}}
\label{class_network_discovery_a7b072466df0ef8881192c1ac8055b0b3}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_network_discovery_a7b072466df0ef8881192c1ac8055b0b3_icgraph}
\end{center}
\end{figure}


\hypertarget{class_network_discovery_aea9048c6f308e703fb403e45b9649fce}{
\index{NetworkDiscovery@{NetworkDiscovery}!changeProgressBarValue@{changeProgressBarValue}}
\index{changeProgressBarValue@{changeProgressBarValue}!NetworkDiscovery@{NetworkDiscovery}}
\subsubsection[{changeProgressBarValue}]{\setlength{\rightskip}{0pt plus 5cm}void NetworkDiscovery::changeProgressBarValue (
\begin{DoxyParamCaption}
\item[{const QString \&}]{ifName, }
\item[{const int \$}]{newValue}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}signal\mbox{]}}}}
\label{class_network_discovery_aea9048c6f308e703fb403e45b9649fce}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_network_discovery_aea9048c6f308e703fb403e45b9649fce_icgraph}
\end{center}
\end{figure}


\hypertarget{class_network_discovery_a3d9ea4838405d593280c527c90a401d4}{
\index{NetworkDiscovery@{NetworkDiscovery}!checkConnectivity@{checkConnectivity}}
\index{checkConnectivity@{checkConnectivity}!NetworkDiscovery@{NetworkDiscovery}}
\subsubsection[{checkConnectivity}]{\setlength{\rightskip}{0pt plus 5cm}bool NetworkDiscovery::checkConnectivity (
\begin{DoxyParamCaption}
\item[{QString}]{ifName}
\end{DoxyParamCaption}
)}}
\label{class_network_discovery_a3d9ea4838405d593280c527c90a401d4}
checks the connectivity. tries to open a TCP connection to the server (see \_\-serverIp). For this it adjusts the routing table. (sets the gateway of the interface as default gateway) Gateway is written into the dhcpcd config file of this interface. (see DEFAULT\_\-INTERFACE\_\-CONF\_\-LOCATION \char`\"{}/var/tmp/conf\_\-\char`\"{})


\begin{DoxyParams}{Parameters}
{\em ifName} & name of a interface.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true: connection is possible false: connection not possible 
\end{DoxyReturn}


Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_network_discovery_a3d9ea4838405d593280c527c90a401d4_cgraph}
\end{center}
\end{figure}




Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_network_discovery_a3d9ea4838405d593280c527c90a401d4_icgraph}
\end{center}
\end{figure}


\hypertarget{class_network_discovery_a192628e526888293c2cbd3f40bb86b9c}{
\index{NetworkDiscovery@{NetworkDiscovery}!checkConnectivityViaTcp@{checkConnectivityViaTcp}}
\index{checkConnectivityViaTcp@{checkConnectivityViaTcp}!NetworkDiscovery@{NetworkDiscovery}}
\subsubsection[{checkConnectivityViaTcp}]{\setlength{\rightskip}{0pt plus 5cm}bool NetworkDiscovery::checkConnectivityViaTcp (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{class_network_discovery_a192628e526888293c2cbd3f40bb86b9c}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_network_discovery_a192628e526888293c2cbd3f40bb86b9c_icgraph}
\end{center}
\end{figure}


\hypertarget{class_network_discovery_a8e48da2ad10414defff044072185e1a3}{
\index{NetworkDiscovery@{NetworkDiscovery}!checkForIsRunning@{checkForIsRunning}}
\index{checkForIsRunning@{checkForIsRunning}!NetworkDiscovery@{NetworkDiscovery}}
\subsubsection[{checkForIsRunning}]{\setlength{\rightskip}{0pt plus 5cm}void NetworkDiscovery::checkForIsRunning (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}slot\mbox{]}}}}
\label{class_network_discovery_a8e48da2ad10414defff044072185e1a3}
only called if autoUp == true. check the IsRunning flag of each interface in the \_\-ifDownList. connected to the timeout signal of the timer. 

Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_network_discovery_a8e48da2ad10414defff044072185e1a3_cgraph}
\end{center}
\end{figure}


\hypertarget{class_network_discovery_a4d2cfc0508510f707597ad509fced2d3}{
\index{NetworkDiscovery@{NetworkDiscovery}!connectionEstablished@{connectionEstablished}}
\index{connectionEstablished@{connectionEstablished}!NetworkDiscovery@{NetworkDiscovery}}
\subsubsection[{connectionEstablished}]{\setlength{\rightskip}{0pt plus 5cm}void NetworkDiscovery::connectionEstablished (
\begin{DoxyParamCaption}
\item[{QString}]{ifName}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}signal\mbox{]}}}}
\label{class_network_discovery_a4d2cfc0508510f707597ad509fced2d3}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_network_discovery_a4d2cfc0508510f707597ad509fced2d3_icgraph}
\end{center}
\end{figure}


\hypertarget{class_network_discovery_a32e2855d7c71af9d3ebec8583fa84642}{
\index{NetworkDiscovery@{NetworkDiscovery}!continueBoot@{continueBoot}}
\index{continueBoot@{continueBoot}!NetworkDiscovery@{NetworkDiscovery}}
\subsubsection[{continueBoot}]{\setlength{\rightskip}{0pt plus 5cm}void NetworkDiscovery::continueBoot (
\begin{DoxyParamCaption}
\item[{QString}]{ifName}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}signal\mbox{]}}}}
\label{class_network_discovery_a32e2855d7c71af9d3ebec8583fa84642}
\hypertarget{class_network_discovery_a06fd0c6fa5e3a3ddae378824e15a11c8}{
\index{NetworkDiscovery@{NetworkDiscovery}!continueBootWithoutCheck@{continueBootWithoutCheck}}
\index{continueBootWithoutCheck@{continueBootWithoutCheck}!NetworkDiscovery@{NetworkDiscovery}}
\subsubsection[{continueBootWithoutCheck}]{\setlength{\rightskip}{0pt plus 5cm}void NetworkDiscovery::continueBootWithoutCheck (
\begin{DoxyParamCaption}
\item[{QString}]{ifName}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}signal\mbox{]}}}}
\label{class_network_discovery_a06fd0c6fa5e3a3ddae378824e15a11c8}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_network_discovery_a06fd0c6fa5e3a3ddae378824e15a11c8_icgraph}
\end{center}
\end{figure}


\hypertarget{class_network_discovery_ad6808c78ab6f0aa8d55a043036502699}{
\index{NetworkDiscovery@{NetworkDiscovery}!GetErrorStr@{GetErrorStr}}
\index{GetErrorStr@{GetErrorStr}!NetworkDiscovery@{NetworkDiscovery}}
\subsubsection[{GetErrorStr}]{\setlength{\rightskip}{0pt plus 5cm}QString NetworkDiscovery::GetErrorStr (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{class_network_discovery_ad6808c78ab6f0aa8d55a043036502699}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_network_discovery_ad6808c78ab6f0aa8d55a043036502699_icgraph}
\end{center}
\end{figure}


\hypertarget{class_network_discovery_a0b659e654a3a519663384ef001618446}{
\index{NetworkDiscovery@{NetworkDiscovery}!getGatewayForInterface@{getGatewayForInterface}}
\index{getGatewayForInterface@{getGatewayForInterface}!NetworkDiscovery@{NetworkDiscovery}}
\subsubsection[{getGatewayForInterface}]{\setlength{\rightskip}{0pt plus 5cm}QString NetworkDiscovery::getGatewayForInterface (
\begin{DoxyParamCaption}
\item[{QString}]{ifName}
\end{DoxyParamCaption}
)}}
\label{class_network_discovery_a0b659e654a3a519663384ef001618446}
returns the gateway address, written into the dhcp config file.


\begin{DoxyParams}{Parameters}
{\em ifName} & name of the interface.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
gateway address as string. or empty string if no interface config was found. 
\end{DoxyReturn}


Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_network_discovery_a0b659e654a3a519663384ef001618446_cgraph}
\end{center}
\end{figure}


\hypertarget{class_network_discovery_ab863df7ce4311ceba4f6a7f747f25ae3}{
\index{NetworkDiscovery@{NetworkDiscovery}!getInterfaceConfig@{getInterfaceConfig}}
\index{getInterfaceConfig@{getInterfaceConfig}!NetworkDiscovery@{NetworkDiscovery}}
\subsubsection[{getInterfaceConfig}]{\setlength{\rightskip}{0pt plus 5cm}QVariantMap NetworkDiscovery::getInterfaceConfig (
\begin{DoxyParamCaption}
\item[{QString}]{ifName}
\end{DoxyParamCaption}
)}}
\label{class_network_discovery_ab863df7ce4311ceba4f6a7f747f25ae3}


Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_network_discovery_ab863df7ce4311ceba4f6a7f747f25ae3_cgraph}
\end{center}
\end{figure}




Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_network_discovery_ab863df7ce4311ceba4f6a7f747f25ae3_icgraph}
\end{center}
\end{figure}


\hypertarget{class_network_discovery_a10568f7ba2530f4fe44ef1825b5222d6}{
\index{NetworkDiscovery@{NetworkDiscovery}!handleClientDisconnect@{handleClientDisconnect}}
\index{handleClientDisconnect@{handleClientDisconnect}!NetworkDiscovery@{NetworkDiscovery}}
\subsubsection[{handleClientDisconnect}]{\setlength{\rightskip}{0pt plus 5cm}void NetworkDiscovery::handleClientDisconnect (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}slot\mbox{]}}}}
\label{class_network_discovery_a10568f7ba2530f4fe44ef1825b5222d6}
called when a client disconnects. 

Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_network_discovery_a10568f7ba2530f4fe44ef1825b5222d6_cgraph}
\end{center}
\end{figure}




Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_network_discovery_a10568f7ba2530f4fe44ef1825b5222d6_icgraph}
\end{center}
\end{figure}


\hypertarget{class_network_discovery_a924c043d6f90d66eeef469f2917d377f}{
\index{NetworkDiscovery@{NetworkDiscovery}!handleNewConnection@{handleNewConnection}}
\index{handleNewConnection@{handleNewConnection}!NetworkDiscovery@{NetworkDiscovery}}
\subsubsection[{handleNewConnection}]{\setlength{\rightskip}{0pt plus 5cm}void NetworkDiscovery::handleNewConnection (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}slot\mbox{]}}}}
\label{class_network_discovery_a924c043d6f90d66eeef469f2917d377f}
connected to the new client arrived signal. connects the client readyRead signal with the handleNewInput slot. 

Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_network_discovery_a924c043d6f90d66eeef469f2917d377f_cgraph}
\end{center}
\end{figure}




Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_network_discovery_a924c043d6f90d66eeef469f2917d377f_icgraph}
\end{center}
\end{figure}


\hypertarget{class_network_discovery_a97c7fe67a7105d47b7494f0d27939010}{
\index{NetworkDiscovery@{NetworkDiscovery}!handleNewInput@{handleNewInput}}
\index{handleNewInput@{handleNewInput}!NetworkDiscovery@{NetworkDiscovery}}
\subsubsection[{handleNewInput}]{\setlength{\rightskip}{0pt plus 5cm}void NetworkDiscovery::handleNewInput (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}slot\mbox{]}}}}
\label{class_network_discovery_a97c7fe67a7105d47b7494f0d27939010}
This method is connected to the readyRead Signal of the QLocalSocket client. send an ACK to the client with every received message. 

Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_network_discovery_a97c7fe67a7105d47b7494f0d27939010_cgraph}
\end{center}
\end{figure}




Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_network_discovery_a97c7fe67a7105d47b7494f0d27939010_icgraph}
\end{center}
\end{figure}


\hypertarget{class_network_discovery_a8904e455a24735e772662b57f9602e1a}{
\index{NetworkDiscovery@{NetworkDiscovery}!handleNewInputLine@{handleNewInputLine}}
\index{handleNewInputLine@{handleNewInputLine}!NetworkDiscovery@{NetworkDiscovery}}
\subsubsection[{handleNewInputLine}]{\setlength{\rightskip}{0pt plus 5cm}void NetworkDiscovery::handleNewInputLine (
\begin{DoxyParamCaption}
\item[{QLocalSocket $\ast$}]{client, }
\item[{QString}]{data}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}slot\mbox{]}}}}
\label{class_network_discovery_a8904e455a24735e772662b57f9602e1a}
This Method processes the send messages.

This Method processes the send messages. It splits the line into several components. Those components are: interface: interface name ==$>$ indicates the process who send the message s\_\-state: is the number representation of syslog.h LOG levels s\_\-subState: is the number representation of the dhcp.c DHCP states (1 -\/ 8) plus the status. h states (9 -\/ ..) msg: is a message which can contain additional informations

According to the s\_\-state and s\_\-subState we emit the \hyperlink{class_network_discovery_aea9048c6f308e703fb403e45b9649fce}{changeProgressBarValue()} signal with different values.


\begin{DoxyParams}{Parameters}
{\em client} & the client who send the message\\
\hline
{\em data} & the message. (format $<$interfaceName$>$;$<$state$>$;$<$subState$>$;$<$msg$>$ ) \\
\hline
\end{DoxyParams}


Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_network_discovery_a8904e455a24735e772662b57f9602e1a_cgraph}
\end{center}
\end{figure}




Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_network_discovery_a8904e455a24735e772662b57f9602e1a_icgraph}
\end{center}
\end{figure}


\hypertarget{class_network_discovery_a177f49af5b6562480ad1029c7634accf}{
\index{NetworkDiscovery@{NetworkDiscovery}!handleProcessFinished@{handleProcessFinished}}
\index{handleProcessFinished@{handleProcessFinished}!NetworkDiscovery@{NetworkDiscovery}}
\subsubsection[{handleProcessFinished}]{\setlength{\rightskip}{0pt plus 5cm}void NetworkDiscovery::handleProcessFinished (
\begin{DoxyParamCaption}
\item[{int}]{exitCode, }
\item[{QProcess::ExitStatus}]{exitStatus}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}slot\mbox{]}}}}
\label{class_network_discovery_a177f49af5b6562480ad1029c7634accf}
This Method is called when a process is finished.

This Method is called when a process is finished. This slot is connected with the signal finished() of the QProcess class. If the process finishes, it will be checked if the process exited normal or if an unexpected error occurred. For this, we determine the sender (which is a QProcess), get the corresponding interface (which is stored in a map), and check the exitCode. Further actions are taken according to the exitCode check. Normal exit: emit changeProgressBar() to 100\% emit \hyperlink{class_network_discovery_a06538e99b8068c931f4291f706b81da6}{updateIfStatus()} to check connection \hyperlink{class_network_discovery_a3d9ea4838405d593280c527c90a401d4}{checkConnectivity()} \begin{DoxySeeAlso}{See also}
\hyperlink{class_network_discovery_a3d9ea4838405d593280c527c90a401d4}{NetworkDiscovery::checkConnectivity()} Unexpected exit: emit \hyperlink{class_network_discovery_a06538e99b8068c931f4291f706b81da6}{updateIfStatus()} to process exited unexpected
\end{DoxySeeAlso}

\begin{DoxyParams}{Parameters}
{\em exitCode} & \\
\hline
{\em exitStatus} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
bool returns true: if the interface name i starts with a letter in the blacklist.
\end{DoxyReturn}
returns false: else

\begin{DoxySeeAlso}{See also}
NetworkDiscovery::getListOfNetworkInterfaces() 
\end{DoxySeeAlso}


Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_network_discovery_a177f49af5b6562480ad1029c7634accf_cgraph}
\end{center}
\end{figure}


\hypertarget{class_network_discovery_aa159f567d54c046e3775e7489b5bba80}{
\index{NetworkDiscovery@{NetworkDiscovery}!handleProcessStarted@{handleProcessStarted}}
\index{handleProcessStarted@{handleProcessStarted}!NetworkDiscovery@{NetworkDiscovery}}
\subsubsection[{handleProcessStarted}]{\setlength{\rightskip}{0pt plus 5cm}void NetworkDiscovery::handleProcessStarted (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}slot\mbox{]}}}}
\label{class_network_discovery_aa159f567d54c046e3775e7489b5bba80}
This Method is called when a process is started.

This Method is called when a process is started. It prints the message: \char`\"{}process started for interface: $<$interfaceName$>$\char`\"{}. \hypertarget{class_network_discovery_a1f59948503efa95c22ba18e3281d21e5}{
\index{NetworkDiscovery@{NetworkDiscovery}!initAndRun@{initAndRun}}
\index{initAndRun@{initAndRun}!NetworkDiscovery@{NetworkDiscovery}}
\subsubsection[{initAndRun}]{\setlength{\rightskip}{0pt plus 5cm}void NetworkDiscovery::initAndRun (
\begin{DoxyParamCaption}
\item[{QString}]{serverIp, }
\item[{bool}]{userChoice, }
\item[{bool}]{autoUp, }
\item[{QString}]{pathToLogFile, }
\item[{QString}]{serverPath = {\ttfamily DEFAULT\_\-QTSOCKETADDRESS}, }
\item[{QString}]{pathToExe = {\ttfamily DEFAULT\_\-PATHTODHCPCDEXE}, }
\item[{QStringList $\ast$}]{args = {\ttfamily NULL}}
\end{DoxyParamCaption}
)}}
\label{class_network_discovery_a1f59948503efa95c22ba18e3281d21e5}
initialize all important class members and start the main work.


\begin{DoxyParams}{Parameters}
{\em serverIp} & the ip of the server with which we are testing the connectivity.\\
\hline
{\em userChoice} & true if the user wishes to have a user choice. true: the chooseInterfaceDialog will be showed.\\
\hline
{\em autoUp} & true if we want to \char`\"{}auto Up\char`\"{} all down interfaces.\\
\hline
{\em pathToLogFile} & the path to the log file.\\
\hline
{\em serverPath} & the path to the server socket (default value: DEFAULT\_\-QTSOCKETADDRESS \char`\"{}/var/tmp/qt\_\-c\_\-socket\_\-default\char`\"{})\\
\hline
{\em pathToExe} & the path to the customdhcpcd exe. (default value: \#define DEFAULT\_\-QTSOCKETADDRESS \char`\"{}/var/tmp/qt\_\-c\_\-socket\_\-default\char`\"{})\\
\hline
{\em args} & additional arguments for the customdhcpcd client. (default value: NULL) \\
\hline
\end{DoxyParams}


Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_network_discovery_a1f59948503efa95c22ba18e3281d21e5_cgraph}
\end{center}
\end{figure}




Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_network_discovery_a1f59948503efa95c22ba18e3281d21e5_icgraph}
\end{center}
\end{figure}


\hypertarget{class_network_discovery_a48d4d370e393015c7b419460b3e4c2ac}{
\index{NetworkDiscovery@{NetworkDiscovery}!ip4\_\-replaceDefaultRoute@{ip4\_\-replaceDefaultRoute}}
\index{ip4\_\-replaceDefaultRoute@{ip4\_\-replaceDefaultRoute}!NetworkDiscovery@{NetworkDiscovery}}
\subsubsection[{ip4\_\-replaceDefaultRoute}]{\setlength{\rightskip}{0pt plus 5cm}int NetworkDiscovery::ip4\_\-replaceDefaultRoute (
\begin{DoxyParamCaption}
\item[{QString}]{ifName, }
\item[{QString}]{gateway, }
\item[{int}]{mss}
\end{DoxyParamCaption}
)}}
\label{class_network_discovery_a48d4d370e393015c7b419460b3e4c2ac}
replace the default route. sets af automatically to AF\_\-INET


\begin{DoxyParams}{Parameters}
{\em ifName} & interface name\\
\hline
{\em gateway} & gateway address\\
\hline
{\em mss} & mss value (i think this is the metric. in most cases this value is 0) \\
\hline
\end{DoxyParams}


Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_network_discovery_a48d4d370e393015c7b419460b3e4c2ac_cgraph}
\end{center}
\end{figure}


\hypertarget{class_network_discovery_ab10e785b28cd3509d62c66f1b270102a}{
\index{NetworkDiscovery@{NetworkDiscovery}!ip4\_\-setManualConfiguration@{ip4\_\-setManualConfiguration}}
\index{ip4\_\-setManualConfiguration@{ip4\_\-setManualConfiguration}!NetworkDiscovery@{NetworkDiscovery}}
\subsubsection[{ip4\_\-setManualConfiguration}]{\setlength{\rightskip}{0pt plus 5cm}int NetworkDiscovery::ip4\_\-setManualConfiguration (
\begin{DoxyParamCaption}
\item[{QVariantMap}]{result}
\end{DoxyParamCaption}
)}}
\label{class_network_discovery_ab10e785b28cd3509d62c66f1b270102a}
replace the dhcp configuration with the manual config, entered by the user. if we can not establish a connection with the entered values, reset to the old dhcp values.


\begin{DoxyParams}{Parameters}
{\em result} & a json object formated string.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 if everything ok 
\end{DoxyReturn}


Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_network_discovery_ab10e785b28cd3509d62c66f1b270102a_cgraph}
\end{center}
\end{figure}




Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_network_discovery_ab10e785b28cd3509d62c66f1b270102a_icgraph}
\end{center}
\end{figure}


\hypertarget{class_network_discovery_a467e2649b80aa7628c7b8a7bdd0be4f0}{
\index{NetworkDiscovery@{NetworkDiscovery}!prepareTryAgain@{prepareTryAgain}}
\index{prepareTryAgain@{prepareTryAgain}!NetworkDiscovery@{NetworkDiscovery}}
\subsubsection[{prepareTryAgain}]{\setlength{\rightskip}{0pt plus 5cm}void NetworkDiscovery::prepareTryAgain (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{class_network_discovery_a467e2649b80aa7628c7b8a7bdd0be4f0}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_network_discovery_a467e2649b80aa7628c7b8a7bdd0be4f0_icgraph}
\end{center}
\end{figure}


\hypertarget{class_network_discovery_a06270b66a54222683243055594af8e6d}{
\index{NetworkDiscovery@{NetworkDiscovery}!readLogFile@{readLogFile}}
\index{readLogFile@{readLogFile}!NetworkDiscovery@{NetworkDiscovery}}
\subsubsection[{readLogFile}]{\setlength{\rightskip}{0pt plus 5cm}QString NetworkDiscovery::readLogFile (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{class_network_discovery_a06270b66a54222683243055594af8e6d}
reads the log file.

\begin{DoxyReturn}{Returns}
the log file as one string. 
\end{DoxyReturn}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=366pt]{class_network_discovery_a06270b66a54222683243055594af8e6d_icgraph}
\end{center}
\end{figure}


\hypertarget{class_network_discovery_abadea517ae1d1532b1f403e179297a6e}{
\index{NetworkDiscovery@{NetworkDiscovery}!readyForRun@{readyForRun}}
\index{readyForRun@{readyForRun}!NetworkDiscovery@{NetworkDiscovery}}
\subsubsection[{readyForRun}]{\setlength{\rightskip}{0pt plus 5cm}void NetworkDiscovery::readyForRun (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}signal\mbox{]}}}}
\label{class_network_discovery_abadea517ae1d1532b1f403e179297a6e}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_network_discovery_abadea517ae1d1532b1f403e179297a6e_icgraph}
\end{center}
\end{figure}


\hypertarget{class_network_discovery_a9b0d8c83cd1f5772eca77a76a66d2fa1}{
\index{NetworkDiscovery@{NetworkDiscovery}!setManualConfInterfaces@{setManualConfInterfaces}}
\index{setManualConfInterfaces@{setManualConfInterfaces}!NetworkDiscovery@{NetworkDiscovery}}
\subsubsection[{setManualConfInterfaces}]{\setlength{\rightskip}{0pt plus 5cm}void NetworkDiscovery::setManualConfInterfaces (
\begin{DoxyParamCaption}
\item[{QString}]{jsonArr}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}signal\mbox{]}}}}
\label{class_network_discovery_a9b0d8c83cd1f5772eca77a76a66d2fa1}
\hypertarget{class_network_discovery_a577a6a5ab12695f99f275aaec06e00ed}{
\index{NetworkDiscovery@{NetworkDiscovery}!slotReadyForRun@{slotReadyForRun}}
\index{slotReadyForRun@{slotReadyForRun}!NetworkDiscovery@{NetworkDiscovery}}
\subsubsection[{slotReadyForRun}]{\setlength{\rightskip}{0pt plus 5cm}void NetworkDiscovery::slotReadyForRun (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}slot\mbox{]}}}}
\label{class_network_discovery_a577a6a5ab12695f99f275aaec06e00ed}
emits the addInterface signal for each interface name in \_\-ifUpList and calls the runDHCPCD method. if the \_\-ifUpList is empty, this method emits an abortBoot signal. connected to the readyForRun signal. 

Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_network_discovery_a577a6a5ab12695f99f275aaec06e00ed_cgraph}
\end{center}
\end{figure}




Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_network_discovery_a577a6a5ab12695f99f275aaec06e00ed_icgraph}
\end{center}
\end{figure}


\hypertarget{class_network_discovery_aef5c609b5a1e3db85c6b99e44611acd3}{
\index{NetworkDiscovery@{NetworkDiscovery}!tryAgain@{tryAgain}}
\index{tryAgain@{tryAgain}!NetworkDiscovery@{NetworkDiscovery}}
\subsubsection[{tryAgain}]{\setlength{\rightskip}{0pt plus 5cm}void NetworkDiscovery::tryAgain (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{class_network_discovery_aef5c609b5a1e3db85c6b99e44611acd3}


Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_network_discovery_aef5c609b5a1e3db85c6b99e44611acd3_cgraph}
\end{center}
\end{figure}


\hypertarget{class_network_discovery_a06538e99b8068c931f4291f706b81da6}{
\index{NetworkDiscovery@{NetworkDiscovery}!updateIfStatus@{updateIfStatus}}
\index{updateIfStatus@{updateIfStatus}!NetworkDiscovery@{NetworkDiscovery}}
\subsubsection[{updateIfStatus}]{\setlength{\rightskip}{0pt plus 5cm}void NetworkDiscovery::updateIfStatus (
\begin{DoxyParamCaption}
\item[{QString}]{ifName, }
\item[{QString}]{status}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}signal\mbox{]}}}}
\label{class_network_discovery_a06538e99b8068c931f4291f706b81da6}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_network_discovery_a06538e99b8068c931f4291f706b81da6_icgraph}
\end{center}
\end{figure}


\hypertarget{class_network_discovery_ae5b592be793529c8a4ff23bdd8aed9a4}{
\index{NetworkDiscovery@{NetworkDiscovery}!updateStatus@{updateStatus}}
\index{updateStatus@{updateStatus}!NetworkDiscovery@{NetworkDiscovery}}
\subsubsection[{updateStatus}]{\setlength{\rightskip}{0pt plus 5cm}void NetworkDiscovery::updateStatus (
\begin{DoxyParamCaption}
\item[{QString}]{status}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}signal\mbox{]}}}}
\label{class_network_discovery_ae5b592be793529c8a4ff23bdd8aed9a4}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_network_discovery_ae5b592be793529c8a4ff23bdd8aed9a4_icgraph}
\end{center}
\end{figure}




The documentation for this class was generated from the following files:\begin{DoxyCompactItemize}
\item 
/home/niklas/workspace/fbgui/src/\hyperlink{networkdiscovery_8h}{networkdiscovery.h}\item 
/home/niklas/workspace/fbgui/src/\hyperlink{networkdiscovery_8cpp}{networkdiscovery.cpp}\end{DoxyCompactItemize}
