summaryrefslogtreecommitdiffstats
path: root/doxygen/latex/class_network_discovery.tex
blob: 05ececd8ad2b38bf9477228da505cbbcfb52560b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
\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}