MCPcopy Create free account
hub / github.com/PurpleI2P/i2pd / ShowNetworkStatus

Function ShowNetworkStatus

daemon/Daemon.cpp:483–519  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

481 }
482
483 static void ShowNetworkStatus (std::stringstream& s, RouterStatus status, bool testing, RouterError error)
484 {
485 switch (status)
486 {
487 case eRouterStatusOK: s << "OK"; break;
488 case eRouterStatusFirewalled: s << "FW"; break;
489 case eRouterStatusUnknown: s << "Unk"; break;
490 case eRouterStatusProxy: s << "Proxy"; break;
491 case eRouterStatusMesh: s << "Mesh"; break;
492 case eRouterStatusStan: s << "Stan"; break;
493 default: s << "Unk";
494 };
495 if (testing)
496 s << " (Test)";
497 if (error != eRouterErrorNone)
498 {
499 switch (error)
500 {
501 case eRouterErrorClockSkew:
502 s << " - " << tr("Clock skew");
503 break;
504 case eRouterErrorOffline:
505 s << " - " << tr("Offline");
506 break;
507 case eRouterErrorSymmetricNAT:
508 s << " - " << tr("Symmetric NAT");
509 break;
510 case eRouterErrorFullConeNAT:
511 s << " - " << tr("Full cone NAT");
512 break;
513 case eRouterErrorNoDescriptors:
514 s << " - " << tr("No Descriptors");
515 break;
516 default: ;
517 }
518 }
519 }
520
521 void PrintMainWindowText (std::stringstream& s)
522 {

Callers 1

PrintMainWindowTextFunction · 0.70

Calls 1

trFunction · 0.85

Tested by

no test coverage detected