preCICE
Loading...
Searching...
No Matches
src
utils
networking.cpp
Go to the documentation of this file.
1
#include "
utils/networking.hpp
"
2
3
namespace
precice::utils::networking
{
4
5
std::string
loopbackInterfaceName
()
6
{
7
#if defined(__linux__)
8
return
"lo"
;
9
#elif defined(__APPLE__) || defined(BSD)
10
return
"lo0"
;
11
#elif defined(_WIN32)
12
// Not required as we directly use the 127.0.0.1 under Windows
13
return
""
;
14
#else
15
#error "There is no loopback device defined for your OS. Please open an issue with a suggestion at https://github.com/precice/precice/issues"
16
#endif
17
}
18
19
}
// namespace precice::utils::networking
precice::utils::networking
Definition
networking.cpp:3
precice::utils::networking::loopbackInterfaceName
std::string loopbackInterfaceName()
Returns the name of the canonical loopback interface on this system.
Definition
networking.cpp:5
networking.hpp